diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/LYCurses.c | 29 | ||||
-rw-r--r-- | src/LYCurses.h | 17 | ||||
-rw-r--r-- | src/LYUtils.c | 6 | ||||
-rw-r--r-- | src/makefile.in | 21 |
4 files changed, 43 insertions, 30 deletions
diff --git a/src/LYCurses.c b/src/LYCurses.c index 805127cc..ffffcb1c 100644 --- a/src/LYCurses.c +++ b/src/LYCurses.c @@ -46,13 +46,12 @@ int has_color = 0; PRIVATE int dumbterm PARAMS((char *terminal)); BOOLEAN LYCursesON = FALSE; -#if USE_COLOR_TABLE || USE_SLANG +#if USE_COLOR_TABLE || defined(USE_SLANG) PRIVATE int Current_Attr; #endif #ifdef USE_SLANG PUBLIC unsigned int Lynx_Color_Flags = 0; -PRIVATE int Current_Attr; PUBLIC BOOLEAN FullRefresh = FALSE; PUBLIC int curscr = 0; #ifdef SLANG_MBCS_HACK @@ -463,7 +462,7 @@ PRIVATE void lynx_map_color ARGS1(int, n) lynx_color_pairs[n+m+1].bg); } if (n == 0 && LYShowColor >= SHOW_COLOR_ON) - bkgd(COLOR_PAIR(9)); + bkgd(COLOR_PAIR(9) | ' '); } } @@ -518,7 +517,7 @@ PRIVATE void lynx_init_colors NOARGS lynx_color_pairs[n+m+1].bg); } if (n == 0 && LYShowColor >= SHOW_COLOR_ON) - bkgd(COLOR_PAIR(9)); + bkgd(COLOR_PAIR(9) | ' '); } } else if (LYShowColor != SHOW_COLOR_NEVER) { LYShowColor = SHOW_COLOR_OFF; @@ -676,6 +675,26 @@ PUBLIC void start_curses NOARGS #endif /* SIGTSTP */ exit (-1); } + + /* + * This is a workaround for a bug in SVr4 curses, observed on Solaris + * 2.4: if your terminal's alternate-character set contains codes in + * the range 128-255, they'll be sign-extended in the acs_map[] table, + * which in turn causes their values to be emitted as 255 (0xff). + * "Fix" this by forcing the table to 8-bit codes (it has to be + * anyway). + */ +#if defined(ALT_CHAR_SET) && !defined(NCURSES_VERSION) + { + int n; + for (n = 0; n < 128; n++) + if (acs_map[n] & 0x80) { + acs_map[n] &= 0xff; + acs_map[n] |= A_ALTCHARSET; + } + } +#endif + #ifdef USE_COLOR_STYLE has_color = has_colors(); if (has_color) @@ -760,7 +779,7 @@ PUBLIC void stop_curses NOARGS #ifdef DJGPP sock_exit(); #endif -#if defined (DOSPATH) && !defined (USE_SLANG) +#if defined (DOSPATH) && !defined(USE_SLANG) clrscr(); #else diff --git a/src/LYCurses.h b/src/LYCurses.h index 2c9d61c8..4a889faa 100644 --- a/src/LYCurses.h +++ b/src/LYCurses.h @@ -110,23 +110,6 @@ extern void LYsubwindow PARAMS((WINDOW * param)); #define BOXHORI '*' /* character for popup window horizontal borders */ #endif -#if defined(BROKEN_CURSES_8BIT_ACS) && defined(ALT_CHAR_SET) -#define FIX_ACS(cht_acs) ((cht_acs & 0x80) ? ((cht_acs & 0xff) | A_ALTCHARSET) : cht_acs) -#ifdef box -#undef box -#endif -#define box(win,verch,horch) \ - wborder(win,\ - FIX_ACS((verch ? verch : ACS_VLINE)),\ - FIX_ACS((verch ? verch : ACS_VLINE)),\ - FIX_ACS((horch ? horch : ACS_HLINE)),\ - FIX_ACS((horch ? horch : ACS_HLINE)),\ - FIX_ACS(ACS_ULCORNER),\ - FIX_ACS(ACS_URCORNER),\ - FIX_ACS(ACS_LLCORNER),\ - FIX_ACS(ACS_LRCORNER)) -#endif /* BROKEN_CURSES_8BIT_ACS */ - extern int LYlines; /* replaces LINES */ extern int LYcols; /* replaces COLS */ diff --git a/src/LYUtils.c b/src/LYUtils.c index 2777eeb2..8073ac04 100644 --- a/src/LYUtils.c +++ b/src/LYUtils.c @@ -1893,9 +1893,11 @@ PUBLIC void statusline ARGS1( int a=(strncmp(buffer, "Alert", 5) || !hashStyles[s_alert].name ? s_status : s_alert); LynxChangeStyle (a, ABS_ON, 1); addstr(buffer); - wbkgdset(stdscr, has_color ? hashStyles[a].color : hashStyles[a].mono); + wbkgdset(stdscr, (has_color + ? hashStyles[a].color + : hashStyles[a].mono) | ' '); clrtoeol(); - wbkgdset(stdscr, hashStyles[s_normal].color); + wbkgdset(stdscr, hashStyles[s_normal].color | ' '); LynxChangeStyle (a, ABS_OFF, 0); } #endif diff --git a/src/makefile.in b/src/makefile.in index 8b2a14db..773fb6bf 100644 --- a/src/makefile.in +++ b/src/makefile.in @@ -8,14 +8,23 @@ exec_prefix = @exec_prefix@ srcdir = @srcdir@ VPATH = $(srcdir) -WWWINC = WWW/Library/Implementation -SITE_DEFS = # FIXME: set in parent makefile MCFLAGS = # FIXME: set in parent makefile +RESOLVLIB = # FIXME: set in parent makefile +SITE_DEFS = # FIXME: set in parent makefile +SITE_LIBS = # FIXME: set in parent makefile +SOCKSLIB = # FIXME: set in parent makefile +WAISLIB = # FIXME: set in parent makefile + +WWWINC = WWW/Library/Implementation +WWWLIB = ../WWW/Library/unix/libwww.a CC = @CC@ CPPOPTS = @DEFS@ @CPPFLAGS@ -I.. -I../$(WWWINC) $(MCFLAGS) $(SITE_DEFS) CFLAGS = $(CPPOPTS) @CFLAGS@ +LIBS = @LIBS@ $(RESOLVLIB) $(WAISLIB) $(SOCKSLIB) $(SITE_LIBS) +LDFLAGS = @LDFLAGS@ + CHARTRANS_OBJS=UCdomap.o UCAux.o UCAuto.o OBJS= LYClean.o LYShowInfo.o LYEdit.o LYStrings.o \ LYMail.o HTAlert.o GridText.o LYGetFile.o \ @@ -33,7 +42,7 @@ all: lynx .c.o: @SHOW_CC@ - @ECHO_CC@$(CC) $(CPPOPTS) $(CFLAGS) -c $(srcdir)/$*.c + @ECHO_CC@$(CC) $(CFLAGS) -c $(srcdir)/$*.c .c.i: @SHOW_CC@ @@ -41,8 +50,8 @@ all: lynx lynx: message @EXTRA_DEPS@ $(OBJS) $(WWWLIB) @echo "Linking and creating Lynx executable" - $(CC) $(CFLAGS) -o lynx $(OBJS) $(WWWLIB) $(LIBS) - @echo "Copying Lynx executable into this directory" + $(CC) $(CFLAGS) $(LDFLAGS) -o lynx $(OBJS) $(WWWLIB) $(LIBS) + @echo "Copying Lynx executable into top-level directory" cp lynx .. @echo "Welcome to Lynx!" @@ -56,7 +65,7 @@ do_chartrans_stuff: CC="$(CC)" tables lint: - lint $(CPPFLAGS) *.c > ../lint.out + lint $(CPPOPTS) *.c > ../lint.out clean: rm -f lynx core *.[ob] |