diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/GridText.c | 3 | ||||
-rw-r--r-- | src/GridText.h | 3 | ||||
-rw-r--r-- | src/HTAlert.h | 1 | ||||
-rw-r--r-- | src/HTFWriter.c | 3 | ||||
-rw-r--r-- | src/HTML.c | 1 | ||||
-rw-r--r-- | src/LYBookmark.c | 18 | ||||
-rw-r--r-- | src/LYCharUtils.c | 7 | ||||
-rw-r--r-- | src/LYClean.h | 1 | ||||
-rw-r--r-- | src/LYCookie.c | 42 | ||||
-rw-r--r-- | src/LYCurses.h | 2 | ||||
-rw-r--r-- | src/LYDownload.c | 12 | ||||
-rw-r--r-- | src/LYEdit.c | 37 | ||||
-rw-r--r-- | src/LYGetFile.c | 5 | ||||
-rw-r--r-- | src/LYGlobalDefs.h | 8 | ||||
-rw-r--r-- | src/LYLeaks.c | 18 | ||||
-rw-r--r-- | src/LYMain.c | 34 | ||||
-rw-r--r-- | src/LYMainLoop.c | 15 | ||||
-rw-r--r-- | src/LYOptions.c | 11 | ||||
-rw-r--r-- | src/LYOptions.h | 6 | ||||
-rw-r--r-- | src/LYPrint.c | 18 | ||||
-rw-r--r-- | src/LYReadCFG.c | 19 | ||||
-rw-r--r-- | src/LYShowInfo.c | 4 | ||||
-rw-r--r-- | src/LYUtils.c | 12 | ||||
-rw-r--r-- | src/LYUtils.h | 24 | ||||
-rw-r--r-- | src/LYrcFile.c | 13 |
25 files changed, 132 insertions, 185 deletions
diff --git a/src/GridText.c b/src/GridText.c index c9d5b5a9..8319737c 100644 --- a/src/GridText.c +++ b/src/GridText.c @@ -2719,9 +2719,6 @@ PUBLIC int HText_beginAnchor ARGS3( /* * If we are doing link_numbering add the link number. */ - if (verbose_links) { - HText_appendText(text, "(LINK)"); - } if ((a->number > 0) && (keypad_mode == LINKS_ARE_NUMBERED || keypad_mode == LINKS_AND_FORM_FIELDS_ARE_NUMBERED)) { diff --git a/src/GridText.h b/src/GridText.h index a17ceb23..a99f66da 100644 --- a/src/GridText.h +++ b/src/GridText.h @@ -83,9 +83,6 @@ extern HTParentAnchor * HTMainAnchor; /* Anchor for HTMainText */ #endif /* SHORT_NAMES */ extern int WWW_TraceFlag; -extern int HTCacheSize; - -extern BOOLEAN mustshow; #if defined(VMS) && defined(VAXC) && !defined(__DECC) extern int HTVirtualMemorySize; diff --git a/src/HTAlert.h b/src/HTAlert.h index 018bf503..334843db 100644 --- a/src/HTAlert.h +++ b/src/HTAlert.h @@ -39,7 +39,6 @@ extern void HTUserMsg2 PARAMS((CONST char * Msg, CONST char * Arg)); */ extern void HTProgress PARAMS((CONST char * Msg)); extern void HTReadProgress PARAMS((long bytes, long total)); -extern BOOLEAN mustshow; #define _HTProgress(msg) mustshow = TRUE, HTProgress(msg) /* diff --git a/src/HTFWriter.c b/src/HTFWriter.c index 316bfd02..e446db19 100644 --- a/src/HTFWriter.c +++ b/src/HTFWriter.c @@ -19,9 +19,6 @@ #include <HTFile.h> #include <HTPlain.h> #include <HTFile.h> -#ifdef VMS -#include <HTVMSUtils.h> -#endif /* VMS */ #include <LYStrings.h> #include <LYUtils.h> diff --git a/src/HTML.c b/src/HTML.c index 9ad52f49..881e1a67 100644 --- a/src/HTML.c +++ b/src/HTML.c @@ -49,7 +49,6 @@ #ifdef VMS #include <LYCurses.h> -#include <HTVMSUtils.h> #endif /* VMS */ #ifdef USE_COLOR_STYLE diff --git a/src/LYBookmark.c b/src/LYBookmark.c index 7e8f7276..dc635da3 100644 --- a/src/LYBookmark.c +++ b/src/LYBookmark.c @@ -12,7 +12,6 @@ #include <GridText.h> #ifdef VMS -#include <HTVMSUtils.h> #include <nam.h> extern BOOLEAN HadVMSInterrupt; /* Flag from cleanup_sig() AST */ #endif /* VMS */ @@ -521,22 +520,9 @@ PUBLIC void remove_bookmark_link ARGS2( return; } } -#else /* UNIX */ +#else /* !UNIX */ if (rename(newfile, filename_buffer) != -1) { -#ifdef VMS - char VMSfilename[256]; - /* - * Purge lower version of file. - */ - sprintf(VMSfilename, "%s;-1", filename_buffer); - while (remove(VMSfilename) == 0) - ; - /* - * Reset version number. - */ - sprintf(VMSfilename, "%s;1", filename_buffer); - rename(filename_buffer, VMSfilename); -#endif /* VMS */ + HTSYS_purge(filename_buffer); return; } else { #ifndef VMS diff --git a/src/LYCharUtils.c b/src/LYCharUtils.c index 5b962a93..dd62a239 100644 --- a/src/LYCharUtils.c +++ b/src/LYCharUtils.c @@ -37,13 +37,6 @@ #include <LYCurses.h> #include <LYCookie.h> -#ifdef VMS -#include <HTVMSUtils.h> -#endif /* VMS */ -#ifdef DOSPATH -#include <HTDOS.h> -#endif - #include <LYexit.h> #include <LYLeaks.h> diff --git a/src/LYClean.h b/src/LYClean.h index dbd6a5ad..f19d08e3 100644 --- a/src/LYClean.h +++ b/src/LYClean.h @@ -8,7 +8,6 @@ extern BOOLEAN HadVMSInterrupt; #endif extern void cleanup_sig PARAMS((int sig)); -extern BOOLEAN setup PARAMS((char *terminal)); extern void cleanup NOPARAMS; extern void cleanup_files NOPARAMS; extern void set_alarm PARAMS((int sig)); diff --git a/src/LYCookie.c b/src/LYCookie.c index e7a3d822..2e0b40a2 100644 --- a/src/LYCookie.c +++ b/src/LYCookie.c @@ -501,7 +501,22 @@ PRIVATE void store_cookie ARGS3( * if confirmed or 'allow' is set to always. - FM */ } else if (HTConfirmCookie(de, hostname, co->name, co->value)) { + +#ifdef EXP_PERSISTENT_COOKIES + /* + * If the cookie domain came from persistent cookie file, + * we want to add new cookies to the end of the cookie list + * to maintain their order for servers that need cookies in + * a particular order. This is a hack. + */ + if ((de->bv = FROM_FILE) != 0) { + HTList_appendObject(cookie_list, co); + } else { + HTList_insertObjectAt(cookie_list, co, pos); + } +#else HTList_insertObjectAt(cookie_list, co, pos); +#endif /* EXP_PERSISTENT_COOKIES */ total_cookies++; } else { freeCookie(co); @@ -607,10 +622,27 @@ PRIVATE char * scan_cookie_sublist ARGS6( /* * Check if we should fold the header. - FM */ - if (len > 800) { - StrAllocCat(header, crlftab); - len = 0; - } + + /* + * Section 2.2 of RFC1945 says: + * + * HTTP/1.0 headers may be folded onto multiple lines + * if each continuation line begins with a space or + * horizontal tab. All linear whitespace, including + * folding, has the same semantics as SP. + * [...] + * However, folding of header lines is not expected by + * some applications, and should not be generated by + * HTTP/1.0 applications. + * + * This code was causing problems. Let's not use it. -BJP + */ + + /* if (len > 800) { */ + /* StrAllocCat(header, crlftab); */ + /* len = 0; */ + /* } */ + } /* * Include the cookie name=value pair. @@ -1998,6 +2030,8 @@ PUBLIC void LYStoreCookies ARGS1 ( } } fclose(cookie_handle); + + HTSYS_purge(cookie_file); } #endif diff --git a/src/LYCurses.h b/src/LYCurses.h index 48bea1e5..1a857341 100644 --- a/src/LYCurses.h +++ b/src/LYCurses.h @@ -301,9 +301,7 @@ extern void VTHome NOPARAMS; */ #if USE_COLOR_TABLE extern void LYaddWAttr PARAMS((WINDOW *win, int a)); -extern void LYaddAttr PARAMS((int a)); extern void LYsubWAttr PARAMS((WINDOW *win, int a)); -extern void LYsubAttr PARAMS((int a)); extern void LYaddWAttr PARAMS((WINDOW *win, int a)); extern void LYsubWAttr PARAMS((WINDOW *win, int a)); extern void lynx_set_color PARAMS((int a)); diff --git a/src/LYDownload.c b/src/LYDownload.c index 114adb16..884e436c 100644 --- a/src/LYDownload.c +++ b/src/LYDownload.c @@ -10,12 +10,6 @@ #include <LYClean.h> #include <LYGetFile.h> #include <LYDownload.h> -#ifdef VMS -#include <HTVMSUtils.h> -#endif /* VMS */ -#ifdef DOSPATH -#include <HTDOS.h> -#endif #include <LYexit.h> #include <LYLeaks.h> @@ -273,11 +267,7 @@ check_recall: if (cp) { sprintf(command, "%s/%s", cp, buffer); -#ifdef DOSPATH - strcpy(buffer, HTDOS_name(command)); -#else - strcpy(buffer, command); -#endif + strcpy(buffer, HTSYS_name(command)); } #endif /* VMS */ diff --git a/src/LYEdit.c b/src/LYEdit.c index f433080d..b05a5575 100644 --- a/src/LYEdit.c +++ b/src/LYEdit.c @@ -11,11 +11,7 @@ #include <LYUtils.h> #ifdef VMS #include <unixio.h> -#include <HTVMSUtils.h> #endif /* VMS */ -#ifdef DOSPATH -#include <HTDOS.h> -#endif #include <LYLeaks.h> @@ -69,15 +65,7 @@ PUBLIC int edit_current_file ARGS3( #if defined (DOSPATH) || defined (__EMX__) if (strlen(filename)>1) filename++; #endif -#ifdef DOSPATH - if ((fp = fopen(HTDOS_name(filename),"r")) == NULL) -#else -#ifdef VMS - if ((fp = fopen(HTVMS_name("", filename), "r")) == NULL) -#else - if ((fp = fopen(filename, "r")) == NULL) -#endif /* VMS */ -#endif /* DOSPATH */ + if ((fp = fopen(HTSYS_name(filename), "r")) == NULL) { HTAlert(COULD_NOT_ACCESS_FILE); FREE(filename); @@ -92,15 +80,7 @@ PUBLIC int edit_current_file ARGS3( /* * Don't allow editing if user lacks append access. */ -#ifdef DOSPATH - if ((fp = fopen(HTDOS_name("", filename), "a")) == NULL) -#else -#ifdef VMS - if ((fp = fopen(HTVMS_name("", filename), "a")) == NULL) -#else - if ((fp = fopen(filename, "a")) == NULL) -#endif /* VMS */ -#endif /* DOSPATH */ + if ((fp = fopen(HTSYS_name(filename), "a")) == NULL) { HTUserMsg(NOAUTH_TO_EDIT_FILE); goto failure; @@ -135,21 +115,12 @@ PUBLIC int edit_current_file ARGS3( sprintf(command, "%s +%d \"%s\"", editor, (lineno + (nlinks ? links[cur].ly : 0)), -#ifdef DOSPATH - HTDOS_name(filename)); -#else - filename); -#endif /* DOSPATH */ + HTSYS_name(filename)); else #ifdef __DJGPP__ sprintf(command, "%s %s", editor, HTDOS_name(filename)); #else - sprintf(command, "%s \"%s\"", editor, -#ifdef DOSPATH - HTDOS_name(filename)); -#else - filename); -#endif /* DOSPATH */ + sprintf(command, "%s \"%s\"", editor, HTSYS_name(filename)); #endif /* __DJGPP__ */ #endif /* VMS */ CTRACE(tfp, "LYEdit: %s\n", command); diff --git a/src/LYGetFile.c b/src/LYGetFile.c index 9875372c..21717afd 100644 --- a/src/LYGetFile.c +++ b/src/LYGetFile.c @@ -24,9 +24,6 @@ #include <LYBookmark.h> #include <LYMap.h> #include <LYList.h> -#ifdef VMS -#include <HTVMSUtils.h> -#endif /* VMS */ #ifdef DIRED_SUPPORT #include <LYLocal.h> #endif /* DIRED_SUPPORT */ @@ -242,9 +239,11 @@ Try_Redirected_URL: } else if (url_type == LYNXPRINT_URL_TYPE) { return(printfile(doc)); +#ifndef NO_OPTION_FORMS } else if (url_type == LYNXOPTIONS_URL_TYPE) { /* forms-based options menu */ return(postoptions(doc)); +#endif } else if (url_type == NEWSPOST_URL_TYPE || url_type == NEWSREPLY_URL_TYPE || diff --git a/src/LYGlobalDefs.h b/src/LYGlobalDefs.h index 92db467a..3960b9f1 100644 --- a/src/LYGlobalDefs.h +++ b/src/LYGlobalDefs.h @@ -111,8 +111,10 @@ extern int LYShowColor; /* Show color or monochrome? */ extern int LYChosenShowColor; /* extended color/monochrome choice */ extern int LYrcShowColor; /* ... as read or last written */ -#ifndef EXP_FORMS_OPTIONS +#if !defined(NO_OPTION_FORMS) && !defined(NO_OPTION_MENU) extern BOOLEAN LYUseFormsOptions; /* use Forms-based options menu */ +#else +#define LYUseFormsOptions FALSE /* simplify ifdef'ing in LYMainLoop.c */ #endif extern BOOLEAN LYShowCursor; /* Show the cursor or hide it? */ extern BOOLEAN verbose_img; /* display filenames of images? */ @@ -168,7 +170,6 @@ extern BOOLEAN telnet_ok; extern BOOLEAN news_ok; extern BOOLEAN ftp_ok; extern BOOLEAN rlogin_ok; -extern BOOLEAN no_print; /* TRUE to disable printing */ extern BOOLEAN system_editor; /* True if locked-down editor */ extern BOOLEAN child_lynx; /* TRUE to exit with an arrow */ extern BOOLEAN error_logging; /* TRUE to mail error messages */ @@ -177,7 +178,6 @@ extern BOOLEAN vi_keys; /* TRUE to turn on vi-like key movement */ extern BOOLEAN emacs_keys; /* TRUE to turn on emacs-like key movement */ extern int keypad_mode; /* is set to either NUMBERS_AS_ARROWS * * or LINKS_ARE_NUMBERED */ -extern BOOLEAN verbose_links; /* TRUE if links are preceded by (LINK) */ extern BOOLEAN case_sensitive; /* TRUE to turn on case sensitive search */ extern BOOLEAN no_inside_telnet; /* this and following are restrictions */ extern BOOLEAN no_outside_telnet; @@ -195,8 +195,8 @@ extern BOOLEAN no_bookmark; extern BOOLEAN no_multibook; extern BOOLEAN no_bookmark_exec; extern BOOLEAN no_option_save; -extern BOOLEAN no_print; extern BOOLEAN no_download; +extern BOOLEAN no_print; /* TRUE to disable printing */ extern BOOLEAN no_disk_save; extern BOOLEAN no_exec; extern BOOLEAN no_lynxcgi; diff --git a/src/LYLeaks.c b/src/LYLeaks.c index bb41b9ad..87afc0bb 100644 --- a/src/LYLeaks.c +++ b/src/LYLeaks.c @@ -155,22 +155,8 @@ PUBLIC void LYLeaks NOARGS fprintf(Fp_leakagesink, "\nTotal memory leakage this run:\t%u\n", (unsigned)st_total); fclose(Fp_leakagesink); -#ifdef VMS - { - char VMSfilename[256]; - /* - * Purge lower versions of the file. - */ - sprintf(VMSfilename, "%s;-1", LEAKAGE_SINK); - while (remove(VMSfilename) == 0) - ; - /* - * Reset version number. - */ - sprintf(VMSfilename, "%s;1", LEAKAGE_SINK); - rename(LEAKAGE_SINK, VMSfilename); - } -#endif /* VMS */ + + HTSYS_purge(LEAKAGE_SINK); } /* diff --git a/src/LYMain.c b/src/LYMain.c index 25ba5b70..4b7447c3 100644 --- a/src/LYMain.c +++ b/src/LYMain.c @@ -6,9 +6,6 @@ #include <HTFile.h> #include <UCMap.h> #include <UCDefs.h> -#ifdef VMS -#include <HTVMSUtils.h> -#endif /* VMS */ #include <HTInit.h> #include <LYCurses.h> #include <LYStyle.h> @@ -150,8 +147,8 @@ PUBLIC int port_syntax = 1; PUBLIC int LYShowColor = SHOW_COLOR_UNKNOWN; /* to show or not to show */ PUBLIC int LYChosenShowColor = SHOW_COLOR_UNKNOWN; /* whether to show and save */ PUBLIC int LYrcShowColor = SHOW_COLOR_UNKNOWN; /* ... as last read or written */ -#ifndef EXP_FORMS_OPTIONS -PUBLIC BOOLEAN LYUseFormsOptions = FALSE; /* use forms-based options menu */ +#if !defined(NO_OPTION_FORMS) && !defined(NO_OPTION_MENU) +PUBLIC BOOLEAN LYUseFormsOptions = TRUE; /* use forms-based options menu */ #endif PUBLIC BOOLEAN LYShowCursor = SHOW_CURSOR; /* to show or not to show */ PUBLIC BOOLEAN verbose_img = VERBOSE_IMAGES; /* show filenames or not */ @@ -187,7 +184,6 @@ PUBLIC BOOLEAN check_mail = CHECKMAIL; PUBLIC BOOLEAN vi_keys = VI_KEYS_ALWAYS_ON; PUBLIC BOOLEAN emacs_keys = EMACS_KEYS_ALWAYS_ON; PUBLIC int keypad_mode = DEFAULT_KEYPAD_MODE; -PUBLIC BOOLEAN verbose_links = VERBOSE_LINKS; PUBLIC BOOLEAN case_sensitive = CASE_SENSITIVE_ALWAYS_ON; PUBLIC BOOLEAN telnet_ok = TRUE; PUBLIC BOOLEAN news_ok = TRUE; @@ -683,22 +679,29 @@ PUBLIC int main ARGS2( StrAllocCat(lynx_version_putenv_command, LYNX_VERSION); putenv(lynx_version_putenv_command); #endif /* VMS */ + if ((cp = getenv("LYNX_TEMP_SPACE")) != NULL) StrAllocCopy(lynx_temp_space, cp); - else -#if defined (DOSPATH) || defined (__EMX__) - if ((cp = getenv("TEMP")) != NULL) +#if defined (UNIX) + else if ((cp = getenv("TMPDIR")) != NULL) StrAllocCopy(lynx_temp_space, cp); +#endif +#if defined (DOSPATH) || defined (__EMX__) + else if ((cp = getenv("TEMP")) != NULL) + StrAllocCopy(lynx_temp_space, HTDOS_name(cp)); else if ((cp = getenv("TMP")) != NULL) - StrAllocCopy(lynx_temp_space, cp); + StrAllocCopy(lynx_temp_space, HTDOS_name(cp)); +#endif else +#ifdef TEMP_SPACE + StrAllocCopy(lynx_temp_space, TEMP_SPACE); +#else { printf("You MUST define a valid TMP or TEMP area!\n"); exit(-1); } -#else - StrAllocCopy(lynx_temp_space, TEMP_SPACE); #endif + if ((cp = strchr(lynx_temp_space, '~'))) { *(cp++) = '\0'; StrAllocCopy(temp, lynx_temp_space); @@ -1037,8 +1040,7 @@ PUBLIC int main ARGS2( } #ifdef VMS LYCloseTracelog(); - while (remove(LYTraceLogPath) == 0) - ; + HTSYS_remove(LYTraceLogPath); if ((LYTraceLogFP = LYNewTxtFile(LYTraceLogPath)) == NULL) { WWW_TraceFlag = FALSE; printf("%s\n", TRACELOG_OPEN_FAILED); @@ -2645,10 +2647,10 @@ keys (may be incompatible with some curses packages)" "from", TOGGLE_ARG, &LYNoFromHeader, "toggle transmissions of From headers" ), -#ifndef EXP_FORMS_OPTIONS +#if !defined(NO_OPTION_FORMS) && !defined(NO_OPTION_MENU) PARSE_SET( "forms_options", TOGGLE_ARG, &LYUseFormsOptions, - "toggles forcing of forms-based options menu style" + "toggles forms-based vs old-style options menu" ), #endif PARSE_SET( diff --git a/src/LYMainLoop.c b/src/LYMainLoop.c index 46ec32e3..7b830ad2 100644 --- a/src/LYMainLoop.c +++ b/src/LYMainLoop.c @@ -46,10 +46,6 @@ #include <io.h> #endif -#ifdef VMS -#include <HTVMSUtils.h> -#endif /* VMS */ - #ifdef DIRED_SUPPORT #include <LYLocal.h> #include <LYUpload.h> @@ -202,7 +198,7 @@ int mainloop NOARGS BOOLEAN vi_keys_flag = vi_keys; BOOLEAN emacs_keys_flag = emacs_keys; BOOLEAN LYRawMode_flag = LYRawMode; -#ifndef EXP_FORMS_OPTIONS +#ifndef NO_OPTION_MENU BOOLEAN LYSelectPopups_flag = LYSelectPopups; BOOLEAN verbose_img_flag = verbose_img; BOOLEAN keypad_mode_flag = keypad_mode; @@ -3721,7 +3717,7 @@ check_goto_URL: #ifdef DIRED_SUPPORT c = dir_list_style; #endif /* DIRED_SUPPORT */ -#ifndef EXP_FORMS_OPTIONS +#ifndef NO_OPTION_MENU if (!LYUseFormsOptions) { LYoptions(); /* do the old-style options stuff */ @@ -3820,7 +3816,8 @@ if (!LYUseFormsOptions) { refresh_screen = TRUE; /* to repaint screen */ break; } /* end if !LYUseFormsOptions */ -#endif /* !EXP_FORMS_OPTIONS */ +#endif /* !NO_OPTION_MENU */ +#ifndef NO_OPTION_FORMS /* * FIXME: Blatantly stolen from LYK_PRINT below. * how much is really valid here? I don't know the @@ -3852,6 +3849,7 @@ if (!LYUseFormsOptions) { */ HTuncache_current_document(); } +#endif /* NO_OPTION_FORMS */ break; case LYK_INDEX_SEARCH: /* search for a user string */ @@ -5073,8 +5071,7 @@ check_add_bookmark_to_self: } #ifdef VMS LYCloseTracelog(); - while (remove(LYTraceLogPath) == 0) - ; + HTSYS_remove(LYTraceLogPath); if ((LYTraceLogFP = LYNewTxtFile(LYTraceLogPath)) == NULL) { TracelogOpenFailed(); break; diff --git a/src/LYOptions.c b/src/LYOptions.c index fa59d8fb..f86fad24 100644 --- a/src/LYOptions.c +++ b/src/LYOptions.c @@ -27,7 +27,7 @@ BOOLEAN term_options; PRIVATE void terminate_options PARAMS((int sig)); -#ifndef EXP_FORMS_OPTIONS +#ifndef NO_OPTION_MENU PRIVATE int boolean_choice PARAMS(( int status, int line, @@ -1789,7 +1789,7 @@ PRIVATE int boolean_choice ARGS4( } } } -#endif /* !EXP_FORMS_OPTIONS */ +#endif /* !NO_OPTION_MENU */ PRIVATE void terminate_options ARGS1( int, sig GCC_UNUSED) @@ -2096,7 +2096,7 @@ draw_bookmark_list: signal(SIGINT, cleanup_sig); } -#ifndef EXP_FORMS_OPTIONS +#ifndef NO_OPTION_MENU /* ** This function prompts for a choice or page number. ** If a 'g' or 'p' suffix is included, that will be @@ -3127,7 +3127,9 @@ restore_popup_statusline: } } -#endif /* !EXP_FORMS_OPTIONS */ +#endif /* !NO_OPTION_MENU */ + +#ifndef NO_OPTION_FORMS /* * I'm paranoid about mistyping strings. Also, this way they get combined @@ -4113,3 +4115,4 @@ PUBLIC int gen_options ARGS1( LYCloseTempFP(fp0); return(0); } +#endif /* !NO_OPTION_FORMS */ diff --git a/src/LYOptions.h b/src/LYOptions.h index 2752bde8..c8fdccbd 100644 --- a/src/LYOptions.h +++ b/src/LYOptions.h @@ -7,11 +7,13 @@ extern BOOLEAN term_options; /* for LYgetstr() */ extern void edit_bookmarks NOPARAMS; +#ifndef NO_OPTION_FORMS extern int postoptions PARAMS((document *newdoc)); extern int gen_options PARAMS((char **newfile)); +#endif /* !NO_OPTION_FORMS */ -#ifndef EXP_FORMS_OPTIONS +#ifndef NO_OPTION_MENU extern void LYoptions NOPARAMS; -#endif /* !EXP_FORMS_OPTIONS */ +#endif /* !NO_OPTION_MENU */ #endif /* LYOPTIONS_H */ diff --git a/src/LYPrint.c b/src/LYPrint.c index c4eea6e0..8c4415d0 100644 --- a/src/LYPrint.c +++ b/src/LYPrint.c @@ -15,12 +15,6 @@ #include <LYHistory.h> #include <LYList.h> #include <LYCharSets.h> /* To get current charset for mail header. */ -#ifdef VMS -#include <HTVMSUtils.h> -#endif /* VMS */ -#ifdef DOSPATH -#include <HTDOS.h> -#endif #include <LYLeaks.h> @@ -407,17 +401,9 @@ PUBLIC int printfile ARGS1( LYTrimPathSep(cp); if (cp) -#ifdef DOSPATH - sprintf(buffer, "%s/%s", cp, HTDOS_name(filename)); -#else - sprintf(buffer, "%s/%s", cp, filename); -#endif + sprintf(buffer, "%s/%s", cp, HTSYS_name(filename)); else -#ifdef DOSPATH - strcpy(buffer, HTDOS_name(filename)); -#else - strcpy(buffer, filename); -#endif + strcpy(buffer, HTSYS_name(filename)); #endif /* VMS */ /* diff --git a/src/LYReadCFG.c b/src/LYReadCFG.c index 551f6219..8b823e84 100644 --- a/src/LYReadCFG.c +++ b/src/LYReadCFG.c @@ -836,7 +836,7 @@ static Config_Type Config_Table [] = PARSE_ENV("finger_proxy", CONF_ENV, 0 ), PARSE_SET("force_8bit_toupper", CONF_BOOL, UCForce8bitTOUPPER), PARSE_SET("force_ssl_cookies_secure", CONF_BOOL, LYForceSSLCookiesSecure), -#ifndef EXP_FORMS_OPTIONS +#if !defined(NO_OPTION_FORMS) && !defined(NO_OPTION_MENU) PARSE_SET("forms_options", CONF_BOOL, LYUseFormsOptions), #endif PARSE_ENV("ftp_proxy", CONF_ENV, 0 ), @@ -950,7 +950,6 @@ static Config_Type Config_Table [] = #endif PARSE_SET("use_select_popups", CONF_BOOL, LYSelectPopups), PARSE_SET("verbose_images", CONF_BOOL, verbose_img), - PARSE_SET("verbose_links", CONF_BOOL, verbose_links), PARSE_SET("vi_keys_always_on", CONF_BOOL, vi_keys), PARSE_FUN("viewer", CONF_FUN, viewer_fun), PARSE_ENV("wais_proxy", CONF_ENV, 0 ), @@ -1238,23 +1237,27 @@ PUBLIC char *lynx_cfg_infopage NOARGS LYforce_no_cache = TRUE; /* don't cache this doc */ + BeginInternalPage (fp0, LYNXCFG_TITLE, NULL); + fprintf(fp0, "<pre>\n"); + +#ifndef NO_CONFIG_INFO + fprintf(fp0, "<em>This is read from your lynx.cfg file,\n"); #if defined(HAVE_CONFIG_H) || defined(VMS) StrAllocCopy(temp, LYNX_CFG_FILE); #else - StrAllocCopy(temp, helpfilepath); /* FIXME: no absolute path */ + StrAllocCopy(temp, helpfilepath); /* no absolute path... */ StrAllocCat(temp, LYNXCFG_HELP); /* for lynx.cfg on DOS/Win32 */ #endif /* HAVE_CONFIG_H */ - - BeginInternalPage (fp0, LYNXCFG_TITLE, NULL); - fprintf(fp0, "<pre>\n"); - fprintf(fp0, "<em>This is read from your lynx.cfg file,\n"); - fprintf(fp0, "please \"read\" distribution's <a href=\"%s\">lynx.cfg", temp); fprintf(fp0, "</a> for more comments.</em>\n\n"); fprintf(fp0, " #<em>Your primary configuration %s</em>\n", lynx_cfg_file); +#else + fprintf(fp0, "<em>This is read from your lynx.cfg file:</em>\n\n"); +#endif /* NO_CONFIG_INFO */ + /* * Process the configuration file. */ diff --git a/src/LYShowInfo.c b/src/LYShowInfo.c index ca01bf9e..f5439ed7 100644 --- a/src/LYShowInfo.c +++ b/src/LYShowInfo.c @@ -23,7 +23,7 @@ #include <LYLocal.h> #endif /* DIRED_SUPPORT */ -#ifdef HAVE_CONFIG_H +#ifndef NO_CONFIG_INFO #define HAVE_CFG_DEFS_H #define PutDefs(table, N) fprintf(fp0, "%-35s %s\n", table[N].name, table[N].value) @@ -68,7 +68,7 @@ PRIVATE char *lynx_compile_opts NOARGS } #else #undef HAVE_CFG_DEFS_H -#endif /* HAVE_CONFIG_H */ +#endif /* !NO_CONFIG_INFO */ /* * Showinfo prints a page of info about the current file and the link diff --git a/src/LYUtils.c b/src/LYUtils.c index ff01e020..3ed0f848 100644 --- a/src/LYUtils.c +++ b/src/LYUtils.c @@ -14,20 +14,18 @@ #include <LYCharSets.h> #include <LYCharUtils.h> -#if defined(DOSPATH) || defined(__EMX__) -#include <HTDOS.h> -#endif #ifdef DJGPP_KEYHANDLER #include <bios.h> #endif /* DJGPP_KEYHANDLER */ + #ifdef DISP_PARTIAL #include <LYKeymap.h> #endif /* DISP_PARTIAL */ + #ifdef VMS #include <descrip.h> #include <libclidef.h> #include <lib$routines.h> -#include <HTVMSUtils.h> #endif /* VMS */ #if HAVE_UTMP @@ -5796,11 +5794,7 @@ PUBLIC void LYRemoveTemp ARGS1( } else { ly_temp = p->next; } - code = remove(name); -#ifdef VMS - while (remove(name) == 0) - ; -#endif + code = HTSYS_remove(name); CTRACE(tfp, "...LYRemoveTemp done(%d)%s\n", code, (p->file != 0) ? ", closed" : ""); CTRACE_FLUSH(tfp); diff --git a/src/LYUtils.h b/src/LYUtils.h index 46d5d93c..5c4ab08e 100644 --- a/src/LYUtils.h +++ b/src/LYUtils.h @@ -5,6 +5,30 @@ #include <HTList.h> #endif /* HTLIST_H */ +#ifdef VMS +#include <HTVMSUtils.h> +#define HTSYS_name(path) HTVMS_name("", path) +#define HTSYS_purge(path) HTVMS_purge(path) +#define HTSYS_remove(path) HTVMS_remove(path) +#endif /* VMS */ + +#if defined(DOSPATH) || defined(__EMX__) +#include <HTDOS.h> +#define HTSYS_name(path) HTDOS_name(path) +#endif + +#ifndef HTSYS_name +#define HTSYS_name(path) path +#endif + +#ifndef HTSYS_purge +#define HTSYS_purge(path) /*nothing*/ +#endif + +#ifndef HTSYS_remove +#define HTSYS_remove(path) remove(path) +#endif + #ifdef DOSPATH #define LYIsPathSep(ch) ((ch) == '/' || (ch) == '\\') #else diff --git a/src/LYrcFile.c b/src/LYrcFile.c index 8c4faa3f..f2b4a2a7 100644 --- a/src/LYrcFile.c +++ b/src/LYrcFile.c @@ -1005,16 +1005,7 @@ PUBLIC int save_rc NOPARAMS */ fclose(fp); -#ifdef VMS - /* - * Get rid of any copies of the .lynxrc file that VMS creates. - */ - while (remove("sys$login:.lynxrc;-1") == 0) ; - /* - * Reset version number. - */ - rename("sys$login:.lynxrc", "sys$login:.lynxrc;1"); -#endif /* VMS */ + HTSYS_purge(rcfile); - return TRUE; + return TRUE; } |