[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev Patch for high-intensity video
From: |
Gisle Vanem |
Subject: |
lynx-dev Patch for high-intensity video |
Date: |
Wed, 21 Jan 2004 16:17:43 +0100 |
This is a simple patch to allow more colors in djgpp version of
Lynx. Like emx, djgpp have a conio function to make the blinkbit
(0x80) enable high-intensity video giving bright background colors.
Enable it by e.g. "COLOR:7:white:brightred" hhich affects the
whereis text. Only tested with S-Lang.
Also a litte patch for 'init_ctrl_break'. Why should that be array of
char?
diff -H -B -u3 -w -r orig/src/lycurses.c src/lycurses.c
--- orig/src/lycurses.c Mon Jan 19 13:16:02 2004
+++ src/lycurses.c Wed Jan 21 14:20:04 2004
@@ -38,6 +38,13 @@
#include <wchar.h>
#endif
+#if defined(__DJGPP__)
+ /* This is in <conio.h>, but don't include it because of clashes
+ * with gettext in libintl.h
+ */
+ extern int intensevideo (void);
+#endif
+
#if defined(COLOR_CURSES)
int lynx_has_color = FALSE;
#endif
@@ -1150,10 +1157,15 @@
LYclear();
#endif
-#if defined(USE_BLINK) && defined(__EMX__)
+#if defined(USE_BLINK)
+#if defined(__EMX__)
if (term_blink_is_boldbg) /* Now actually make it so! */
make_blink_boldbg();
+#elif defined(__DJGPP__)
+ if (term_blink_is_boldbg)
+ intensevideo();
#endif
+#endif /* USE_BLINK */
LYCursesON = TRUE;
#if defined(PDCURSES) && defined(PDC_BUILD) && PDC_BUILD >= 2401
diff -H -B -u3 -w -r orig/src/lymain.c src/lymain.c
--- orig/src/lymain.c Thu Jan 8 03:03:08 2004
+++ src/lymain.c Wed Jan 21 15:57:24 2004
@@ -76,7 +76,7 @@
#endif /* IGNORE_CTRL_C */
#ifdef __DJGPP__
-PRIVATE char init_ctrl_break[1];
+PRIVATE int init_ctrl_break;
#endif /* __DJGPP__ */
#if USE_VMS_MAILER
@@ -326,7 +325,7 @@
#endif
#ifdef USE_BLINK
-# ifdef __EMX__
+# if defined(__EMX__) || defined(__DJGPP__)
PUBLIC BOOLEAN term_blink_is_boldbg = TRUE;
# else
PUBLIC BOOLEAN term_blink_is_boldbg = FALSE;
@@ -606,7 +605,7 @@
PRIVATE void reset_break(void)
{
- LY_set_ctrl_break(init_ctrl_break[0]);
+ LY_set_ctrl_break(init_ctrl_break);
}
#endif /* __DJGPP__ */
@@ -1000,9 +999,10 @@
#ifdef __DJGPP__
if (LY_get_ctrl_break() == 0) {
LY_set_ctrl_break(TRUE);
- init_ctrl_break[0] = 0;
+ __djgpp_set_ctrl_c(FALSE); /* !! Added 20-04-2003 */
+ init_ctrl_break = 0;
} else {
- init_ctrl_break[0] = 1;
+ init_ctrl_break = 1;
}
__djgpp_set_sigquit_key(0x082D); /* Bind ALT-X to SIGQUIT */
signal(SIGQUIT, cleanup_sig);
----------
Gisle V.
# rm /bin/laden
/bin/laden: Not found
; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden
- lynx-dev Patch for high-intensity video,
Gisle Vanem <=