diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/GridText.c | 56 | ||||
-rw-r--r-- | src/LYBookmark.c | 8 | ||||
-rw-r--r-- | src/LYCurses.c | 110 | ||||
-rw-r--r-- | src/LYCurses.h | 58 | ||||
-rw-r--r-- | src/LYGlobalDefs.h | 1 | ||||
-rw-r--r-- | src/LYLocal.c | 64 | ||||
-rw-r--r-- | src/LYMain.c | 5 | ||||
-rw-r--r-- | src/LYMainLoop.c | 4 | ||||
-rw-r--r-- | src/LYOptions.c | 88 | ||||
-rw-r--r-- | src/LYReadCFG.c | 1 | ||||
-rw-r--r-- | src/LYUtils.c | 4 | ||||
-rw-r--r-- | src/LYrcFile.c | 1 | ||||
-rw-r--r-- | src/LYrcFile.h | 1 | ||||
-rw-r--r-- | src/chrtrans/makefile.dos | 7 | ||||
-rw-r--r-- | src/chrtrans/makeuctb.c | 1 | ||||
-rw-r--r-- | src/makefile.dos | 11 | ||||
-rw-r--r-- | src/makefile.dsl | 23 |
17 files changed, 251 insertions, 192 deletions
diff --git a/src/GridText.c b/src/GridText.c index 614275fb..a9a073e1 100644 --- a/src/GridText.c +++ b/src/GridText.c @@ -1384,8 +1384,8 @@ PRIVATE int display_line ARGS4( if (!cp_tgt || i_start_tgt != i) { LYstopTargetEmphasis(); intarget = NO; - if (inbold) start_bold(); - if (inunderline) start_underline(); + if (inbold) lynx_start_bold(); + if (inunderline) lynx_start_underline(); } } } @@ -1416,11 +1416,11 @@ PRIVATE int display_line ARGS4( if (!intarget) { #if defined(PDCURSES) if (LYShowColor == SHOW_COLOR_NEVER) - start_bold(); + lynx_start_bold(); else - start_underline(); + lynx_start_underline(); #else - start_underline(); + lynx_start_underline(); #endif /* PDCURSES */ } } @@ -1435,11 +1435,11 @@ PRIVATE int display_line ARGS4( if (!intarget) { #if defined(PDCURSES) if (LYShowColor == SHOW_COLOR_NEVER) - stop_bold(); + lynx_stop_bold(); else - stop_underline(); + lynx_stop_underline(); #else - stop_underline(); + lynx_stop_underline(); #endif /* PDCURSES */ } } @@ -1448,13 +1448,13 @@ PRIVATE int display_line ARGS4( case LY_BOLD_START_CHAR: inbold = YES; if (!intarget) - start_bold(); + lynx_start_bold(); break; case LY_BOLD_END_CHAR: inbold = NO; if (!intarget) - stop_bold(); + lynx_stop_bold(); break; #endif @@ -1572,8 +1572,8 @@ after_while: #undef intarget #endif /* SHOW_WHEREIS_TARGETS && !USE_COLOR_STYLE */ #ifndef USE_COLOR_STYLE - stop_underline(); - stop_bold(); + lynx_stop_underline(); + lynx_stop_bold(); #else while (current_style < line->numstyles) { @@ -13201,7 +13201,7 @@ PRIVATE void redraw_part_of_line ARGS4( LYaddch('_'); i++; } else { - start_underline(); + lynx_start_underline(); } break; @@ -13210,16 +13210,16 @@ PRIVATE void redraw_part_of_line ARGS4( LYaddch('_'); i++; } else { - stop_underline(); + lynx_stop_underline(); } break; case LY_BOLD_START_CHAR: - start_bold(); + lynx_start_bold(); break; case LY_BOLD_END_CHAR: - stop_bold (); + lynx_stop_bold (); break; #endif @@ -13293,8 +13293,8 @@ PRIVATE void redraw_part_of_line ARGS4( } /* end of while */ #ifndef USE_COLOR_STYLE - stop_underline(); - stop_bold(); + lynx_stop_underline(); + lynx_stop_bold(); #else while (current_style < line->numstyles) @@ -13491,8 +13491,8 @@ PRIVATE void move_to_glyph ARGS10( #endif /* SHOW_WHEREIS_TARGETS */ { if (inunderline) inU = YES; - if (inunderline) stop_underline(); - if (inbold) stop_bold(); + if (inunderline) lynx_stop_underline(); + if (inbold) lynx_stop_bold(); lynx_start_link_color (flag, inU); } @@ -13548,8 +13548,8 @@ PRIVATE void move_to_glyph ARGS10( } } if (!incurlink) { - if (inbold) start_bold(); - if (inunderline) start_underline(); + if (inbold) lynx_start_bold(); + if (inunderline) lynx_start_underline(); } } } @@ -13581,25 +13581,25 @@ PRIVATE void move_to_glyph ARGS10( case LY_UNDERLINE_START_CHAR: if (!drawing || !incurlink) inunderline = YES; if (drawing && !intarget && !incurlink) - start_underline(); + lynx_start_underline(); break; case LY_UNDERLINE_END_CHAR: inunderline = NO; if (drawing && !intarget && !incurlink) - stop_underline(); + lynx_stop_underline(); break; case LY_BOLD_START_CHAR: if (!drawing || !incurlink) inbold = YES; if (drawing && !intarget && !incurlink) - start_bold(); + lynx_start_bold(); break; case LY_BOLD_END_CHAR: inbold = NO; if (drawing && !intarget && !incurlink) - stop_bold(); + lynx_stop_bold(); break; case LY_SOFT_NEWLINE: @@ -13720,9 +13720,9 @@ PRIVATE void move_to_glyph ARGS10( #endif /* SHOW_WHEREIS_TARGETS */ { if (inbold) - start_bold(); + lynx_start_bold(); if (inunderline) - start_underline(); + lynx_start_underline(); } } LYaddstr(buffer); diff --git a/src/LYBookmark.c b/src/LYBookmark.c index 256842f5..6f333c76 100644 --- a/src/LYBookmark.c +++ b/src/LYBookmark.c @@ -869,15 +869,15 @@ PUBLIC int select_menu_multi_bookmarks NOARGS if (MBM_screens > 1) { LYmove(LYlines-2, 0); LYaddstr("'"); - start_bold(); + lynx_start_bold(); LYaddstr("["); - stop_bold(); + lynx_stop_bold(); LYaddstr("' "); LYaddstr(PREVIOUS); LYaddstr(", '"); - start_bold(); + lynx_start_bold(); LYaddstr("]"); - stop_bold(); + lynx_stop_bold(); LYaddstr("' "); LYaddstr(NEXT_SCREEN); } diff --git a/src/LYCurses.c b/src/LYCurses.c index 40addf86..5058f989 100644 --- a/src/LYCurses.c +++ b/src/LYCurses.c @@ -1683,10 +1683,10 @@ PUBLIC void LYstartTargetEmphasis NOARGS } #endif #if defined(FANCY_CURSES) || defined(USE_SLANG) - start_bold(); - start_reverse(); + lynx_start_bold(); + lynx_start_reverse(); #endif /* FANCY_CURSES || USE_SLANG */ - start_underline(); + lynx_start_underline(); } PUBLIC void LYstopTargetEmphasis NOARGS @@ -1697,10 +1697,10 @@ PUBLIC void LYstopTargetEmphasis NOARGS return; } #endif - stop_underline(); + lynx_stop_underline(); #if defined(FANCY_CURSES) || defined(USE_SLANG) - stop_reverse(); - stop_bold(); + lynx_stop_reverse(); + lynx_stop_bold(); #endif /* FANCY_CURSES || USE_SLANG */ } @@ -2463,14 +2463,14 @@ PUBLIC void lynx_force_repaint NOARGS PUBLIC void lynx_start_title_color NOARGS { #ifdef SH_EX - start_reverse(); + lynx_start_reverse(); #endif } PUBLIC void lynx_stop_title_color NOARGS { #ifdef SH_EX - stop_reverse(); + lynx_stop_reverse(); #endif } @@ -2483,26 +2483,26 @@ PUBLIC void lynx_start_link_color ARGS2( * they can't handle two attributes at the * same time */ - /* start_bold(); */ - start_reverse(); + /* lynx_start_bold(); */ + lynx_start_reverse(); #if defined(USE_SLANG) #ifndef __DJGPP__ if (SLtt_Use_Ansi_Colors) #endif /* !__DJGPP__ */ - start_underline (); + lynx_start_underline (); #endif /* USE_SLANG */ #if defined(FANCY_CURSES) && defined(COLOR_CURSES) if (lynx_has_color && LYShowColor >= SHOW_COLOR_ON) - start_underline (); + lynx_start_underline (); #endif /* USE_SLANG */ } else { - start_bold(); + lynx_start_bold(); /* * Make sure when flag is OFF that "unhighlighted" links * will be underlined if appropriate. - LE & FM */ if (pending) - start_underline(); + lynx_start_underline(); } } @@ -2514,41 +2514,42 @@ PUBLIC void lynx_stop_link_color ARGS2( LynxChangeStyle(flag == ON ? s_alink : s_a, ABS_OFF); #else if (flag) { - stop_reverse(); + lynx_stop_reverse(); #if defined(USE_SLANG) #ifndef __DJGPP__ if (SLtt_Use_Ansi_Colors) #endif /* !__DJGPP__ */ - stop_underline (); + lynx_stop_underline (); #endif /* USE_SLANG */ #if defined(FANCY_CURSES) && defined(COLOR_CURSES) if (lynx_has_color && LYShowColor >= SHOW_COLOR_ON) - stop_underline (); + lynx_stop_underline (); #endif /* FANCY_CURSES && COLOR_CURSES */ } else { - stop_bold(); + lynx_stop_bold(); /* * If underlining was turned on above, turn it off. - LE & FM */ if (pending) - stop_underline(); + lynx_stop_underline(); } #endif } +/* FIXME: consider inlining these */ PUBLIC void lynx_stop_target_color NOARGS { - stop_underline(); - stop_reverse(); - stop_bold(); + lynx_stop_underline(); + lynx_stop_reverse(); + lynx_stop_bold(); } PUBLIC void lynx_start_target_color NOARGS { - start_bold(); - start_reverse(); - start_underline(); + lynx_start_bold(); + lynx_start_reverse(); + lynx_start_underline(); } @@ -2559,7 +2560,7 @@ PUBLIC void lynx_start_status_color NOARGS lynx_set_color (2); else #endif - start_reverse (); + lynx_start_reverse (); } PUBLIC void lynx_stop_status_color NOARGS @@ -2569,46 +2570,79 @@ PUBLIC void lynx_stop_status_color NOARGS lynx_set_color (0); else #endif - stop_reverse (); + lynx_stop_reverse (); } PUBLIC void lynx_start_h1_color NOARGS { if (bold_H1 || bold_headers) - start_bold(); + lynx_start_bold(); } PUBLIC void lynx_stop_h1_color NOARGS { if (bold_H1 || bold_headers) - stop_bold(); + lynx_stop_bold(); } PUBLIC void lynx_start_prompt_color NOARGS { - start_reverse (); + lynx_start_reverse (); } PUBLIC void lynx_stop_prompt_color NOARGS { - stop_reverse (); + lynx_stop_reverse (); } PUBLIC void lynx_start_radio_color NOARGS { - start_bold (); + lynx_start_bold (); } PUBLIC void lynx_stop_radio_color NOARGS { - stop_bold (); + lynx_stop_bold (); } PUBLIC void lynx_stop_all_colors NOARGS { - stop_underline (); - stop_reverse (); - stop_bold (); + lynx_stop_underline (); + lynx_stop_reverse (); + lynx_stop_bold (); +} + +/* + * Wrappers for LYUnderlineLinks flag. + */ +PUBLIC void lynx_start_bold NOARGS +{ + start_bold(); +} + +PUBLIC void lynx_start_reverse NOARGS +{ + start_reverse(); +} + +PUBLIC void lynx_start_underline NOARGS +{ + start_underline(); +} + +PUBLIC void lynx_stop_bold NOARGS +{ + stop_bold(); +} + +PUBLIC void lynx_stop_reverse NOARGS +{ + stop_reverse(); +} + +PUBLIC void lynx_stop_underline NOARGS +{ + stop_underline(); } /* @@ -2658,9 +2692,13 @@ PRIVATE void make_blink_boldbg NOARGS PUBLIC long LYgetattrs ARGS1(WINDOW *, win) { attr_t result = 0; +#if (defined(NCURSES_VERSION_MAJOR) && NCURSES_VERSION_MAJOR < 5) || !defined(NCURSES_MAJOR_VERSION) + result = getattrs(win); +#else short pair = 0; wattr_get(win, &result, &pair, NULL); +#endif return result; } #endif /* HAVE_WATTR_GET */ diff --git a/src/LYCurses.h b/src/LYCurses.h index e2943a24..6168667d 100644 --- a/src/LYCurses.h +++ b/src/LYCurses.h @@ -447,21 +447,12 @@ extern unsigned int Lynx_Color_Flags; #define SL_LYNX_USE_COLOR 1 #define SL_LYNX_OVERRIDE_COLOR 2 -#ifdef UNDERLINE_LINKS -#define start_bold() LYaddAttr(4) +#define start_bold() LYaddAttr(LYUnderlineLinks ? 4 : 1) #define start_reverse() LYaddAttr(2) -#define start_underline() LYaddAttr(1) -#define stop_bold() LYsubAttr(4) +#define start_underline() LYaddAttr(LYUnderlineLinks ? 1 : 4) +#define stop_bold() LYsubAttr(LYUnderlineLinks ? 4 : 1) #define stop_reverse() LYsubAttr(2) -#define stop_underline() LYsubAttr(1) -#else -#define start_bold() LYaddAttr(1) -#define start_reverse() LYaddAttr(2) -#define start_underline() LYaddAttr(4) -#define stop_bold() LYsubAttr(1) -#define stop_reverse() LYsubAttr(2) -#define stop_underline() LYsubAttr(4) -#endif +#define stop_underline() LYsubAttr(LYUnderlineLinks ? 1 : 4) #ifdef FANCY_CURSES #undef FANCY_CURSES @@ -533,17 +524,10 @@ extern void VTHome NOPARAMS; * add and subtract, respectively, the attributes * _UNDERLINE, _BOLD, _REVERSE, and _BLINK. - FM */ -#ifdef UNDERLINE_LINKS -#define start_bold() setattr(_UNDERLINE) -#define stop_bold() clrattr(_UNDERLINE) -#define start_underline() setattr(_BOLD) -#define stop_underline() clrattr(_BOLD) -#else /* not UNDERLINE_LINKS */ -#define start_bold() setattr(_BOLD) -#define stop_bold() clrattr(_BOLD) -#define start_underline() setattr(_UNDERLINE) -#define stop_underline() clrattr(_UNDERLINE) -#endif /* UNDERLINE_LINKS */ +#define start_bold() setattr(LYUnderlineLinks ? _UNDERLINE : _BOLD) +#define stop_bold() clrattr(LYUnderlineLinks ? _UNDERLINE : _BOLD) +#define start_underline() setattr(LYUnderlineLinks ? _BOLD : _UNDERLINE) +#define stop_underline() clrattr(LYUnderlineLinks ? _BOLD : _UNDERLINE) #define start_reverse() setattr(_REVERSE) #define wstart_reverse(w) wsetattr(w, _REVERSE) #define stop_reverse() clrattr(_REVERSE) @@ -577,21 +561,10 @@ extern int lynx_chg_color PARAMS((int, int, int)); #define LYsubWAttr(win,attr) wattroff(win,attr) #endif -#ifdef UNDERLINE_LINKS -#define start_bold() LYaddAttr(A_UNDERLINE) -#define stop_bold() LYsubAttr(A_UNDERLINE) -#define start_underline() LYaddAttr(A_BOLD) -#define stop_underline() LYsubAttr(A_BOLD) -#else /* not UNDERLINE_LINKS: */ -#define start_bold() LYaddAttr(A_BOLD) -#define stop_bold() LYsubAttr(A_BOLD) -#ifdef USE_COLOR_STYLE -#define start_underline() attron(A_UNDERLINE) /* allow combining - kw */ -#else -#define start_underline() LYaddAttr(A_UNDERLINE) -#endif /* USE_COLOR_STYLE */ -#define stop_underline() LYsubAttr(A_UNDERLINE) -#endif /* UNDERLINE_LINKS */ +#define start_bold() LYaddAttr(LYUnderlineLinks ? A_UNDERLINE : A_BOLD) +#define stop_bold() LYsubAttr(LYUnderlineLinks ? A_UNDERLINE : A_BOLD) +#define start_underline() LYaddAttr(LYUnderlineLinks ? A_BOLD : A_UNDERLINE) +#define stop_underline() LYsubAttr(LYUnderlineLinks ? A_BOLD : A_UNDERLINE) #if defined(SNAKE) && defined(HP_TERMINAL) #define start_reverse() LYaddWAttr(LYwin, A_DIM) @@ -711,6 +684,13 @@ extern void lynx_start_radio_color NOPARAMS; extern void lynx_stop_radio_color NOPARAMS; extern void lynx_stop_all_colors NOPARAMS; +extern void lynx_start_bold NOPARAMS; +extern void lynx_start_reverse NOPARAMS; +extern void lynx_start_underline NOPARAMS; +extern void lynx_stop_bold NOPARAMS; +extern void lynx_stop_reverse NOPARAMS; +extern void lynx_stop_underline NOPARAMS; + /* * To prevent corrupting binary data on DOS, MS-WINDOWS or OS/2 we open files * and stdout in BINARY mode by default. Where necessary we should open and diff --git a/src/LYGlobalDefs.h b/src/LYGlobalDefs.h index 9df42f62..e8cdcb5b 100644 --- a/src/LYGlobalDefs.h +++ b/src/LYGlobalDefs.h @@ -184,6 +184,7 @@ extern BOOLEAN LYJumpFileURL; /* URL from the jump file shortcuts? */ extern BOOLEAN LYNewsPosting; /* News posting supported if TRUE */ extern BOOLEAN LYShowCursor; /* Show the cursor or hide it? */ extern BOOLEAN LYShowTransferRate; +extern BOOLEAN LYUnderlineLinks; /* Show the links underlined vs bold */ extern BOOLEAN LYUseDefShoCur; /* Command line -show_cursor toggle */ extern BOOLEAN LYUserSpecifiedURL; /* URL from a goto or document? */ extern BOOLEAN LYfind_leaks; diff --git a/src/LYLocal.c b/src/LYLocal.c index 8d85d09e..65c20190 100644 --- a/src/LYLocal.c +++ b/src/LYLocal.c @@ -110,6 +110,7 @@ struct dired_menu { char *href; struct dired_menu *next; } defmenu[] = { + /* * The following initializations determine the contents of the f)ull menu * selection when in dired mode. If any menu entries are defined in the @@ -1165,10 +1166,10 @@ PRIVATE int remove_single ARGS1( /*** Course, it's probably broken for screen sizes other 80, too ***/ if (strlen(cp) < 37) { HTSprintf0(&tmpbuf, - gettext("Remove '%s' and all of its contents?"), cp); + gettext("Remove directory '%s'?"), cp); } else { HTSprintf0(&tmpbuf, - gettext("Remove directory and all of its contents?")); + gettext("Remove directory?")); } is_directory = TRUE; } else if (S_ISREG(dir_info.st_mode)) { @@ -1524,7 +1525,7 @@ PUBLIC void tagflag ARGS2( { if (nlinks > 0) { LYmove(links[cur].ly, 2); - stop_reverse(); + lynx_stop_reverse(); if (flag == ON) { LYaddch('+'); } else { @@ -1678,81 +1679,92 @@ PRIVATE char *build_command ARGS3( # ifndef ARCHIVE_ONLY # ifdef OK_GZIP if ((arg = match_op("UNTAR_GZ", line)) != 0) { -#define FMT_UNTAR_GZ "cd %s; %s -qdc %s | %s -xf -" +#define FMT_UNTAR_GZ "cd %s; %s -qdc %s | %s %s %s" if ((program = HTGetProgramPath(ppGZIP)) != NULL) { dirname = DirectoryOf(arg); HTAddParam(&buffer, FMT_UNTAR_GZ, 1, dirname); HTAddParam(&buffer, FMT_UNTAR_GZ, 2, program); HTAddParam(&buffer, FMT_UNTAR_GZ, 3, arg); HTAddParam(&buffer, FMT_UNTAR_GZ, 4, tar_path); - HTEndParam(&buffer, FMT_UNTAR_GZ, 4); + HTAddToCmd(&buffer, FMT_UNTAR_GZ, 5, TAR_DOWN_OPTIONS); + HTAddToCmd(&buffer, FMT_UNTAR_GZ, 6, TAR_PIPE_OPTIONS); + HTEndParam(&buffer, FMT_UNTAR_GZ, 6); } return buffer; } # endif /* OK_GZIP */ if ((arg = match_op("UNTAR_Z", line)) != 0) { -#define FMT_UNTAR_Z "cd %s; %s %s | %s -xf -" +#define FMT_UNTAR_Z "cd %s; %s %s | %s %s %s" if ((program = HTGetProgramPath(ppZCAT)) != NULL) { dirname = DirectoryOf(arg); HTAddParam(&buffer, FMT_UNTAR_Z, 1, dirname); HTAddParam(&buffer, FMT_UNTAR_Z, 2, program); HTAddParam(&buffer, FMT_UNTAR_Z, 3, arg); HTAddParam(&buffer, FMT_UNTAR_Z, 4, tar_path); - HTEndParam(&buffer, FMT_UNTAR_Z, 4); + HTAddToCmd(&buffer, FMT_UNTAR_Z, 5, TAR_DOWN_OPTIONS); + HTAddToCmd(&buffer, FMT_UNTAR_Z, 6, TAR_PIPE_OPTIONS); + HTEndParam(&buffer, FMT_UNTAR_Z, 6); } return buffer; } if ((arg = match_op("UNTAR", line)) != 0) { -#define FMT_UNTAR "cd %s; %s -xf %s" +#define FMT_UNTAR "cd %s; %s %s %s" dirname = DirectoryOf(arg); HTAddParam(&buffer, FMT_UNTAR, 1, dirname); HTAddParam(&buffer, FMT_UNTAR, 2, tar_path); - HTAddParam(&buffer, FMT_UNTAR, 3, arg); - HTEndParam(&buffer, FMT_UNTAR, 3); + HTAddToCmd(&buffer, FMT_UNTAR, 3, TAR_DOWN_OPTIONS); + HTAddParam(&buffer, FMT_UNTAR, 4, arg); + HTEndParam(&buffer, FMT_UNTAR, 4); return buffer; } # endif /* !ARCHIVE_ONLY */ # ifdef OK_GZIP if ((arg = match_op("TAR_GZ", line)) != 0) { -#define FMT_TAR_GZ "cd %s; %s -cf - %s | %s -qc >%s%s" +#define FMT_TAR_GZ "cd %s; %s %s %s %s | %s -qc >%s%s" if ((program = HTGetProgramPath(ppGZIP)) != NULL) { dirname = DirectoryOf(arg); HTAddParam(&buffer, FMT_TAR_GZ, 1, dirname); HTAddParam(&buffer, FMT_TAR_GZ, 2, tar_path); - HTAddParam(&buffer, FMT_TAR_GZ, 3, LYPathLeaf(arg)); - HTAddParam(&buffer, FMT_TAR_GZ, 4, program); - HTAddParam(&buffer, FMT_TAR_GZ, 5, LYonedot(LYPathLeaf(arg))); - HTAddParam(&buffer, FMT_TAR_GZ, 6, EXT_TAR_GZ); - HTEndParam(&buffer, FMT_TAR_GZ, 6); + HTAddToCmd(&buffer, FMT_TAR_GZ, 3, TAR_UP_OPTIONS); + HTAddToCmd(&buffer, FMT_TAR_GZ, 4, TAR_PIPE_OPTIONS); + HTAddParam(&buffer, FMT_TAR_GZ, 5, LYPathLeaf(arg)); + HTAddParam(&buffer, FMT_TAR_GZ, 6, program); + HTAddParam(&buffer, FMT_TAR_GZ, 7, LYonedot(LYPathLeaf(arg))); + HTAddParam(&buffer, FMT_TAR_GZ, 8, EXT_TAR_GZ); + HTEndParam(&buffer, FMT_TAR_GZ, 8); } return buffer; } # endif /* OK_GZIP */ if ((arg = match_op("TAR_Z", line)) != 0) { -#define FMT_TAR_Z "cd %s; %s -cf - %s | %s >%s%s" +#define FMT_TAR_Z "cd %s; %s %s %s %s | %s >%s%s" if ((program = HTGetProgramPath(ppCOMPRESS)) != NULL) { dirname = DirectoryOf(arg); HTAddParam(&buffer, FMT_TAR_Z, 1, dirname); HTAddParam(&buffer, FMT_TAR_Z, 2, tar_path); - HTAddParam(&buffer, FMT_TAR_Z, 3, LYPathLeaf(arg)); - HTAddParam(&buffer, FMT_TAR_Z, 4, program); - HTAddParam(&buffer, FMT_TAR_Z, 5, LYonedot(LYPathLeaf(arg))); - HTAddParam(&buffer, FMT_TAR_Z, 6, EXT_TAR_Z); - HTEndParam(&buffer, FMT_TAR_Z, 6); + HTAddToCmd(&buffer, FMT_TAR_Z, 3, TAR_UP_OPTIONS); + HTAddToCmd(&buffer, FMT_TAR_Z, 4, TAR_PIPE_OPTIONS); + HTAddParam(&buffer, FMT_TAR_Z, 5, LYPathLeaf(arg)); + HTAddParam(&buffer, FMT_TAR_Z, 6, program); + HTAddParam(&buffer, FMT_TAR_Z, 7, LYonedot(LYPathLeaf(arg))); + HTAddParam(&buffer, FMT_TAR_Z, 8, EXT_TAR_Z); + HTEndParam(&buffer, FMT_TAR_Z, 8); } return buffer; } if ((arg = match_op("TAR", line)) != 0) { -#define FMT_TAR "cd %s; %s -cf %s.tar %s" +#define FMT_TAR "cd %s; %s %s %s %s.tar %s" dirname = DirectoryOf(arg); HTAddParam(&buffer, FMT_TAR, 1, dirname); HTAddParam(&buffer, FMT_TAR, 2, tar_path); - HTAddParam(&buffer, FMT_TAR, 3, LYonedot(LYPathLeaf(arg))); - HTAddParam(&buffer, FMT_TAR, 4, LYPathLeaf(arg)); - HTEndParam(&buffer, FMT_TAR, 4); + HTAddToCmd(&buffer, FMT_TAR, 3, TAR_UP_OPTIONS); + HTAddToCmd(&buffer, FMT_TAR, 4, TAR_FILE_OPTIONS); + HTAddParam(&buffer, FMT_TAR, 5, LYonedot(LYPathLeaf(arg))); + HTAddParam(&buffer, FMT_TAR, 6, LYPathLeaf(arg)); + HTEndParam(&buffer, FMT_TAR, 6); return buffer; } } diff --git a/src/LYMain.c b/src/LYMain.c index fa8b4484..b85d70dc 100644 --- a/src/LYMain.c +++ b/src/LYMain.c @@ -171,6 +171,7 @@ PUBLIC BOOLEAN LYJumpFileURL = FALSE; /* always FALSE the first time */ PUBLIC BOOLEAN LYPermitURL = FALSE; PUBLIC BOOLEAN LYRestricted = FALSE; /* whether we have -anonymous option */ PUBLIC BOOLEAN LYShowCursor = SHOW_CURSOR; /* to show or not to show */ +PUBLIC BOOLEAN LYUnderlineLinks = UNDERLINE_LINKS; /* Show the links underlined vs bold */ PUBLIC BOOLEAN LYUseDefShoCur = TRUE; /* Command line -show_cursor toggle */ PUBLIC BOOLEAN LYUserSpecifiedURL = TRUE;/* always TRUE the first time */ PUBLIC BOOLEAN LYValidate = FALSE; @@ -3819,6 +3820,10 @@ treated '>' as a co-terminator for double-quotes and tags" "trim input text/textarea fields in forms" ), PARSE_SET( + "underline_links",4|TOGGLE_ARG, LYUnderlineLinks, + "toggles use of underline/bold attribute for links" + ), + PARSE_SET( "underscore", 4|TOGGLE_ARG, use_underscore, "toggles use of _underline_ format in dumps" ), diff --git a/src/LYMainLoop.c b/src/LYMainLoop.c index 77b64dd5..c8c759e0 100644 --- a/src/LYMainLoop.c +++ b/src/LYMainLoop.c @@ -7619,9 +7619,9 @@ PRIVATE void show_main_statusline ARGS2( if (is_www_index) { char *indx = gettext("-index-"); LYmove(LYlines-1, LYcols - strlen(indx) - 1); - start_reverse(); + lynx_start_reverse(); LYaddstr(indx); - stop_reverse(); + lynx_stop_reverse(); } } else if (user_mode == ADVANCED_MODE && nlinks > 0) { diff --git a/src/LYOptions.c b/src/LYOptions.c index 6bef4f79..8749a59a 100644 --- a/src/LYOptions.c +++ b/src/LYOptions.c @@ -230,18 +230,18 @@ PRIVATE void addlbl ARGS1(CONST char *, text) actual[d++] = text[s]; if (text[s] == LPAREN) { d = add_it(actual, d-1); - start_bold(); + lynx_start_bold(); b = TRUE; actual[d++] = text[s]; } else if (text[s] == RPAREN) { d = add_it(actual, d); - stop_bold(); + lynx_stop_bold(); b = FALSE; } } add_it(actual, d); if (b) - stop_bold(); + lynx_stop_bold(); } #if !defined(VMS) || defined(USE_SLANG) @@ -564,23 +564,23 @@ draw_options: LYmove(LYlines-3, 2); LYaddstr(SELECT_SEGMENT); - start_bold(); + lynx_start_bold(); LYaddstr(CAP_LETT_SEGMENT); - stop_bold(); + lynx_stop_bold(); LYaddstr(OF_OPT_LINE_SEGMENT); if (!no_option_save) { LYaddstr(" '"); - start_bold(); + lynx_start_bold(); LYaddstr(">"); - stop_bold(); + lynx_stop_bold(); LYaddstr("'"); LYaddstr(TO_SAVE_SEGMENT); } LYaddstr(OR_SEGMENT); LYaddstr("'"); - start_bold(); + lynx_start_bold(); LYaddstr("r"); - stop_bold(); + lynx_stop_bold(); LYaddstr("'"); LYaddstr(TO_RETURN_SEGMENT); @@ -622,10 +622,10 @@ draw_options: } _statusline(ACCEPT_DATA); LYmove(L_EDITOR, COL_OPTION_VALUES); - start_bold(); + lynx_start_bold(); ch = LYgetstr(display_option, VISIBLE, sizeof(display_option), NORECALL); - stop_bold(); + lynx_stop_bold(); LYmove(L_EDITOR, COL_OPTION_VALUES); if (term_options || ch == -1) { LYaddstr((editor && *editor) ? @@ -658,10 +658,10 @@ draw_options: } _statusline(ACCEPT_DATA); LYmove(L_DISPLAY, COL_OPTION_VALUES); - start_bold(); + lynx_start_bold(); ch = LYgetstr(display_option, VISIBLE, sizeof(display_option), NORECALL); - stop_bold(); + lynx_stop_bold(); LYmove(L_DISPLAY, COL_OPTION_VALUES); #ifdef VMS @@ -776,10 +776,10 @@ draw_options: } _statusline(ACCEPT_DATA); LYmove(L_HOME, C_DEFAULT); - start_bold(); + lynx_start_bold(); ch = LYgetstr(display_option, VISIBLE, sizeof(display_option), NORECALL); - stop_bold(); + lynx_stop_bold(); LYmove(L_HOME, C_DEFAULT); if (term_options || ch == -1 || *display_option == '\0') { @@ -843,10 +843,10 @@ draw_options: } _statusline(ACCEPT_DATA); LYmove(L_MAIL_ADDRESS, COL_OPTION_VALUES); - start_bold(); + lynx_start_bold(); ch = LYgetstr(display_option, VISIBLE, sizeof(display_option), NORECALL); - stop_bold(); + lynx_stop_bold(); LYmove(L_MAIL_ADDRESS, COL_OPTION_VALUES); if (term_options || ch == -1) { LYaddstr((personal_mail_address && @@ -1051,10 +1051,10 @@ draw_options: } _statusline(ACCEPT_DATA); LYmove(L_LANGUAGE, COL_OPTION_VALUES); - start_bold(); + lynx_start_bold(); ch = LYgetstr(display_option, VISIBLE, sizeof(display_option), NORECALL); - stop_bold(); + lynx_stop_bold(); LYmove(L_LANGUAGE, COL_OPTION_VALUES); if (term_options || ch == -1) { LYaddstr((language && *language) ? @@ -1086,10 +1086,10 @@ draw_options: } _statusline(ACCEPT_DATA); LYmove(L_PREF_CHARSET, COL_OPTION_VALUES); - start_bold(); + lynx_start_bold(); ch = LYgetstr(display_option, VISIBLE, sizeof(display_option), NORECALL); - stop_bold(); + lynx_stop_bold(); LYmove(L_PREF_CHARSET, COL_OPTION_VALUES); if (term_options || ch == -1) { LYaddstr((pref_charset && *pref_charset) ? @@ -1421,10 +1421,10 @@ draw_options: } _statusline(ACCEPT_DATA_OR_DEFAULT); LYmove(L_User_Agent, COL_OPTION_VALUES); - start_bold(); + lynx_start_bold(); ch = LYgetstr(display_option, VISIBLE, sizeof(display_option), NORECALL); - stop_bold(); + lynx_stop_bold(); LYmove(L_User_Agent, COL_OPTION_VALUES); if (term_options || ch == -1) { LYaddstr((LYUserAgent && @@ -1605,7 +1605,7 @@ PRIVATE int boolean_choice ARGS4( * Highlight the current choice. */ LYmove(line, col); - start_reverse(); + lynx_start_reverse(); show_choice(choices[cur_choice], width); if (LYShowCursor) LYmove(line, (col - 1)); @@ -1704,7 +1704,7 @@ PRIVATE int boolean_choice ARGS4( * Unhighlight choice. */ LYmove(line, col); - stop_reverse(); + lynx_stop_reverse(); show_choice(choices[cur_choice], width); if (term_options) { @@ -1820,15 +1820,15 @@ draw_bookmark_list: if (LYlines < MBM_V_MAXFILES + MULTI_OFFSET) { LYmove((LYlines - 4), 0); LYaddstr("'"); - start_bold(); + lynx_start_bold(); LYaddstr("["); - stop_bold(); + lynx_stop_bold(); LYaddstr("' "); LYaddstr(PREVIOUS); LYaddstr(", '"); - start_bold(); + lynx_start_bold(); LYaddstr("]"); - stop_bold(); + lynx_stop_bold(); LYaddstr("' "); LYaddstr(NEXT_SCREEN); } @@ -1836,17 +1836,17 @@ draw_bookmark_list: LYmove((LYlines - 3), 0); if (!no_option_save) { LYaddstr("'"); - start_bold(); + lynx_start_bold(); LYaddstr(">"); - stop_bold(); + lynx_stop_bold(); LYaddstr("'"); LYaddstr(TO_SAVE_SEGMENT); } LYaddstr(OR_SEGMENT); LYaddstr("'"); - start_bold(); + lynx_start_bold(); LYaddstr("^G"); - stop_bold(); + lynx_stop_bold(); LYaddstr("'"); LYaddstr(TO_RETURN_SEGMENT); @@ -1941,7 +1941,7 @@ draw_bookmark_list: _statusline(ACCEPT_DATA); if (a > 0) { - start_bold(); + lynx_start_bold(); if (LYlines < (MBM_V_MAXFILES + MULTI_OFFSET)) LYmove( (3 + a) - ((MBM_V_MAXFILES/2 + 1)*(MBM_current - 1)), @@ -1954,7 +1954,7 @@ draw_bookmark_list: sizeof(MBM_tmp_line) - 1); ch = LYgetstr(MBM_tmp_line, VISIBLE, sizeof(MBM_tmp_line), NORECALL); - stop_bold(); + lynx_stop_bold(); if (strlen(MBM_tmp_line) < 1) { FREE(MBM_A_subdescript[a]); @@ -1982,13 +1982,13 @@ draw_bookmark_list: LYmove((3 + a), 35); LYaddstr("| "); - start_bold(); + lynx_start_bold(); LYstrncpy(MBM_tmp_line, NonNull(MBM_A_subbookmark[a]), sizeof(MBM_tmp_line) - 1); ch = LYgetstr(MBM_tmp_line, VISIBLE, sizeof(MBM_tmp_line), NORECALL); - stop_bold(); + lynx_stop_bold(); if (*MBM_tmp_line == '\0') { if (a == 0) @@ -2174,6 +2174,8 @@ static OptValues show_color_values[] = { static char * show_cursor_string = RC_SHOW_CURSOR; +static char * underline_links_string = RC_UNDERLINE_LINKS; + #ifdef USE_SCROLLBAR static char * show_scrollbar_string = RC_SCROLLBAR; #endif @@ -2726,6 +2728,12 @@ PUBLIC int postoptions ARGS1( LYShowCursor = (BOOL) code; } + /* Underline links: ON/OFF */ + if (!strcmp(data[i].tag, underline_links_string) + && GetOptValues(bool_values, data[i].value, &code)) { + LYUnderlineLinks = (BOOL) code; + } + #ifdef USE_SCROLLBAR /* Show Scrollbar: ON/OFF */ if (!strcmp(data[i].tag, show_scrollbar_string) @@ -3507,6 +3515,12 @@ PRIVATE int gen_options ARGS1( PutOptValues(fp0, LYShowCursor, bool_values); EndSelect(fp0); + /* Underline links: ON/OFF */ + PutLabel(fp0, gettext("Underline links"), underline_links_string); + BeginSelect(fp0, underline_links_string); + PutOptValues(fp0, LYUnderlineLinks, bool_values); + EndSelect(fp0); + #ifdef USE_SCROLLBAR /* Show scrollbar: ON/OFF */ PutLabel(fp0, gettext("Show scrollbar"), show_scrollbar_string); diff --git a/src/LYReadCFG.c b/src/LYReadCFG.c index 195edf71..4a24a940 100644 --- a/src/LYReadCFG.c +++ b/src/LYReadCFG.c @@ -1505,6 +1505,7 @@ PRIVATE Config_Type Config_Table [] = PARSE_DEF(RC_TRUSTED_LYNXCGI, CGI_PATH), #endif PARSE_PRG(RC_UNCOMPRESS_PATH, ppUNCOMPRESS), + PARSE_SET(RC_UNDERLINE_LINKS, LYUnderlineLinks), PARSE_PRG(RC_UNZIP_PATH, ppUNZIP), #ifdef DIRED_SUPPORT PARSE_ADD(RC_UPLOADER, uploaders), diff --git a/src/LYUtils.c b/src/LYUtils.c index 813c273c..db5468ee 100644 --- a/src/LYUtils.c +++ b/src/LYUtils.c @@ -1449,7 +1449,7 @@ PUBLIC void noviceline ARGS1( return; LYmove(LYlines-2,0); - /* stop_reverse(); */ + /* lynx_stop_reverse(); */ LYclrtoeol(); LYaddstr(NOVICE_LINE_ONE); LYclrtoeol(); @@ -6008,7 +6008,7 @@ PUBLIC FILE *LYOpenTemp ARGS3( } if (make_it) { int old_mask = umask(HIDE_UMASK); - StrAllocCat(lynx_temp_space, "XXXXXX"); + StrAllocCat(lynx_temp_space, "XXXXXXXXXX"); if (mkdtemp(lynx_temp_space) == 0) { printf("%s: %s\n", lynx_temp_space, LYStrerror(errno)); exit(EXIT_FAILURE); diff --git a/src/LYrcFile.c b/src/LYrcFile.c index 65ba26c6..fca9852c 100644 --- a/src/LYrcFile.c +++ b/src/LYrcFile.c @@ -533,6 +533,7 @@ presented regardless of user mode.\n\ ")), MAYBE_FUN(RC_TAGSOUP, get_tagsoup, put_tagsoup, MSG_ENABLE_LYNXRC), + MAYBE_SET(RC_UNDERLINE_LINKS, LYUnderlineLinks, MSG_ENABLE_LYNXRC), PARSE_ENU(RC_USER_MODE, user_mode, tbl_user_mode, N_("\ user_mode specifies the users level of knowledge with Lynx. The\n\ default is \"NOVICE\" which displays two extra lines of help at the\n\ diff --git a/src/LYrcFile.h b/src/LYrcFile.h index e5ae4548..a60e5f40 100644 --- a/src/LYrcFile.h +++ b/src/LYrcFile.h @@ -212,6 +212,7 @@ #define RC_TRUSTED_EXEC "trusted_exec" #define RC_TRUSTED_LYNXCGI "trusted_lynxcgi" #define RC_UNCOMPRESS_PATH "uncompress_path" +#define RC_UNDERLINE_LINKS "underline_links" #define RC_UNZIP_PATH "unzip_path" #define RC_UPLOADER "uploader" #define RC_URL_DOMAIN_PREFIXES "url_domain_prefixes" diff --git a/src/chrtrans/makefile.dos b/src/chrtrans/makefile.dos index 1ee118c7..975561d9 100644 --- a/src/chrtrans/makefile.dos +++ b/src/chrtrans/makefile.dos @@ -12,11 +12,10 @@ CFLAGS = $(MCFLAGS) CC = gcc -MCFLAGS = -O2 -DDOSPATH -DNO_TTYTYP \ +MCFLAGS = -O2 -DDOSPATH \ -I. \ -I../../WWW/Library/Implementation \ --I/djgpp/watt32/inc \ --I/djgpp/watt32/inc/sys \ +-I/djgpp/watt32/inc -I../.. .SUFFIXES: .tbl @@ -99,7 +98,7 @@ cp866u_uni.h: cp866u_uni.tbl makeuctb.exe cp869_uni.h: cp869_uni.tbl makeuctb.exe def7_uni.h: def7_uni.tbl makeuctb.exe dmcs_uni.h: dmcs_uni.tbl makeuctb.exe -hp_uni.h: hp_uni.tbl makeuctb.exe +hp_uni.h: hp_uni.tbl makeuctb.exe iso01_uni.h: iso01_uni.tbl makeuctb.exe iso02_uni.h: iso02_uni.tbl makeuctb.exe iso03_uni.h: iso03_uni.tbl makeuctb.exe diff --git a/src/chrtrans/makeuctb.c b/src/chrtrans/makeuctb.c index 04d05234..d8003cb8 100644 --- a/src/chrtrans/makeuctb.c +++ b/src/chrtrans/makeuctb.c @@ -887,4 +887,5 @@ id_append, id_append, nuni, id_append, lowest_eight, RawOrEnc, CodePage); } done(EX_OK); + return 0; } diff --git a/src/makefile.dos b/src/makefile.dos index 6c574947..14ded8d3 100644 --- a/src/makefile.dos +++ b/src/makefile.dos @@ -9,7 +9,7 @@ LYLeaks.o LYexit.o LYJump.o LYList.o LYCgi.o LYTraversal.o \ LYEditmap.o LYCharSets.o LYCharUtils.o LYMap.o LYCookie.o LYExtern.o \ LYStyle.o LYHash.o LYPrettySrc.o TRSTable.o -CFLAGS= -O2 $(MCFLAGS) $(INTLFLAGS) -I. -I.. $(SLANGINC) +CFLAGS= -O2 $(MCFLAGS) $(INTLFLAGS) -I. -I.. # comment this line to suppress DIRED support DIRED_DEFS = \ @@ -21,8 +21,7 @@ DIRED_DEFS = \ -DOK_OVERRIDE # Use this option to enable optional and *experimental* color style. -#ENABLE_COLOR_STYLE = \ - -DUSE_COLOR_STYLE +#ENABLE_COLOR_STYLE = -DUSE_COLOR_STYLE CC = gcc @@ -48,14 +47,12 @@ MCFLAGS = \ -DUSE_FILE_UPLOAD \ -DUSE_PRETTYSRC \ -DUSE_ZLIB \ - -DWATT32 \ $(SSLFLAGS) \ $(SSLINC) \ -I./chrtrans \ -I../WWW/Library/Implementation \ -I/djgpp/pdcur26 \ - -I/djgpp/watt32/inc \ - -I/djgpp/watt32/inc/sys + -I/djgpp/watt32/inc WWWLIB = \ ../WWW/Library/djgpp/libwww.a \ @@ -67,7 +64,7 @@ LIBS= -L/djgpp/watt32/lib -lwatt -lz -lwmemu #INTLFLAGS = -DHAVE_GETTEXT -DHAVE_LIBINTL_H #INTLLIBS= -lintl -liconv -# Uncomment the followint to enable SSL. +# Uncomment the following to enable SSL. #SSLFLAGS = -DUSE_SSL #SSLLIB = -lssl -lcrypto #SSLINC = -I/djgpp/include/openssl diff --git a/src/makefile.dsl b/src/makefile.dsl index 1893b3ab..1af08539 100644 --- a/src/makefile.dsl +++ b/src/makefile.dsl @@ -9,7 +9,7 @@ LYLeaks.o LYexit.o LYJump.o LYList.o LYCgi.o LYTraversal.o \ LYEditmap.o LYCharSets.o LYCharUtils.o LYMap.o LYCookie.o LYExtern.o \ LYStyle.o LYHash.o LYPrettySrc.o TRSTable.o -CFLAGS= -O1 $(MCFLAGS) $(INTLFLAGS) -I. -I.. $(SLANGINC) +CFLAGS= -O2 $(MCFLAGS) $(INTLFLAGS) -I. -I.. $(SLANGINC) # comment this line to suppress DIRED support DIRED_DEFS = \ @@ -18,7 +18,7 @@ DIRED_DEFS = \ -DOK_TAR \ -DOK_GZIP \ -DOK_ZIP \ - -DOK_OVERRIDE + -DOK_OVERRIDE CC = gcc @@ -28,6 +28,7 @@ MCFLAGS = \ -DDISP_PARTIAL \ -DDJGPP_KEYHANDLER \ -DDOSPATH \ + -DHAVE_POPEN \ -DNOUSERS \ -DNO_CUSERID \ -DNO_TTYTYPE \ @@ -37,18 +38,26 @@ MCFLAGS = \ -DUSE_SLANG \ -DUSE_SOURCE_CACHE \ -DUSE_ZLIB \ - -DWATT32 \ + $(SSLFLAGS) \ + $(SSLINC) \ -I./chrtrans \ -I../WWW/Library/Implementation \ - -I../djgpp/watt32/inc \ - -I../djgpp/watt32/inc/sys + -I/dev/env/DJDIR/watt32/inc WWWLIB = \ ../WWW/Library/djgpp/libwww.a \ - ../djgpp/watt32/lib/libwatt.a + /dev/env/DJDIR/watt32/lib/libwatt.a -LIBS= $(SLANGLIB) -lslang -lz # -lintl +LIBS= $(SLANGLIB) -lslang $(SSLLIB) -lz $(INTLLIBS) + +# Uncomment the following to enable Internationalization. #INTLFLAGS = -DHAVE_GETTEXT -DHAVE_LIBINTL_H +#INTLLIBS= -lintl -liconv + +# Uncomment the following to enable SSL. +#SSLFLAGS = -DUSE_SSL +#SSLLIB = -lssl -lcrypto +#SSLINC = -I/dev/env/DJDIR/include/openssl all: lynx.exe |