diff options
44 files changed, 2013 insertions, 885 deletions
@@ -1,6 +1,125 @@ Changes since Lynx 2.8 release =============================================================================== +1999-06-29 (2.8.3dev.3) +* move HTAlert call so we don't get it each time we run the options menu -TD +* entify messages in LYshow_statusline_messages() -LP +* add -DNO_PORT to WWW/*/djgpp makefiles -DK + This is to make ftp work with new version of the WATTCP library as revised by + Igor Poretsky for building lynx with DJGPP. The old version has been renamed + to "tcplibdj-old.zip". For the new package, go to: + "http://www.rahul.net/dkaufman/tcplibdj.zip" or + "ftp://ftp.rahul.net/pub/dkaufman/tcplibdj.zip" +* new option REUSE_TEMPFILES, see comments in lynx.cfg -KW +* use P instead of invalid TR for right-aligned "LYNXMESSAGES:" link in HISTORY + page -KW +* better support for accessing FTP directory listings on Windows NT FTP + servers: try to switch MSDOS-like directory output off with SITE DIRSTYLE. + The price to pay for this is one or (probably more often) two more command/ + response round trips -KW +* added support for accessing FTP directory listings in "dls" style sent by + some OS/2 servers. Only one server was known and used for testing, so the + heuristics used may not be quite general enough. File date/time is not shown + since it doesn't seem to be part of the basic format -KW +* In lynx.man removed bogus "ID:" for -assume_charset, -assume_local_charset -KW +* in a list, render a <DIV> that doesn't have an ALIGN="center" or + ALIGN="right" attribute like a <P> in that situation: break the line if + necessary but don't create an empty line, an keep list indentation. This + addresses Debian bug #21331 -KW +* other changes for DIV: it's a block element, so make sure its contents + doesn't get rendered inline, even for nested DIVs that don't change text + alignment. Try to avoid improperly kept change of DIV styles' alignment by a + <P> or </P> in its content -KW +* make "treating H# in a list as an LH" work also for SortaSGML parsing, + previously it only worked with TagSoup -KW +* removed special handling for empty last field from LYstrsep(), which made it + act differently from (GNU) C library's strsep() -KW +* macro DEFAULT_INVCHECK_BV for default invalid cookie checking behaviour, can + be changed at top of LYCookie.c for those who really want that -KW +* reorganize code for invalid cookie checking / prompting somewhat, it is + hopefully easier to follow now, and should result in more logical prompting + (or not) if a cookie is invalid for more than one reason -KW +* change invalid cookie confirmation prompts to default to "no" answer. This + can prevent the impression that Lynx hangs because the prompt is not + completely visible. There should be a better way to ensure that all prompts + are recognizable as such (at least with "normal" screen widths) -KW +* use more of the available statusline width for showing cookie name and value + in normal cookie prompts -KW +* handle \" in quoted cookie values, so that the quote char doesn't end the + value string -KW +* write quoted cookie values to cookie file with the quotes ('"' chars). When + the cookie file is read, assume that quoted strings are quoted cookie values. + It would be better to have a separate flag stored, but we are limited by the + choice of the Netscape-compatible file format. This should resolve Debian + bug #35523 -KW +* handle empty value strings like any other cookie values: they can be kept in + the cookie jar (in memory), and can be written to and read from the cookie + file -KW +* more checking whether a line read from a cookie file is complete -KW +* write out second field in cookie file lines a TRUE or FALSE depending on + whether the domain can be used for suffix matching or has to match + completely. This seems to be how Netscape uses it. We don't actually use + this field when reading a file (presence of a leading dot in the domain value + tells us what we need to know), but this should improve behavior for people + sharing a cookie file between Lynx and a Netscape browser (although such + sharing shouldn't be recommended) -KW +* treat case as insignificant in cookie domains more consistently -KW +* remove remnants of FROM_FILE domain behaviour, it was unused -KW +* add some clarifications in lynx.cfg regarding cookies -KW +* entify strings when adding them to LYNXMESSAGES: stack -KW +* save HTAlwaysAlert messages for LYNXMESSAGES: page -KW +* generate TRACE output for prompts that use HTConfirm() or HTConfirmDefault + -KW +* make sure force_old_UCLYhndl_on_reload is initialized and reset properly -KW +* minor tweaks (LYCharUtils.c, LYMain.c, LYPrint.c) -KW +* flush Lynx.leaks file after writing each memory leak record but before + freeing the memory block, to ensure the info is on disk if something goes + seriously wrong (i.e., FREE causes a signal). +* more general checking in postoptions - `lynx LYNXOPTIONS:foo' now doesn't + crash -KW +* revived dired "install" functionality, more or less as it was (apparently) + originally meant to be used, but with various checks added. Compilation is + now conditional on new symbol OK_INSTALL. The "install" function is the + closest we have to a "copy file" function, and could be used instead; the + actual command executed depends on macros INSTALL_PATH and possibly + INSTALL_ARGS, one can define INSTALL_PATH for example to "/bin/cp" before + compilation to effectively get something like a dired "copy" function. Note + the the "install" function requires a special file in the home directory, + which can be customized, see samples/installdirs.html -KW +* new function HTURLPath_toFile in HTFile.c. Use it if we don't have a full + URL where HTnameOfFile_WWW was used previously, this avoids misparsing of + some unusual URL forms for files -KW +* other changes for dired support (KW): + - various corrections with respect to URL-unescaping: don't escape + too often or too little, dired operations could fail on filenames + with special characters + - avoid some unnecessary copying and allocation for filenames + - avoid some more static buffers + - add some buffer overflow checks +* make local directory display somewhat interruptible even without + partial page display -KW +* make do_readme in HTFile.c 8-bit clean -KW +* tweak in HTTP.c to avoid doing strlen() on received data that are to be + passed on raw; raw NUL bytes within the first block read could lead to data + loss -KW +* change newly introduced CAN_ANONYMOUS_* at end of userdefs.h to be FALSE by + default, to get behavior with -anonymous that is equivalent to 2.8.2 -KW +* handle some more common forms of mailcap $DISPLAY tests internally in + HTInit.c -KW +* correct a problem which appears when the curses library causes FANCY_CURSES + to be defined but not COLOR_CURSES: the code can call attrset() twice for + the same characters, thus replacing the original attribute with the new one. + Fix by using attron() instead (patch by Julian Coleman + <J.D.Coleman@newcastle.ac.uk>) +* modify LYonedot() so it does not change its parameter, avoiding corrupting + the name to be zipped (reported by DK) -TD +* modify LYDownload.c to skip over delimiter for file://localhost to avoid + treating it as part of the DOS filename -DK +* alter LYExecv() to only do an HTAlert if the return-code is zero, i.e., an + error was reported. This lets us reuse (and free) memory pointed to by + tmpbuf (reported by DK) -TD +* remove redefinition of lstat() and change test of stat() function with DJGPP, + which returns nonzero rather than negative on failure -DK 1999-06-18 (2.8.3dev.2) * move some of the path-manipulation from the DJGPP dired change into new functions LYisAbsPath, LYisRootPath and LYLastPathSep -TD @@ -62,7 +181,7 @@ Changes since Lynx 2.8 release * document use of '|' pipes in PRINTER commands in lynx.cfg -TD * add shell script man2hlp.sh, used that to generate lynx.hlp from lynx.man -TD * SOURCE_CACHE: source_cache_file and source_cache_chunk are now members of - HTParentAnchor (where they should belong, not HText nor mutable globals). + HTParentAnchor (where they should belong, not HText nor mutable globals). Add one more parse setting member (verbose_img) to HText structure -LP * correct spelling of ifdef for reload_read_cfg() (reported by KW) -LP * minor docs tweaks -LP @@ -77,7 +196,7 @@ Changes since Lynx 2.8 release (This is KW's patch, with minor corrections) * Key handling changes: - Extended lynxkeycodes: a bit flag is used to indicate that the lower bits - of the value already are a lynxactioncode and need not be looked up again. + of the value already are a lynxactioncode and need not be looked up again. Reduces need for back and forth forward and reverse binding lookups; currently only used in some places. - Extended lynxkeycodes: several (currently three) bit flags are used to @@ -122,15 +241,15 @@ Changes since Lynx 2.8 release a prefix key to set a modifier flag. Keys with second function when pressed twice are ^E^E and ^K^K. ESC is also recognized as setting a modifier flag, in case it gets through without been having been handled in - LYgetch(). See new file keystrokes/bashlike_edit_help.html for more info. + LYgetch(). See new file keystrokes/bashlike_edit_help.html for more info. The Bash-like Line Editor Bindings are only compiled in if compiled with -DEXP_ALT_BINDINGS / configured with --enable-alt-bindings (but not subject to a new macro). Implementation code for the new emacs-like functions - additionally ifdef'd with ENHANCED_LINEEDIT. + additionally ifdef'd with ENHANCED_LINEEDIT. - Avoid dependency on DNARROW key binding when form field line-editing is ended with Enter or Return key. - Take setting of real_c/old_c into consideration after return from form - field line-editing. Previously there were some strange effects: + field line-editing. Previously there were some strange effects: statusline messages would sometimes not appear when they should, the KEYMAP command would sometimes not work when invoked with ^Vk while in a form field. @@ -145,14 +264,14 @@ Changes since Lynx 2.8 release and NEXT_LINK, with the difference that, when moving to a form input or textarea line, the last column position (relative to the field) is remembered. They are not mapped by default, but mentioned in lynx.cfg. - - New key action DWIMHELP. It should give some context-sensitive help. + - New key action DWIMHELP. It should give some context-sensitive help. Currentely the appropriate Line Editor Binding help page is shown if a form input field is selected, otherwise it defaults to the main HELP page. - - New key action DWIMEDIT. Revert meaning of EDIT back to previous meaning: + - New key action DWIMEDIT. Revert meaning of EDIT back to previous meaning: always edit document file, not textarea content. DWIMEDIT acts like EDITTEXTAREA if the current link is a form textarea or input field and AUTOEXTEDIT was defined, and like EDIT otherwise. Also added slightly - different statusline message if form field external editiong cannot be done + different statusline message if form field external editing cannot be done because editing is disabled: it shouldn't refer to "The 'e'dit command". - Summary of reasonable ways to invoke external texarea editing (assuming that it is desired to keep the action of 'e' to edit files at least outside @@ -243,7 +362,7 @@ Changes since Lynx 2.8 release failed because of memory problems, and also fake a 'z' in that case to short-circuit a URL guessing cycle. - For most systems, generate more trace output for connection attempts, close - to the actual connect() and select() calls to prevent clobbering errno. + to the actual connect() and select() calls to prevent clobbering errno. See SOCKET_DEBUG_TRACE. This should help diagnose some obscure system-dependent problems that have occasionally been reported. * Added some missing stuff for color handling to forms Option Menu code. @@ -259,7 +378,7 @@ Changes since Lynx 2.8 release whether to send Referer header earlier, and made it apply for URL types that might be proxied. * LYAddVisitedLink tried to regard documents with the same address but a - different title string as different documents, but this was coded wrong. + different title string as different documents, but this was coded wrong. Removed ineffective comparison, but keep old title string if new title string is empty. * Correct long-standing logic error in MAIL_SYSTEM_ERROR_LOGGING handling. @@ -267,7 +386,7 @@ Changes since Lynx 2.8 release * Fix for traversal code to put the right address into the TRAVERSE_REJECT_FILE if a request fails after popping a document from the history stack (this can only occur if a previous request for the same document had succeeded). Also - don't try to send mail in such a case if MAIL_SYSTEM_ERROR_LOGGING is on. + don't try to send mail in such a case if MAIL_SYSTEM_ERROR_LOGGING is on. Also prevent possible history stack underflow if this occurs on return to the first document. * According to lynx.cfg, error logging mail may be sent to ALERTMAIL if no @@ -290,7 +409,7 @@ Changes since Lynx 2.8 release pushed on the history stack because it looks like a generated special page. * Made "Don't waste the cache" optimization in historytarget() subject to additional checks, to avoid uncaching of the wrong document in some cases. -* LYSafeGets() would drop the last line from a file if it was not terminated. +* LYSafeGets() would drop the last line from a file if it was not terminated. Changed to return the unterminated line like fgets(). * Clarifications on restrictions. "download" does not imply "disk_save" while "print" does, this doesn't seem to make much sense but has been the behavior @@ -299,7 +418,7 @@ Changes since Lynx 2.8 release posting. The documentation (except for the corresponding comments in userdefs.h) said that they apply to posting, while in fact they were implemented for reading only. [Does nobody read this stuff???] Also, the - implementation only checked the flag for news: URLs, but not for nntp: + implementation only checked the flag for news: URLs, but not for nntp: URLs, which doesn't make much sense given that the latter provide an alternative way for most (if not all) purposes of the first. So now these restrictions apply to news:, nntp:, newspost:, and newsreply: (but not to @@ -309,7 +428,7 @@ Changes since Lynx 2.8 release quite sure whether the corresponding features work there at all. * Changed restriction parsing so that "all" and "default" don't get ignored if they appear as one of several items in the same list. -* Implement listing of current restrictions to stdout with new -restrictions=? +* Implement listing of current restrictions to stdout with new -restrictions=? option. This should appear as the last command line option, otherwise the effect of options appearing later may not be shown. The '?' may require quoting. @@ -397,6 +516,13 @@ Changes since Lynx 2.8 release * Various doc tweaks. * Updated README.defines. Other contributors should please add their stuff there, too. +* Additional non-option args (before the last one), i.e. URLs or filenames, + are made available for 'g'oto recall. If unwanted, this can be disabled by + changing EXTENDED_STARTFILE_RECALL in LYMain.c -KW +* In UCChangeTerminalCodepage() used for --enable-font-switch with linux: use + LYOpenTemp() etc. instead of tempnam(), this avoids "Invalid pointer" with + LY_FIND_LEAKS and avoids leaving old temporary files hanging around in some + situations. Also added some error checking -KW 1999-06-01 (2.8.2rel.1) ----------------------- diff --git a/WWW/Library/Implementation/HTFTP.c b/WWW/Library/Implementation/HTFTP.c index 5507254c..86544009 100644 --- a/WWW/Library/Implementation/HTFTP.c +++ b/WWW/Library/Implementation/HTFTP.c @@ -177,6 +177,7 @@ PRIVATE char *last_username_and_host = NULL; #define MSDOS_SERVER 11 #define APPLESHARE_SERVER 12 #define NETPRESENZ_SERVER 13 +#define DLS_SERVER 14 PRIVATE int server_type = GENERIC_SERVER; /* the type of ftp host */ PRIVATE int unsure_type = FALSE; /* sure about the type? */ @@ -606,6 +607,45 @@ PRIVATE void get_ftp_pwd ARGS2( } } +/* This function turns MSDOS-like directory output off for + * Windows NT servers. + */ + +PRIVATE void set_unix_dirstyle ARGS2( + int *, ServerType, + BOOLEAN *, UseList) +{ + + char *cp; + /* This is a toggle. It seems we have to toggle in order to see + * the current state (after toggling), so we may end up toggling + * twice. - kw + */ + int status = response("SITE DIRSTYLE\r\n"); + if (status != 2) { + *ServerType = GENERIC_SERVER; + CTRACE(tfp, "HTFTP: DIRSTYLE failed, treating as Generic server.\n"); + return; + } else { + *UseList = TRUE; + /* Expecting one of: + * 200 MSDOS-like directory output is off + * 200 MSDOS-like directory output is on + * The following code doesn't look for the full exact string - + * who knows how the wording may change in some future version. + * If the first response isn't recognized, we toggle again + * anyway, under the assumption that it's more likely that + * the MSDOS setting was "off" originally. - kw + */ + cp = strstr(response_text+4, "MSDOS"); + if (cp && strstr(cp, " off")) { + return; /* already off now. */ + } else { + response("SITE DIRSTYLE\r\n"); + } + } +} + /* Get a valid connection to the host ** ---------------------------------- ** @@ -889,6 +929,7 @@ PRIVATE int get_connection ARGS2( } else if (strstr(response_text+4, "UNIX") != NULL || strstr(response_text+4, "Unix") != NULL) { server_type = UNIX_SERVER; + unsure_type = FALSE; /* to the best of out knowledge... */ use_list = TRUE; CTRACE(tfp, "HTFTP: Treating as Unix server.\n"); @@ -931,8 +972,8 @@ PRIVATE int get_connection ARGS2( } else if (strncmp(response_text+4, "Windows_NT", 10) == 0) { server_type = WINDOWS_NT_SERVER; - use_list = TRUE; CTRACE(tfp, "HTFTP: Treating as Window_NT server.\n"); + set_unix_dirstyle(&server_type, &use_list); } else if (strncmp(response_text+4, "MS Windows", 10) == 0) { server_type = MS_WINDOWS_SERVER; @@ -1404,6 +1445,111 @@ PRIVATE void parse_ls_line ARGS2( } /* parse_ls_line() */ /* + * parse_sls_line() -- + * Extract the name and size info and whether it refers to a + * directory from a LIST line in OS/2 "dls" format. + */ +PRIVATE void parse_dls_line ARGS3( + char *, line, + EntryInfo *, entry_info, + char **, pspilledname) +{ + short j; + int base=1; + int size_num=0; + int len; + char *cps = NULL; + + /* README 763 Information about this server\0 + bin/ - \0 + etc/ = \0 + ls-lR 0 \0 + ls-lR.Z 3 \0 + pub/ = Public area\0 + usr/ - \0 + morgan 14 -> ../real/morgan\0 + TIMIT.mostlikely.Z\0 + 79215 \0 + */ + + len = strlen(line); + if (len == 0) { + FREE(*pspilledname); + entry_info->display = FALSE; + return; + } + cps = LYSkipNonBlanks(line); + if (*cps == '\0') { /* only a filename, save it and return. */ + StrAllocCopy(*pspilledname, line); + entry_info->display = FALSE; + return; + } + if (len < 24 || line[23] != ' ' || + (isspace(line[0]) && !*pspilledname)) { + /* this isn't the expected "dls" format! */ + if (!isspace(line[0])) + *cps = '\0'; + if (*pspilledname && !*line) { + entry_info->filename = *pspilledname; + *pspilledname = NULL; + if (entry_info->filename[strlen(entry_info->filename)-1] == '/') + StrAllocCopy(entry_info->type, ENTRY_IS_DIRECTORY); + else + StrAllocCopy(entry_info->type, ""); + } else { + StrAllocCopy(entry_info->filename, line); + if (cps && cps != line && *(cps-1) == '/') + StrAllocCopy(entry_info->type, ENTRY_IS_DIRECTORY); + else + StrAllocCopy(entry_info->type, ""); + FREE(*pspilledname); + } + return; + } + + j = 22; + if (line[j] == '=' || line[j] == '-') { + StrAllocCopy(entry_info->type, ENTRY_IS_DIRECTORY); + } else { + while (isdigit(line[j])) { + size_num += (line[j] - '0') * base; + base *= 10; + j--; + } + } + entry_info->size = size_num; + + cps = LYSkipBlanks(&line[23]); + if (!strncmp(cps, "-> ", 3) && cps[3] != '\0' && cps[3] != ' ') { + StrAllocCopy(entry_info->type, gettext("Symbolic Link")); + entry_info->size = 0; /* don't display size */ + } + + if (j > 0) + line[j] = '\0'; + + LYTrimTrailing(line); + + len = strlen(line); + if (len == 0 && *pspilledname && **pspilledname) { + line = *pspilledname; + len = strlen(*pspilledname); + } + if (len > 0 && line[len-1] == '/') { + /* + ** It's a dir, remove / and mark it as such. + */ + if (len > 1) + line[len-1] = '\0'; + if (!entry_info->type) + StrAllocCopy(entry_info->type, ENTRY_IS_DIRECTORY); + } + + StrAllocCopy(entry_info->filename, line); + FREE(*pspilledname); +} /* parse_dls_line() */ + +/* * parse_vms_dir_entry() * Format the name, date, and size from a VMS LIST line * into the EntryInfo structure - FM @@ -1884,9 +2030,10 @@ PRIVATE void parse_cms_dir_entry ARGS2( * If first is true, this is the first name in a directory. */ -PRIVATE EntryInfo * parse_dir_entry ARGS2( +PRIVATE EntryInfo * parse_dir_entry ARGS3( char *, entry, - BOOLEAN *, first) + BOOLEAN *, first, + char **, pspilledname) { EntryInfo *entry_info; int i; @@ -1904,6 +2051,51 @@ PRIVATE EntryInfo * parse_dir_entry ARGS2( entry_info->display = TRUE; switch (server_type) { + case DLS_SERVER: + + /* + ** Interpret and edit LIST output from OS/2 server in + ** "dls" format. + ** This one must have claimed to be Unix in order to + ** get here; if the first line looks fishy, we revert + ** to Unix and hope that fits better (this recovery is + ** untested). - kw + */ + + if (*first) { + len = strlen(entry); + if (!len || entry[0] == ' ' || + (len >= 24 && entry[23] != ' ') || + (len < 24 && strchr(entry, ' '))) { + server_type = UNIX_SERVER; + CTRACE(tfp, + "HTFTP: Falling back to treating as Unix server.\n"); + } else { + *first = FALSE; + } + } + + if (server_type == DLS_SERVER) { + /* if still unchanged... */ + parse_dls_line(entry, entry_info, pspilledname); + + if (!entry_info->filename || *entry_info->filename == '\0') { + entry_info->display = FALSE; + return(entry_info); + } + if (!strcmp(entry_info->filename,"..") || + !strcmp(entry_info->filename,".")) + entry_info->display = FALSE; + if (entry_info->type && *entry_info->type == '\0') { + FREE(entry_info->type); + return(entry_info); + } + /* + ** Goto the bottom and get real type. + */ + break; + } /* fall through if server_type changed for *first == TRUE ! */ + case UNIX_SERVER: case PETER_LEWIS_SERVER: case MACHTEN_SERVER: @@ -2365,6 +2557,7 @@ PRIVATE int read_directory ARGS4( int BytesReceived = 0; int BytesReported = 0; char NumBytes[64]; + char *spilledname = NULL; PUTC('\n'); /* prettier LJM */ for (ic = 0; ic != EOF;) { /* For each entry in the directory */ HTChunkClear(chunk); @@ -2376,6 +2569,7 @@ PRIVATE int read_directory ARGS4( } else { ABORT_TARGET; HTBTreeAndObject_free(bt); + FREE(spilledname); return HT_INTERRUPTED; } } @@ -2392,6 +2586,7 @@ AgainForMultiNet: } else { ABORT_TARGET; HTBTreeAndObject_free(bt); + FREE(spilledname); return HT_INTERRUPTED; } } else if ((char)ic == CR || (char)ic == LF) { /* Terminator? */ @@ -2447,8 +2642,9 @@ AgainForMultiNet: CTRACE(tfp, "HTFTP: Line in %s is %s\n", lastpath, chunk->data); - entry_info = parse_dir_entry(chunk->data, &first); + entry_info = parse_dir_entry(chunk->data, &first, &spilledname); if (entry_info->display) { + FREE(spilledname); CTRACE(tfp, "Adding file to BTree: %s\n", entry_info->filename); HTBTree_add(bt, (EntryInfo *)entry_info); @@ -2462,6 +2658,7 @@ AgainForMultiNet: unload_btree: HTChunkFree(chunk); + FREE(spilledname); /* print out the handy help message if it exits :) */ if (help_message_cache_non_empty()) { @@ -3185,6 +3382,12 @@ listen: /* @@ */ #endif /* LISTEN */ if (isDirectory) { + if (server_type == UNIX_SERVER && !unsure_type && + !strcmp(response_text, + "150 Opening ASCII mode data connection for /bin/dl.\n")) { + CTRACE(tfp, "HTFTP: Treating as OS/2 \"dls\" server.\n"); + server_type = DLS_SERVER; + } status = read_directory (anchor, name, format_out, sink); NETCLOSE(data_soc); NETCLOSE(control->socket); diff --git a/WWW/Library/Implementation/HTFile.c b/WWW/Library/Implementation/HTFile.c index f8280243..f4699191 100644 --- a/WWW/Library/Implementation/HTFile.c +++ b/WWW/Library/Implementation/HTFile.c @@ -26,7 +26,6 @@ #ifdef DOSPATH #define LONG_LIST /* Define this for long style unix listings (ls -l), the actual style is configurable from lynx.cfg */ -#define lstat stat #endif /* #define NO_PARENT_DIR_REFERENCE */ /* Define this for no parent links */ #endif /* !VMS */ @@ -558,6 +557,50 @@ PRIVATE int HTCreatePath ARGS1(CONST char *,path) } #endif /* NOT_IMPLEMENTED */ +/* Convert filename from URL-path syntax to local path format +** ---------------------------------------------------------- +** Input name is assumed to be the URL-path of a local file +** URL, i.e. what comes after the "file://localhost". +** '#'-fragments to be treated as such must already be stripped. +** If expand_all is FALSE, unescape only escaped '/'. - kw +** +** On exit: +** Returns a malloc'ed string which must be freed by the caller. +*/ +PUBLIC char * HTURLPath_toFile ARGS2( + CONST char *, name, + BOOL, expand_all) +{ + char * path = NULL; + char * result = NULL; + + StrAllocCopy(path, name); + if (expand_all) + HTUnEscape(path); /* Interpret all % signs */ + else + HTUnEscapeSome(path, "/"); /* Interpret % signs for path delims */ + + CTRACE(tfp, "URLPath `%s' means path `%s'\n", name, path); +#ifdef DOSPATH + StrAllocCopy(result, HTDOS_name(path)); +#else +#ifdef __EMX__ + if (path[0] == '/' + && isalpha(path[1]) + && path[2] == ':') /* pesky leading slash */ + StrAllocCopy(result, path+1); + else + StrAllocCopy(result, path); + CTRACE(tfp, "EMX hack changed `%s' to `%s'\n", path, result); +#else + StrAllocCopy(result, path); +#endif /* __EMX__ */ +#endif /* DOSPATH */ + + FREE(path); + + return result; +} /* Convert filenames between local and WWW formats. ** ------------------------------------------------ ** Make up a suitable name for saving the node in @@ -568,6 +611,11 @@ PRIVATE int HTCreatePath ARGS1(CONST char *,path) ** On exit: ** Returns a malloc'ed string which must be freed by the caller. */ +/* NOTE: Don't use this function if you know that the input is a URL path + rather than a full URL, use HTURLPath_toFile instead. Otherwise + this function will return the wrong thing for some unusual + paths (like ones containing "//", possibly escaped). - kw +*/ PUBLIC char * HTnameOfFile_WWW ARGS3( CONST char *, name, BOOL, WWW_prefix, @@ -579,9 +627,9 @@ PUBLIC char * HTnameOfFile_WWW ARGS3( char * home; char * result = NULL; - if (expand_all) + if (expand_all) { HTUnEscape(path); /* Interpret all % signs */ - else + } else HTUnEscapeSome(path, "/"); /* Interpret % signs for path delims */ if (0 == strcmp(acc_method, "file") /* local file */ @@ -1193,9 +1241,9 @@ PUBLIC void HTDirEntry ARGS3( ** On exit: ** Returns TRUE if an "Up to <parent>" link was not created ** for a readable local directory because LONG_LIST is defined -** and NO_PARENT_DIR_REFERENCE is not defined, such that the -** calling function use LYListFmtParse() to create a link to -** the parent directory. Otherwise, it returns FALSE. - FM +** and NO_PARENT_DIR_REFERENCE is not defined, so that the +** calling function should use LYListFmtParse() to create a link +** to the parent directory. Otherwise, it returns FALSE. - FM */ PUBLIC BOOL HTDirTitles ARGS3( HTStructured *, target, @@ -1211,7 +1259,7 @@ PUBLIC BOOL HTDirTitles ARGS3( #ifdef DOSPATH BOOL local_link = FALSE; - if (logical[18] == ':') local_link = TRUE; + if (strlen(logical) > 18 && logical[18] == ':') local_link = TRUE; #endif /* ** Check tildeIsTop for treating home directory as Welcome @@ -1246,10 +1294,11 @@ PUBLIC BOOL HTDirTitles ARGS3( char * printable = NULL; #ifdef DIRED_SUPPORT - printable = HTfullURL_toFile( + printable = HTURLPath_toFile( (0 == strncasecomp(path, "/%2F", 4)) /* "//" ? */ ? (path+1) - : path); + : path, + TRUE); if (0 == strncasecomp(printable, "/vmsysu:", 8) || 0 == strncasecomp(printable, "/anonymou.", 10)) { StrAllocCopy(cp, (printable+1)); @@ -1441,8 +1490,8 @@ PRIVATE void do_readme ARGS2(HTStructured *, target, CONST char *, localname) targetClass = *target->isa; /* (Can't init agregate in K&R) */ START(HTML_PRE); for (;;){ - char c = fgetc(fp); - if (c == (char)EOF) break; + int c = fgetc(fp); + if (c == EOF) break; #ifdef NOTDEFINED switch (c) { case '&': @@ -1458,10 +1507,10 @@ PRIVATE void do_readme ARGS2(HTStructured *, target, CONST char *, localname) PUTC('\r'); Bug removed thanks to joe@athena.mit.edu */ default: - PUTC(c); + PUTC((char)c); } #else - PUTC(c); + PUTC((char)c); #endif /* NOTDEFINED */ } END(HTML_PRE); @@ -1652,7 +1701,7 @@ PRIVATE int print_local_dir ARGS5( { HTBTElement * next_element = HTBTree_next(bt,NULL); /* pick up the first element of the list */ - int num_of_entries_partial = 0; /* lines counter */ + int num_of_entries_output = 0; /* lines counter */ char state; /* I for initial (.. file), @@ -1667,19 +1716,28 @@ PRIVATE int print_local_dir ARGS5( while (next_element != NULL) { char *entry, *file_extra; +#ifndef DISP_PARTIAL + if (num_of_entries_output % HTMAX(display_lines,10) == 0) { + if (HTCheckForInterrupt()) { + _HTProgress ("Data transfer interrupted."); + status = HT_PARTIAL_CONTENT; + break; + } + } +#endif StrAllocCopy(tmpfilename,localname); if (strcmp(localname, "/")) /* ** If filename is not root directory. */ - StrAllocCat(tmpfilename, "/"); + LYAddHtmlSep(&tmpfilename); - StrAllocCat(tmpfilename, - (char *)HTBTree_object(next_element)+1); + entry = (char*)HTBTree_object(next_element)+1; /* ** Append the current entry's filename ** to the path. */ + StrAllocCat(tmpfilename, entry); HTSimplify(tmpfilename); /* ** Output the directory entry. @@ -1753,7 +1811,6 @@ PRIVATE int print_local_dir ARGS5( START(HTML_LI); #endif /* !LONG_LIST */ } - entry = (char*)HTBTree_object(next_element)+1; file_extra = NULL; #ifdef LONG_LIST @@ -1777,10 +1834,10 @@ PRIVATE int print_local_dir ARGS5( /* optimize for expensive operation: */ #ifdef DISP_PARTIAL - if (num_of_entries_partial % + if (num_of_entries_output % (partial_threshold > 0 ? partial_threshold : display_lines) == 0) { - /* num_of_entries, num_of_entries_partial... */ + /* num_of_entries, num_of_entries_output... */ /* HTReadProgress...(bytes, 0); */ HTDisplayPartial(); @@ -1790,7 +1847,7 @@ PRIVATE int print_local_dir ARGS5( break; } } - num_of_entries_partial++; + num_of_entries_output++; #endif /* DISP_PARTIAL */ } /* end while next_element */ @@ -2131,7 +2188,7 @@ PUBLIC int HTLoadFile ARGS4( FREE(filename); } -#else /* Unix: */ +#else /* not VMS: */ FREE(filename); diff --git a/WWW/Library/Implementation/HTFile.h b/WWW/Library/Implementation/HTFile.h index a88b1285..50e38273 100644 --- a/WWW/Library/Implementation/HTFile.h +++ b/WWW/Library/Implementation/HTFile.h @@ -42,6 +42,7 @@ extern int HTDirReadme; /* Include readme files in listing? */ /* ** Convert filenames between local and WWW formats */ +extern char * HTURLPath_toFile PARAMS((CONST char * name, BOOL expand_all)); extern char * HTnameOfFile_WWW PARAMS((CONST char * name, BOOL WWW_prefix, BOOL expand_all)); #define HTLocalName(name) HTnameOfFile_WWW(name,TRUE,TRUE) #define HTfullURL_toFile(name) HTnameOfFile_WWW(name,FALSE,TRUE) diff --git a/WWW/Library/Implementation/HTFormat.c b/WWW/Library/Implementation/HTFormat.c index a45d7d0c..b2c933ef 100644 --- a/WWW/Library/Implementation/HTFormat.c +++ b/WWW/Library/Implementation/HTFormat.c @@ -490,7 +490,7 @@ PUBLIC void HTDisplayPartial NOARGS #ifdef DISP_PARTIAL if (display_partial) { /* - ** HText_getNumOfLines() = "current" number of lines received + ** HText_getNumOfLines() = "current" number of complete lines received ** NumOfLines_partial = number of lines at the moment of last repaint. ** ** We update NumOfLines_partial only when we repaint the display. diff --git a/WWW/Library/Implementation/HTTP.c b/WWW/Library/Implementation/HTTP.c index ab5b3bc7..2dd3ac84 100644 --- a/WWW/Library/Implementation/HTTP.c +++ b/WWW/Library/Implementation/HTTP.c @@ -117,7 +117,7 @@ PRIVATE int HTLoadHTTP ARGS4 ( BOOL show_407 = FALSE; BOOL auth_proxy = NO; /* Generate a proxy authorization. - AJL */ - int length, rv; + int length, rawlength, rv; BOOL doing_redirect, already_retrying = FALSE, bad_location = FALSE; int len = 0; @@ -768,6 +768,8 @@ try_again: while (!eol && !end_of_file && bytes_already_read < 100); } /* Scope of loop variables */ + /* save total length, in case we decide later to show it all - kw */ + rawlength = length; /* We now have a terminated unfolded line. Parse it. ** -------------------------------------------------- @@ -1462,7 +1464,7 @@ Cookie2_continuation: doing_redirect = FALSE; permanent_redirection = FALSE; start_of_data = line_kept_clean; - length = strlen(start_of_data); + length = rawlength; if (!bad_location) { HTAlert(gettext("Got redirection with no Location header.")); HTProgress(line_buffer); @@ -1718,7 +1720,7 @@ Cookie2_continuation: ** It was a HEAD request, or we want the headers and source. */ start_of_data = line_kept_clean; - length = strlen(start_of_data); + length = rawlength; format_in = HTAtom_for("text/plain"); } diff --git a/WWW/Library/djgpp/makefile b/WWW/Library/djgpp/makefile index 06e6f2e7..b91e2c52 100644 --- a/WWW/Library/djgpp/makefile +++ b/WWW/Library/djgpp/makefile @@ -8,7 +8,7 @@ WWW_MACH = djgpp #ASIS_MACH = hardware/os CFLAGS = -O3 -DUSE_ZLIB -DDOSPATH -DNOUSERS -DDISP_PARTIAL \ --DSOURCE_CACHE -DUSE_PSRC \ +-DSOURCE_CACHE -DUSE_PSRC -DNOPORT \ -I../Implementation \ -I../../../djgpp/tcplib/include \ -I../../../djgpp/tcplib/include/tcp \ diff --git a/WWW/Library/djgpp/makefile.sla b/WWW/Library/djgpp/makefile.sla index aa45ac45..78b63da9 100644 --- a/WWW/Library/djgpp/makefile.sla +++ b/WWW/Library/djgpp/makefile.sla @@ -8,7 +8,7 @@ WWW_MACH = djgpp #ASIS_MACH = hardware/os CFLAGS = -O3 -DUSE_SLANG -DUSE_ZLIB -DDOSPATH -DNOUSERS -DDISP_PARTIAL \ --DDIRED_SUPPORT -DSOURCE_CACHE -DUSE_PSRC \ +-DDIRED_SUPPORT -DSOURCE_CACHE -DUSE_PSRC -DNOPORT \ -I../Implementation \ -I../../../djgpp/tcplib/include \ -I../../../djgpp/tcplib/include/tcp \ @@ -135,6 +135,7 @@ #undef NO_PARENT_DIR_REFERENCE /* configure --disable-parent-dir */ #undef NSL_FORK /* CF_ARG_ENABLE(nsl-fork) */ #undef OK_GZIP /* CF_ARG_DISABLE(dired-gzip) */ +#undef OK_INSTALL #undef OK_OVERRIDE /* CF_ARG_DISABLE(dired-override) */ #undef OK_PERMIT /* CF_ARG_DISABLE(dired-permit) */ #undef OK_TAR /* CF_ARG_DISABLE(dired-tar) */ @@ -4994,10 +4994,85 @@ EOF ;; *) # (vi - cat >> confdefs.h <<EOF -#define INSTALL_PATH "$INSTALL" + cf_save_INSTALL="$INSTALL" + +test -z "$INSTALL" && INSTALL=install +if test "$with_full_paths" = yes ; then + # Extract the first word of "install", so it can be a program name with args. +set dummy install; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:5005: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_INSTALL'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$INSTALL" in + /*) + ac_cv_path_INSTALL="$INSTALL" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_INSTALL="$INSTALL" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_INSTALL="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_INSTALL" && ac_cv_path_INSTALL="$INSTALL" + ;; +esac +fi +INSTALL="$ac_cv_path_INSTALL" +if test -n "$INSTALL"; then + echo "$ac_t""$INSTALL" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +else + echo $ac_n "checking for install""... $ac_c" 1>&6 +echo "configure:5040: checking for install" >&5 + echo "$ac_t""$INSTALL" 1>&6 + eval 'ac_cv_path_'INSTALL'="'install'"' +fi +cf_path_prog="" +cf_path_args="" +IFS="${IFS= }"; cf_save_ifs="$IFS" +case $host_os in #(vi +os2*) #(vi + IFS="${IFS};" + ;; +*) + IFS="${IFS}:" + ;; +esac +for cf_temp in $ac_cv_path_INSTALL +do + if test -z "$cf_path_prog" ; then + cf_path_prog="$cf_temp" + elif test -z "$cf_path_args" ; then + cf_path_args="$cf_temp" + else + cf_path_args="$cf_path_args $cf_temp" + fi +done +IFS="$cf_save_ifs" + +cat >> confdefs.h <<EOF +#define INSTALL_PATH "$cf_path_prog" EOF +test -n "$cf_path_args" && cat >> confdefs.h <<EOF +#define INSTALL_ARGS "$cf_path_args" +EOF + + + INSTALL="$cf_save_INSTALL" ;; esac @@ -5010,7 +5085,7 @@ EOF if test -z "$GCC" ; then echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6 -echo "configure:5014: checking for ${CC-cc} option to accept ANSI C" >&5 +echo "configure:5089: checking for ${CC-cc} option to accept ANSI C" >&5 if eval "test \"`echo '$''{'cf_cv_ansi_cc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5034,7 +5109,7 @@ for cf_arg in "-DCC_HAS_PROTOS" \ do CFLAGS="$cf_save_CFLAGS $cf_arg" cat > conftest.$ac_ext <<EOF -#line 5038 "configure" +#line 5113 "configure" #include "confdefs.h" #ifndef CC_HAS_PROTOS @@ -5050,7 +5125,7 @@ int main() { struct s2 {int (*f) (double a);}; ; return 0; } EOF -if { (eval echo configure:5054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_ansi_cc="$cf_arg"; break else @@ -5078,12 +5153,12 @@ fi fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:5082: checking for working const" >&5 +echo "configure:5157: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5087 "configure" +#line 5162 "configure" #include "confdefs.h" int main() { @@ -5132,7 +5207,7 @@ ccp = (char const *const *) p; ; return 0; } EOF -if { (eval echo configure:5136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -5174,7 +5249,7 @@ clix*) # contributed by Alex Matulich (matuli_a@marlin.navsea.navy.mil) also # references -lmalloc and -lbsd. echo $ac_n "checking for strcmp in -lc_s""... $ac_c" 1>&6 -echo "configure:5178: checking for strcmp in -lc_s" >&5 +echo "configure:5253: checking for strcmp in -lc_s" >&5 ac_lib_var=`echo c_s'_'strcmp | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5182,7 +5257,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc_s $LIBS" cat > conftest.$ac_ext <<EOF -#line 5186 "configure" +#line 5261 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -5193,7 +5268,7 @@ int main() { strcmp() ; return 0; } EOF -if { (eval echo configure:5197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5283,7 +5358,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5287: checking for $ac_word" >&5 +echo "configure:5362: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5328,17 +5403,17 @@ sony-newsos*) do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5332: checking for $ac_hdr" >&5 +echo "configure:5407: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5337 "configure" +#line 5412 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5417: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5382,17 +5457,17 @@ ultrix*) do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5386: checking for $ac_hdr" >&5 +echo "configure:5461: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5391 "configure" +#line 5466 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5471: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5430,16 +5505,16 @@ if test -n "$TRY_CFLAGS" ; then cf_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $TRY_CFLAGS" echo $ac_n "checking if we should use compile options $TRY_CFLAGS""... $ac_c" 1>&6 -echo "configure:5434: checking if we should use compile options $TRY_CFLAGS" >&5 +echo "configure:5509: checking if we should use compile options $TRY_CFLAGS" >&5 cat > conftest.$ac_ext <<EOF -#line 5436 "configure" +#line 5511 "configure" #include "confdefs.h" #include <stdio.h> int main() { FILE *fp = stdin ; return 0; } EOF -if { (eval echo configure:5443: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_result=yes else @@ -5457,7 +5532,7 @@ fi ### Look for network libraries first, since some functions (such as gethostname) ### are used in a lot of places. echo $ac_n "checking if you want socks library""... $ac_c" 1>&6 -echo "configure:5461: checking if you want socks library" >&5 +echo "configure:5536: checking if you want socks library" >&5 if eval "test \"`echo '$''{'cf_cv_use_libsocks'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5477,7 +5552,7 @@ fi echo "$ac_t""$cf_cv_use_libsocks" 1>&6 echo $ac_n "checking if you want socks5 library""... $ac_c" 1>&6 -echo "configure:5481: checking if you want socks5 library" >&5 +echo "configure:5556: checking if you want socks5 library" >&5 if eval "test \"`echo '$''{'cf_cv_use_libsocks5'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5543,7 +5618,7 @@ cat >> confdefs.h <<\EOF EOF cat > conftest.$ac_ext <<EOF -#line 5547 "configure" +#line 5622 "configure" #include "confdefs.h" #include <stdio.h> @@ -5552,7 +5627,7 @@ int main() { accept((char *)0) ; return 0; } EOF -if { (eval echo configure:5556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then : else echo "configure: failed program was:" >&5 @@ -5582,9 +5657,9 @@ cat >> confdefs.h <<\EOF EOF echo $ac_n "checking if the socks library uses socks4 prefix""... $ac_c" 1>&6 -echo "configure:5586: checking if the socks library uses socks4 prefix" >&5 +echo "configure:5661: checking if the socks library uses socks4 prefix" >&5 cat > conftest.$ac_ext <<EOF -#line 5588 "configure" +#line 5663 "configure" #include "confdefs.h" #include <socks.h> @@ -5593,7 +5668,7 @@ int main() { Rinit((char *)0) ; return 0; } EOF -if { (eval echo configure:5597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cat >> confdefs.h <<\EOF #define USE_SOCKS4_PREFIX 1 @@ -5605,14 +5680,14 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 5609 "configure" +#line 5684 "configure" #include "confdefs.h" #include <socks.h> int main() { SOCKSinit((char *)0) ; return 0; } EOF -if { (eval echo configure:5616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_use_socks4=no else @@ -5681,7 +5756,7 @@ else cf_test_netlibs=no echo $ac_n "checking for network libraries""... $ac_c" 1>&6 -echo "configure:5685: checking for network libraries" >&5 +echo "configure:5760: checking for network libraries" >&5 if eval "test \"`echo '$''{'cf_cv_netlibs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5692,12 +5767,12 @@ cf_test_netlibs=yes for ac_func in gethostname do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5696: checking for $ac_func" >&5 +echo "configure:5771: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5701 "configure" +#line 5776 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5720,7 +5795,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:5724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5743,7 +5818,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gethostname in -lnsl""... $ac_c" 1>&6 -echo "configure:5747: checking for gethostname in -lnsl" >&5 +echo "configure:5822: checking for gethostname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5751,7 +5826,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $cf_cv_netlibs $LIBS" cat > conftest.$ac_ext <<EOF -#line 5755 "configure" +#line 5830 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -5762,7 +5837,7 @@ int main() { gethostname() ; return 0; } EOF -if { (eval echo configure:5766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5795,7 +5870,7 @@ else echo $ac_n "checking for gethostname in -lsocket""... $ac_c" 1>&6 -echo "configure:5799: checking for gethostname in -lsocket" >&5 +echo "configure:5874: checking for gethostname in -lsocket" >&5 ac_lib_var=`echo socket'_'gethostname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5803,7 +5878,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $cf_cv_netlibs $LIBS" cat > conftest.$ac_ext <<EOF -#line 5807 "configure" +#line 5882 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -5814,7 +5889,7 @@ int main() { gethostname() ; return 0; } EOF -if { (eval echo configure:5818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5858,21 +5933,21 @@ done # FIXME: sequent needs this library (i.e., -lsocket -linet -lnsl), but # I don't know the entrypoints - 97/7/22 TD echo $ac_n "checking for -linet""... $ac_c" 1>&6 -echo "configure:5862: checking for -linet" >&5 +echo "configure:5937: checking for -linet" >&5 if eval "test \"`echo '$''{'ac_cv_lib_inet'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-linet $LIBS" cat > conftest.$ac_ext <<EOF -#line 5869 "configure" +#line 5944 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:5876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_lib_inet=yes else @@ -5895,12 +5970,12 @@ if test "$ac_cv_func_lsocket" != no ; then for ac_func in socket do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5899: checking for $ac_func" >&5 +echo "configure:5974: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5904 "configure" +#line 5979 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5923,7 +5998,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:5927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5946,7 +6021,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:5950: checking for socket in -lsocket" >&5 +echo "configure:6025: checking for socket in -lsocket" >&5 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5954,7 +6029,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $cf_cv_netlibs $LIBS" cat > conftest.$ac_ext <<EOF -#line 5958 "configure" +#line 6033 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -5965,7 +6040,7 @@ int main() { socket() ; return 0; } EOF -if { (eval echo configure:5969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5998,7 +6073,7 @@ else echo $ac_n "checking for socket in -lbsd""... $ac_c" 1>&6 -echo "configure:6002: checking for socket in -lbsd" >&5 +echo "configure:6077: checking for socket in -lbsd" >&5 ac_lib_var=`echo bsd'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6006,7 +6081,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lbsd $cf_cv_netlibs $LIBS" cat > conftest.$ac_ext <<EOF -#line 6010 "configure" +#line 6085 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6017,7 +6092,7 @@ int main() { socket() ; return 0; } EOF -if { (eval echo configure:6021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6062,12 +6137,12 @@ fi for ac_func in gethostbyname do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6066: checking for $ac_func" >&5 +echo "configure:6141: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6071 "configure" +#line 6146 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -6090,7 +6165,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:6094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6113,7 +6188,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:6117: checking for gethostbyname in -lnsl" >&5 +echo "configure:6192: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6121,7 +6196,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $cf_cv_netlibs $LIBS" cat > conftest.$ac_ext <<EOF -#line 6125 "configure" +#line 6200 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6132,7 +6207,7 @@ int main() { gethostbyname() ; return 0; } EOF -if { (eval echo configure:6136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6173,12 +6248,12 @@ done for ac_func in strcasecmp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6177: checking for $ac_func" >&5 +echo "configure:6252: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6182 "configure" +#line 6257 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -6201,7 +6276,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:6205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6224,7 +6299,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6 -echo "configure:6228: checking for strcasecmp in -lresolv" >&5 +echo "configure:6303: checking for strcasecmp in -lresolv" >&5 ac_lib_var=`echo resolv'_'strcasecmp | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6232,7 +6307,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $cf_cv_netlibs $LIBS" cat > conftest.$ac_ext <<EOF -#line 6236 "configure" +#line 6311 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6243,7 +6318,7 @@ int main() { strcasecmp() ; return 0; } EOF -if { (eval echo configure:6247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6289,13 +6364,13 @@ test $cf_test_netlibs = no && echo "$cf_cv_netlibs" >&6 fi echo $ac_n "checking for inet_aton function""... $ac_c" 1>&6 -echo "configure:6293: checking for inet_aton function" >&5 +echo "configure:6368: checking for inet_aton function" >&5 if eval "test \"`echo '$''{'cf_cv_have_inet_aton'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6299 "configure" +#line 6374 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/socket.h> @@ -6306,7 +6381,7 @@ int main() { inet_aton(0, (struct in_addr *)0) ; return 0; } EOF -if { (eval echo configure:6310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_have_inet_aton=yes else @@ -6326,13 +6401,13 @@ EOF else echo $ac_n "checking for inet_addr function""... $ac_c" 1>&6 -echo "configure:6330: checking for inet_addr function" >&5 +echo "configure:6405: checking for inet_addr function" >&5 if eval "test \"`echo '$''{'cf_cv_have_inet_addr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6336 "configure" +#line 6411 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/socket.h> @@ -6343,7 +6418,7 @@ int main() { inet_addr(0) ; return 0; } EOF -if { (eval echo configure:6347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_have_inet_addr=yes else @@ -6358,7 +6433,7 @@ fi echo "$ac_t""$cf_cv_have_inet_addr" 1>&6 if test "$cf_cv_have_inet_addr" = no ; then echo $ac_n "checking for library with inet_addr""... $ac_c" 1>&6 -echo "configure:6362: checking for library with inet_addr" >&5 +echo "configure:6437: checking for library with inet_addr" >&5 if eval "test \"`echo '$''{'cf_cv_lib_inet_addr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6368,7 +6443,7 @@ else do LIBS="$cf_save_LIBS $cf_inetlib" cat > conftest.$ac_ext <<EOF -#line 6372 "configure" +#line 6447 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/socket.h> @@ -6379,7 +6454,7 @@ int main() { inet_addr(0) ; return 0; } EOF -if { (eval echo configure:6383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_lib_inet_addr=$cf_inetlib else @@ -6406,7 +6481,7 @@ fi echo $ac_n "checking for screen type""... $ac_c" 1>&6 -echo "configure:6410: checking for screen type" >&5 +echo "configure:6485: checking for screen type" >&5 if eval "test \"`echo '$''{'cf_cv_screen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6441,12 +6516,12 @@ case $cf_cv_screen in curses) echo $ac_n "checking for initscr""... $ac_c" 1>&6 -echo "configure:6445: checking for initscr" >&5 +echo "configure:6520: checking for initscr" >&5 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6450 "configure" +#line 6525 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char initscr(); below. */ @@ -6469,7 +6544,7 @@ initscr(); ; return 0; } EOF -if { (eval echo configure:6473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_initscr=yes" else @@ -6490,7 +6565,7 @@ else case $host_os in #(vi freebsd*) #(vi echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6 -echo "configure:6494: checking for tgoto in -lmytinfo" >&5 +echo "configure:6569: checking for tgoto in -lmytinfo" >&5 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6498,7 +6573,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lmytinfo $LIBS" cat > conftest.$ac_ext <<EOF -#line 6502 "configure" +#line 6577 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6509,7 +6584,7 @@ int main() { tgoto() ; return 0; } EOF -if { (eval echo configure:6513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6532,7 +6607,7 @@ fi ;; hpux10.*) echo $ac_n "checking for initscr in -lcur_colr""... $ac_c" 1>&6 -echo "configure:6536: checking for initscr in -lcur_colr" >&5 +echo "configure:6611: checking for initscr in -lcur_colr" >&5 ac_lib_var=`echo cur_colr'_'initscr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6540,7 +6615,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcur_colr $LIBS" cat > conftest.$ac_ext <<EOF -#line 6544 "configure" +#line 6619 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6551,7 +6626,7 @@ int main() { initscr() ; return 0; } EOF -if { (eval echo configure:6555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6575,7 +6650,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for initscr in -lHcurses""... $ac_c" 1>&6 -echo "configure:6579: checking for initscr in -lHcurses" >&5 +echo "configure:6654: checking for initscr in -lHcurses" >&5 ac_lib_var=`echo Hcurses'_'initscr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6583,7 +6658,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lHcurses $LIBS" cat > conftest.$ac_ext <<EOF -#line 6587 "configure" +#line 6662 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6594,7 +6669,7 @@ int main() { initscr() ; return 0; } EOF -if { (eval echo configure:6598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6643,12 +6718,12 @@ if test ".$ac_cv_func_initscr" != .yes ; then # Check for library containing tgoto. Do this before curses library # because it may be needed to link the test-case for initscr. echo $ac_n "checking for tgoto""... $ac_c" 1>&6 -echo "configure:6647: checking for tgoto" >&5 +echo "configure:6722: checking for tgoto" >&5 if eval "test \"`echo '$''{'ac_cv_func_tgoto'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6652 "configure" +#line 6727 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char tgoto(); below. */ @@ -6671,7 +6746,7 @@ tgoto(); ; return 0; } EOF -if { (eval echo configure:6675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_tgoto=yes" else @@ -6692,7 +6767,7 @@ else for cf_term_lib in termcap termlib unknown do echo $ac_n "checking for tgoto in -l$cf_term_lib""... $ac_c" 1>&6 -echo "configure:6696: checking for tgoto in -l$cf_term_lib" >&5 +echo "configure:6771: checking for tgoto in -l$cf_term_lib" >&5 ac_lib_var=`echo $cf_term_lib'_'tgoto | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6700,7 +6775,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$cf_term_lib $LIBS" cat > conftest.$ac_ext <<EOF -#line 6704 "configure" +#line 6779 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6711,7 +6786,7 @@ int main() { tgoto() ; return 0; } EOF -if { (eval echo configure:6715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6741,7 +6816,7 @@ fi for cf_curs_lib in cursesX curses ncurses xcurses jcurses unknown do echo $ac_n "checking for initscr in -l$cf_curs_lib""... $ac_c" 1>&6 -echo "configure:6745: checking for initscr in -l$cf_curs_lib" >&5 +echo "configure:6820: checking for initscr in -l$cf_curs_lib" >&5 ac_lib_var=`echo $cf_curs_lib'_'initscr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6749,7 +6824,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$cf_curs_lib $LIBS" cat > conftest.$ac_ext <<EOF -#line 6753 "configure" +#line 6828 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6760,7 +6835,7 @@ int main() { initscr() ; return 0; } EOF -if { (eval echo configure:6764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6786,16 +6861,16 @@ fi LIBS="-l$cf_curs_lib $cf_save_LIBS" if test "$cf_term_lib" = unknown ; then echo $ac_n "checking if we can link with $cf_curs_lib library""... $ac_c" 1>&6 -echo "configure:6790: checking if we can link with $cf_curs_lib library" >&5 +echo "configure:6865: checking if we can link with $cf_curs_lib library" >&5 cat > conftest.$ac_ext <<EOF -#line 6792 "configure" +#line 6867 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> int main() { initscr() ; return 0; } EOF -if { (eval echo configure:6799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_result=yes else @@ -6809,16 +6884,16 @@ rm -f conftest* test $cf_result = no && { echo "configure: error: Cannot link curses library" 1>&2; exit 1; } elif test "$cf_term_lib" != predefined ; then echo $ac_n "checking if we need both $cf_curs_lib and $cf_term_lib libraries""... $ac_c" 1>&6 -echo "configure:6813: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5 +echo "configure:6888: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5 cat > conftest.$ac_ext <<EOF -#line 6815 "configure" +#line 6890 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> int main() { initscr(); tgoto((char *)0, 0, 0); ; return 0; } EOF -if { (eval echo configure:6822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_result=no else @@ -6828,14 +6903,14 @@ else LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS" cat > conftest.$ac_ext <<EOF -#line 6832 "configure" +#line 6907 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> int main() { initscr() ; return 0; } EOF -if { (eval echo configure:6839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_result=yes else @@ -6857,14 +6932,14 @@ fi echo $ac_n "checking for curses performance tradeoff""... $ac_c" 1>&6 -echo "configure:6861: checking for curses performance tradeoff" >&5 +echo "configure:6936: checking for curses performance tradeoff" >&5 if eval "test \"`echo '$''{'cf_cv_curs_performance'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cf_cv_curs_performance=no cat > conftest.$ac_ext <<EOF -#line 6868 "configure" +#line 6943 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -6878,11 +6953,11 @@ int main() { ; return 0; } EOF -if { (eval echo configure:6882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 6886 "configure" +#line 6961 "configure" #include "confdefs.h" #define CURS_PERFORMANCE @@ -6897,7 +6972,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:6901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_curs_performance=yes else @@ -6922,13 +6997,13 @@ EOF ncurses) echo $ac_n "checking for ncurses header file""... $ac_c" 1>&6 -echo "configure:6926: checking for ncurses header file" >&5 +echo "configure:7001: checking for ncurses header file" >&5 if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6932 "configure" +#line 7007 "configure" #include "confdefs.h" #include <curses.h> int main() { @@ -6945,7 +7020,7 @@ make an error ; return 0; } EOF -if { (eval echo configure:6949: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_ncurses_header=predefined else @@ -7031,7 +7106,7 @@ done ;; esac echo $ac_n "checking for ncurses version""... $ac_c" 1>&6 -echo "configure:7035: checking for ncurses version" >&5 +echo "configure:7110: checking for ncurses version" >&5 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7056,7 +7131,7 @@ Autoconf "old" #endif EOF cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out" - { (eval echo configure:7060: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; } + { (eval echo configure:7135: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; } if test -f conftest.out ; then cf_out=`cat conftest.out | sed -e 's@^Autoconf @@' -e 's@^[^"]*"@@' -e 's@".*@@'` test -n "$cf_out" && cf_cv_ncurses_version="$cf_out" @@ -7065,7 +7140,7 @@ EOF else cat > conftest.$ac_ext <<EOF -#line 7069 "configure" +#line 7144 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -7088,7 +7163,7 @@ int main() exit(0); } EOF -if { (eval echo configure:7092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then cf_cv_ncurses_version=`cat $cf_tempfile` @@ -7113,7 +7188,7 @@ echo "$ac_t""$cf_cv_ncurses_version" 1>&6 cf_ncurses_LIBS="" cf_ncurses_SAVE="$LIBS" echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6 -echo "configure:7117: checking for Gpm_Open in -lgpm" >&5 +echo "configure:7192: checking for Gpm_Open in -lgpm" >&5 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7121,7 +7196,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgpm $LIBS" cat > conftest.$ac_ext <<EOF -#line 7125 "configure" +#line 7200 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7132,7 +7207,7 @@ int main() { Gpm_Open() ; return 0; } EOF -if { (eval echo configure:7136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7148,7 +7223,7 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6 -echo "configure:7152: checking for initscr in -lgpm" >&5 +echo "configure:7227: checking for initscr in -lgpm" >&5 ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7156,7 +7231,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgpm $LIBS" cat > conftest.$ac_ext <<EOF -#line 7160 "configure" +#line 7235 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7167,7 +7242,7 @@ int main() { initscr() ; return 0; } EOF -if { (eval echo configure:7171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7198,7 +7273,7 @@ freebsd*) # This is only necessary if you are linking against an obsolete # version of ncurses (but it should do no harm, since it's static). echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6 -echo "configure:7202: checking for tgoto in -lmytinfo" >&5 +echo "configure:7277: checking for tgoto in -lmytinfo" >&5 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7206,7 +7281,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lmytinfo $LIBS" cat > conftest.$ac_ext <<EOF -#line 7210 "configure" +#line 7285 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7217,7 +7292,7 @@ int main() { tgoto() ; return 0; } EOF -if { (eval echo configure:7221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7245,12 +7320,12 @@ LIBS="$cf_ncurses_LIBS $LIBS" cf_cv_have_lib_ncurses=no cf_libdir="" echo $ac_n "checking for initscr""... $ac_c" 1>&6 -echo "configure:7249: checking for initscr" >&5 +echo "configure:7324: checking for initscr" >&5 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 7254 "configure" +#line 7329 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char initscr(); below. */ @@ -7273,7 +7348,7 @@ initscr(); ; return 0; } EOF -if { (eval echo configure:7277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_initscr=yes" else @@ -7293,17 +7368,17 @@ else cf_save_LIBS="$LIBS" echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6 -echo "configure:7297: checking for initscr in -lncurses" >&5 +echo "configure:7372: checking for initscr in -lncurses" >&5 LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <<EOF -#line 7300 "configure" +#line 7375 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> int main() { initscr() ; return 0; } EOF -if { (eval echo configure:7307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cf_cv_have_lib_ncurses=yes @@ -7330,17 +7405,17 @@ test "$prefix" != /usr && cf_search="$cf_search /usr/lib /usr/lib/ncur for cf_libdir in $cf_search do echo $ac_n "checking for -lncurses in $cf_libdir""... $ac_c" 1>&6 -echo "configure:7334: checking for -lncurses in $cf_libdir" >&5 +echo "configure:7409: checking for -lncurses in $cf_libdir" >&5 LIBS="-L$cf_libdir -lncurses $cf_save_LIBS" cat > conftest.$ac_ext <<EOF -#line 7337 "configure" +#line 7412 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> int main() { initscr() ; return 0; } EOF -if { (eval echo configure:7344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cf_cv_have_lib_ncurses=yes @@ -7372,7 +7447,7 @@ esac if test -n "$cf_ncurses_LIBS" ; then echo $ac_n "checking if we can link ncurses without $cf_ncurses_LIBS""... $ac_c" 1>&6 -echo "configure:7376: checking if we can link ncurses without $cf_ncurses_LIBS" >&5 +echo "configure:7451: checking if we can link ncurses without $cf_ncurses_LIBS" >&5 cf_ncurses_SAVE="$LIBS" for p in $cf_ncurses_LIBS ; do q=`echo $LIBS | sed -e 's/'$p' //' -e 's/'$p'$//'` @@ -7381,14 +7456,14 @@ echo "configure:7376: checking if we can link ncurses without $cf_ncurses_LIBS" fi done cat > conftest.$ac_ext <<EOF -#line 7385 "configure" +#line 7460 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> int main() { initscr(); mousemask(0,0); tgoto((char *)0, 0, 0); ; return 0; } EOF -if { (eval echo configure:7392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -7405,20 +7480,20 @@ fi slang) echo $ac_n "checking for slang header file""... $ac_c" 1>&6 -echo "configure:7409: checking for slang header file" >&5 +echo "configure:7484: checking for slang header file" >&5 if eval "test \"`echo '$''{'cf_cv_slang_header'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 7415 "configure" +#line 7490 "configure" #include "confdefs.h" #include <slang.h> int main() { printf("%s\n", SLANG_VERSION) ; return 0; } EOF -if { (eval echo configure:7422: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7497: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_slang_header=predefined else @@ -7500,24 +7575,24 @@ else cf_cv_termlib=none cat > conftest.$ac_ext <<EOF -#line 7504 "configure" +#line 7579 "configure" #include "confdefs.h" int main() { char *x=(char*)tgoto("",0,0) ; return 0; } EOF -if { (eval echo configure:7511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 7514 "configure" +#line 7589 "configure" #include "confdefs.h" int main() { int x=tigetstr("") ; return 0; } EOF -if { (eval echo configure:7521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_termlib=terminfo else @@ -7539,7 +7614,7 @@ else # HP-UX 9.x terminfo has setupterm, but no tigetstr. if test "$cf_cv_termlib" = none; then echo $ac_n "checking for tigetstr in -ltermlib""... $ac_c" 1>&6 -echo "configure:7543: checking for tigetstr in -ltermlib" >&5 +echo "configure:7618: checking for tigetstr in -ltermlib" >&5 ac_lib_var=`echo termlib'_'tigetstr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7547,7 +7622,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermlib $LIBS" cat > conftest.$ac_ext <<EOF -#line 7551 "configure" +#line 7626 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7558,7 +7633,7 @@ int main() { tigetstr() ; return 0; } EOF -if { (eval echo configure:7562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7581,7 +7656,7 @@ fi fi if test "$cf_cv_termlib" = none; then echo $ac_n "checking for tgoto in -ltermlib""... $ac_c" 1>&6 -echo "configure:7585: checking for tgoto in -ltermlib" >&5 +echo "configure:7660: checking for tgoto in -ltermlib" >&5 ac_lib_var=`echo termlib'_'tgoto | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7589,7 +7664,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermlib $LIBS" cat > conftest.$ac_ext <<EOF -#line 7593 "configure" +#line 7668 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7600,7 +7675,7 @@ int main() { tgoto() ; return 0; } EOF -if { (eval echo configure:7604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7624,7 +7699,7 @@ fi if test "$cf_cv_termlib" = none; then # allow curses library for broken AIX system. echo $ac_n "checking for initscr in -lcurses""... $ac_c" 1>&6 -echo "configure:7628: checking for initscr in -lcurses" >&5 +echo "configure:7703: checking for initscr in -lcurses" >&5 ac_lib_var=`echo curses'_'initscr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7632,7 +7707,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcurses $LIBS" cat > conftest.$ac_ext <<EOF -#line 7636 "configure" +#line 7711 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7643,7 +7718,7 @@ int main() { initscr() ; return 0; } EOF -if { (eval echo configure:7647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7664,7 +7739,7 @@ else fi echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6 -echo "configure:7668: checking for tgoto in -ltermcap" >&5 +echo "configure:7743: checking for tgoto in -ltermcap" >&5 ac_lib_var=`echo termcap'_'tgoto | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7672,7 +7747,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext <<EOF -#line 7676 "configure" +#line 7751 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7683,7 +7758,7 @@ int main() { tgoto() ; return 0; } EOF -if { (eval echo configure:7687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7706,7 +7781,7 @@ fi fi if test "$cf_cv_termlib" = none; then echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6 -echo "configure:7710: checking for tgoto in -ltermcap" >&5 +echo "configure:7785: checking for tgoto in -ltermcap" >&5 ac_lib_var=`echo termcap'_'tgoto | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7714,7 +7789,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext <<EOF -#line 7718 "configure" +#line 7793 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7725,7 +7800,7 @@ int main() { tgoto() ; return 0; } EOF -if { (eval echo configure:7729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7748,7 +7823,7 @@ fi fi if test "$cf_cv_termlib" = none; then echo $ac_n "checking for tgoto in -lncurses""... $ac_c" 1>&6 -echo "configure:7752: checking for tgoto in -lncurses" >&5 +echo "configure:7827: checking for tgoto in -lncurses" >&5 ac_lib_var=`echo ncurses'_'tgoto | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7756,7 +7831,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <<EOF -#line 7760 "configure" +#line 7835 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7767,7 +7842,7 @@ int main() { tgoto() ; return 0; } EOF -if { (eval echo configure:7771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7799,12 +7874,12 @@ fi cf_slang_LIBS2="$LIBS" echo $ac_n "checking for acos""... $ac_c" 1>&6 -echo "configure:7803: checking for acos" >&5 +echo "configure:7878: checking for acos" >&5 if eval "test \"`echo '$''{'ac_cv_func_acos'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 7808 "configure" +#line 7883 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char acos(); below. */ @@ -7827,7 +7902,7 @@ acos(); ; return 0; } EOF -if { (eval echo configure:7831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_acos=yes" else @@ -7846,7 +7921,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for acos in -lm""... $ac_c" 1>&6 -echo "configure:7850: checking for acos in -lm" >&5 +echo "configure:7925: checking for acos in -lm" >&5 ac_lib_var=`echo m'_'acos | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7854,7 +7929,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS $LIBS" cat > conftest.$ac_ext <<EOF -#line 7858 "configure" +#line 7933 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7865,7 +7940,7 @@ int main() { acos() ; return 0; } EOF -if { (eval echo configure:7869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7905,12 +7980,12 @@ fi cf_cv_have_lib_slang=no cf_libdir="" echo $ac_n "checking for SLtt_get_screen_size""... $ac_c" 1>&6 -echo "configure:7909: checking for SLtt_get_screen_size" >&5 +echo "configure:7984: checking for SLtt_get_screen_size" >&5 if eval "test \"`echo '$''{'ac_cv_func_SLtt_get_screen_size'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 7914 "configure" +#line 7989 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char SLtt_get_screen_size(); below. */ @@ -7933,7 +8008,7 @@ SLtt_get_screen_size(); ; return 0; } EOF -if { (eval echo configure:7937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_SLtt_get_screen_size=yes" else @@ -7953,17 +8028,17 @@ else cf_save_LIBS="$LIBS" echo $ac_n "checking for SLtt_get_screen_size in -lslang""... $ac_c" 1>&6 -echo "configure:7957: checking for SLtt_get_screen_size in -lslang" >&5 +echo "configure:8032: checking for SLtt_get_screen_size in -lslang" >&5 LIBS="-lslang $LIBS" cat > conftest.$ac_ext <<EOF -#line 7960 "configure" +#line 8035 "configure" #include "confdefs.h" #include <slang.h> int main() { SLtt_get_screen_size() ; return 0; } EOF -if { (eval echo configure:7967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cf_cv_have_lib_slang=yes @@ -7990,17 +8065,17 @@ test "$prefix" != /usr && cf_search="$cf_search /usr/lib /usr/lib/slan for cf_libdir in $cf_search do echo $ac_n "checking for -lslang in $cf_libdir""... $ac_c" 1>&6 -echo "configure:7994: checking for -lslang in $cf_libdir" >&5 +echo "configure:8069: checking for -lslang in $cf_libdir" >&5 LIBS="-L$cf_libdir -lslang $cf_save_LIBS" cat > conftest.$ac_ext <<EOF -#line 7997 "configure" +#line 8072 "configure" #include "confdefs.h" #include <slang.h> int main() { SLtt_get_screen_size() ; return 0; } EOF -if { (eval echo configure:8004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cf_cv_have_lib_slang=yes @@ -8031,7 +8106,7 @@ esac cf_slang_LIBS3="$LIBS" echo $ac_n "checking if we can link slang without termcap""... $ac_c" 1>&6 -echo "configure:8035: checking if we can link slang without termcap" >&5 +echo "configure:8110: checking if we can link slang without termcap" >&5 if test -n "`echo $cf_slang_LIBS1 | sed -e 's/ //g'`" ; then cf_exclude=`echo ".$cf_slang_LIBS2" | sed -e "s@$cf_slang_LIBS1@@" -e 's@^.@@'` else @@ -8039,14 +8114,14 @@ else fi LIBS=`echo ".$cf_slang_LIBS3" | sed -e "s@$cf_exclude@@" -e 's@^.@@'` cat > conftest.$ac_ext <<EOF -#line 8043 "configure" +#line 8118 "configure" #include "confdefs.h" #include <slang.h> int main() { SLtt_get_screen_size() ; return 0; } EOF -if { (eval echo configure:8050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_result=yes else @@ -8066,7 +8141,7 @@ eval cf_libdir=$libdir cf_libdir=`echo $cf_libdir | sed -e s@'^NONE/'@$prefix/@ -e s@'^NONE/'@$ac_default_prefix/@` echo $ac_n "checking for location of config-file""... $ac_c" 1>&6 -echo "configure:8070: checking for location of config-file" >&5 +echo "configure:8145: checking for location of config-file" >&5 LYNX_CFG_FILE=$cf_libdir/lynx.cfg cat >> confdefs.h <<EOF #define LYNX_CFG_FILE "$LYNX_CFG_FILE" @@ -8076,12 +8151,12 @@ echo "$ac_t""$LYNX_CFG_FILE" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:8080: checking for ANSI C header files" >&5 +echo "configure:8155: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 8085 "configure" +#line 8160 "configure" #include "confdefs.h" #include <stdlib.h> #include <stdarg.h> @@ -8089,7 +8164,7 @@ else #include <float.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8168: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8106,7 +8181,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 8110 "configure" +#line 8185 "configure" #include "confdefs.h" #include <string.h> EOF @@ -8124,7 +8199,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 8128 "configure" +#line 8203 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -8145,7 +8220,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <<EOF -#line 8149 "configure" +#line 8224 "configure" #include "confdefs.h" #include <ctype.h> #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -8156,7 +8231,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:8160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -8180,12 +8255,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:8184: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:8259: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 8189 "configure" +#line 8264 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/time.h> @@ -8194,7 +8269,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:8198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -8219,12 +8294,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:8223: checking for $ac_hdr that defines DIR" >&5 +echo "configure:8298: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 8228 "configure" +#line 8303 "configure" #include "confdefs.h" #include <sys/types.h> #include <$ac_hdr> @@ -8232,7 +8307,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:8236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -8257,7 +8332,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:8261: checking for opendir in -ldir" >&5 +echo "configure:8336: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8265,7 +8340,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <<EOF -#line 8269 "configure" +#line 8344 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -8276,7 +8351,7 @@ int main() { opendir() ; return 0; } EOF -if { (eval echo configure:8280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8298,7 +8373,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:8302: checking for opendir in -lx" >&5 +echo "configure:8377: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8306,7 +8381,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <<EOF -#line 8310 "configure" +#line 8385 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -8317,7 +8392,7 @@ int main() { opendir() ; return 0; } EOF -if { (eval echo configure:8321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8356,17 +8431,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8360: checking for $ac_hdr" >&5 +echo "configure:8435: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 8365 "configure" +#line 8440 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8370: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8394,13 +8469,13 @@ done echo $ac_n "checking termio.h and termios.h""... $ac_c" 1>&6 -echo "configure:8398: checking termio.h and termios.h" >&5 +echo "configure:8473: checking termio.h and termios.h" >&5 if eval "test \"`echo '$''{'cf_cv_termio_and_termios'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 8404 "configure" +#line 8479 "configure" #include "confdefs.h" #if HAVE_TERMIO_H @@ -8413,7 +8488,7 @@ int main() { putchar (0x0a) ; return 0; } EOF -if { (eval echo configure:8417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8492: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_termio_and_termios=yes else @@ -8436,17 +8511,17 @@ for ac_hdr in sys/wait.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8440: checking for $ac_hdr" >&5 +echo "configure:8515: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 8445 "configure" +#line 8520 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8450: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8525: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8483,17 +8558,17 @@ for ac_hdr in wait.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8487: checking for $ac_hdr" >&5 +echo "configure:8562: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 8492 "configure" +#line 8567 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8497: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8523,17 +8598,17 @@ for ac_hdr in waitstatus.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8527: checking for $ac_hdr" >&5 +echo "configure:8602: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 8532 "configure" +#line 8607 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8612: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8574,13 +8649,13 @@ fi echo $ac_n "checking for union wait""... $ac_c" 1>&6 -echo "configure:8578: checking for union wait" >&5 +echo "configure:8653: checking for union wait" >&5 if eval "test \"`echo '$''{'cf_cv_type_unionwait'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 8584 "configure" +#line 8659 "configure" #include "confdefs.h" $cf_wait_headers int main() { @@ -8591,7 +8666,7 @@ int x; ; return 0; } EOF -if { (eval echo configure:8595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_type_unionwait=no echo compiles ok w/o union wait 1>&5 @@ -8602,7 +8677,7 @@ else rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 8606 "configure" +#line 8681 "configure" #include "confdefs.h" $cf_wait_headers int main() { @@ -8617,7 +8692,7 @@ union wait x; ; return 0; } EOF -if { (eval echo configure:8621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_type_unionwait=yes echo compiles ok with union wait and possibly macros too 1>&5 @@ -8644,20 +8719,20 @@ EOF if test $cf_cv_type_unionwait = yes; then echo $ac_n "checking if union wait can be used as wait-arg""... $ac_c" 1>&6 -echo "configure:8648: checking if union wait can be used as wait-arg" >&5 +echo "configure:8723: checking if union wait can be used as wait-arg" >&5 if eval "test \"`echo '$''{'cf_cv_arg_union_wait'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 8654 "configure" +#line 8729 "configure" #include "confdefs.h" $cf_wait_headers int main() { union wait x; wait(&x) ; return 0; } EOF -if { (eval echo configure:8661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8736: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_arg_union_wait=yes else @@ -8677,20 +8752,20 @@ EOF echo $ac_n "checking if union wait can be used as waitpid-arg""... $ac_c" 1>&6 -echo "configure:8681: checking if union wait can be used as waitpid-arg" >&5 +echo "configure:8756: checking if union wait can be used as waitpid-arg" >&5 if eval "test \"`echo '$''{'cf_cv_arg_union_waitpid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 8687 "configure" +#line 8762 "configure" #include "confdefs.h" $cf_wait_headers int main() { union wait x; waitpid(0, &x, 0) ; return 0; } EOF -if { (eval echo configure:8694: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_arg_union_waitpid=yes else @@ -8716,17 +8791,17 @@ for ac_hdr in stdarg.h varargs.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8720: checking for $ac_hdr" >&5 +echo "configure:8795: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 8725 "configure" +#line 8800 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8730: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8805: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8753,13 +8828,13 @@ fi done echo $ac_n "checking for standard varargs""... $ac_c" 1>&6 -echo "configure:8757: checking for standard varargs" >&5 +echo "configure:8832: checking for standard varargs" >&5 if eval "test \"`echo '$''{'cf_cv_ansi_varargs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 8763 "configure" +#line 8838 "configure" #include "confdefs.h" #if HAVE_STDARG_H @@ -8774,7 +8849,7 @@ int main() { return 0;} int foo(char *fmt,...){va_list args;va_start(args,fmt);va_end(args) ; return 0; } EOF -if { (eval echo configure:8778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_ansi_varargs=yes else @@ -8794,12 +8869,12 @@ EOF echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:8798: checking for uid_t in sys/types.h" >&5 +echo "configure:8873: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 8803 "configure" +#line 8878 "configure" #include "confdefs.h" #include <sys/types.h> EOF @@ -8828,7 +8903,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:8832: checking type of array argument to getgroups" >&5 +echo "configure:8907: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8836,7 +8911,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <<EOF -#line 8840 "configure" +#line 8915 "configure" #include "confdefs.h" /* Thanks to Mike Rendell for this test. */ @@ -8861,7 +8936,7 @@ main() } EOF -if { (eval echo configure:8865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -8875,7 +8950,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext <<EOF -#line 8879 "configure" +#line 8954 "configure" #include "confdefs.h" #include <unistd.h> EOF @@ -8899,12 +8974,12 @@ EOF echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:8903: checking for pid_t" >&5 +echo "configure:8978: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 8908 "configure" +#line 8983 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -8932,12 +9007,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:8936: checking for uid_t in sys/types.h" >&5 +echo "configure:9011: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 8941 "configure" +#line 9016 "configure" #include "confdefs.h" #include <sys/types.h> EOF @@ -8966,12 +9041,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:8970: checking for mode_t" >&5 +echo "configure:9045: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 8975 "configure" +#line 9050 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -9002,17 +9077,17 @@ fi ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 -echo "configure:9006: checking for vfork.h" >&5 +echo "configure:9081: checking for vfork.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 9011 "configure" +#line 9086 "configure" #include "confdefs.h" #include <vfork.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9091: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9037,18 +9112,18 @@ else fi echo $ac_n "checking for working vfork""... $ac_c" 1>&6 -echo "configure:9041: checking for working vfork" >&5 +echo "configure:9116: checking for working vfork" >&5 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then echo $ac_n "checking for vfork""... $ac_c" 1>&6 -echo "configure:9047: checking for vfork" >&5 +echo "configure:9122: checking for vfork" >&5 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 9052 "configure" +#line 9127 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char vfork(); below. */ @@ -9071,7 +9146,7 @@ vfork(); ; return 0; } EOF -if { (eval echo configure:9075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vfork=yes" else @@ -9093,7 +9168,7 @@ fi ac_cv_func_vfork_works=$ac_cv_func_vfork else cat > conftest.$ac_ext <<EOF -#line 9097 "configure" +#line 9172 "configure" #include "confdefs.h" /* Thanks to Paul Eggert for this test. */ #include <stdio.h> @@ -9188,7 +9263,7 @@ main() { } } EOF -if { (eval echo configure:9192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_vfork_works=yes else @@ -9212,13 +9287,13 @@ fi echo $ac_n "checking if we should use fcntl or ioctl""... $ac_c" 1>&6 -echo "configure:9216: checking if we should use fcntl or ioctl" >&5 +echo "configure:9291: checking if we should use fcntl or ioctl" >&5 if eval "test \"`echo '$''{'cf_cv_fionbio'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 9222 "configure" +#line 9297 "configure" #include "confdefs.h" #include <sys/types.h> @@ -9230,7 +9305,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:9234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_fionbio=ioctl else @@ -9239,7 +9314,7 @@ else rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 9243 "configure" +#line 9318 "configure" #include "confdefs.h" #include <sys/types.h> @@ -9256,7 +9331,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:9260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_fionbio=fcntl else @@ -9279,20 +9354,20 @@ EOF echo $ac_n "checking for broken/missing definition of remove""... $ac_c" 1>&6 -echo "configure:9283: checking for broken/missing definition of remove" >&5 +echo "configure:9358: checking for broken/missing definition of remove" >&5 if eval "test \"`echo '$''{'cf_cv_baddef_remove'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 9289 "configure" +#line 9364 "configure" #include "confdefs.h" #include <stdio.h> int main() { remove("dummy") ; return 0; } EOF -if { (eval echo configure:9296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_baddef_remove=no else @@ -9300,7 +9375,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 9304 "configure" +#line 9379 "configure" #include "confdefs.h" #include <stdio.h> int __unlink(name) { return unlink(name); } @@ -9308,7 +9383,7 @@ int main() { remove("dummy") ; return 0; } EOF -if { (eval echo configure:9312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_baddef_remove=yes else @@ -9332,13 +9407,13 @@ EOF echo $ac_n "checking for lstat""... $ac_c" 1>&6 -echo "configure:9336: checking for lstat" >&5 +echo "configure:9411: checking for lstat" >&5 if eval "test \"`echo '$''{'ac_cv_func_lstat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 9342 "configure" +#line 9417 "configure" #include "confdefs.h" #include <sys/types.h> @@ -9347,7 +9422,7 @@ int main() { lstat(".", (struct stat *)0) ; return 0; } EOF -if { (eval echo configure:9351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_lstat=yes else @@ -9382,12 +9457,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9386: checking for $ac_func" >&5 +echo "configure:9461: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 9391 "configure" +#line 9466 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -9410,7 +9485,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:9414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -9440,12 +9515,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9444: checking for $ac_func" >&5 +echo "configure:9519: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 9449 "configure" +#line 9524 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -9468,7 +9543,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:9472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -9499,12 +9574,12 @@ for ac_func in strstr do echo $ac_n "checking for $ac_func declaration""... $ac_c" 1>&6 -echo "configure:9503: checking for $ac_func declaration" >&5 +echo "configure:9578: checking for $ac_func declaration" >&5 if eval "test \"`echo '$''{'ac_cv_func_decl_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 9508 "configure" +#line 9583 "configure" #include "confdefs.h" #include <string.h> int main() { @@ -9513,11 +9588,11 @@ extern int ${ac_func}(); #endif ; return 0; } EOF -if { (eval echo configure:9517: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9592: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 9521 "configure" +#line 9596 "configure" #include "confdefs.h" #include <string.h> int main() { @@ -9526,7 +9601,7 @@ int (*p)() = ${ac_func}; #endif ; return 0; } EOF -if { (eval echo configure:9530: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_decl_$ac_func=yes" @@ -9568,12 +9643,12 @@ for ac_func in getgrgid getgrnam do echo $ac_n "checking for $ac_func declaration""... $ac_c" 1>&6 -echo "configure:9572: checking for $ac_func declaration" >&5 +echo "configure:9647: checking for $ac_func declaration" >&5 if eval "test \"`echo '$''{'ac_cv_func_decl_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 9577 "configure" +#line 9652 "configure" #include "confdefs.h" #include <stdio.h> @@ -9584,11 +9659,11 @@ extern int ${ac_func}(); #endif ; return 0; } EOF -if { (eval echo configure:9588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 9592 "configure" +#line 9667 "configure" #include "confdefs.h" #include <stdio.h> @@ -9599,7 +9674,7 @@ int (*p)() = ${ac_func}; #endif ; return 0; } EOF -if { (eval echo configure:9603: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_decl_$ac_func=yes" @@ -9641,13 +9716,13 @@ done echo $ac_n "checking if TRUE/FALSE are defined""... $ac_c" 1>&6 -echo "configure:9645: checking if TRUE/FALSE are defined" >&5 +echo "configure:9720: checking if TRUE/FALSE are defined" >&5 if eval "test \"`echo '$''{'cf_cv_bool_defs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 9651 "configure" +#line 9726 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -9656,7 +9731,7 @@ int main() { int x = TRUE, y = FALSE ; return 0; } EOF -if { (eval echo configure:9660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9735: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_bool_defs=yes else @@ -9683,13 +9758,13 @@ fi echo $ac_n "checking if external errno is declared""... $ac_c" 1>&6 -echo "configure:9687: checking if external errno is declared" >&5 +echo "configure:9762: checking if external errno is declared" >&5 if eval "test \"`echo '$''{'cf_cv_dcl_errno'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 9693 "configure" +#line 9768 "configure" #include "confdefs.h" #if HAVE_STDLIB_H @@ -9702,7 +9777,7 @@ int main() { long x = (long) errno ; return 0; } EOF -if { (eval echo configure:9706: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval 'cf_cv_dcl_'errno'=yes' else @@ -9733,13 +9808,13 @@ fi # It's possible (for near-UNIX clones) that the data doesn't exist echo $ac_n "checking if external errno exists""... $ac_c" 1>&6 -echo "configure:9737: checking if external errno exists" >&5 +echo "configure:9812: checking if external errno exists" >&5 if eval "test \"`echo '$''{'cf_cv_have_errno'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 9743 "configure" +#line 9818 "configure" #include "confdefs.h" #undef errno @@ -9749,7 +9824,7 @@ int main() { errno = 2 ; return 0; } EOF -if { (eval echo configure:9753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval 'cf_cv_have_'errno'=yes' else @@ -9781,20 +9856,20 @@ fi echo $ac_n "checking for setlocale()""... $ac_c" 1>&6 -echo "configure:9785: checking for setlocale()" >&5 +echo "configure:9860: checking for setlocale()" >&5 if eval "test \"`echo '$''{'cf_cv_locale'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 9791 "configure" +#line 9866 "configure" #include "confdefs.h" #include <locale.h> int main() { setlocale(LC_ALL, "") ; return 0; } EOF -if { (eval echo configure:9798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_locale=yes else @@ -9815,13 +9890,13 @@ EOF echo $ac_n "checking if NGROUPS is defined""... $ac_c" 1>&6 -echo "configure:9819: checking if NGROUPS is defined" >&5 +echo "configure:9894: checking if NGROUPS is defined" >&5 if eval "test \"`echo '$''{'cf_cv_ngroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 9825 "configure" +#line 9900 "configure" #include "confdefs.h" #if HAVE_SYS_PARAM_H @@ -9835,7 +9910,7 @@ int main() { int x = NGROUPS ; return 0; } EOF -if { (eval echo configure:9839: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9914: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_ngroups=yes else @@ -9843,7 +9918,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 9847 "configure" +#line 9922 "configure" #include "confdefs.h" #if HAVE_SYS_PARAM_H @@ -9857,7 +9932,7 @@ int main() { int x = NGROUPS_MAX ; return 0; } EOF -if { (eval echo configure:9861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_ngroups=NGROUPS_MAX else @@ -9891,13 +9966,13 @@ for cf_name in sys_nerr sys_errlist do echo $ac_n "checking if external $cf_name is declared""... $ac_c" 1>&6 -echo "configure:9895: checking if external $cf_name is declared" >&5 +echo "configure:9970: checking if external $cf_name is declared" >&5 if eval "test \"`echo '$''{'cf_cv_dcl_$cf_name'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 9901 "configure" +#line 9976 "configure" #include "confdefs.h" #if HAVE_STDLIB_H @@ -9910,7 +9985,7 @@ int main() { long x = (long) $cf_name ; return 0; } EOF -if { (eval echo configure:9914: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval 'cf_cv_dcl_'$cf_name'=yes' else @@ -9941,13 +10016,13 @@ fi # It's possible (for near-UNIX clones) that the data doesn't exist echo $ac_n "checking if external $cf_name exists""... $ac_c" 1>&6 -echo "configure:9945: checking if external $cf_name exists" >&5 +echo "configure:10020: checking if external $cf_name exists" >&5 if eval "test \"`echo '$''{'cf_cv_have_$cf_name'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 9951 "configure" +#line 10026 "configure" #include "confdefs.h" #undef $cf_name @@ -9957,7 +10032,7 @@ int main() { $cf_name = 2 ; return 0; } EOF -if { (eval echo configure:9961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval 'cf_cv_have_'$cf_name'=yes' else @@ -9990,13 +10065,13 @@ done echo $ac_n "checking if struct utmp is declared""... $ac_c" 1>&6 -echo "configure:9994: checking if struct utmp is declared" >&5 +echo "configure:10069: checking if struct utmp is declared" >&5 if eval "test \"`echo '$''{'cf_cv_have_utmp'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 10000 "configure" +#line 10075 "configure" #include "confdefs.h" #include <sys/types.h> @@ -10005,7 +10080,7 @@ int main() { struct utmp x; char *y = &x.ut_host[0] ; return 0; } EOF -if { (eval echo configure:10009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_have_utmp=yes else @@ -10013,14 +10088,14 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 10017 "configure" +#line 10092 "configure" #include "confdefs.h" #include <utmpx.h> int main() { struct utmpx x; char *y = &x.ut_host[0] ; return 0; } EOF -if { (eval echo configure:10024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_have_utmp=utmpx else @@ -10048,13 +10123,13 @@ EOF echo $ac_n "checking if external h_errno exists""... $ac_c" 1>&6 -echo "configure:10052: checking if external h_errno exists" >&5 +echo "configure:10127: checking if external h_errno exists" >&5 if eval "test \"`echo '$''{'cf_cv_have_h_errno'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 10058 "configure" +#line 10133 "configure" #include "confdefs.h" #undef h_errno @@ -10064,7 +10139,7 @@ int main() { h_errno = 2 ; return 0; } EOF -if { (eval echo configure:10068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval 'cf_cv_have_'h_errno'=yes' else @@ -10095,13 +10170,13 @@ fi echo $ac_n "checking if character set is EBCDIC""... $ac_c" 1>&6 -echo "configure:10099: checking if character set is EBCDIC" >&5 +echo "configure:10174: checking if character set is EBCDIC" >&5 if eval "test \"`echo '$''{'cf_cv_ebcdic'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 10105 "configure" +#line 10180 "configure" #include "confdefs.h" int main() { @@ -10114,7 +10189,7 @@ make an error "Character set is not EBCDIC" #endif ; return 0; } EOF -if { (eval echo configure:10118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # TryCompile action if true cf_cv_ebcdic=yes @@ -10148,7 +10223,7 @@ esac if test $cf_cv_screen != slang ; then echo $ac_n "checking if curses supports alternate-character set""... $ac_c" 1>&6 -echo "configure:10152: checking if curses supports alternate-character set" >&5 +echo "configure:10227: checking if curses supports alternate-character set" >&5 if eval "test \"`echo '$''{'cf_cv_alt_char_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10156,7 +10231,7 @@ else for mapname in acs_map _acs_map do cat > conftest.$ac_ext <<EOF -#line 10160 "configure" +#line 10235 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -10165,7 +10240,7 @@ int main() { chtype x = $mapname['l']; $mapname['m'] = 0 ; return 0; } EOF -if { (eval echo configure:10169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_alt_char_set=$mapname break @@ -10188,13 +10263,13 @@ EOF echo $ac_n "checking if curses supports fancy attributes""... $ac_c" 1>&6 -echo "configure:10192: checking if curses supports fancy attributes" >&5 +echo "configure:10267: checking if curses supports fancy attributes" >&5 if eval "test \"`echo '$''{'cf_cv_fancy_curses'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 10198 "configure" +#line 10273 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -10207,7 +10282,7 @@ attrset(A_UNDERLINE|A_BOLD|A_REVERSE); ; return 0; } EOF -if { (eval echo configure:10211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_fancy_curses=yes else @@ -10227,7 +10302,7 @@ EOF echo $ac_n "checking for ncurses version""... $ac_c" 1>&6 -echo "configure:10231: checking for ncurses version" >&5 +echo "configure:10306: checking for ncurses version" >&5 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10252,7 +10327,7 @@ Autoconf "old" #endif EOF cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out" - { (eval echo configure:10256: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; } + { (eval echo configure:10331: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; } if test -f conftest.out ; then cf_out=`cat conftest.out | sed -e 's@^Autoconf @@' -e 's@^[^"]*"@@' -e 's@".*@@'` test -n "$cf_out" && cf_cv_ncurses_version="$cf_out" @@ -10261,7 +10336,7 @@ EOF else cat > conftest.$ac_ext <<EOF -#line 10265 "configure" +#line 10340 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -10284,7 +10359,7 @@ int main() exit(0); } EOF -if { (eval echo configure:10288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then cf_cv_ncurses_version=`cat $cf_tempfile` @@ -10304,13 +10379,13 @@ echo "$ac_t""$cf_cv_ncurses_version" 1>&6 if test "$cf_cv_ncurses_version" != no ; then echo $ac_n "checking for obsolete/broken version of ncurses""... $ac_c" 1>&6 -echo "configure:10308: checking for obsolete/broken version of ncurses" >&5 +echo "configure:10383: checking for obsolete/broken version of ncurses" >&5 if eval "test \"`echo '$''{'cf_cv_ncurses_broken'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 10314 "configure" +#line 10389 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -10324,7 +10399,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:10328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_ncurses_broken=no else @@ -10349,13 +10424,13 @@ fi echo $ac_n "checking if curses supports color attributes""... $ac_c" 1>&6 -echo "configure:10353: checking if curses supports color attributes" >&5 +echo "configure:10428: checking if curses supports color attributes" >&5 if eval "test \"`echo '$''{'cf_cv_color_curses'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 10359 "configure" +#line 10434 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -10370,7 +10445,7 @@ chtype x = COLOR_BLUE; ; return 0; } EOF -if { (eval echo configure:10374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_color_curses=yes else @@ -10397,7 +10472,7 @@ fi echo $ac_n "checking declaration of size-change""... $ac_c" 1>&6 -echo "configure:10401: checking declaration of size-change" >&5 +echo "configure:10476: checking declaration of size-change" >&5 if eval "test \"`echo '$''{'cf_cv_sizechange'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10411,7 +10486,7 @@ do CFLAGS="$cf_save_CFLAGS" test -n "$cf_opts" && CFLAGS="$CFLAGS -D$cf_opts" cat > conftest.$ac_ext <<EOF -#line 10415 "configure" +#line 10490 "configure" #include "confdefs.h" #include <sys/types.h> #if HAVE_TERMIOS_H @@ -10450,7 +10525,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:10454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_sizechange=yes else @@ -10482,20 +10557,20 @@ EOF echo $ac_n "checking if ttytype is declared in curses library""... $ac_c" 1>&6 -echo "configure:10486: checking if ttytype is declared in curses library" >&5 +echo "configure:10561: checking if ttytype is declared in curses library" >&5 if eval "test \"`echo '$''{'cf_cv_have_ttytype'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 10492 "configure" +#line 10567 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> int main() { char *x = &ttytype[1]; *x = 1 ; return 0; } EOF -if { (eval echo configure:10499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_have_ttytype=yes else @@ -10523,12 +10598,12 @@ EOF do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10527: checking for $ac_func" >&5 +echo "configure:10602: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 10532 "configure" +#line 10607 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -10551,7 +10626,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:10555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -10581,7 +10656,7 @@ fi echo $ac_n "checking if configuration info should be browsable""... $ac_c" 1>&6 -echo "configure:10585: checking if configuration info should be browsable" >&5 +echo "configure:10660: checking if configuration info should be browsable" >&5 # Check whether --enable-config-info or --disable-config-info was given. if test "${enable_config_info+set}" = set; then @@ -10605,7 +10680,7 @@ EOF echo $ac_n "checking if new-style forms-based options screen should be used""... $ac_c" 1>&6 -echo "configure:10609: checking if new-style forms-based options screen should be used" >&5 +echo "configure:10684: checking if new-style forms-based options screen should be used" >&5 # Check whether --enable-forms-options or --disable-forms-options was given. if test "${enable_forms_options+set}" = set; then @@ -10629,7 +10704,7 @@ EOF echo $ac_n "checking if old-style options menu should be used""... $ac_c" 1>&6 -echo "configure:10633: checking if old-style options menu should be used" >&5 +echo "configure:10708: checking if old-style options menu should be used" >&5 # Check whether --enable-menu-options or --disable-menu-options was given. if test "${enable_menu_options+set}" = set; then @@ -10653,7 +10728,7 @@ EOF echo $ac_n "checking if experimental address-list page should be used""... $ac_c" 1>&6 -echo "configure:10657: checking if experimental address-list page should be used" >&5 +echo "configure:10732: checking if experimental address-list page should be used" >&5 # Check whether --enable-addrlist-page or --disable-addrlist-page was given. if test "${enable_addrlist_page+set}" = set; then @@ -10677,7 +10752,7 @@ EOF echo $ac_n "checking if color-style code should be used""... $ac_c" 1>&6 -echo "configure:10681: checking if color-style code should be used" >&5 +echo "configure:10756: checking if color-style code should be used" >&5 # Check whether --enable-color-style or --disable-color-style was given. if test "${enable_color_style+set}" = set; then @@ -10725,7 +10800,7 @@ EOF echo "$ac_t""yes" 1>&6 echo $ac_n "checking for location of style-sheet file""... $ac_c" 1>&6 -echo "configure:10729: checking for location of style-sheet file" >&5 +echo "configure:10804: checking for location of style-sheet file" >&5 LYNX_LSS_FILE=$cf_libdir/lynx.lss cat >> confdefs.h <<EOF #define LYNX_LSS_FILE "$LYNX_LSS_FILE" @@ -10743,7 +10818,7 @@ test ".$ac_cv_func_use_default_colors" = ".yes" && use_dft_colors=maybe if test "$use_dft_colors" != no ; then echo $ac_n "checking if you want to use default-colors""... $ac_c" 1>&6 -echo "configure:10747: checking if you want to use default-colors" >&5 +echo "configure:10822: checking if you want to use default-colors" >&5 # Check whether --enable-default-colors or --disable-default-colors was given. if test "${enable_default_colors+set}" = set; then @@ -10768,7 +10843,7 @@ EOF fi echo $ac_n "checking if experimental file-upload logic should be used""... $ac_c" 1>&6 -echo "configure:10772: checking if experimental file-upload logic should be used" >&5 +echo "configure:10847: checking if experimental file-upload logic should be used" >&5 # Check whether --enable-file-upload or --disable-file-upload was given. if test "${enable_file_upload+set}" = set; then @@ -10792,7 +10867,7 @@ EOF echo $ac_n "checking if experimental keyboard-layout logic should be used""... $ac_c" 1>&6 -echo "configure:10796: checking if experimental keyboard-layout logic should be used" >&5 +echo "configure:10871: checking if experimental keyboard-layout logic should be used" >&5 # Check whether --enable-kbd-layout or --disable-kbd-layout was given. if test "${enable_kbd_layout+set}" = set; then @@ -10816,7 +10891,7 @@ EOF echo $ac_n "checking if experimental JavaScript support should be used""... $ac_c" 1>&6 -echo "configure:10820: checking if experimental JavaScript support should be used" >&5 +echo "configure:10895: checking if experimental JavaScript support should be used" >&5 # Check whether --enable-libjs or --disable-libjs was given. if test "${enable_libjs+set}" = set; then @@ -10840,7 +10915,7 @@ EOF echo $ac_n "checking if html source should be colorized""... $ac_c" 1>&6 -echo "configure:10844: checking if html source should be colorized" >&5 +echo "configure:10919: checking if html source should be colorized" >&5 # Check whether --enable-prettysrc or --disable-prettysrc was given. if test "${enable_prettysrc+set}" = set; then @@ -10864,7 +10939,7 @@ EOF echo $ac_n "checking if source caching should be used""... $ac_c" 1>&6 -echo "configure:10868: checking if source caching should be used" >&5 +echo "configure:10943: checking if source caching should be used" >&5 # Check whether --enable-source-cache or --disable-source-cache was given. if test "${enable_source_cache+set}" = set; then @@ -10891,7 +10966,7 @@ EOF echo $ac_n "checking if alternative line-edit bindings should be used""... $ac_c" 1>&6 -echo "configure:10895: checking if alternative line-edit bindings should be used" >&5 +echo "configure:10970: checking if alternative line-edit bindings should be used" >&5 # Check whether --enable-alt-bindings or --disable-alt-bindings was given. if test "${enable_alt_bindings+set}" = set; then @@ -10915,7 +10990,7 @@ EOF echo $ac_n "checking if you want to use extended HTML DTD logic""... $ac_c" 1>&6 -echo "configure:10919: checking if you want to use extended HTML DTD logic" >&5 +echo "configure:10994: checking if you want to use extended HTML DTD logic" >&5 # Check whether --enable-extended-dtd or --disable-extended-dtd was given. if test "${enable_extended_dtd+set}" = set; then @@ -10939,7 +11014,7 @@ EOF echo $ac_n "checking if partial-display should be used""... $ac_c" 1>&6 -echo "configure:10943: checking if partial-display should be used" >&5 +echo "configure:11018: checking if partial-display should be used" >&5 # Check whether --enable-partial or --disable-partial was given. if test "${enable_partial+set}" = set; then @@ -10963,7 +11038,7 @@ EOF echo $ac_n "checking if you want to use external commands""... $ac_c" 1>&6 -echo "configure:10967: checking if you want to use external commands" >&5 +echo "configure:11042: checking if you want to use external commands" >&5 # Check whether --enable-externs or --disable-externs was given. if test "${enable_externs+set}" = set; then @@ -10987,7 +11062,7 @@ EOF echo $ac_n "checking if you want to use setfont support""... $ac_c" 1>&6 -echo "configure:10991: checking if you want to use setfont support" >&5 +echo "configure:11066: checking if you want to use setfont support" >&5 # Check whether --enable-font-switch or --disable-font-switch was given. if test "${enable_font_switch+set}" = set; then @@ -11011,7 +11086,7 @@ EOF echo $ac_n "checking if you want cgi-link support""... $ac_c" 1>&6 -echo "configure:11015: checking if you want cgi-link support" >&5 +echo "configure:11090: checking if you want cgi-link support" >&5 # Check whether --enable-cgi-links or --disable-cgi-links was given. if test "${enable_cgi_links+set}" = set; then @@ -11030,7 +11105,7 @@ fi echo "$ac_t""$enableval" 1>&6 echo $ac_n "checking if you want change-exec support""... $ac_c" 1>&6 -echo "configure:11034: checking if you want change-exec support" >&5 +echo "configure:11109: checking if you want change-exec support" >&5 # Check whether --enable-change-exec or --disable-change-exec was given. if test "${enable_change_exec+set}" = set; then @@ -11049,7 +11124,7 @@ fi echo "$ac_t""$enableval" 1>&6 echo $ac_n "checking if you want exec-links support""... $ac_c" 1>&6 -echo "configure:11053: checking if you want exec-links support" >&5 +echo "configure:11128: checking if you want exec-links support" >&5 # Check whether --enable-exec-links or --disable-exec-links was given. if test "${enable_exec_links+set}" = set; then @@ -11068,7 +11143,7 @@ fi echo "$ac_t""$enableval" 1>&6 echo $ac_n "checking if you want exec-scripts support""... $ac_c" 1>&6 -echo "configure:11072: checking if you want exec-scripts support" >&5 +echo "configure:11147: checking if you want exec-scripts support" >&5 # Check whether --enable-exec-scripts or --disable-exec-scripts was given. if test "${enable_exec_scripts+set}" = set; then @@ -11087,7 +11162,7 @@ fi echo "$ac_t""$enableval" 1>&6 echo $ac_n "checking if you want internal-links feature""... $ac_c" 1>&6 -echo "configure:11091: checking if you want internal-links feature" >&5 +echo "configure:11166: checking if you want internal-links feature" >&5 # Check whether --enable-internal-links or --disable-internal-links was given. if test "${enable_internal_links+set}" = set; then @@ -11111,7 +11186,7 @@ EOF echo $ac_n "checking if you want to fork NSL requests""... $ac_c" 1>&6 -echo "configure:11115: checking if you want to fork NSL requests" >&5 +echo "configure:11190: checking if you want to fork NSL requests" >&5 # Check whether --enable-nsl-fork or --disable-nsl-fork was given. if test "${enable_nsl_fork+set}" = set; then @@ -11135,7 +11210,7 @@ EOF echo $ac_n "checking if you want to log URL requests via syslog""... $ac_c" 1>&6 -echo "configure:11139: checking if you want to log URL requests via syslog" >&5 +echo "configure:11214: checking if you want to log URL requests via syslog" >&5 # Check whether --enable-syslog or --disable-syslog was given. if test "${enable_syslog+set}" = set; then @@ -11159,7 +11234,7 @@ EOF echo $ac_n "checking if persistent-cookie logic should be used""... $ac_c" 1>&6 -echo "configure:11163: checking if persistent-cookie logic should be used" >&5 +echo "configure:11238: checking if persistent-cookie logic should be used" >&5 # Check whether --enable-persistent-cookies or --disable-persistent-cookies was given. if test "${enable_persistent_cookies+set}" = set; then @@ -11183,7 +11258,7 @@ EOF echo $ac_n "checking if you want to underline links""... $ac_c" 1>&6 -echo "configure:11187: checking if you want to underline links" >&5 +echo "configure:11262: checking if you want to underline links" >&5 # Check whether --enable-underlines or --disable-underlines was given. if test "${enable_underlines+set}" = set; then @@ -11207,7 +11282,7 @@ EOF echo $ac_n "checking if help files should be gzip'ed""... $ac_c" 1>&6 -echo "configure:11211: checking if help files should be gzip'ed" >&5 +echo "configure:11286: checking if help files should be gzip'ed" >&5 # Check whether --enable-gzip-help or --disable-gzip-help was given. if test "${enable_gzip_help+set}" = set; then @@ -11236,7 +11311,7 @@ fi echo $ac_n "checking if you want to use zlib for decompression of some gzip files""... $ac_c" 1>&6 -echo "configure:11240: checking if you want to use zlib for decompression of some gzip files" >&5 +echo "configure:11315: checking if you want to use zlib for decompression of some gzip files" >&5 # Check whether --with-zlib or --without-zlib was given. if test "${with_zlib+set}" = set; then @@ -11253,12 +11328,12 @@ if test ".$use_zlib" != ".no" ; then cf_cv_have_lib_z=no cf_libdir="" echo $ac_n "checking for gzopen""... $ac_c" 1>&6 -echo "configure:11257: checking for gzopen" >&5 +echo "configure:11332: checking for gzopen" >&5 if eval "test \"`echo '$''{'ac_cv_func_gzopen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 11262 "configure" +#line 11337 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char gzopen(); below. */ @@ -11281,7 +11356,7 @@ gzopen(); ; return 0; } EOF -if { (eval echo configure:11285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gzopen=yes" else @@ -11301,17 +11376,17 @@ else cf_save_LIBS="$LIBS" echo $ac_n "checking for gzopen in -lz""... $ac_c" 1>&6 -echo "configure:11305: checking for gzopen in -lz" >&5 +echo "configure:11380: checking for gzopen in -lz" >&5 LIBS="-lz $LIBS" cat > conftest.$ac_ext <<EOF -#line 11308 "configure" +#line 11383 "configure" #include "confdefs.h" #include <zlib.h> int main() { gzopen("name","mode") ; return 0; } EOF -if { (eval echo configure:11315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cf_cv_have_lib_z=yes @@ -11338,17 +11413,17 @@ test "$prefix" != /usr && cf_search="$cf_search /usr/lib /usr/lib/z" for cf_libdir in $cf_search do echo $ac_n "checking for -lz in $cf_libdir""... $ac_c" 1>&6 -echo "configure:11342: checking for -lz in $cf_libdir" >&5 +echo "configure:11417: checking for -lz in $cf_libdir" >&5 LIBS="-L$cf_libdir -lz $cf_save_LIBS" cat > conftest.$ac_ext <<EOF -#line 11345 "configure" +#line 11420 "configure" #include "confdefs.h" #include <zlib.h> int main() { gzopen("name","mode") ; return 0; } EOF -if { (eval echo configure:11352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cf_cv_have_lib_z=yes @@ -11384,7 +11459,7 @@ EOF fi echo $ac_n "checking if you want to exclude FINGER code""... $ac_c" 1>&6 -echo "configure:11388: checking if you want to exclude FINGER code" >&5 +echo "configure:11463: checking if you want to exclude FINGER code" >&5 # Check whether --enable-finger or --disable-finger was given. if test "${enable_finger+set}" = set; then @@ -11408,7 +11483,7 @@ EOF echo $ac_n "checking if you want to exclude GOPHER code""... $ac_c" 1>&6 -echo "configure:11412: checking if you want to exclude GOPHER code" >&5 +echo "configure:11487: checking if you want to exclude GOPHER code" >&5 # Check whether --enable-gopher or --disable-gopher was given. if test "${enable_gopher+set}" = set; then @@ -11432,7 +11507,7 @@ EOF echo $ac_n "checking if you want to exclude NEWS code""... $ac_c" 1>&6 -echo "configure:11436: checking if you want to exclude NEWS code" >&5 +echo "configure:11511: checking if you want to exclude NEWS code" >&5 # Check whether --enable-news or --disable-news was given. if test "${enable_news+set}" = set; then @@ -11456,7 +11531,7 @@ EOF echo $ac_n "checking if you want to exclude FTP code""... $ac_c" 1>&6 -echo "configure:11460: checking if you want to exclude FTP code" >&5 +echo "configure:11535: checking if you want to exclude FTP code" >&5 # Check whether --enable-ftp or --disable-ftp was given. if test "${enable_ftp+set}" = set; then @@ -11485,7 +11560,7 @@ EOF # All DirEd functions that were enabled on compilation can be disabled # or modified at run time via DIRED_MENU symbols in lynx.cfg. echo $ac_n "checking if directory-editor code should be used""... $ac_c" 1>&6 -echo "configure:11489: checking if directory-editor code should be used" >&5 +echo "configure:11564: checking if directory-editor code should be used" >&5 # Check whether --enable-dired or --disable-dired was given. if test "${enable_dired+set}" = set; then @@ -11511,7 +11586,7 @@ EOF echo $ac_n "checking if you wish to allow extracting from archives via DirEd""... $ac_c" 1>&6 -echo "configure:11515: checking if you wish to allow extracting from archives via DirEd" >&5 +echo "configure:11590: checking if you wish to allow extracting from archives via DirEd" >&5 # Check whether --enable-dired-archive or --disable-dired-archive was given. if test "${enable_dired_archive+set}" = set; then @@ -11530,7 +11605,7 @@ fi echo "$ac_t""$enableval" 1>&6 echo $ac_n "checking if you wish to allow users to redefine DirEd keys""... $ac_c" 1>&6 -echo "configure:11534: checking if you wish to allow users to redefine DirEd keys" >&5 +echo "configure:11609: checking if you wish to allow users to redefine DirEd keys" >&5 # Check whether --enable-dired-override or --disable-dired-override was given. if test "${enable_dired_override+set}" = set; then @@ -11556,7 +11631,7 @@ fi echo "$ac_t""$enableval" 1>&6 echo $ac_n "checking if you wish to allow permissions commands via DirEd""... $ac_c" 1>&6 -echo "configure:11560: checking if you wish to allow permissions commands via DirEd" >&5 +echo "configure:11635: checking if you wish to allow permissions commands via DirEd" >&5 # Check whether --enable-dired-permit or --disable-dired-permit was given. if test "${enable_dired_permit+set}" = set; then @@ -11582,7 +11657,7 @@ fi echo "$ac_t""$enableval" 1>&6 echo $ac_n "checking if you wish to allow executable-permission commands via DirEd""... $ac_c" 1>&6 -echo "configure:11586: checking if you wish to allow executable-permission commands via DirEd" >&5 +echo "configure:11661: checking if you wish to allow executable-permission commands via DirEd" >&5 # Check whether --enable-dired-xpermit or --disable-dired-xpermit was given. if test "${enable_dired_xpermit+set}" = set; then @@ -11601,7 +11676,7 @@ fi echo "$ac_t""$enableval" 1>&6 echo $ac_n "checking if you wish to allow "tar" commands from DirEd""... $ac_c" 1>&6 -echo "configure:11605: checking if you wish to allow "tar" commands from DirEd" >&5 +echo "configure:11680: checking if you wish to allow "tar" commands from DirEd" >&5 # Check whether --enable-dired-tar or --disable-dired-tar was given. if test "${enable_dired_tar+set}" = set; then @@ -11627,7 +11702,7 @@ fi echo "$ac_t""$enableval" 1>&6 echo $ac_n "checking if you wish to allow "uudecode" commands from DirEd""... $ac_c" 1>&6 -echo "configure:11631: checking if you wish to allow "uudecode" commands from DirEd" >&5 +echo "configure:11706: checking if you wish to allow "uudecode" commands from DirEd" >&5 # Check whether --enable-dired-uudecode or --disable-dired-uudecode was given. if test "${enable_dired_uudecode+set}" = set; then @@ -11653,7 +11728,7 @@ fi echo "$ac_t""$enableval" 1>&6 echo $ac_n "checking if you wish to allow "zip" and "unzip" commands from DirEd""... $ac_c" 1>&6 -echo "configure:11657: checking if you wish to allow "zip" and "unzip" commands from DirEd" >&5 +echo "configure:11732: checking if you wish to allow "zip" and "unzip" commands from DirEd" >&5 # Check whether --enable-dired-zip or --disable-dired-zip was given. if test "${enable_dired_zip+set}" = set; then @@ -11679,7 +11754,7 @@ fi echo "$ac_t""$enableval" 1>&6 echo $ac_n "checking if you wish to allow "gzip" and "gunzip" commands from DirEd""... $ac_c" 1>&6 -echo "configure:11683: checking if you wish to allow "gzip" and "gunzip" commands from DirEd" >&5 +echo "configure:11758: checking if you wish to allow "gzip" and "gunzip" commands from DirEd" >&5 # Check whether --enable-dired-gzip or --disable-dired-gzip was given. if test "${enable_dired_gzip+set}" = set; then @@ -11706,7 +11781,7 @@ fi fi echo $ac_n "checking if you want long-directory listings""... $ac_c" 1>&6 -echo "configure:11710: checking if you want long-directory listings" >&5 +echo "configure:11785: checking if you want long-directory listings" >&5 # Check whether --enable-long-list or --disable-long-list was given. if test "${enable_long_list+set}" = set; then @@ -11732,7 +11807,7 @@ fi echo "$ac_t""$enableval" 1>&6 echo $ac_n "checking if parent-directory references are permitted""... $ac_c" 1>&6 -echo "configure:11736: checking if parent-directory references are permitted" >&5 +echo "configure:11811: checking if parent-directory references are permitted" >&5 # Check whether --enable-parent-dir-refs or --disable-parent-dir-refs was given. if test "${enable_parent_dir_refs+set}" = set; then @@ -11752,7 +11827,7 @@ echo "$ac_t""$enableval" 1>&6 echo $ac_n "checking if we can include termio.h with curses""... $ac_c" 1>&6 -echo "configure:11756: checking if we can include termio.h with curses" >&5 +echo "configure:11831: checking if we can include termio.h with curses" >&5 if eval "test \"`echo '$''{'cf_cv_termio_and_curses'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11761,7 +11836,7 @@ else CFLAGS="$CFLAGS -DHAVE_CONFIG_H -I. -I${srcdir-.} -I${srcdir-.}/src -I${srcdir-.}/WWW/Library/Implementation" touch lynx_cfg.h cat > conftest.$ac_ext <<EOF -#line 11765 "configure" +#line 11840 "configure" #include "confdefs.h" #include <LYCurses.h> @@ -11770,7 +11845,7 @@ int main() { putchar(0x0a) ; return 0; } EOF -if { (eval echo configure:11774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_termio_and_curses=yes else @@ -12012,6 +12087,7 @@ s%@ZIP@%$ZIP%g s%@TELNET@%$TELNET%g s%@TN3270@%$TN3270%g s%@RLOGIN@%$RLOGIN%g +s%@INSTALL@%$INSTALL%g s%@PROG_EXT@%$PROG_EXT%g s%@LIBOBJS@%$LIBOBJS%g s%@INSTALL_LSS@%$INSTALL_LSS%g diff --git a/configure.in b/configure.in index 80cbb0a6..d75577e5 100644 --- a/configure.in +++ b/configure.in @@ -224,7 +224,9 @@ $srcdir*) # (vi AC_DEFINE_UNQUOTED(INSTALL_PATH,"install") ;; *) # (vi - AC_DEFINE_UNQUOTED(INSTALL_PATH,"$INSTALL") + cf_save_INSTALL="$INSTALL" + CF_PATH_PROG(INSTALL, install) + INSTALL="$cf_save_INSTALL" ;; esac diff --git a/docs/README.defines b/docs/README.defines index d93b60e6..33e391b0 100644 --- a/docs/README.defines +++ b/docs/README.defines @@ -59,6 +59,7 @@ Related to DirEd code - probably only usable for UNIX or similar # -DOK_TAR (see INSTALLATION, Section II-1c) # -DOK_UUDECODE (see INSTALLATION, Section II-1c) # -DOK_ZIP (see INSTALLATION, Section II-1c) +# -DOK_INSTALL to enable dired menu "Install" function # -DARCHIVE_ONLY (see INSTALLATION, Section II-1c) # -DNO_CHANGE_EXECUTE_PERMS (see INSTALLATION, Section II-1c) # -DCANT_EDIT_UNWRITABLE_FILES (see LYEdit.c - always in effect for VMS) @@ -135,3 +136,7 @@ EXTENDED_STARTFILE_RECALL LYMain.c reverse_mailcap HTInit.c ADVANCED_INFO LYShowInfo.c CHECK_FREE_MEM GridText.c +max_cookies_domain LYCookie.c +max_cookies_global LYCookie.c +max_cookies_buffer LYCookie.c +DEFAULT_INVCHECK_BV LYCookie.c @@ -37,7 +37,7 @@ # and now your own tweaks. # # Starting with Lynx 2.8.2, the INCLUDE facility is yet more powerful. You can -# suppress all but specific settings that will be read from included files. +# suppress all but specific settings that will be read from included files. # This allows sysadmins to provide users the ability to customize lynx with # options that normally do not affect security, such as COLOR, VIEWER, KEYMAP. # @@ -171,6 +171,25 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # #SAVE_SPACE:~/foo/ +# Lynx uses temporary files for (among other purposes) the content of +# various user interface pages. REUSE_TEMPFILES changes the behavior +# for some of these temp files, among them pages shown for HISTORY, +# VLINKS, OPTIONS, INFO, PRINT, DOWNLOAD commands. +# If set to TRUE, the same file can be used multiple times for the same +# purpose. If set to FALSE, a new filename is generated each time before +# rewriting such a page. With TRUE, repeated invocation of these commands +# is less likely to push previous documents out of the cache of rendered +# texts (see also DEFAULT_CACHE_SIZE). This is especially useful with +# intermittent (dialup) network connections, when it is desirable to +# continue browsing through the cached documents after disconnecting. +# With the default setting of FALSE, there can be more than one incarnation +# of e.g. the VLINKS page cached in memory (but still only the most recently +# generated one is kept as a file), resulting in sometimes less surprising +# behaviour when returning to such a page via HISTORY or PREV_DOC functions +# (most users will not encounter and notice this difference). +# +#REUSE_TEMPFILES:FALSE + # If LYNX_HOST_NAME is defined here or in userdefs.h, it will be # treated as an alias for the local host name in checks for URLs on # the local host (e.g., when the -localhost switch is set), and this @@ -619,7 +638,7 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html #SEEK_FRAG_AREA_IN_CUR:TRUE # Local execution links and scripts are by default completely disabled, -# unless a change is made to the userdefs.h file to enabled them or +# unless a change is made to the userdefs.h file to enable them or # the configure script is used with the corresponding options # (--enable-exec-links and --enable-exec-scripts). # See the Lynx source code distribution and the userdefs.h @@ -874,14 +893,24 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html #TAGSOUP:FALSE # If SET_COOKIES is set FALSE, Lynx will ignore Set-Cookie headers -# in http server replies. +# in http server replies. Note that if a COOKIE_FILE is in use (see +# below) that contains cookies at startup, Lynx will still send those +# persistent cookies in requests as appropriate. Setting SET_COOKIES +# to FALSE just prevents accepting any new cookies from servers. To +# prevent all cookie processing (sending *and* receiving) in a session, +# make sure that PERSISTENT_COOKIES is not TRUE or that COOKIE_FILE does +# not point to a file with cookies, in addition to setting SET_COOKIES +# to FALSE. # The default is defined in userdefs.h, and can be overridden here, # and/or toggled via the -cookies command line switch. # #SET_COOKIES:TRUE # If ACCEPT_ALL_COOKIES is set TRUE, Lynx will accept cookies from all -# domains with no user interaction. +# domains with no user interaction. This is equivalent to automatically +# replying to all cookie 'Allow?' prompts with 'A'lways. Note that it +# does not preempt validity checking, which has to be controlled separately +# (see below). # The default is defined in userdefs.h and can be overridden here, or # in the .lynxrc file via an o(ptions) screen setting. It may also be # toggled via the -accept_all_cookies command line switch. @@ -889,29 +918,44 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html #ACCEPT_ALL_COOKIES:FALSE # COOKIE_ACCEPT_DOMAINS and COOKIE_REJECT_DOMAINS are comma-delimited lists -# of domains from which Lynx should automatically accept or reject all -# cookies. If a domain is specified in both options, rejection will take -# precedence. The ACCEPT_ALL_COOKIES parameter will override any settings -# made here. +# of domains from which Lynx should automatically accept or reject cookies +# without asking for confirmation. If the same domain is specified in both +# lists, rejection will take precedence. +# Note that in order to match cookies, domains have to be spelled out exactly +# in the form in which they would appear on the Cookie Jar page (case is +# insignificant). They are not wildcards. Domains that apply to more than +# one host have a leading '.', but have to match *the cookie's* domain +# exactly. # #COOKIE_ACCEPT_DOMAINS: #COOKIE_REJECT_DOMAINS: # COOKIE_LOOSE_INVALID_DOMAINS, COOKIE_STRICT_INVALID_DOMAINS, and -# COOKIE_QUERY_INVALID_DOMAINS are comma-delimited lists of which domains -# should be subjected to varying degrees of validity checking. If a -# domain is set to strict checking, strict conformance to RFC2109 will +# COOKIE_QUERY_INVALID_DOMAINS are comma-delimited lists of domains. +# They control the degree of validity checking that is applied to cookies +# for the specified domains. +# Note that in order to match cookies, domains have to be spelled out exactly +# in the form in which they would appear on the Cookie Jar page (cass is +# insignificant). They are not wildcards. Domains that apply to more than +# one host have a leading '.', but have to match *the cookie's* domain +# exactly. +# If a domain is set to strict checking, strict conformance to RFC2109 will # be applied. A domain with loose checking will be allowed to set cookies # with an invalid path or domain attribute. All domains will default to -# querying the user for an invalid path or domain. +# asking the user for confirmation in case of an invalid path or domain. +# Cookie validity checking takes place as a separate step before the +# final decision to accept or reject (see previous options), therefore +# a cookie that passes validity checking may still be automatically +# rejected or cause another prompt. # #COOKIE_LOOSE_INVALID_DOMAINS: #COOKIE_STRICT_INVALID_DOMAINS: #COOKIE_QUERY_INVALID_DOMAINS: -# COOKIE_FILE is the default file to store persistent downloaded cookies -# in, if Lynx was compiled with EXP_PERSISTENT_COOKIES. The cookie file -# can also be specified in .lynxrc or on the commandline. +# COOKIE_FILE is the default file from which persistent cookies are read +# at startup (if the file exists), and into which persistent cookies are +# stored before exiting, if Lynx was compiled with EXP_PERSISTENT_COOKIES. +# The cookie file can also be specified in .lynxrc or on the commandline. #COOKIE_FILE:~/.lynx_cookies # PERSISTENT_COOKIES indicates that cookies should be stored for use between @@ -1642,7 +1686,7 @@ MINIMAL_COMMENTS:TRUE # Other codes not listed above may be available for additional keys, # depending on operating system and libraries used to compile Lynx. # On some systems, if compiled with recent versions of slang or ncurses -# if macro USE_KEYMAPS was in effect during compilation), an additional +# (if macro USE_KEYMAPS was in effect during compilation), an additional # level of key mapping is supported via an external ".lynx-keymaps" file. # This file, if found in the home directory at startup, will always be # used under those conditions; see lynx-keymaps distributed in the samples @@ -1741,6 +1785,8 @@ MINIMAL_COMMENTS:TRUE #KEYMAP:???:EDITTEXTAREA # use external editor to edit a form textarea #KEYMAP:???:GROWTEXTAREA # Add some blank lines to bottom of textarea #KEYMAP:???:INSERTFILE # Insert file into a textarea (just above cursor) +#*** Only useful with dired support and OK_INSTALL: *** +#KEYMAP:???:INSTALL # install (i.e. copy) local files to new location # If TOGGLE_HELP is mapped, in novice mode the second help menu line # can be toggled among NOVICE_LINE_TWO_A, _B, and _C, as defined in @@ -1863,8 +1909,10 @@ MINIMAL_COMMENTS:TRUE #DIRED_MENU:::New File:(in current directory):LYNXDIRED://NEW_FILE%d #DIRED_MENU:::New Directory:(in current directory):LYNXDIRED://NEW_FOLDER%d -#DIRED_MENU:FILE::Install:(of current selection):LYNXDIRED://INSTALL_SRC%p -#DIRED_MENU:DIR::Install:(of current selection):LYNXDIRED://INSTALL_SRC%p +# Following depends on OK_INSTALL +#DIRED_MENU:FILE::Install:selected file to new location:LYNXDIRED://INSTALL_SRC%p +#DIRED_MENU:DIR::Install:selected directory to new location:LYNXDIRED://INSTALL_SRC%p + #DIRED_MENU:FILE::Modify File Name:(of current selection):LYNXDIRED://MODIFY_NAME%p #DIRED_MENU:DIR::Modify Directory Name:(of current selection):LYNXDIRED://MODIFY_NAME%p #DIRED_MENU:LINK::Modify Name:(of selected symbolic link):LYNXDIRED://MODIFY_NAME%p @@ -1920,6 +1968,10 @@ MINIMAL_COMMENTS:TRUE #DIRED_MENU:FILE::Compress:(using zip):LYNXDIRED://ZIP%p #DIRED_MENU:TAG::Move all tagged items to another location.::LYNXDIRED://MOVE_TAGGED%d + +# Following depends on OK_INSTALL +#DIRED_MENU:TAG::Install tagged files into another directory.::LYNXDIRED://INSTALL_SRC%00 + #DIRED_MENU:TAG::Remove all tagged files and directories.::LYNXDIRED://REMOVE_TAGGED #DIRED_MENU:TAG::Untag all tagged items.::LYNXDIRED://CLEAR_TAGGED @@ -1949,7 +2001,7 @@ MINIMAL_COMMENTS:TRUE # option is useful mostly only for users running Lynx under xterm or a # similar X terminal emulator. On systems where the preconditions don't # apply this option is ignored. -# +# #NONRESTARTING_SIGWINCH:FALSE # Unix ONLY: @@ -51,10 +51,10 @@ apply restrictions for anonymous account, see also -restrictions. - -assume_charset=ID:MIMEname + -assume_charset=MIMEname charset for documents that don't specify it. - -assume_local_charset=ID:MIMEname + -assume_local_charset=MIMEname charset assumed for local files. -assume_unrec_charset=MIMEname @@ -70,10 +70,10 @@ accept all cookies. .B -anonymous apply restrictions for anonymous account, see also -restrictions. .TP -.B -assume_charset\fR=\fIID\fR:\fIMIMEname +.B -assume_charset\fR=\fIMIMEname charset for documents that don't specify it. .TP -.B -assume_local_charset\fR=\fIID\fR:\fIMIMEname +.B -assume_local_charset\fR=\fIMIMEname charset assumed for local files. .TP .B -assume_unrec_charset\fR=\fIMIMEname diff --git a/samples/installdirs.html b/samples/installdirs.html new file mode 100644 index 00000000..c3f63c48 --- /dev/null +++ b/samples/installdirs.html @@ -0,0 +1,18 @@ +<HTML> +<TITLE>File Management Install Targets</TITLE> +<!-- This is an example file for the Lynx dired "install" functionality. + Lynx needs to be compiled with dired support and OK_INSTALL defined. + For the dired "install" function to work, this file has to exist + in the HOME directory under the name ".installdirs.html" or (for + 8+3, i.e. DOS-like, filesystems) "instdirs.htm". + --> +<BODY> +<H1>Install Target directories</H1> +<UL> +<LH>Choose destination:</LH> +<LI><A HREF="LYNXDIRED://INSTALL_DEST/~/">install in Home directory</A> +<LI><A HREF="LYNXDIRED://INSTALL_DEST/~/bin">install in ~/bin</A> +<LI><A HREF="LYNXDIRED://INSTALL_DEST/tmp">install in /tmp</A> +</UL> +</BODY> +</HTML> diff --git a/src/HTAlert.c b/src/HTAlert.c index 4889f719..29abf7c1 100644 --- a/src/HTAlert.c +++ b/src/HTAlert.c @@ -48,12 +48,14 @@ PUBLIC void HTAlwaysAlert ARGS2( "%s %s!\n", extra_prefix, Msg); fflush(stdout); + LYstore_message2(ALERT_FORMAT, Msg); sleep(AlertSecs); } else { fprintf(((TRACE) ? stdout : stderr), ALERT_FORMAT, (Msg == 0) ? "" : Msg); fflush(stdout); + LYstore_message2(ALERT_FORMAT, Msg); sleep(AlertSecs); fprintf(((TRACE) ? stdout : stderr), "\n"); } @@ -211,6 +213,12 @@ PUBLIC BOOL HTConfirmDefault ARGS2(CONST char *, Msg, int, Dft) conf_cancelled = NO; if (dump_output_immediately) { /* Non-interactive, can't respond */ + if (Dft == DFT_CONFIRM) { + CTRACE(tfp, "Confirm: %s (%c/%c) ", Msg, *msg_yes, *msg_no); + } else { + CTRACE(tfp, "Confirm: %s (%c) ", Msg, (Dft == YES) ? *msg_yes : *msg_no); + } + CTRACE(tfp, "- NO, not interactive.\n"); result = NO; } else { char *msg = NULL; @@ -219,6 +227,9 @@ PUBLIC BOOL HTConfirmDefault ARGS2(CONST char *, Msg, int, Dft) HTSprintf0(&msg, "%s (%c/%c) ", Msg, *msg_yes, *msg_no); else HTSprintf0(&msg, "%s (%c) ", Msg, (Dft == YES) ? *msg_yes : *msg_no); + if (LYTraceLogFP) { + CTRACE(tfp, "Confirm: %s", msg); + } _statusline(msg); FREE(msg); @@ -236,11 +247,15 @@ PUBLIC BOOL HTConfirmDefault ARGS2(CONST char *, Msg, int, Dft) } else if (TOUPPER(c) == TOUPPER(*msg_yes)) { result = YES; } else if (TOUPPER(c) == TOUPPER(*msg_no)) { - return(NO); + result = NO; } else if (Dft != DFT_CONFIRM) { - return(Dft); + result = Dft; + break; } } + CTRACE(tfp, "- %s%s.\n", + (result != NO) ? "YES" : "NO", + conf_cancelled ? ", cancelled" : ""); } return (result); } @@ -478,17 +493,16 @@ PUBLIC BOOL HTConfirmCookie ARGS4( if ((de = (domain_entry *)dp) == NULL) return FALSE; -#ifdef ENHANCED_COOKIES /* If the user has specified a list of domains to allow or deny ** from the config file, then they'll already have de->bv set to ** ACCEPT_ALWAYS or REJECT_ALWAYS so we can relax and let the - ** default cookie handling code cope with this fine. I hope. + ** default cookie handling code cope with this fine. */ -#endif + /* ** If the user has specified a constant action, don't prompt at all. */ - if (de->bv == ACCEPT_ALWAYS || de->bv == FROM_FILE) + if (de->bv == ACCEPT_ALWAYS) return TRUE; if (de->bv == REJECT_ALWAYS) return FALSE; @@ -505,19 +519,14 @@ PUBLIC BOOL HTConfirmCookie ARGS4( /* ** Estimate how much of the cookie we can show. */ - if (de != NULL) { - if (de->bv == ACCEPT_ALWAYS) - return TRUE; - if (de->bv == REJECT_ALWAYS) - return FALSE; - } if(!LYAcceptAllCookies) { int namelen, valuelen, space_free, percentage; char *message = 0; - space_free = (((LYcols - 1) - - strlen(ADVANCED_COOKIE_CONFIRMATION)) - - strlen(server)); + space_free = ((LYcols - 1) + - (strlen(ADVANCED_COOKIE_CONFIRMATION) + - 10) /* %s and %.*s and %.*s chars */ + - strlen(server)); if (space_free < 0) space_free = 0; namelen = strlen(name); diff --git a/src/HTInit.c b/src/HTInit.c index d65298d7..b5f39fb7 100644 --- a/src/HTInit.c +++ b/src/HTInit.c @@ -530,7 +530,9 @@ PRIVATE int PassesTest ARGS1( /* * Save overhead of system() calls by faking these. - FM */ - if (0 == strcasecomp(mc->testcommand, "test -n \"$DISPLAY\"")) { + if (0 == strcmp(mc->testcommand, "test \"$DISPLAY\"") || + 0 == strcmp(mc->testcommand, "test \"$DISPLAY\" != \"\"") || + 0 == strcasecomp(mc->testcommand, "test -n \"$DISPLAY\"")) { FREE(mc->testcommand); CTRACE(tfp, "PassesTest: Testing for XWINDOWS environment.\n"); if (LYgetXDisplay() != NULL) { @@ -1720,11 +1720,33 @@ PRIVATE void HTML_start_element ARGS6( "HTML: ****** Maximum nesting of %d divisions exceeded!\n", MAX_NESTING); } + if (me->inP) + LYEnsureSingleSpace(me); /* always at least break line - kw */ if (ElementNumber == HTML_CENTER) { me->DivisionAlignments[me->Division_Level] = HT_CENTER; change_paragraph_style(me, styles[HTML_DCENTER]); UPDATE_STYLE; me->current_default_alignment = styles[HTML_DCENTER]->alignment; + } else if (me->List_Nesting_Level >= 0 && + !(present && present[HTML_DIV_ALIGN] && + value[HTML_DIV_ALIGN] && + (!strcasecomp(value[HTML_DIV_ALIGN], "center") || + !strcasecomp(value[HTML_DIV_ALIGN], "right")))) { + if (present && present[HTML_DIV_ALIGN]) + me->current_default_alignment = HT_LEFT; + else if (me->Division_Level == 0) + me->current_default_alignment = HT_LEFT; + else if (me->sp[0].tag_number == HTML_UL || + me->sp[0].tag_number == HTML_OL || + me->sp[0].tag_number == HTML_MENU || + me->sp[0].tag_number == HTML_DIR || + me->sp[0].tag_number == HTML_LI || + me->sp[0].tag_number == HTML_LH || + me->sp[0].tag_number == HTML_DD) + me->current_default_alignment = HT_LEFT; + LYHandlePlike(me, present, value, include, HTML_DIV_ALIGN, TRUE); + me->DivisionAlignments[me->Division_Level] = + me->current_default_alignment; } else if (present && present[HTML_DIV_ALIGN] && value[HTML_DIV_ALIGN] && *value[HTML_DIV_ALIGN]) { if (!strcasecomp(value[HTML_DIV_ALIGN], "center")) { @@ -1779,7 +1801,8 @@ PRIVATE void HTML_start_element ARGS6( (me->sp[0].tag_number == HTML_UL || me->sp[0].tag_number == HTML_OL || me->sp[0].tag_number == HTML_MENU || - me->sp[0].tag_number == HTML_DIR)) { + me->sp[0].tag_number == HTML_DIR || + me->sp[0].tag_number == HTML_LI)) { if (HTML_dtd.tags[HTML_LH].contents == SGML_EMPTY) { ElementNumber = HTML_LH; } else { @@ -1844,7 +1867,8 @@ PRIVATE void HTML_start_element ARGS6( break; case HTML_P: - LYHandleP(me, present, value, include, TRUE); + LYHandlePlike(me, present, value, include, HTML_P_ALIGN, TRUE); + CHECK_ID(HTML_P_ID); break; case HTML_BR: @@ -2525,97 +2549,107 @@ PRIVATE void HTML_start_element ARGS6( HText_appendParagraph(me->text); me->sp->style->alignment = HT_LEFT; CHECK_ID(HTML_LI_ID); - if (me->sp[0].tag_number == HTML_OL) { - char number_string[20]; - int counter, seqnum; - char seqtype; - - counter = me->List_Nesting_Level < 11 ? - me->List_Nesting_Level : 11; - if (present && present[HTML_LI_TYPE] && value[HTML_LI_TYPE]) { - if (*value[HTML_LI_TYPE] == '1') { - me->OL_Type[counter] = '1'; - } else if (*value[HTML_LI_TYPE] == 'A') { - me->OL_Type[counter] = 'A'; - } else if (*value[HTML_LI_TYPE] == 'a') { - me->OL_Type[counter] = 'a'; - } else if (*value[HTML_LI_TYPE] == 'I') { - me->OL_Type[counter] = 'I'; - } else if (*value[HTML_LI_TYPE] == 'i') { - me->OL_Type[counter] = 'i'; + { + int surrounding_tag_number = me->sp[0].tag_number; + /* + * No, a LI should never occur directly within another LI, + * but this may result from incomplete error recovery. + * So check one more surrounding level in this case. - kw + */ + if (surrounding_tag_number == HTML_LI && + me->sp < (me->stack + MAX_NESTING - 1)) + surrounding_tag_number = me->sp[1].tag_number; + if (surrounding_tag_number == HTML_OL) { + char number_string[20]; + int counter, seqnum; + char seqtype; + + counter = me->List_Nesting_Level < 11 ? + me->List_Nesting_Level : 11; + if (present && present[HTML_LI_TYPE] && value[HTML_LI_TYPE]) { + if (*value[HTML_LI_TYPE] == '1') { + me->OL_Type[counter] = '1'; + } else if (*value[HTML_LI_TYPE] == 'A') { + me->OL_Type[counter] = 'A'; + } else if (*value[HTML_LI_TYPE] == 'a') { + me->OL_Type[counter] = 'a'; + } else if (*value[HTML_LI_TYPE] == 'I') { + me->OL_Type[counter] = 'I'; + } else if (*value[HTML_LI_TYPE] == 'i') { + me->OL_Type[counter] = 'i'; + } } - } - if (present && present[HTML_LI_VALUE] && - ((value[HTML_LI_VALUE] != NULL) && - (*value[HTML_LI_VALUE] != '\0')) && - ((isdigit(*value[HTML_LI_VALUE])) || - (*value[HTML_LI_VALUE] == '-' && - isdigit(*(value[HTML_LI_VALUE] + 1))))) { - seqnum = atoi(value[HTML_LI_VALUE]); - if (seqnum <= OL_VOID) - seqnum = OL_VOID + 1; - seqtype = me->OL_Type[counter]; - if (seqtype != '1' && seqnum < 1) - seqnum = 1; - me->OL_Counter[counter] = seqnum + 1; - } else if (me->OL_Counter[counter] >= OL_VOID) { - seqnum = me->OL_Counter[counter]++; - seqtype = me->OL_Type[counter]; - if (seqtype != '1' && seqnum < 1) { - seqnum = 1; + if (present && present[HTML_LI_VALUE] && + ((value[HTML_LI_VALUE] != NULL) && + (*value[HTML_LI_VALUE] != '\0')) && + ((isdigit(*value[HTML_LI_VALUE])) || + (*value[HTML_LI_VALUE] == '-' && + isdigit(*(value[HTML_LI_VALUE] + 1))))) { + seqnum = atoi(value[HTML_LI_VALUE]); + if (seqnum <= OL_VOID) + seqnum = OL_VOID + 1; + seqtype = me->OL_Type[counter]; + if (seqtype != '1' && seqnum < 1) + seqnum = 1; me->OL_Counter[counter] = seqnum + 1; - } - } else { - seqnum = me->Last_OL_Count + 1; - seqtype = me->Last_OL_Type; - for (i = (counter - 1); i >= 0; i--) { - if (me->OL_Counter[i] > OL_VOID) { - seqnum = me->OL_Counter[i]++; - seqtype = me->OL_Type[i]; - i = 0; + } else if (me->OL_Counter[counter] >= OL_VOID) { + seqnum = me->OL_Counter[counter]++; + seqtype = me->OL_Type[counter]; + if (seqtype != '1' && seqnum < 1) { + seqnum = 1; + me->OL_Counter[counter] = seqnum + 1; + } + } else { + seqnum = me->Last_OL_Count + 1; + seqtype = me->Last_OL_Type; + for (i = (counter - 1); i >= 0; i--) { + if (me->OL_Counter[i] > OL_VOID) { + seqnum = me->OL_Counter[i]++; + seqtype = me->OL_Type[i]; + i = 0; + } } } - } - if (seqtype == 'A') { - sprintf(number_string, LYUppercaseA_OL_String(seqnum)); - } else if (seqtype == 'a') { - sprintf(number_string, LYLowercaseA_OL_String(seqnum)); - } else if (seqtype == 'I') { - sprintf(number_string, LYUppercaseI_OL_String(seqnum)); - } else if (seqtype == 'i') { - sprintf(number_string, LYLowercaseI_OL_String(seqnum)); - } else { - sprintf(number_string, "%2d.", seqnum); - } - me->Last_OL_Count = seqnum; - me->Last_OL_Type = seqtype; - /* - * Hack, because there is no append string! - */ - for (i = 0; number_string[i] != '\0'; i++) - if (number_string[i] == ' ') - HTML_put_character(me, HT_NON_BREAK_SPACE); - else - HTML_put_character(me, number_string[i]); + if (seqtype == 'A') { + sprintf(number_string, LYUppercaseA_OL_String(seqnum)); + } else if (seqtype == 'a') { + sprintf(number_string, LYLowercaseA_OL_String(seqnum)); + } else if (seqtype == 'I') { + sprintf(number_string, LYUppercaseI_OL_String(seqnum)); + } else if (seqtype == 'i') { + sprintf(number_string, LYLowercaseI_OL_String(seqnum)); + } else { + sprintf(number_string, "%2d.", seqnum); + } + me->Last_OL_Count = seqnum; + me->Last_OL_Type = seqtype; + /* + * Hack, because there is no append string! + */ + for (i = 0; number_string[i] != '\0'; i++) + if (number_string[i] == ' ') + HTML_put_character(me, HT_NON_BREAK_SPACE); + else + HTML_put_character(me, number_string[i]); - /* - * Use HTML_put_character so that any other spaces - * coming through will be collapsed. We'll use - * nbsp, so it won't break at the spacing character - * if there are no spaces in the subsequent text up - * to the right margin, but will declare it as a - * normal space to ensure collapsing if a normal - * space does immediately follow it. - FM - */ - HTML_put_character(me, HT_NON_BREAK_SPACE); - HText_setLastChar(me->text, ' '); - } else if (me->sp[0].tag_number == HTML_UL) { - /* - * Hack, because there is no append string! - */ - HTML_put_character(me, HT_NON_BREAK_SPACE); - HTML_put_character(me, HT_NON_BREAK_SPACE); - switch(me->List_Nesting_Level % 7) { + /* + * Use HTML_put_character so that any other spaces + * coming through will be collapsed. We'll use + * nbsp, so it won't break at the spacing character + * if there are no spaces in the subsequent text up + * to the right margin, but will declare it as a + * normal space to ensure collapsing if a normal + * space does immediately follow it. - FM + */ + HTML_put_character(me, HT_NON_BREAK_SPACE); + HText_setLastChar(me->text, ' '); + } else if (surrounding_tag_number == HTML_UL) { + /* + * Hack, because there is no append string! + */ + HTML_put_character(me, HT_NON_BREAK_SPACE); + HTML_put_character(me, HT_NON_BREAK_SPACE); + switch(me->List_Nesting_Level % 7) { case 0: HTML_put_character(me, '*'); break; @@ -2638,25 +2672,26 @@ PRIVATE void HTML_start_element ARGS6( HTML_put_character(me, '='); break; + } + /* + * Keep using HTML_put_character so that any other + * spaces coming through will be collapsed. We use + * nbsp, so we won't wrap at the spacing character + * if there are no spaces in the subsequent text up + * to the right margin, but will declare it as a + * normal space to ensure collapsing if a normal + * space does immediately follow it. - FM + */ + HTML_put_character(me, HT_NON_BREAK_SPACE); + HText_setLastChar(me->text, ' '); + } else { + /* + * Hack, because there is no append string! + */ + HTML_put_character(me, HT_NON_BREAK_SPACE); + HTML_put_character(me, HT_NON_BREAK_SPACE); + HText_setLastChar(me->text, ' '); } - /* - * Keep using HTML_put_character so that any other - * spaces coming through will be collapsed. We use - * nbsp, so we won't wrap at the spacing character - * if there are no spaces in the subsequent text up - * to the right margin, but will declare it as a - * normal space to ensure collapsing if a normal - * space does immediately follow it. - FM - */ - HTML_put_character(me, HT_NON_BREAK_SPACE); - HText_setLastChar(me->text, ' '); - } else { - /* - * Hack, because there is no append string! - */ - HTML_put_character(me, HT_NON_BREAK_SPACE); - HTML_put_character(me, HT_NON_BREAK_SPACE); - HText_setLastChar(me->text, ' '); } me->in_word = NO; me->inP = FALSE; @@ -4628,7 +4663,7 @@ PRIVATE void HTML_start_element ARGS6( HText_appendCharacter(me->text, LY_UNDERLINE_END_CHAR); } -#else +#else CTRACE(tfp, "Attempting to fake as: %s\n", I.type); #endif /* EXP_FILE_UPLOAD */ #ifdef NOTDEFINED @@ -5696,7 +5731,8 @@ PRIVATE void HTML_end_element ARGS3( (me->sp[0].tag_number == HTML_UL || me->sp[0].tag_number == HTML_OL || me->sp[0].tag_number == HTML_MENU || - me->sp[0].tag_number == HTML_DIR) && + me->sp[0].tag_number == HTML_DIR || + me->sp[0].tag_number == HTML_LI) && (element_number == HTML_H1 || element_number == HTML_H2 || element_number == HTML_H3 || @@ -5742,7 +5778,8 @@ PRIVATE void HTML_end_element ARGS3( (me->sp[0].tag_number == HTML_UL || me->sp[0].tag_number == HTML_OL || me->sp[0].tag_number == HTML_MENU || - me->sp[0].tag_number == HTML_DIR) && + me->sp[0].tag_number == HTML_DIR || + me->sp[0].tag_number == HTML_LI) && (element_number == HTML_H1 || element_number == HTML_H2 || element_number == HTML_H3 || @@ -5944,14 +5981,23 @@ PRIVATE void HTML_end_element ARGS3( case HTML_DIV: if (me->Division_Level >= 0) me->Division_Level--; - if (me->Division_Level >= 0) - me->sp->style->alignment = + if (me->Division_Level >= 0) { + if (me->sp->style->alignment != + me->DivisionAlignments[me->Division_Level]) { + if (me->inP) + LYEnsureSingleSpace(me); + me->sp->style->alignment = me->DivisionAlignments[me->Division_Level]; + } + } change_paragraph_style(me, me->sp->style); - UPDATE_STYLE; + if (me->style_change) { + actually_set_style(me); + if (me->List_Nesting_Level >= 0) + HText_NegateLineOne(me->text); + } else if (me->inP) + LYEnsureSingleSpace(me); me->current_default_alignment = me->sp->style->alignment; - if (me->List_Nesting_Level >= 0) - HText_NegateLineOne(me->text); break; case HTML_H1: /* header styles */ @@ -5988,9 +6034,9 @@ PRIVATE void HTML_end_element ARGS3( break; case HTML_P: - LYHandleP(me, + LYHandlePlike(me, (CONST BOOL*)0, (CONST char **)0, - include, + include, 0, FALSE); break; diff --git a/src/LYCharSets.c b/src/LYCharSets.c index e58cc37e..8890f9df 100644 --- a/src/LYCharSets.c +++ b/src/LYCharSets.c @@ -21,7 +21,7 @@ extern HTCJKlang HTCJK; PUBLIC HTkcode kanji_code = NOKANJI; PUBLIC BOOLEAN LYHaveCJKCharacterSet = FALSE; PUBLIC BOOLEAN DisplayCharsetMatchLocale = TRUE; -PUBLIC BOOL force_old_UCLYhndl_on_reload; +PUBLIC BOOL force_old_UCLYhndl_on_reload = FALSE; PUBLIC int forced_UCLYhdnl; extern void UCInit NOARGS; extern int UCInitialized; diff --git a/src/LYCharUtils.c b/src/LYCharUtils.c index 717409ce..5e15c2a2 100644 --- a/src/LYCharUtils.c +++ b/src/LYCharUtils.c @@ -133,8 +133,8 @@ PUBLIC void LYEntify ARGS2( *q++ = *p; } } - StrAllocCopy(*str, cp); - FREE(cp); + FREE(*str); + *str = cp; } /* @@ -367,7 +367,8 @@ PUBLIC void LYFillLocalFileURL ARGS2( char curdir[LY_MAXPATH]; temp2 = wwwName(Current_Dir(curdir)); #endif /* VMS */ - LYAddHtmlSep(href); + if (!LYIsHtmlSep(*temp2)) + LYAddHtmlSep(href); /* * Check for pathological cases - current dir has chars which * MUST BE URL-escaped - kw @@ -3084,11 +3085,12 @@ free_META_copies: ** current paragraph and subsequent text when a P ** end tag is present or not in the markup. - FM */ -PUBLIC void LYHandleP ARGS5( +PUBLIC void LYHandlePlike ARGS6( HTStructured *, me, CONST BOOL*, present, CONST char **, value, char **, include GCC_UNUSED, + int, align_idx, BOOL, start) { if (TRUE) { @@ -3151,7 +3153,8 @@ PUBLIC void LYHandleP ARGS5( if (LYoverride_default_alignment(me)) { me->sp->style->alignment = LYstyles(me->sp[0].tag_number)->alignment; - } else if (me->List_Nesting_Level >= 0 || + } else if ((me->List_Nesting_Level >= 0 && + strncmp(me->sp->style->name, "Div", 3)) || ((me->Division_Level < 0) && (!strcmp(me->sp->style->name, "Normal") || !strcmp(me->sp->style->name, "Preformatted")))) { @@ -3161,19 +3164,18 @@ PUBLIC void LYHandleP ARGS5( } if (start) { - if (present && present[HTML_P_ALIGN] && value[HTML_P_ALIGN]) { - if (!strcasecomp(value[HTML_P_ALIGN], "center") && + if (present && present[align_idx] && value[align_idx]) { + if (!strcasecomp(value[align_idx], "center") && !(me->List_Nesting_Level >= 0 && !me->inP)) me->sp->style->alignment = HT_CENTER; - else if (!strcasecomp(value[HTML_P_ALIGN], "right") && + else if (!strcasecomp(value[align_idx], "right") && !(me->List_Nesting_Level >= 0 && !me->inP)) me->sp->style->alignment = HT_RIGHT; - else if (!strcasecomp(value[HTML_P_ALIGN], "left") || - !strcasecomp(value[HTML_P_ALIGN], "justify")) + else if (!strcasecomp(value[align_idx], "left") || + !strcasecomp(value[align_idx], "justify")) me->sp->style->alignment = HT_LEFT; } - CHECK_ID(HTML_P_ID); } /* diff --git a/src/LYCharUtils.h b/src/LYCharUtils.h index dc5a6c7f..d518d3ae 100644 --- a/src/LYCharUtils.h +++ b/src/LYCharUtils.h @@ -63,11 +63,12 @@ extern void LYHandleMETA PARAMS(( CONST BOOL* present, CONST char ** value, char ** include)); -extern void LYHandleP PARAMS(( +extern void LYHandlePlike PARAMS(( HTStructured * me, CONST BOOL* present, CONST char ** value, char ** include, + int align_idx, BOOL start)); extern void LYHandleSELECT PARAMS(( HTStructured * me, diff --git a/src/LYCookie.c b/src/LYCookie.c index bd0bab72..e93b27f2 100644 --- a/src/LYCookie.c +++ b/src/LYCookie.c @@ -74,6 +74,9 @@ #define max_cookies_global 500 #define max_cookies_buffer 4096 +/* default for new domains, one of the invcheck_behaviour_t values: */ +#define DEFAULT_INVCHECK_BV INVCHECK_QUERY + /* ** The first level of the cookie list is a list indexed by the domain ** string; cookies with the same domain will be placed in the same @@ -271,6 +274,9 @@ PRIVATE void store_cookie ARGS3( CONST char *ptr; domain_entry *de = NULL; BOOL Replacement = FALSE; + int invprompt_reasons = 0; /* what is wrong with this cookie - kw */ +#define FAILS_COND1 0x01 +#define FAILS_COND4 0x02 if (co == NULL) return; @@ -294,7 +300,7 @@ PRIVATE void store_cookie ARGS3( for (hl = domain_list; hl != NULL; hl = hl->next) { de = (domain_entry *)hl->object; if ((de != NULL && de->domain != NULL) && - !strcmp(co->domain, de->domain)) { + !strcasecomp(co->domain, de->domain)) { cookie_list = de->cookie_list; break; } @@ -316,32 +322,21 @@ PRIVATE void store_cookie ARGS3( * if set to INVCHECK_QUERY. */ if (strncmp(co->path, path, co->pathlen) != 0) { - if((de != NULL && de->invcheck_bv != INVCHECK_LOOSE) - || de == NULL) { - if(de != NULL && de->invcheck_bv == INVCHECK_STRICT) { - CTRACE(tfp, "store_cookie: Rejecting because '%s' is not a prefix of '%s'.\n", - co->path, path); - freeCookie(co); - co = NULL; - return; - } else if ((de != NULL - && de->invcheck_bv == INVCHECK_QUERY) - || de == NULL) { - char *msg = 0; - HTSprintf0(&msg, - INVALID_COOKIE_PATH_CONFIRMATION, - co->path, path); - if (!HTConfirm(msg)) { - CTRACE(tfp, "store_cookie: Rejecting because '%s' is not a prefix of '%s'.\n", - co->path, path); - freeCookie(co); - co = NULL; - FREE(msg); - return; - } else { - FREE(msg); - } - } + invcheck_behaviour_t invcheck_bv = (de ? de->invcheck_bv + : DEFAULT_INVCHECK_BV); + switch (invcheck_bv) { + case INVCHECK_LOOSE: + break; /* continue as if nothing were wrong */ + + case INVCHECK_QUERY: + invprompt_reasons |= FAILS_COND1; + break; /* will prompt later if we get that far */ + + case INVCHECK_STRICT: + CTRACE(tfp, "store_cookie: Rejecting because '%s' is not a prefix of '%s'.\n", + co->path, path); + freeCookie(co); + return; } } /* @@ -356,7 +351,6 @@ PRIVATE void store_cookie ARGS3( CTRACE(tfp, "store_cookie: Rejecting because '%s' has no dot.\n", hostname); freeCookie(co); - co = NULL; return; } @@ -371,7 +365,6 @@ PRIVATE void store_cookie ARGS3( CTRACE(tfp, "store_cookie: Rejecting domain '%s'.\n", co->domain); freeCookie(co); - co = NULL; return; } ptr = strchr((co->domain + 1), '.'); @@ -379,7 +372,6 @@ PRIVATE void store_cookie ARGS3( CTRACE(tfp, "store_cookie: Rejecting domain '%s'.\n", co->domain); freeCookie(co); - co = NULL; return; } @@ -391,7 +383,6 @@ PRIVATE void store_cookie ARGS3( CTRACE(tfp, "store_cookie: Rejecting domain '%s' for host '%s'.\n", co->domain, hostname); freeCookie(co); - co = NULL; return; } @@ -406,36 +397,61 @@ PRIVATE void store_cookie ARGS3( */ ptr = ((hostname + strlen(hostname)) - strlen(co->domain)); if (strchr(hostname, '.') < ptr) { - if((de != NULL && de->invcheck_bv != INVCHECK_LOOSE) - || de == NULL) { - if(de != NULL && de->invcheck_bv == INVCHECK_STRICT) { - CTRACE(tfp, "store_cookie: Rejecting domain '%s' for host '%s'.\n", - co->domain, - hostname); - freeCookie(co); - co = NULL; - return; - } else if ((de != NULL - && de->invcheck_bv == INVCHECK_QUERY) - || de == NULL) { - char *msg = 0; - HTSprintf0(&msg, - INVALID_COOKIE_DOMAIN_CONFIRMATION, - co->domain, - hostname); - if (!HTConfirm(msg)) { - CTRACE(tfp, "store_cookie: Rejecting domain '%s' for host '%s'.\n", + invcheck_behaviour_t invcheck_bv = (de ? de->invcheck_bv + : DEFAULT_INVCHECK_BV); + switch (invcheck_bv) { + case INVCHECK_LOOSE: + break; /* continue as if nothing were wrong */ + + case INVCHECK_QUERY: + invprompt_reasons |= FAILS_COND4; + break; /* will prompt later if we get that far */ + + case INVCHECK_STRICT: + CTRACE(tfp, "store_cookie: Rejecting because '%s' is not a prefix of '%s'.\n", + co->path, path); + freeCookie(co); + return; + } + } + } + + /* + * If we found reasons for issuing an invalid cookie confirmation + * prompt, do that now. Rejection by the user here is the last + * chance to completely ignore this cookie; after it passes this + * hurdle, it may at least supersede a previous cookie (even if + * it finally gets rejected). - kw + */ + if (invprompt_reasons) { + char *msg = 0; + if (invprompt_reasons & FAILS_COND4) { + HTSprintf0(&msg, + INVALID_COOKIE_DOMAIN_CONFIRMATION, + co->domain, + hostname); + if (!HTConfirmDefault(msg, NO)) { + CTRACE(tfp, "store_cookie: Rejecting domain '%s' for host '%s'.\n", co->domain, hostname); - freeCookie(co); - co = NULL; - FREE(msg); - return; - } - FREE(msg); - } - } + freeCookie(co); + FREE(msg); + return; + } + } + if (invprompt_reasons & FAILS_COND1) { + HTSprintf0(&msg, + INVALID_COOKIE_PATH_CONFIRMATION, + co->path, path); + if (!HTConfirmDefault(msg, NO)) { + CTRACE(tfp, "store_cookie: Rejecting because '%s' is not a prefix of '%s'.\n", + co->path, path); + freeCookie(co); + FREE(msg); + return; + } } + FREE(msg); } if (hl == NULL) { @@ -447,21 +463,20 @@ PRIVATE void store_cookie ARGS3( outofmem(__FILE__, "store_cookie"); #if 0 /* was: ifdef EXP_PERSISTENT_COOKIES */ /* - * Ok, this is a problem. The first cookie for a domain - * effectively sets the policy for that whole domain - for - * something like Netlink, where there are lots of websites - * under www.netlink.co.uk, this isn't sensible. However, - * taking this sort of decision down to cookie level also - * isn't sensible. Perhaps something based on the domain - * and the path in conjunction makes more sense? - RP + * The default behavior for this new domain could be set + * differently if the cookie comes from a file, as the + * code had it originally, but there doesn't seem to be + * a good reason for it any more; setting more permissive + * behavior for individual domains is now possible via + * configuration options. - kw */ if (persistent_cookies && (co->flags & COOKIE_FLAG_FROM_FILE)) - de->bv = FROM_FILE; + de->bv = ACCEPT_ALWAYS; /* ?? */ else #endif de->bv = QUERY_USER; - de->invcheck_bv = INVCHECK_QUERY; /* should this go here? */ + de->invcheck_bv = DEFAULT_INVCHECK_BV; /* should this go here? */ cookie_list = de->cookie_list = HTList_new(); StrAllocCopy(de->domain, co->domain); HTList_appendObject(domain_list, de); @@ -490,7 +505,7 @@ PRIVATE void store_cookie ARGS3( * Check if this cookie matches the one we're inserting. */ } else if ((c2) && - !strcmp(co->domain, c2->domain) && + !strcasecomp(co->domain, c2->domain) && !strcmp(co->path, c2->path) && !strcmp(co->name, c2->name)) { HTList_removeObject(cookie_list, c2); @@ -547,7 +562,12 @@ PRIVATE void store_cookie ARGS3( /* * Don't add the cookie if the value is NULL. - BJP */ - } else if (co->value[0] == '\0') { + /* + * Presence of value is now needed (indicated normally by '='), + * but it can now be an empty string. + * - kw 1999-06-24 + */ + } else if (co->value == NULL) { /* should not happen - kw */ CTRACE(tfp, "store_cookie: Value is NULL! Not storing cookie.\n"); freeCookie(co); co = NULL; @@ -940,16 +960,27 @@ PRIVATE void LYProcessSetCookies ARGS6( break; } } else if (*p == '"') { + BOOLEAN escaped = FALSE; /* - * It's a quoted string. + * It looks like quoted string. */ p++; value_start = p; - while (*p != '\0' && *p != '"') + while (*p != '\0' && (*p != '"' || escaped)) { + escaped = (!escaped && *p == '\\'); p++; - value_end = p; - if (*p == '"') + } + if (p != value_start && *p == '"' && !escaped) { + value_end = p; p++; + Quoted = TRUE; + } else { + value_start--; + value_end = p; + if (*p) + p++; + Quoted = FALSE; + } } else { /* * Otherwise, it's an unquoted string. @@ -987,7 +1018,12 @@ PRIVATE void LYProcessSetCookies ARGS6( BOOLEAN known_attr = NO; char *value = NULL; - if (value_end > value_start) { + if (value_start && value_end >= value_start) { + /* + * Presence of value is now needed (indicated normally by '=') + * to start a cookie, but it can now be an empty string. + * - kw 1999-06-24 + */ int value_len = (value_end - value_start); if (value_len > max_cookies_buffer) { @@ -1218,8 +1254,11 @@ PRIVATE void LYProcessSetCookies ARGS6( * no value? This seems to be needed for sites that reset a * cookie by nulling out the value. If this causes problems, * we can go back to the original behavior above. - BJP + * + * Presence of value is now needed (indicated normally by '='), + * but it can now be an empty string. - kw 1999-06-24 */ - if (!known_attr) { + if (!known_attr && value && value_end >= value_start) { /* * If we've started a cookie, and it's not too big, * save it in the CombinedCookies list. - FM @@ -1441,17 +1480,27 @@ PRIVATE void LYProcessSetCookies ARGS6( break; } } else if (*p == '"') { + BOOLEAN escaped = FALSE; /* - * It's a quoted string. + * It looks like quoted string. */ p++; value_start = p; - while (*p != '\0' && *p != '"') + while (*p != '\0' && (*p != '"' || escaped)) { + escaped = (!escaped && *p == '\\'); p++; - value_end = p; - if (*p == '"') + } + if (p != value_start && *p == '"' && !escaped) { + value_end = p; p++; - Quoted = TRUE; + Quoted = TRUE; + } else { + value_start--; + value_end = p; + if (*p) + p++; + Quoted = FALSE; + } } else { /* * Otherwise, it's an unquoted string. @@ -1489,7 +1538,12 @@ PRIVATE void LYProcessSetCookies ARGS6( BOOLEAN known_attr = NO; char *value = NULL; - if (value_end > value_start) { + if (value_start && value_end >= value_start) { + /* + * Presence of value is now needed (indicated normally by '=') + * to start a cookie, but it can now be an empty string. + * - kw 1999-06-24 + */ int value_len = (value_end - value_start); if (value_len > max_cookies_buffer) { @@ -1497,7 +1551,7 @@ PRIVATE void LYProcessSetCookies ARGS6( } value = (char *)calloc(1, value_len + 1); if (value == NULL) - outofmem(__FILE__, "LYProcessSetCookie"); + outofmem(__FILE__, "LYProcessSetCookies"); LYstrncpy(value, value_start, value_len); } if (len == 6 && !strncasecomp(attr_start, "secure", 6)) { @@ -1705,8 +1759,11 @@ PRIVATE void LYProcessSetCookies ARGS6( * no value? This seems to be needed for sites that reset a * cookie by nulling out the value. If this causes problems, * we can go back to the original behavior above. - BJP + * + * Presence of value is now needed (indicated normally by '='), + * but it can now be an empty string. - kw 1999-06-24 */ - if (!known_attr) { + if (!known_attr && value && value_end >= value_start) { /* * If we've started a cookie, and it's not too big, * save it in the CombinedCookies list. - FM @@ -1924,7 +1981,7 @@ PUBLIC char * LYCookie ARGS4( */ header = scan_cookie_sublist(hostname, path, port, de->cookie_list, header, secure); - } else if (de->bv == QUERY_USER && de->invcheck_bv == INVCHECK_QUERY) { + } else if (de->bv == QUERY_USER && de->invcheck_bv == DEFAULT_INVCHECK_BV) { /* * No cookies in this domain, and no default * accept/reject choice was set by the user, @@ -1998,7 +2055,10 @@ PUBLIC void LYLoadCookies ARGS1 ( while(buf[i] != '\n' && buf[i] != 0) { i++; } - buf[i] = '\0'; + if (buf[i] == '\n') { + buf[i++] = '\t'; /* add sep after line if enough space - kw */ + buf[i] = '\0'; + } /* * Tokenise the cookie line into its component parts - @@ -2010,6 +2070,12 @@ PUBLIC void LYLoadCookies ARGS1 ( * 'fixed' by using strsep instead of strtok. No idea * what kind of platform problems this might introduce. - RP */ + /* + * This fails when the path is blank + * + * sscanf(buf, "%s\t%s\t%s\t%s\t%d\t%s\t%[ -~]", + * domain, what, path, secure, &expires, name, value); + */ CTRACE(tfp, "LYLoadCookies: tokenising %s\n", buf); tok_ptr = buf; tok_out = LYstrsep(&tok_ptr, "\t"); @@ -2025,15 +2091,14 @@ PUBLIC void LYLoadCookies ARGS1 ( */ tok_out = LYstrsep(&tok_ptr, "\t"); } - expires = atol(expires_a); - /* - * This fails when the path is blank - * - * sscanf(buf, "%s\t%s\t%s\t%s\t%d\t%s\t%[ -~]", - * domain, what, path, secure, &expires, name, value); - */ + if (tok_values[tok_loop].s) { + /* tok_out in above loop must have been NULL prematurely - kw */ + CTRACE(tfp, "*** wrong format: not enough tokens, ignoring line!\n"); + continue; + } + expires = atol(expires_a); CTRACE(tfp, "expires:\t%s\n", ctime(&expires)); /* CTRACE(tfp, "%s\t%s\t%s\t%s\t%ld\t%s\t%s\tREADCOOKIE\n", */ /* domain, what, path, secure, (long) expires, name, value); */ @@ -2041,7 +2106,15 @@ PUBLIC void LYLoadCookies ARGS1 ( StrAllocCopy(moo->domain, domain); StrAllocCopy(moo->path, path); StrAllocCopy(moo->name, name); - StrAllocCopy(moo->value, value); + if (value && value[0] == '"' && + value[1] && value[strlen(value)-1] == '"' && + value[strlen(value)-2] != '\\') { + value[strlen(value)-1] = '\0'; + StrAllocCopy(moo->value, value+1); + moo->quoted = TRUE; + } else { + StrAllocCopy(moo->value, value); + } moo->pathlen = strlen(moo->path); /* * Justification for following flags: @@ -2171,11 +2244,15 @@ PUBLIC void LYStoreCookies ARGS1 ( continue; } - fprintf(cookie_handle, "%s\t%s\t%s\t%s\t%ld\t%s\t%s\n", + fprintf(cookie_handle, "%s\t%s\t%s\t%s\t%ld\t%s\t%s%s%s\n", de->domain, - "FALSE", co->path, + (de->domain[0] == '.') ? "TRUE" : "FALSE", + co->path, co->flags & COOKIE_FLAG_SECURE ? "TRUE" : "FALSE", - (long) co->expires, co->name, co->value); + (long) co->expires, co->name, + (co->quoted ? "\"" : ""), + co->value, + (co->quoted ? "\"" : "")); CTRACE(tfp, "STORED\n"); } @@ -2264,7 +2341,7 @@ PRIVATE int LYHandleCookies ARGS4 ( * First object in the list always is empty. - FM */ continue; - if (!strcmp(domain, de->domain)) { + if (!strcasecomp(domain, de->domain)) { FREE(domain); /* * We found the domain. Check @@ -2527,11 +2604,6 @@ Delete_all_cookies_in_domain: case (QUERY_USER): HTSprintf0(&buf, COOKIES_ALLOWED_VIA_PROMPT); break; - case (FROM_FILE): -#if 0 /* not used any more - kw */ - HTSprintf0(&buf, COOKIES_READ_FROM_FILE); -#endif - break; } PUTS(buf); HTSprintf0(&buf, "\n"); @@ -2673,8 +2745,11 @@ PUBLIC void cookie_domain_flag_set ARGS2( char *strsmall = NULL; int isexisting = FALSE; - if (str == NULL) - outofmem(__FILE__, "cookie_set_invcheck"); + if (str == NULL) { + HTAlwaysAlert(gettext("Internal"), + gettext("cookie_domain_flag_set error, aborting program")); + exit_immediately(-1); + } /* * Is this the first domain we're handling? If so, initialize @@ -2695,6 +2770,11 @@ PUBLIC void cookie_domain_flag_set ARGS2( while ((strsmall = LYstrsep(str, ",")) != 0) { + if (*strsmall == '\0') + /* Never add a domain for empty string. It would actually + * make more sense to use strtok here. - kw */ + continue; + /* * Check the list of existing domains to see if this is a * re-setting of an already existing domains -- if so, just @@ -2704,7 +2784,7 @@ PUBLIC void cookie_domain_flag_set ARGS2( for (hl = domain_list; hl != NULL; hl = hl->next) { de2 = (domain_entry *)hl->object; if ((de2 != NULL && de2->domain != NULL) && - !strcmp(strsmall, de2->domain)) { + !strcasecomp(strsmall, de2->domain)) { isexisting = TRUE; break; } else { @@ -2720,16 +2800,13 @@ PUBLIC void cookie_domain_flag_set ARGS2( switch(flag) { case (FLAG_ACCEPT_ALWAYS): de->bv = ACCEPT_ALWAYS; - de->invcheck_bv = INVCHECK_QUERY; + de->invcheck_bv = DEFAULT_INVCHECK_BV; break; case (FLAG_REJECT_ALWAYS): de->bv = REJECT_ALWAYS; - de->invcheck_bv = INVCHECK_QUERY; + de->invcheck_bv = DEFAULT_INVCHECK_BV; break; case (FLAG_QUERY_USER): de->bv = QUERY_USER; - de->invcheck_bv = INVCHECK_QUERY; - break; - case (FLAG_FROM_FILE): de->bv = FROM_FILE; - de->invcheck_bv = INVCHECK_QUERY; + de->invcheck_bv = DEFAULT_INVCHECK_BV; break; case (FLAG_INVCHECK_QUERY): de->invcheck_bv = INVCHECK_QUERY; de->bv = QUERY_USER; @@ -2753,8 +2830,6 @@ PUBLIC void cookie_domain_flag_set ARGS2( break; case (FLAG_QUERY_USER): de2->bv = QUERY_USER; break; - case (FLAG_FROM_FILE): de2->bv = FROM_FILE; - break; case (FLAG_INVCHECK_QUERY): de2->invcheck_bv = INVCHECK_QUERY; break; case (FLAG_INVCHECK_STRICT): de2->invcheck_bv = INVCHECK_STRICT; diff --git a/src/LYCookie.h b/src/LYCookie.h index b811e371..5e599191 100644 --- a/src/LYCookie.h +++ b/src/LYCookie.h @@ -7,10 +7,10 @@ #include <HTList.h> -typedef enum {ACCEPT_ALWAYS, REJECT_ALWAYS, QUERY_USER, FROM_FILE} behaviour; +typedef enum {ACCEPT_ALWAYS, REJECT_ALWAYS, QUERY_USER} behaviour_t; typedef enum {INVCHECK_QUERY, INVCHECK_STRICT, - INVCHECK_LOOSE} invcheck_behaviour; + INVCHECK_LOOSE} invcheck_behaviour_t; typedef enum {FLAG_ACCEPT_ALWAYS, FLAG_REJECT_ALWAYS, FLAG_QUERY_USER, @@ -21,8 +21,8 @@ typedef enum {FLAG_ACCEPT_ALWAYS, struct _domain_entry { char * domain; /* Domain for which these cookies are valid */ - behaviour bv; - invcheck_behaviour invcheck_bv; + behaviour_t bv; + invcheck_behaviour_t invcheck_bv; HTList * cookie_list; }; typedef struct _domain_entry domain_entry; @@ -40,13 +40,6 @@ extern void LYStoreCookies PARAMS(( char * cookie_file)); extern void LYLoadCookies PARAMS(( char * cookie_file)); -extern void cookie_add_acceptlist PARAMS(( - char * acceptdomains)); -extern void cookie_add_rejectlist PARAMS(( - char * rejectdomains)); -extern void cookie_set_invcheck PARAMS(( - char * domains, - invcheck_behaviour setting)); extern void cookie_domain_flag_set PARAMS(( char * domainstr, int flag)); diff --git a/src/LYCurses.h b/src/LYCurses.h index 5505e9ca..51c116e1 100644 --- a/src/LYCurses.h +++ b/src/LYCurses.h @@ -306,8 +306,8 @@ extern int lynx_chg_color PARAMS((int, int, int)); #undef standend #define standend() lynx_standout(FALSE) #else -#define LYaddAttr attrset -#define LYaddWAttr wattrset +#define LYaddAttr attron +#define LYaddWAttr wattron #define LYsubAttr attroff #define LYsubWAttr wattroff #endif diff --git a/src/LYDownload.c b/src/LYDownload.c index eaf1690b..5b079b32 100644 --- a/src/LYDownload.c +++ b/src/LYDownload.c @@ -91,7 +91,14 @@ PUBLIC void LYDownload ARGS1( #ifdef DIRED_SUPPORT /* FIXME: use HTLocalName */ if (!strncmp(file, "file://localhost", 16)) +#ifdef __DJGPP__ + { + file += 17; + file = HTDOS_name(file); + } +#else file += 16; +#endif /* __DJGPP__ */ else if (!strncmp(file, "file:", 5)) file += 5; HTUnEscape(file); @@ -469,7 +476,7 @@ PUBLIC int LYdownload_options ARGS2( char **, newfile, char *, data_file) { - static char tempfile[LY_MAXPATH]; + static char tempfile[LY_MAXPATH] = "\0"; char *downloaded_url = NULL; char *sug_filename = NULL; FILE *fp0; @@ -482,8 +489,13 @@ PUBLIC int LYdownload_options ARGS2( StrAllocCopy(sug_filename, *newfile); change_sug_filename(sug_filename); - LYRemoveTemp(tempfile); - if ((fp0 = LYOpenTemp(tempfile, HTML_SUFFIX, "w")) == NULL) { + if (LYReuseTempfiles) { + fp0 = LYOpenTempRewrite(tempfile, HTML_SUFFIX, "w"); + } else { + LYRemoveTemp(tempfile); + fp0 = LYOpenTemp(tempfile, HTML_SUFFIX, "w"); + } + if (fp0 == NULL) { HTAlert(CANNOT_OPEN_TEMP); return(-1); } diff --git a/src/LYGetFile.c b/src/LYGetFile.c index 2bb09ea3..aa95cd9e 100644 --- a/src/LYGetFile.c +++ b/src/LYGetFile.c @@ -54,7 +54,7 @@ PUBLIC int HTNoDataOK = 0; /* * getfile is the main mechanism to load a new document (or a previously - * laoded one whose rendering is cached in a HText structure) from + * loaded one whose rendering is cached in a HText structure) from * mainloop, nearly everything goes through it. * It should return one of the values * NORMAL - requested document loaded successfully, usually [always?] diff --git a/src/LYGlobalDefs.h b/src/LYGlobalDefs.h index 91923705..9148285e 100644 --- a/src/LYGlobalDefs.h +++ b/src/LYGlobalDefs.h @@ -383,6 +383,7 @@ extern BOOLEAN LYPrependBaseToSource; extern BOOLEAN LYPrependCharsetToSource; extern BOOLEAN LYQuitDefaultYes; extern BOOLEAN LYNonRestartingSIGWINCH; +extern BOOLEAN LYReuseTempfiles; #ifndef VMS extern BOOLEAN LYNoCore; diff --git a/src/LYHistory.c b/src/LYHistory.c index eef57082..6edc58c0 100644 --- a/src/LYHistory.c +++ b/src/LYHistory.c @@ -395,13 +395,18 @@ PUBLIC void LYpop_num ARGS2( PUBLIC int showhistory ARGS1( char **, newfile) { - static char tempfile[LY_MAXPATH]; + static char tempfile[LY_MAXPATH] = "\0"; char *Title = NULL; int x = 0; FILE *fp0; - LYRemoveTemp(tempfile); - if ((fp0 = LYOpenTemp(tempfile, HTML_SUFFIX, "w")) == NULL) { + if (LYReuseTempfiles) { + fp0 = LYOpenTempRewrite(tempfile, HTML_SUFFIX, "w"); + } else { + LYRemoveTemp(tempfile); + fp0 = LYOpenTemp(tempfile, HTML_SUFFIX, "w"); + } + if (fp0 == NULL) { HTAlert(CANNOT_OPEN_TEMP); return(-1); } @@ -413,7 +418,7 @@ PUBLIC int showhistory ARGS1( BeginInternalPage(fp0, HISTORY_PAGE_TITLE, HISTORY_PAGE_HELP); - fprintf(fp0, "<tr align=right> <a href=\"LYNXMESSAGES:\">[%s]</a> </tr>\n", + fprintf(fp0, "<p align=right> <a href=\"LYNXMESSAGES:\">[%s]</a>\n", STATUSLINES_TITLE); fprintf(fp0, "<pre>\n"); @@ -557,7 +562,7 @@ PUBLIC BOOLEAN historytarget ARGS1( PUBLIC int LYShowVisitedLinks ARGS1( char **, newfile) { - static char tempfile[LY_MAXPATH]; + static char tempfile[LY_MAXPATH] = "\0"; char *Title = NULL; char *Address = NULL; int x; @@ -568,8 +573,13 @@ PUBLIC int LYShowVisitedLinks ARGS1( if (!cur) return(-1); - LYRemoveTemp(tempfile); - if ((fp0 = LYOpenTemp(tempfile, HTML_SUFFIX, "w")) == NULL) { + if (LYReuseTempfiles) { + fp0 = LYOpenTempRewrite(tempfile, HTML_SUFFIX, "w"); + } else { + LYRemoveTemp(tempfile); + fp0 = LYOpenTemp(tempfile, HTML_SUFFIX, "w"); + } + if (fp0 == NULL) { HTAlert(CANNOT_OPEN_TEMP); return(-1); } @@ -683,13 +693,19 @@ PRIVATE void to_stack ARGS1(char *, str) PUBLIC int LYshow_statusline_messages ARGS1( document *, newdoc) { - static char tempfile[LY_MAXPATH]; + static char tempfile[LY_MAXPATH] = "\0"; static char *info_url; FILE *fp0; int i; + char *temp = NULL; - LYRemoveTemp(tempfile); - if ((fp0 = LYOpenTemp (tempfile, HTML_SUFFIX, "w")) == 0) { + if (LYReuseTempfiles) { + fp0 = LYOpenTempRewrite(tempfile, HTML_SUFFIX, "w"); + } else { + LYRemoveTemp(tempfile); + fp0 = LYOpenTemp(tempfile, HTML_SUFFIX, "w"); + } + if (fp0 == NULL) { HTAlert(CANNOT_OPEN_TEMP); return(NOT_FOUND); } @@ -704,13 +720,19 @@ PUBLIC int LYshow_statusline_messages ARGS1( /* print messages in reverse order: */ i = topOfStack; while (--i >= 0) { - if (buffstack[i] != NULL) - fprintf(fp0, "<li> <em>%s</em>\n", buffstack[i]); + if (buffstack[i] != NULL) { + StrAllocCopy(temp, buffstack[i]); + LYEntify(&temp, TRUE); + fprintf(fp0, "<li> <em>%s</em>\n", temp); + } } i = STATUSBUFSIZE; while (--i >= topOfStack) { - if (buffstack[i] != NULL) - fprintf(fp0, "<li> <em>%s</em>\n", buffstack[i]); + if (buffstack[i] != NULL) { + StrAllocCopy(temp, buffstack[i]); + LYEntify(&temp, TRUE); + fprintf(fp0, "<li> <em>%s</em>\n", temp); + } } fprintf(fp0, "</ol>\n"); @@ -772,6 +794,7 @@ PUBLIC void LYstore_message2 ARGS2( if (message != NULL) { char *temp = NULL; HTSprintf(&temp, message, (argument == 0) ? "" : argument); + LYEntify(&temp, TRUE); to_stack(temp); } } @@ -782,6 +805,7 @@ PUBLIC void LYstore_message ARGS1( if (message != NULL) { char *temp = NULL; StrAllocCopy(temp, message); + LYEntify(&temp, TRUE); to_stack(temp); } } diff --git a/src/LYKeymap.c b/src/LYKeymap.c index 3999898c..be169559 100644 --- a/src/LYKeymap.c +++ b/src/LYKeymap.c @@ -893,7 +893,7 @@ PUBLIC int lkcstring_to_lkc ARGS1( #ifndef USE_SLANG if (c >= 0) { if ((c&LKC_MASK) > 255 && !(c & LKC_ISLKC)) - return (-1); /* Don't accept untranslatable curses KEY_* */ + return (-1); /* Don't accept untranslated curses KEY_* */ else c &= ~LKC_ISLKC; } diff --git a/src/LYLeaks.c b/src/LYLeaks.c index 70c8d8a1..0d8ff2bf 100644 --- a/src/LYLeaks.c +++ b/src/LYLeaks.c @@ -129,7 +129,6 @@ PUBLIC void LYLeaks NOARGS } } fprintf(Fp_leakagesink, "\n"); - FREE(ALp_head->vp_Alloced); fprintf(Fp_leakagesink, "%s\t%d\n", gettext("ByteSize:"), (int)(ALp_head->st_Bytes)); @@ -151,6 +150,8 @@ PUBLIC void LYLeaks NOARGS gettext("LineCount:"), ALp_head->SL_realloc.ssi_LineNumber); } + fflush(Fp_leakagesink); + FREE(ALp_head->vp_Alloced); } /* diff --git a/src/LYLocal.c b/src/LYLocal.c index df254292..7409535a 100644 --- a/src/LYLocal.c +++ b/src/LYLocal.c @@ -82,6 +82,10 @@ #define EXT_Z ".Z" #endif +#ifndef DIRED_MAXBUF +#define DIRED_MAXBUF 512 +#endif + PRIVATE int LYExecv PARAMS(( char * path, char ** argv, @@ -91,6 +95,15 @@ PRIVATE int LYExecv PARAMS(( PUBLIC char LYPermitFileURL[LY_MAXPATH] = "\0"; PUBLIC char LYDiredFileURL[LY_MAXPATH] = "\0"; +#ifdef OK_INSTALL +PUBLIC char LYInstallFileURL[LY_MAXPATH] = "\0"; +#ifdef FNAMES_8_3 +#define INSTALLDIRS_FILE "instdirs.htm" +#else +#define INSTALLDIRS_FILE ".installdirs.html" +#endif /* FNAMES_8_3 */ +#endif /* OK_INSTALL */ + PRIVATE char *get_filename PARAMS(( char * prompt, char * buf, @@ -105,8 +118,8 @@ PRIVATE BOOLEAN permit_location PARAMS(( PRIVATE char *render_item PARAMS(( CONST char * s, - char * path, - char * dir, + CONST char * path, + CONST char * dir, char * buf, int bufsize, BOOLEAN url_syntax)); @@ -136,10 +149,17 @@ struct dired_menu { { 0, "", "New Directory", "(in current directory)", "LYNXDIRED://NEW_FOLDER%d", NULL }, +#ifdef OK_INSTALL { DE_FILE, "", "Install", -"(of current selection)", "LYNXDIRED://INSTALL_SRC%p", NULL }, +"selected file to new location", "LYNXDIRED://INSTALL_SRC%p", NULL }, +/* The following (installing a directory) doesn't work for me, at least + with the "install" from GNU fileutils 4.0. I leave it in anyway, in + case one compiles with INSTALL_PATH / INSTALL_ARGS defined to some + other command for which it works (like a script, or maybe "cp -a"). - kw +*/ { DE_DIR, "", "Install", -"(of current selection)", "LYNXDIRED://INSTALL_SRC%p", NULL }, +"selected directory to new location", "LYNXDIRED://INSTALL_SRC%p", NULL }, +#endif /* OK_INSTALL */ { DE_FILE, "", "Modify File Name", "(of current selection)", "LYNXDIRED://MODIFY_NAME%p", NULL }, @@ -249,6 +269,11 @@ struct dired_menu { { DE_TAG, "", "Move all tagged items to another location.", "", "LYNXDIRED://MOVE_TAGGED%d", NULL }, +#ifdef OK_INSTALL +{ DE_TAG, "", "Install tagged files into another directory.", + "", "LYNXDIRED://INSTALL_SRC%00", NULL }, +#endif + { DE_TAG, "", "Remove all tagged files and directories.", "", "LYNXDIRED://REMOVE_TAGGED", NULL }, @@ -259,7 +284,7 @@ struct dired_menu { NULL, NULL, NULL } }; -PRIVATE BOOLEAN cannot_stat ARGS1(char *, name) +PRIVATE BOOLEAN cannot_stat ARGS1(CONST char *, name) { char *tmpbuf = 0; HTSprintf(&tmpbuf, gettext("Unable to get status of '%s'."), name); @@ -268,10 +293,12 @@ PRIVATE BOOLEAN cannot_stat ARGS1(char *, name) return FALSE; } -PRIVATE BOOLEAN ok_stat ARGS2(char *, name, struct stat*, sb) +#define OK_STAT(name, sb) (stat(name, sb) == 0) + +PRIVATE BOOLEAN ok_stat ARGS2(CONST char *, name, struct stat*, sb) { CTRACE(tfp, "testing ok_stat(%s)\n", name); - if (stat(name, sb) < 0) { + if (!OK_STAT(name, sb)) { return cannot_stat(name); } return TRUE; @@ -300,20 +327,23 @@ PRIVATE BOOLEAN ok_file_or_dir ARGS1(struct stat*, sb) return TRUE; } -PRIVATE BOOLEAN ok_localname ARGS2(char*, dst, char*, src) +#ifdef OK_INSTALL /* currently only used in local_install */ +PRIVATE BOOLEAN ok_localname ARGS2(char*, dst, CONST char*, src) { - char *s = HTfullURL_toFile(strip_trailing_slash(src)); struct stat dir_info; - if (!ok_stat(s, &dir_info) + if (!ok_stat(src, &dir_info) || !ok_file_or_dir(&dir_info)) { - FREE(s); return FALSE; } - strcpy(dst, s); - FREE(s); + if (strlen(src) >= DIRED_MAXBUF) { + CTRACE(tfp, "filename too long in ok_localname!\n"); + return FALSE; + } + strcpy(dst, src); return TRUE; } +#endif /* OK_INSTALL */ PRIVATE int move_file ARGS2(char *, source, char *, target) { @@ -335,7 +365,7 @@ PRIVATE BOOLEAN not_already_exists ARGS1(char *, name) { struct stat dir_info; - if (stat(name, &dir_info) == -1) { + if (!OK_STAT(name, &dir_info)) { if (errno != ENOENT) { cannot_stat(name); } else { @@ -437,7 +467,7 @@ PRIVATE BOOLEAN modify_tagged ARGS1( ino_t inode; uid_t owner; char tmpbuf[1024]; - char *savepath = NULL; + char *savepath; char *srcpath = NULL; struct stat dir_info; int count = 0; @@ -471,21 +501,28 @@ PRIVATE BOOLEAN modify_tagged ARGS1( cp = HTList_lastObject(tagged); testpath = NULL; /* Won't be needed any more in this function, set to NULL as a flag. */ - if (!cp) /* Last resort, should never happen. */ - cp = "/"; } if (testpath == NULL) { /* * Get the directory containing the file or subdir. */ - cp = HTfullURL_toFile(strip_trailing_slash(cp)); - savepath = HTParse(".", cp, PARSE_PATH+PARSE_PUNCTUATION); + if (cp) { + cp = strip_trailing_slash(cp); + cp = HTParse(".", cp, PARSE_PATH+PARSE_PUNCTUATION); + savepath = HTURLPath_toFile(cp, TRUE); + FREE(cp); + } else { /* Last resort, should never happen. */ + savepath = HTURLPath_toFile(".", TRUE); + } } else { - cp = HTfullURL_toFile(cp); - StrAllocCopy(savepath, cp); + if (!strncmp(cp, "file://localhost", 16)) { + cp += 16; + } else if (!strncmp(cp, "file:", 5)) { + cp += 5; + } + savepath = HTURLPath_toFile(cp, TRUE); } - FREE(cp); if (!ok_stat(savepath, &dir_info)) { FREE(savepath); @@ -556,8 +593,7 @@ PRIVATE BOOLEAN modify_tagged ARGS1( * Move all tagged items to the target location. */ while ((cp = (char *)HTList_nextObject(tag)) != NULL) { - cp = HTfullURL_toFile(cp); - StrAllocCopy(srcpath, cp); + srcpath = HTfullURL_toFile(cp); if (move_file(srcpath, savepath) < 0) { FREE(cp); @@ -565,7 +601,7 @@ PRIVATE BOOLEAN modify_tagged ARGS1( count = -1; break; } - FREE(cp); + FREE(srcpath); ++count; } clear_tags(); @@ -584,9 +620,9 @@ PRIVATE BOOLEAN modify_name ARGS1( char *, testpath) { char *cp; - char tmpbuf[512]; - char newpath[512]; - char savepath[512]; + char tmpbuf[DIRED_MAXBUF]; + char newpath[DIRED_MAXBUF]; + char savepath[DIRED_MAXBUF]; struct stat dir_info; /* @@ -642,8 +678,8 @@ PRIVATE BOOLEAN modify_location ARGS1( ino_t inode; uid_t owner; char tmpbuf[1024]; - char newpath[512]; - char savepath[512]; + char newpath[DIRED_MAXBUF]; + char savepath[DIRED_MAXBUF]; struct stat dir_info; /* @@ -725,15 +761,14 @@ PUBLIC BOOLEAN local_modify ARGS2( { int c, ans; char *cp; - char testpath[512]; /* a bit ridiculous */ + char testpath[DIRED_MAXBUF]; /* a bit ridiculous */ int count; if (!HTList_isEmpty(tagged)) { cp = HTpartURL_toFile(doc->address); - strcpy(testpath, cp); - FREE(cp); - count = modify_tagged(testpath); + count = modify_tagged(cp); + FREE(cp); if (doc->link > (nlinks-count - 1)) doc->link = (nlinks-count - 1); @@ -762,6 +797,10 @@ PUBLIC BOOLEAN local_modify ARGS2( if (strchr("NLP", ans) != NULL) { cp = HTfullURL_toFile(links[doc->link].lname); + if (strlen(cp) >= DIRED_MAXBUF) { + FREE(cp); + return 0; + } strcpy(testpath, cp); FREE(cp); @@ -794,8 +833,8 @@ PRIVATE BOOLEAN create_file ARGS1( char *, current_location) { int code = FALSE; - char tmpbuf[512]; - char testpath[512]; + char tmpbuf[DIRED_MAXBUF]; + char testpath[DIRED_MAXBUF]; char *args[5]; char *bad_chars = ".~/"; @@ -842,8 +881,8 @@ PRIVATE BOOLEAN create_directory ARGS1( char *, current_location) { int code = FALSE; - char tmpbuf[512]; - char testpath[512]; + char tmpbuf[DIRED_MAXBUF]; + char testpath[DIRED_MAXBUF]; char *args[5]; char *bad_chars = ".~/"; @@ -888,16 +927,20 @@ PUBLIC BOOLEAN local_create ARGS1( { int c, ans; char *cp; - char testpath[512]; - - _statusline(gettext("Create file or directory (f or d): ")); - c = LYgetch(); - ans = TOUPPER(c); + char testpath[DIRED_MAXBUF]; cp = HTfullURL_toFile(doc->address); + if (strlen(cp) >= DIRED_MAXBUF) { + FREE(cp); + return 0; + } strcpy(testpath,cp); FREE(cp); + _statusline(gettext("Create file or directory (f or d): ")); + c = LYgetch(); + ans = TOUPPER(c); + if (ans == 'F') { return(create_file(testpath)); } else if (ans == 'D') { @@ -980,7 +1023,7 @@ PUBLIC BOOLEAN local_remove ARGS1( document *, doc) { char *cp, *tp; - char testpath[512]; + char testpath[DIRED_MAXBUF]; int count, i; if (!HTList_isEmpty(tagged)) { @@ -996,6 +1039,10 @@ PUBLIC BOOLEAN local_remove ARGS1( cp = links[doc->link].lname; if (is_url(cp) == FILE_URL_TYPE) { tp = HTfullURL_toFile(cp); + if (strlen(tp) >= DIRED_MAXBUF) { + FREE(tp); + return 0; + } strcpy(testpath, tp); FREE(tp); @@ -1058,22 +1105,19 @@ PRIVATE BOOLEAN permit_location ARGS3( * Create form. */ FILE *fp0; - char local_src[LY_MAXPATH]; char * user_filename; char * group_name; - cp = HTfullURL_toFile(strip_trailing_slash(srcpath)); - strcpy(local_src, cp); - FREE(cp); + srcpath = strip_trailing_slash(srcpath); /* * A couple of sanity tests. */ - if (!ok_lstat(local_src, &dir_info) + if (!ok_lstat(srcpath, &dir_info) || !ok_file_or_dir(&dir_info)) return 0; - user_filename = LYPathLeaf(local_src); + user_filename = LYPathLeaf(srcpath); LYRemoveTemp(tempfile); if ((fp0 = LYOpenTemp(tempfile, HTML_SUFFIX, "w")) == NULL) { @@ -1089,7 +1133,7 @@ PRIVATE BOOLEAN permit_location ARGS3( group_name = HTAA_GidToName (dir_info.st_gid); LYstrncpy(LYValidPermitFile, - local_src, + srcpath, (sizeof(LYValidPermitFile) - 1)); fprintf(fp0, "<Html><Head>\n<Title>%s</Title>\n</Head>\n<Body>\n", @@ -1194,10 +1238,14 @@ PRIVATE BOOLEAN permit_location ARGS3( *cp++ = '\0'; /* Null terminate file name and start working on the masks. */ - if ((destpath = HTfullURL_toFile(destpath)) == 0) + /* Will now operate only on filename part. */ + if ((destpath = HTURLPath_toFile(destpath, TRUE)) == 0) return(0); - - strcpy(tmpdst, destpath); /* operate only on filename */ + if (strlen(destpath) >= LY_MAXPATH) { + FREE(destpath); + return(0); + } + strcpy(tmpdst, destpath); FREE(destpath); destpath = tmpdst; @@ -1358,15 +1406,20 @@ PRIVATE char * DirectoryOf ARGS1( } #ifdef __DJGPP__ -/* Convert filenames to acceptable 8+3 names when necessary -*/ +/* + * Convert filenames to acceptable 8+3 names when necessary. Make a copy of + * the parameter if we must modify it. + */ PRIVATE char * LYonedot ARGS1( char *, line) { char *dot; + static char line1[LY_MAXPATH]; + if (pathconf (line, _PC_NAME_MAX) <= 12) { + strcpy(line1, line); for (;;) { - if ((dot = strrchr(line, '.')) == 0 + if ((dot = strrchr(line1, '.')) == 0 || LYLastPathSep(dot) != 0) { break; } else if (strlen(dot) == 1) { @@ -1375,6 +1428,7 @@ PRIVATE char * LYonedot ARGS1( *dot = '_'; } } + return(line1); } return(line); } @@ -1428,15 +1482,19 @@ PUBLIC int local_dired ARGS1( } else if (!strncmp(line, "LYNXDIRED://NEW_FOLDER", 22)) { if (create_directory(&line[22]) > 0) LYforce_no_cache = TRUE; +#ifdef OK_INSTALL } else if (!strncmp(line, "LYNXDIRED://INSTALL_SRC", 23)) { local_install(NULL, &line[23], &tp); - StrAllocCopy(doc->address, tp); - FREE(tp); + if (tp) { + FREE(doc->address); + doc->address = tp; + } FREE(line); return 0; } else if (!strncmp(line, "LYNXDIRED://INSTALL_DEST", 24)) { local_install(&line[24], NULL, &tp); LYpop(doc); +#endif /* OK_INSTALL */ } else if (!strncmp(line, "LYNXDIRED://MODIFY_NAME", 23)) { if (modify_name(&line[23]) > 0) LYforce_no_cache = TRUE; @@ -1449,13 +1507,14 @@ PUBLIC int local_dired ARGS1( #ifdef OK_PERMIT } else if (!strncmp(line, "LYNXDIRED://PERMIT_SRC", 22)) { permit_location(NULL, &line[22], &tp); - if (tp) + if (tp) { /* * One of the checks may have failed. */ - StrAllocCopy(doc->address, tp); + FREE(doc->address); + doc->address = tp; + } FREE(line); - FREE(tp); return 0; } else if (!strncmp(line, "LYNXDIRED://PERMIT_LOCATION", 27)) { permit_location(&line_url[27], NULL, &tp); @@ -1619,7 +1678,7 @@ PUBLIC int local_dired ARGS1( } _statusline(tmpbuf); stop_curses(); - printf("%s\n", tmpbuf); + printf("%s\r\n", tmpbuf); LYSystem(buffer); #ifdef VMS HadVMSInterrupt = FALSE; @@ -1646,11 +1705,11 @@ PUBLIC int dired_options ARGS2( char **, newfile) { static char tempfile[LY_MAXPATH]; - char path[512], dir[512]; /* much too large */ + char *path; + char *dir; lynx_html_item_type *nxt; struct stat dir_info; FILE *fp0; - char *cp = NULL; char *dir_url; char *path_url; BOOLEAN nothing_tagged; @@ -1670,26 +1729,23 @@ PUBLIC int dired_options ARGS2( LYLocalFileToURL(newfile, tempfile); strcpy(LYDiredFileURL, *newfile); - cp = HTpartURL_toFile(doc->address); - strcpy(dir, cp); - LYTrimPathSep(dir); - FREE(cp); - if (doc->link > -1 && doc->link < (nlinks+1)) { - cp = HTfullURL_toFile(links[doc->link].lname); - strcpy(path, cp); + path = HTfullURL_toFile(links[doc->link].lname); LYTrimPathSep(path); - FREE(cp); if (!ok_lstat(path, &dir_info)) { LYCloseTempFP(fp0); + FREE(path); return 0; } } else { - path[0] = '\0'; + StrAllocCopy(path, ""); } + dir = HTfullURL_toFile(doc->address); + LYTrimPathSep(dir); + nothing_tagged = (HTList_isEmpty(tagged)); BeginInternalPage(fp0, DIRED_MENU_TITLE, DIRED_MENU_HELP); @@ -1778,6 +1834,7 @@ PUBLIC int dired_options ARGS2( FREE(dir_url); FREE(path_url); } + FREE(path); if (uploaders != NULL) { fprintf(fp0, "<p>Upload to current directory:<p>\n"); @@ -1789,6 +1846,7 @@ PUBLIC int dired_options ARGS2( count, dir, nxt->name); } } + FREE(dir); EndInternalPage(fp0); LYCloseTempFP(fp0); @@ -1831,6 +1889,72 @@ PRIVATE char *get_filename ARGS3( return buf; } +#ifdef OK_INSTALL + +#define LYEXECV_MAX_ARGC 15 +/* these are quasi-constant once they have been allocated: */ +static char ** install_argp = NULL; /* args for execv install */ +static char * install_path = NULL; /* auxiliary */ +#ifdef LY_FIND_LEAKS +PRIVATE void clear_install_path NOARGS +{ + FREE(install_argp); + FREE(install_path); +} +#endif /* LY_FIND_LEAKS */ +/* + * Fill in args array for execv (or execvp etc.) call, after first + * allocating it if necessary. No fancy parsing, cmd_args is just + * split at spaces. Leave room for reserve additional args to be + * added by caller. + * On success *argvp points to new args vector, *pathp is auxiliary. + * On success returns index of next argument, else -1. + * This is generic enough that it could be used for other calls than + * install, except the atexit call. Go through this trouble for install + * because INSTALL_ARGS may be significant, and someone may configure it + * with more than one significant flags. - kw + */ +PRIVATE int fill_argv_for_execv ARGS5( + char ***, argvp, + char **, pathp, + char *, cmd_path, + CONST char *, cmd_args, + int, reserve) +{ + int n = 0; + + char **args; + char *cp; + if (*argvp == NULL) { + *argvp = (char **)calloc(LYEXECV_MAX_ARGC+1, sizeof(char *)); + if (!*argvp) + return(-1); +#ifdef LY_FIND_LEAKS + atexit(clear_install_path); +#endif + } + args = *argvp; + args[n++] = cmd_path; + if (cmd_args) { + StrAllocCopy(*pathp, cmd_args); + cp = strtok(*pathp, " "); + if (cp) { + while (cp && (n < LYEXECV_MAX_ARGC - reserve)) { + args[n++] = cp; + cp = strtok(NULL, " "); + } + if (cp && (n >= LYEXECV_MAX_ARGC - reserve)) { + CTRACE(tfp, "Too many args for '%s' in '%s'!\n", + cmd_path ? cmd_path : "<null>" , cmd_args); + return(-1); + } + } else { + args[n++] = *pathp; + } + } + args[n] = (char *)0; + return(n); +} /* * Install the specified file or directory. */ @@ -1840,71 +1964,173 @@ PUBLIC BOOLEAN local_install ARGS3( char **, newpath) { char *tmpbuf = NULL; - char savepath[512]; /* This will be the link that is to be installed. */ + static char savepath[DIRED_MAXBUF]; /* This will be the link that + is to be installed. */ struct stat dir_info; - char *args[6]; + char **args; HTList *tag; + char *cp = NULL; + char *tmpdest = NULL; int count = 0; - int n = 0, src; /* indices into 'args[]' */ + int n = 0; /* indices into 'args[]' */ + static int src = -1; /* * Determine the status of the selected item. */ if (srcpath) { - if (!ok_localname(savepath, srcpath)) + srcpath = strip_trailing_slash(srcpath); + if (is_url(srcpath)) { + char *local_src = HTfullURL_toFile(srcpath); + if (!ok_localname(savepath, local_src)) { + FREE(local_src); + return 0; + } + FREE(local_src); + } else if (!HTList_isEmpty(tagged) && + srcpath[0] == '\0') { + savepath[0] = '\0'; /* will always use tagged list - kw */ + } else if (!ok_localname(savepath, srcpath)) { return 0; - + } LYforce_no_cache = TRUE; LYLocalFileToURL(newpath, Home_Dir()); - StrAllocCat(*newpath, "/.installdirs.html"); + LYAddHtmlSep(newpath); + StrAllocCat(*newpath, INSTALLDIRS_FILE); + LYstrncpy(LYInstallFileURL, + *newpath, + (sizeof(LYInstallFileURL) - 1)); return 0; } + /* deal with ~/ or /~/ at the beginning - kw */ + if (destpath[0] == '~' && + (destpath[1] == '/' || destpath[1] == '\0')) { + cp = &destpath[1]; + } else if (destpath[0] == '/' && destpath[1] == '~' && + (destpath[2] == '/' || destpath[2] == '\0')) { + cp = &destpath[2]; + } + if (cp) { + /* If found, allocate new string, make destpath point to it - kw */ + StrAllocCopy(tmpdest, Home_Dir()); + if (cp[0] && cp[1]) { + LYAddPathSep(&tmpdest); + StrAllocCat(tmpdest, cp + 1); + } + destpath = tmpdest; + } + destpath = strip_trailing_slash(destpath); if (!ok_stat(destpath, &dir_info)) { + FREE(tmpdest); return 0; } else if (!S_ISDIR(dir_info.st_mode)) { HTAlert(gettext("The selected item is not a directory! Request ignored.")); + FREE(tmpdest); return 0; } else if (0 /*directory not writable*/) { HTAlert(gettext("Install in the selected directory not permitted.")); + FREE(tmpdest); return 0; } statusline(gettext("Just a moment, ...")); - args[n++] = "install"; + + /* fill in the fixed args, if not already done - kw */ + if (src > 0 && install_argp) { + n = src; + n++; + } else { + n = fill_argv_for_execv(&install_argp, &install_path, + "install", #ifdef INSTALL_ARGS - args[n++] = INSTALL_ARGS; + INSTALL_ARGS, +#else + NULL, #endif /* INSTALL_ARGS */ - src = n++; + 2); + if (n <= 0) { + src = 0; + HTAlert(gettext("Error buiding install args")); + FREE(tmpdest); + return 0; + } + src = n++; + } + args = install_argp; + args[n++] = destpath; args[n] = (char *)0; - HTSprintf(&tmpbuf, "install %s", destpath); tag = tagged; if (HTList_isEmpty(tagged)) { + /* simplistic detection of identical src and dest - kw */ + if (!strcmp(savepath, destpath)) { + HTUserMsg2(gettext("Source and target are the same: %s"), + savepath); + FREE(tmpdest); + return(-1); /* don't do it */ + } else if (!strncmp(savepath, destpath, strlen(destpath)) && + LYIsPathSep(savepath[strlen(destpath)]) && +#ifdef DOSPATH + !strchr(savepath + strlen(destpath) + 1, '\\') && +#endif + !strchr(savepath + strlen(destpath) + 1, '/')) { + HTUserMsg2(gettext("Already in target directory: %s"), + savepath); + FREE(tmpdest); + return 0; /* don't do it */ + } args[src] = savepath; - if (LYExecv(INSTALL_PATH, args, tmpbuf) <= 0) + HTSprintf(&tmpbuf, "install %s in %s", savepath, destpath); + if (LYExecv(INSTALL_PATH, args, tmpbuf) <= 0) { + FREE(tmpbuf); + FREE(tmpdest); return (-1); + } count++; } else { char *name; + HTSprintf(&tmpbuf, "install in %s", destpath); while ((name = (char *)HTList_nextObject(tag))) { int err; args[src] = HTfullURL_toFile(name); + + /* simplistic detection of identical src and dest - kw */ + if (!strcmp(args[src], destpath)) { + HTUserMsg2(gettext("Source and target are the same: %s"), + args[src]); + FREE(args[src]); + continue; /* skip this source file */ + } else if (!strncmp(args[src], destpath, strlen(destpath)) && + LYIsPathSep(args[src][strlen(destpath)]) && +#ifdef DOSPATH + !strchr(args[src] + strlen(destpath) + 1, '\\') && +#endif + !strchr(args[src] + strlen(destpath) + 1, '/')) { + HTUserMsg2(gettext("Already in target directory: %s"), + args[src]); + FREE(args[src]); + continue; /* skip this source file */ + } err = (LYExecv(INSTALL_PATH, args, tmpbuf) <= 0); FREE(args[src]); - if (err) + if (err) { + FREE(tmpdest); return ((count == 0) ? -1 : count); + } count++; } clear_tags(); } FREE(tmpbuf); + FREE(tmpdest); HTInfoMsg(gettext("Installation complete")); return count; } +#endif /* OK_INSTALL */ /* * Clear DIRED tags. @@ -1990,13 +2216,13 @@ PUBLIC void add_menu_item ARGS1( */ PRIVATE char * render_item ARGS6( CONST char *, s, - char *, path, - char *, dir, + CONST char *, path, + CONST char *, dir, char *, buf, int, bufsize, BOOLEAN, url_syntax) { - char *cp; + CONST char *cp; char *bp; char overrun = '\0'; char *taglist = NULL; @@ -2081,6 +2307,7 @@ PRIVATE char * render_item ARGS6( *bp = '\0'; return buf; } + #endif /* DIRED_SUPPORT */ /* @@ -2169,7 +2396,8 @@ PRIVATE int LYExecv ARGS3( } start_curses(); if (tmpbuf != 0) { - HTAlert(tmpbuf); + if (rc == 0) + HTAlert(tmpbuf); FREE(tmpbuf); } diff --git a/src/LYLocal.h b/src/LYLocal.h index 029718d1..143e3914 100644 --- a/src/LYLocal.h +++ b/src/LYLocal.h @@ -35,11 +35,16 @@ extern char LYPermitFileURL[]; extern char LYDiredFileURL[]; extern char LYUploadFileURL[]; +#ifdef OK_INSTALL +extern char LYInstallFileURL[]; +#endif extern BOOLEAN local_create PARAMS((document *doc)); extern BOOLEAN local_modify PARAMS((document *doc, char **newpath)); extern BOOLEAN local_remove PARAMS((document *doc)); +#ifdef OK_INSTALL extern BOOLEAN local_install PARAMS((char *destpath, char *srcpath, char **newpath)); +#endif /* MainLoop needs to know about this one for atexit cleanup */ extern void clear_tags NOPARAMS; diff --git a/src/LYMail.c b/src/LYMail.c index 340f14c9..37764eab 100644 --- a/src/LYMail.c +++ b/src/LYMail.c @@ -1852,7 +1852,7 @@ PUBLIC void reply_by_mail ARGS4( sleep(AlertSecs); start_curses(); goto cleandown; -#else /* Unix: */ +#else /* not VMS: */ /* * Send the tmpfile into sendmail. */ diff --git a/src/LYMain.c b/src/LYMain.c index e422853b..1c7f6c87 100644 --- a/src/LYMain.c +++ b/src/LYMain.c @@ -409,6 +409,7 @@ PUBLIC int partial_threshold = -1; /* # of lines to be d/l'ed until we repaint #endif PUBLIC BOOLEAN LYNonRestartingSIGWINCH = FALSE; +PUBLIC BOOLEAN LYReuseTempfiles = FALSE; /* These are declared in cutil.h for current freeWAIS libraries. - FM */ #ifdef DECLARE_WAIS_LOGFILES @@ -2561,6 +2562,7 @@ static int restrictions_fun ARGS1( #ifndef NO_CONFIG_INFO ," lynxcfg_xinfo disable extended lynx.cfg viewing and reloading" #endif +," mail disallow mail" ," multibook disallow multiple bookmark files" ," news_post disallow USENET News posting." ," option_save disallow saving options in .lynxrc" diff --git a/src/LYMainLoop.c b/src/LYMainLoop.c index 51cfb467..47ac1d67 100644 --- a/src/LYMainLoop.c +++ b/src/LYMainLoop.c @@ -743,6 +743,7 @@ try_again: LYCancelledFetch = FALSE; ForcePush = FALSE; LYforce_HTML_mode = FALSE; + force_old_UCLYhndl_on_reload = FALSE; if (traversal) { crawl_ok = FALSE; if (traversal_link_to_add) { @@ -1121,6 +1122,7 @@ try_again: LYPermitURL = FALSE; /* only for LYValidate or check_realm */ ForcePush = FALSE; /* only set for some PRINT requests. */ LYforce_HTML_mode = FALSE; + force_old_UCLYhndl_on_reload = FALSE; popped_doc = FALSE; } /* end if (LYforce_no_cache || force_load || are_different(...)) */ @@ -1761,6 +1763,7 @@ new_cmd: /* * back through the getch() loop. */ + force_old_UCLYhndl_on_reload = FALSE; CTRACE_FLUSH(tfp); switch(cmd) { @@ -3329,6 +3332,9 @@ new_cmd: /* (strcmp(curdoc.address, LYPermitFileURL) || strcmp((curdoc.title ? curdoc.title : ""), PERMIT_OPTIONS_TITLE)) && +#ifdef OK_INSTALL + strcmp(curdoc.address, LYInstallFileURL) && +#endif /* OK_INSTALL */ (strcmp(curdoc.address, LYUploadFileURL) || strcmp((curdoc.title ? curdoc.title : ""), UPLOAD_OPTIONS_TITLE))) || @@ -3509,7 +3515,9 @@ new_cmd: /* * unescaping of other chars. - KW */ HTUnEscapeSome(newdoc.address,"/"); - strip_trailing_slash(newdoc.address); + /* avoid stripping final slash for root dir - kw */ + if (strcasecomp(newdoc.address, "file://localhost/")) + strip_trailing_slash(newdoc.address); } #endif /* DIRED_SUPPORT && !__DJGPP__ */ if (!strncmp(curdoc.address, "LYNXCOOKIE:", 11)) { @@ -4738,12 +4746,12 @@ if (!LYUseFormsOptions) { } break; -#ifdef DIRED_SUPPORT +#if defined(DIRED_SUPPORT) && defined(OK_INSTALL) case LYK_INSTALL: /* install a file into system area */ if (lynx_edit_mode && nlinks > 0 && !no_dired_support) local_install(NULL, links[curdoc.link].lname, &newdoc.address); break; -#endif /* DIRED_SUPPORT */ +#endif /* DIRED_SUPPORT && OK_INSTALL */ case LYK_INFO: /* show document info */ /* diff --git a/src/LYOptions.c b/src/LYOptions.c index 560b29e8..7bc6e1d0 100644 --- a/src/LYOptions.c +++ b/src/LYOptions.c @@ -3553,17 +3553,22 @@ PUBLIC int postoptions ARGS1( return(NULLFILE); } + data = break_data(newdoc->post_data); - /*------------------------------------------------- - * kludge gen_options() call: - *--------------------------------------------------*/ - - if (strstr(newdoc->address, "LYNXOPTIONS:/") && !newdoc->post_data) { - int status = gen_options(&newdoc->address); - if (status == NOT_FOUND) - return(NOT_FOUND); + if (!data) { + int status; + + /*------------------------------------------------- + * kludge gen_options() call: + *--------------------------------------------------*/ + status = gen_options(&newdoc->address); + if (status != NORMAL) { + HTAlwaysAlert("Unexpected way of accessing", newdoc->address); + FREE(newdoc->address); + return(status); + } - /* exit to getfile() cyrcle */ + /* exit to getfile() cycle */ WWWDoc.address = newdoc->address; WWWDoc.post_data = newdoc->post_data; WWWDoc.post_content_type = newdoc->post_content_type; @@ -3576,9 +3581,6 @@ PUBLIC int postoptions ARGS1( return(NORMAL); } - - data = break_data(newdoc->post_data); - for (i = 0; data[i].tag != NULL; i++) { /* * Paranoid security. @@ -4085,13 +4087,17 @@ PRIVATE int gen_options ARGS1( #if defined(USE_SLANG) || defined(COLOR_CURSES) BOOLEAN can_do_colors; #endif - static char tempfile[LY_MAXPATH]; + static char tempfile[LY_MAXPATH] = "\0"; FILE *fp0; size_t cset_len = 0; size_t text_len = COLS - 38; /* cf: PutLabel */ - LYRemoveTemp(tempfile); - fp0 = LYOpenTemp(tempfile, HTML_SUFFIX, "w"); + if (LYReuseTempfiles) { + fp0 = LYOpenTempRewrite(tempfile, HTML_SUFFIX, "w"); + } else { + LYRemoveTemp(tempfile); + fp0 = LYOpenTemp(tempfile, HTML_SUFFIX, "w"); + } if (fp0 == NULL) { HTAlert(UNABLE_TO_OPEN_TEMPFILE); return(NOT_FOUND); diff --git a/src/LYPrint.c b/src/LYPrint.c index 810a1ab7..489e88ae 100644 --- a/src/LYPrint.c +++ b/src/LYPrint.c @@ -986,6 +986,7 @@ PRIVATE void send_file_to_screen ARGS3( if (Lpansi) { printf("\n\014"); /* Form feed */ printf("\033[4i"); + fflush(stdout); /* refresh to screen */ Lpansi = FALSE; } else { fprintf(stdout,"\n\n%s", PRESS_RETURN_TO_FINISH); @@ -995,7 +996,6 @@ PRIVATE void send_file_to_screen ARGS3( HadVMSInterrupt = FALSE; #endif /* VMS */ } - fflush(stdout); /* refresh to screen */ start_curses(); done: @@ -1237,15 +1237,20 @@ PUBLIC int print_options ARGS3( char **, printed_url, int, lines_in_file) { - static char my_temp[LY_MAXPATH]; + static char my_temp[LY_MAXPATH] = "\0"; char *buffer = 0; int count; int pages; FILE *fp0; lynx_printer_item_type *cur_printer; - LYRemoveTemp(my_temp); - if ((fp0 = LYOpenTemp(my_temp, HTML_SUFFIX, "w")) == NULL) { + if (LYReuseTempfiles) { + fp0 = LYOpenTempRewrite(my_temp, HTML_SUFFIX, "w"); + } else { + LYRemoveTemp(my_temp); + fp0 = LYOpenTemp(my_temp, HTML_SUFFIX, "w"); + } + if (fp0 == NULL) { HTAlert(UNABLE_TO_OPEN_PRINTOP_FILE); return(-1); } diff --git a/src/LYReadCFG.c b/src/LYReadCFG.c index a8cc016b..5a535ffc 100644 --- a/src/LYReadCFG.c +++ b/src/LYReadCFG.c @@ -1181,6 +1181,7 @@ static Config_Type Config_Table [] = PARSE_SET("prepend_charset_to_source", CONF_BOOL, &LYPrependCharsetToSource), PARSE_FUN("printer", CONF_FUN, printer_fun), PARSE_SET("quit_default_yes", CONF_BOOL, &LYQuitDefaultYes), + PARSE_SET("reuse_tempfiles", CONF_BOOL, &LYReuseTempfiles), #ifndef NO_RULES PARSE_FUN("rule", CONF_FUN, HTSetConfiguration), PARSE_FUN("rulesfile", CONF_FUN, cern_rulesfile_fun), diff --git a/src/LYShowInfo.c b/src/LYShowInfo.c index 56340c16..d7389761 100644 --- a/src/LYShowInfo.c +++ b/src/LYShowInfo.c @@ -33,7 +33,7 @@ PUBLIC int showinfo ARGS4( document *, newdoc, char *, owner_address) { - static char tempfile[LY_MAXPATH]; + static char tempfile[LY_MAXPATH] = "\0"; int url_type; FILE *fp0; char *Address = NULL, *Title = NULL; @@ -48,8 +48,13 @@ PUBLIC int showinfo ARGS4( struct stat dir_info; #endif /* DIRED_SUPPORT */ - LYRemoveTemp(tempfile); - if ((fp0 = LYOpenTemp (tempfile, HTML_SUFFIX, "w")) == 0) { + if (LYReuseTempfiles) { + fp0 = LYOpenTempRewrite(tempfile, HTML_SUFFIX, "w"); + } else { + LYRemoveTemp(tempfile); + fp0 = LYOpenTemp(tempfile, HTML_SUFFIX, "w"); + } + if (fp0 == NULL) { HTAlert(CANNOT_OPEN_TEMP); return(-1); } diff --git a/src/LYStrings.c b/src/LYStrings.c index 5fa74a85..01981de5 100644 --- a/src/LYStrings.c +++ b/src/LYStrings.c @@ -2737,11 +2737,6 @@ PUBLIC char *LYstrsep ARGS2( if (!stringp || !*stringp) /* nothing to do? */ return 0; /* then don't fall on our faces */ - if (!**stringp) { /* empty string: */ - *stringp = 0; /* let caller see he's done; */ - return 0; /* no tokens in an empty string */ - } - out = *stringp; /* save the start of the string */ tmp = strpbrk(*stringp, delim); if (tmp) { diff --git a/src/LYUtils.c b/src/LYUtils.c index 157cef47..73ff1bf3 100644 --- a/src/LYUtils.c +++ b/src/LYUtils.c @@ -17,6 +17,10 @@ #include <LYMainLoop.h> #include <LYKeymap.h> +#ifndef NO_GROUPS +#include <HTFile.h> +#endif + #ifdef DJGPP_KEYHANDLER #include <bios.h> #endif /* DJGPP_KEYHANDLER */ @@ -6114,6 +6118,165 @@ PUBLIC FILE *LYReopenTemp ARGS1( } /* + * Open a temp-file for writing, possibly re-using a previously used + * name and file. + * If a non-empty fname is given, it is reused if it indicates a file + * previously registered as a temp file and, in case the file still + * exists, if it looks like we can write to it safely. Otherwise a + * new temp file (with new name) will be generated and returned in fname. + * + * File permissions are set so that the file is not readable by unprivileged + * other users. + * + * Suffix is only used if fname is not being reused. + * The mode should be "w", others are possible (they may be passed on) + * but probably don't make sense. - kw + */ +PUBLIC FILE *LYOpenTempRewrite ARGS3( + char *, fname, + CONST char *, suffix, + CONST char *, mode) +{ + FILE *fp = 0; + BOOL txt = TRUE; + char wrt = 'r'; + BOOL registered = NO; + BOOL writable_exists = NO; + BOOL is_ours = NO; + BOOL still_open = NO; + LY_TEMP *p; + struct stat stat_buf; + + CTRACE(tfp, "LYOpenTempRewrite(%s,%s,%s)\n", fname, suffix, mode); + if (*fname == '\0') /* first time, no filename yet */ + return (LYOpenTemp(fname, suffix, mode)); + + for (p = ly_temp; p != 0; p = p->next) { + if (!strcmp(fname, p->name)) { + registered = YES; + if (p->file != 0) + still_open = YES; + CTRACE(tfp, "...used before%s\n", + still_open ? ", still open!" : "."); + break; + } + } + + if (registered) { +#ifndef NO_GROUPS + writable_exists = HTEditable(fname); /* existing, can write */ +#else + writable_exists = (stat(fname, &stat_buf) == 0); /* existing, assume can write */ +#endif + + if (writable_exists) { +#ifdef UNIX + is_ours = IsOurFile(fname); +#else + is_ours = TRUE; /* assume ok, if we get to here */ +#endif + } + CTRACE(tfp, "...%s%s\n", + writable_exists ? +#ifndef NO_GROUPS + "exists and is writable, " +#else + "exists, " +#endif + : "", + is_ours ? "is our file." : "is NOT our file."); + } + + /* + * Note that in cases where LYOpenTemp is called as fallback below, + * we don't call LYRemoveTemp first. That may be appropriate in some + * cases, but not trying to remove a weird existing file seems safer + * and could help diagnose an unusual situation. (They may be removed + * anyway later.) + */ + if (still_open) { + /* + * This should probably not happen. Make a new one. + */ + return (LYOpenTemp(fname, suffix, mode)); + } else if (is_ours) { + /* + * Yes, it exists, is writable if we checked, and everything + * looks ok so far. This should be the most regular case. + * We truncate and then append, this avoids having a small + * window in which the file doesn't exist. - kw + */ + if (truncate(fname, 0) != 0) { + CTRACE(tfp, "... truncate(%s,0) failed: %s\n", + fname, LYStrerror(errno)); + return (LYOpenTemp(fname, suffix, mode)); + } else { + return (LYReopenTemp(fname)); + } + } else if (writable_exists) { + /* + * File exists, writable if we checked, but something is wrong + * with it. + */ + return (LYOpenTemp(fname, suffix, mode)); +#ifndef NO_GROUPS + } else if (registered && (lstat(fname, &stat_buf) == 0)) { + /* + * Exists but not writable, and something is wrong with it. + */ + return (LYOpenTemp(fname, suffix, mode)); +#endif + } else if (!registered) { + /* + * Not registered. It should have been registered at one point + * though, otherwise we wouldn't be called like this. + */ + return (LYOpenTemp(fname, suffix, mode)); + } else { + /* + * File does not exist, but is registered as a temp file. + * It must have been removed by some means other than + * LYRemoveTemp. Reuse the name! + */ + } + + while (*mode != '\0') { + switch (*mode++) { + case 'w': wrt = 'w'; break; + case 'a': wrt = 'a'; break; + case 'b': txt = FALSE; break; + default: + CTRACE(tfp, "%s @%d: BUG\n", __FILE__, __LINE__); + return fp; + } + } + + if (txt) { + switch (wrt) { + case 'w': + fp = LYNewTxtFile (fname); + break; + case 'a': + fp = LYAppendToTxtFile (fname); + break; + } + } else { + fp = LYNewBinFile (fname); + } + p->file = fp; + + CTRACE(tfp, "... LYOpenTempRewrite(%s), %s\n", fname, + (fp) ? "ok" : "failed"); + /* + * We could fall back to trying LYOpenTemp() here in case of failure. + * After all the checks already done above a filure here should be + * pretty unusual though, so maybe it's better to let the user notice + * that something went wrong, and not try to fix it up. - kw + */ + return fp; +} + +/* * Special case of LYOpenTemp, used for manipulating bookmark file, i.e., with * renaming. */ @@ -6536,7 +6699,7 @@ PUBLIC void LYAddPathSep0 ARGS1( * Check if a given string contains a path separator */ PUBLIC char * LYLastPathSep ARGS1( - char *, path) + CONST char *, path) { char *result; #ifdef DOSPATH diff --git a/src/LYUtils.h b/src/LYUtils.h index 8a8608f3..10cf755b 100644 --- a/src/LYUtils.h +++ b/src/LYUtils.h @@ -71,9 +71,10 @@ extern FILE *LYNewBinFile PARAMS((char * name)); extern FILE *LYNewTxtFile PARAMS((char * name)); extern FILE *LYOpenScratch PARAMS((char *result, CONST char *prefix)); extern FILE *LYOpenTemp PARAMS((char *result, CONST char *suffix, CONST char *mode)); +extern FILE *LYOpenTempRewrite PARAMS((char *result, CONST char *suffix, CONST char *mode)); extern FILE *LYReopenTemp PARAMS((char *name)); extern char *Current_Dir PARAMS((char * pathname)); -extern char *LYLastPathSep PARAMS((char *path)); +extern char *LYLastPathSep PARAMS((CONST char *path)); extern char *LYPathLeaf PARAMS((char * pathname)); extern char *LYSysShell NOPARAMS; extern char *LYgetXDisplay NOPARAMS; @@ -1255,12 +1255,12 @@ * the version definition with the Project Version on checkout. Just * ignore it. - kw */ /* $Format: "#define LYNX_VERSION \"$ProjectVersion$\""$ */ -#define LYNX_VERSION "2.8.3dev.2" +#define LYNX_VERSION "2.8.3dev.3" #define LYNX_WWW_HOME "http://lynx.browser.org/" #define LYNX_WWW_DIST "http://www.slcc.edu/lynx/current/" #define LYNX_RELEASE FALSE /* $Format: "#define LYNX_DATE \"$ProjectDate$\""$ */ -#define LYNX_DATE "Fri, 18 Jun 1999 15:54:46 -0600" +#define LYNX_DATE "Tue, 29 Jun 1999 06:50:02 -0600" #define LYNX_DATE_OFF 5 /* truncate the automatically-generated date */ #define LYNX_DATE_LEN 11 /* truncate the automatically-generated date */ #define LYNX_RELEASE_DATE "1999" @@ -1485,7 +1485,7 @@ * to lynx.cfg as a normal file, e.g., through a "file:" URL, * if other restrictions allow that.) */ -#define CAN_ANONYMOUS_VIEW_LYNXCFG_INFO TRUE +#define CAN_ANONYMOUS_VIEW_LYNXCFG_INFO FALSE /******************************* * set to FALSE if users with anonymous restrictions should @@ -1500,7 +1500,7 @@ * names and location and links for reading the files, as well * as information on nesting of included configuration files. */ -#define CAN_ANONYMOUS_VIEW_LYNXCFG_EXTENDED_INFO TRUE +#define CAN_ANONYMOUS_VIEW_LYNXCFG_EXTENDED_INFO FALSE /******************************* * set to FALSE if users with anonymous restrictions should @@ -1510,7 +1510,7 @@ * AND --disable-config-info wasn't used, otherwise this * special URL scheme isn't recognized anyway. */ -#define CAN_ANONYMOUS_VIEW_COMPILEOPTS_INFO TRUE +#define CAN_ANONYMOUS_VIEW_COMPILEOPTS_INFO FALSE /******************************* * set to FALSE if you don't want users of your anonymous @@ -1518,7 +1518,7 @@ * configuration info (LYNXCFG: and LYNXCOMPILEOPTS:) if * they are otherwise allowed. */ -#define CAN_ANONYMOUS_GOTO_CONFIGINFO TRUE +#define CAN_ANONYMOUS_GOTO_CONFIGINFO FALSE /***************************** * Be sure you have read about and set defines above in Sections |