diff options
51 files changed, 1801 insertions, 1373 deletions
diff --git a/CHANGES b/CHANGES index e821ac89..246558f4 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,77 @@ Changes since Lynx 2.8 release ================================================================================ +1998-09-12 (2.8.1dev.26) +* change behavior of NSL_FORK and related I/O (patch by BL) + - Make URL guessing (www.huh.com? www.huh.org? www.huh.net?) interruptible. + - Make URL guessing from the command line interruptible. + - Use select() instead of FIONREAD. This makes it work on OSes where + previously it only *looked* like it was working. + - select() on stdin as well as the child pipe, when using [n]curses (not + SLANG). This allows interrupt to be processed instantly, without + up-to-1-second delay. + - While looping, 1 second at a time, bail out after "too many" (currently 50) + loops: just in case something weird happens, like select() returning some + unexpected error that we ignore. + - Make sure child processes are always killed and reaped. + - Close pipe ends as soon as possible. + - Now write the length down the pipe (using a known-to-the-program length of + sizeof(int)) first -- this both helps workaround old CMU TCP bugs and the + fact that select() doesn't let us get number of bytes ready, like FIONREAD + does. +* change default for NO_ANONYMOUS_EMAIL to TRUE (patch by HN) +* use url for "W3C HTML Validation Service" rather than "A Kinder, Gentler HTML + Validator" +* update url for HTML Quick Reference Guide (report by LE) - TE +* modify verbose images to show ISMAPs and USEMAPs (patch by LE). +* fix typos in AttrList.h, LYStrings.h (reported by LV & HN) - TD +* Chartrans recovery and cleanup: by introducing an invariant + "current_char_set and UCLYhndl_for_unspec always valid charsets" we solve + possible problems with invalid/undeclared charsets. Use + 'safeUCGetLYhndl_byMIME()' for reading charset information from + lynx.cfg/userdefs.h/command line switches to recover possible typos by + fallback to ISO-8859-1; If UCLYhndl_for_unrec or UCLYhndl_HTFile_for_unspec + not set explicitely - now fallback to UCLYhndl_for_unspec (was before, but + not clear in certain places). Add comments to UCMap.h, add comments on + chartrans initialization in LYMain.c. UCAssume_localMIMEcharset and + UCAssume_unrecMIMEcharset now removed (UCLYhandl_* do all the stuff). - LP +* LYCharSets.c: LYRawMode code simplified and comments added. It was realized + that UCAssume_MIMEcharset may differ from its handler as LYRawMode history. + Also: HTMLSetRawModeDefault() moved into HTMLUseCharacterSet() to reduce + clutter, declare HTMLSetCJKCharacterSet() as PRIVATE. - LP +* more "big5" bugs fixed (in HTMIME.c and HTFile.c); function Set_HTCJK() added + to LYCharSets.c - LP +* LYCharUtils.c: META charset code corrected against 2.7.2, obsolete code + removed - LP +* partial mode now repaint the screen in one stage with a complete display + ('display_lines' received, fix in HTPartialDisplay()). Incremental rendering + of the first page may be annoying on slow connection (reported by Nelson + Henry Eric <nelsonhe@nara.kindai.ac.jp>) - LP +* temp fix for HText_trimHightext side effect from partial mode by introducing + a flag in HText_beginInput(), so this side effect still only happens for long + documents with forms input mixed with normal href= link. - LP +* print menu: fixed document URL near the top (was temp file name) - LP +* forms-options menu: fixed screen size in Novice mode - LP +* limit length of strings copied via tok_values[] in LYCookies.c - TD +* clean up a few memory leaks in cookie_add_acceptlist() and + cookie_add_rejectlist() in LYCookie.c. These were leaking 4 bytes for each + entry in COOKIE_ACCEPT_DOMAINS - BJC +* fix to LYLoadCookies() which was causing duplicate invalid cookies to be + loaded - BJC +* split out install-doc rule in top-level makefile to install extra documentation + files in $(libdir)/lynx_doc (request by HN) - TD +* improved algorithm to set 'secure_value', used in forms-options to circumvent + spoofing (based on comments from Mike Castle) - TD +* integrate WB's mouse changes (see 1997-04-24) for page-up/down into the Unix + flavors of mouse support (e.g., ncurses and slang) - TD +* use ncurses define_key to implement lynx-keymaps (see dev.10) - TD +* modify slang keymap code to work with slang 0.99-38 - TD +* replace several ifdef'd pathname constructions to use LYAddPathToHome() - TD +* make keymaps file consistently named on Unix and VMS - TD +* remove redundant "Lynx" from internal-page titles (suggested by LP) - TD +* remove install-log makefile target, generate cfg_defs.h file directly from + lynx_cfg.h and config.cache, to compile-in the configuration-definitions + rather than rely on external file lynx_site.txt - TD 1998-09-06 (2.8.1dev.25) * corrected compiled-in path for lynx_site.txt - TD * implement logic for exec-links in forms-options page - TD @@ -24,7 +95,7 @@ Changes since Lynx 2.8 release * Fixed: forms input in display_partial mode! Previously hightext was printed at wrong positions while loading was in process (try -debug_partial to see the bug). Fix made in HText_pageDisplay: we call HText_trimHightext() which - was the main part of HText_endAppend() before. People, no more problems + was the main part of HText_endAppend() before. Seems no more problems reported from incremental rendering mode! - LP * set PARTIAL mode ON by default, unless it disabled in lynx.cfg or by configure --disable-partial option - LP @@ -54,7 +125,7 @@ Changes since Lynx 2.8 release it is started from one of the root directories of a disk drive, since it is trying to write to "c:\\file.ext", rather than "c:\file.ext" - DK * correct a comment in userdefs.h; commercial Japanese sites are named with - co.jp, not com.jp (Larry Virden). + co.jp, not com.jp (LV). * correct some debug messages in LYCookie.c - BJP * fix a missing </h1> in ShowInfo.c - SKY * modified '+'->' ' conversion to allow Unix commands to have '+' beginning @@ -95,7 +166,7 @@ Changes since Lynx 2.8 release * Al's convention of '#<number>' into '#<id name>' in Lynx_users_guide.html is included - SKY 1998-08-31 (2.8.1dev.24) -* re-correct DH's patch for COLLAPSE_BR_TAGS (reported by Larry Virden) - TD +* re-correct DH's patch for COLLAPSE_BR_TAGS (reported by LV) - TD 1998-08-29 (2.8.1dev.23) * make interim fix for gzip'd html files until we can resolve portability issues raised by SKY's renaming - TD @@ -305,7 +376,7 @@ Changes since Lynx 2.8 release * add option -eat_all_cookies and corresponding config variable EAT_ALL_COOKIES (Brian J Pardy <posterkid@psnw.com>). * correct spurious 'Content' string versus newline after X-URL in LYMail.c - (Bela Lubkin and Larry Virden). + (Bela Lubkin and LV). * updated versions of config.guess and config.sub based on automake 1.3 - TD * updated experimental persistent-cookie support based on RP's patch: Replaced the call to strsep with a home-rolled one for those people who don't have it. @@ -567,7 +638,7 @@ Changes since Lynx 2.8 release local file if the original string omits scheme:// prefix but guessing fails. * tweak formatting of .message in HTFTP.c so it has leading/trailing blank lines (patch by Ismael Cordeiro <ismael@CAM.ORG>) -* retested 'make depend' rule (for Larry Virden) - TD +* retested 'make depend' rule (for LV (Larry Virden)) - TD * eliminate (except for absolute pathnames, as in VMS) quoted includes - TD * remove WWW/Library/Implementation/HTAlert.[ch], since they conflict with src/HTAlert.[ch], and are not used - TD diff --git a/INSTALLATION b/INSTALLATION index 1067ec73..66330e41 100644 --- a/INSTALLATION +++ b/INSTALLATION @@ -148,7 +148,7 @@ II. Compile instructions -- UNIX order shown by the -help option is different. See "docs/README.defines" for information on defines for which there are no option switches. - --disable-dired (defines DIRED_SUPPORT) + --disable-dired (define DIRED_SUPPORT) Use this option to disable the optional directory-editor. Lynx supports directory editing (DirEd) for local directories. diff --git a/LYMessages_en.h b/LYMessages_en.h index 8d09adad..58d83ed1 100644 --- a/LYMessages_en.h +++ b/LYMessages_en.h @@ -651,17 +651,18 @@ "Modified tail combined with head of form field value." /* Lynx internal page titles */ -#define COOKIE_JAR_TITLE "Lynx Cookie Jar" +#define COOKIE_JAR_TITLE "Cookie Jar" +#define CONFIG_DEF_TITLE "Configuration Definitions" #define CURRENT_KEYMAP_TITLE "Current Key Map" #define DIRED_MENU_TITLE "File Management Options" #define PERMIT_OPTIONS_TITLE "File Permission Options" -#define DOWNLOAD_OPTIONS_TITLE "Lynx Download Options" -#define HISTORY_PAGE_TITLE "Lynx History Page" -#define LIST_PAGE_TITLE "Lynx List Page" -#define OPTIONS_TITLE "Lynx Options Page" -#define PRINT_OPTIONS_TITLE "Lynx Printing Options" -#define UPLOAD_OPTIONS_TITLE "Lynx Upload Options" -#define VISITED_LINKS_TITLE "Lynx Visited Links Page" +#define DOWNLOAD_OPTIONS_TITLE "Download Options" +#define HISTORY_PAGE_TITLE "History Page" +#define LIST_PAGE_TITLE "List Page" +#define OPTIONS_TITLE "Options Page" +#define PRINT_OPTIONS_TITLE "Printing Options" +#define UPLOAD_OPTIONS_TITLE "Upload Options" +#define VISITED_LINKS_TITLE "Visited Links Page" #ifdef DIRED_SUPPORT #define DIRED_NOVICELINE \ diff --git a/WWW/Library/Implementation/HTAnchor.c b/WWW/Library/Implementation/HTAnchor.c index 59b4cd50..ec332eb3 100644 --- a/WWW/Library/Implementation/HTAnchor.c +++ b/WWW/Library/Implementation/HTAnchor.c @@ -1179,7 +1179,7 @@ PUBLIC LYUCcharset * HTAnchor_getUCInfoStage ARGS2( { if (me && !me->UCStages) { int i; - int chndl = UCLYhndl_for_unspec; + int chndl = UCLYhndl_for_unspec; /* always >= 0 */ UCAnchorInfo * stages = (UCAnchorInfo*)calloc(1, sizeof(UCAnchorInfo)); if (stages == NULL) @@ -1190,21 +1190,18 @@ PUBLIC LYUCcharset * HTAnchor_getUCInfoStage ARGS2( } if (me->charset) { chndl = UCGetLYhndl_byMIME(me->charset); - if (chndl < 0) { + if (chndl < 0) chndl = UCLYhndl_for_unrec; - } - } - if (chndl >= 0) { - memcpy(&stages->s[UCT_STAGE_MIME].C, &LYCharSet_UC[chndl], - sizeof(LYUCcharset)); - stages->s[UCT_STAGE_MIME].lock = UCT_SETBY_DEFAULT; - } else { - /* - * Should not happen... - */ - stages->s[UCT_STAGE_MIME].C.UChndl = -1; - stages->s[UCT_STAGE_MIME].lock = UCT_SETBY_NONE; + if (chndl < 0) + /* + ** UCLYhndl_for_unrec not defined :-( + ** fallback to UCLYhndl_for_unspec which always valid. + */ + chndl = UCLYhndl_for_unspec; /* always >= 0 */ } + memcpy(&stages->s[UCT_STAGE_MIME].C, &LYCharSet_UC[chndl], + sizeof(LYUCcharset)); + stages->s[UCT_STAGE_MIME].lock = UCT_SETBY_DEFAULT; stages->s[UCT_STAGE_MIME].LYhndl = chndl; me->UCStages = stages; } diff --git a/WWW/Library/Implementation/HTFile.c b/WWW/Library/Implementation/HTFile.c index c530db85..3ede11c9 100644 --- a/WWW/Library/Implementation/HTFile.c +++ b/WWW/Library/Implementation/HTFile.c @@ -900,6 +900,12 @@ PUBLIC HTFormat HTCharsetFormat ARGS3( ** Got something but we don't recognize it. */ chndl = UCLYhndl_for_unrec; + if (chndl < 0) + /* + ** UCLYhndl_for_unrec not defined :-( + ** fallback to UCLYhndl_for_unspec which always valid. + */ + chndl = UCLYhndl_for_unspec; /* always >= 0 */ if (UCCanTranslateFromTo(chndl, current_char_set)) { chartrans_ok = YES; HTAnchor_setUCInfoStage(anchor, chndl, @@ -944,35 +950,9 @@ PUBLIC HTFormat HTCharsetFormat ARGS3( HTPassEightBitRaw = TRUE; } } else if (p_out->enc == UCT_ENC_CJK) { - if (LYRawMode) { - if ((!strcmp(p_in->MIMEname, "euc-jp") || - !strcmp(p_in->MIMEname, "shift_jis")) && - (!strcmp(p_out->MIMEname, "euc-jp") || - !strcmp(p_out->MIMEname, "shift_jis"))) { - HTCJK = JAPANESE; - } else if (!strcmp(p_in->MIMEname, "euc-cn") && - !strcmp(p_out->MIMEname, "euc-cn")) { - HTCJK = CHINESE; - } else if (!strcmp(p_in->MIMEname, "big-5") && - !strcmp(p_out->MIMEname, "big-5")) { - HTCJK = TAIPEI; - } else if (!strcmp(p_in->MIMEname, "euc-kr") && - !strcmp(p_out->MIMEname, "euc-kr")) { - HTCJK = KOREAN; - } else { - HTCJK = NOCJK; - } - } else { - HTCJK = NOCJK; - } + Set_HTCJK(p_in->MIMEname, p_out->MIMEname); } - /* - ** Check for an iso-8859-# we don't know. - FM - */ - } else if (!strncmp(cp4, "iso-8859-", 9) && - isdigit((unsigned char)cp4[9]) && - !strncmp(LYchar_set_names[current_char_set], - "Other ISO Latin", 15)) { + } else { /* ** Hope it's a match, for now. - FM */ diff --git a/WWW/Library/Implementation/HTFormat.c b/WWW/Library/Implementation/HTFormat.c index e1c9a851..899b8640 100644 --- a/WWW/Library/Implementation/HTFormat.c +++ b/WWW/Library/Implementation/HTFormat.c @@ -503,9 +503,11 @@ PRIVATE void HTDisplayPartial NOARGS /* new hypertext document available */ && ((Newline_partial + display_lines) > NumOfLines_partial) /* current page not complete... */ - && ((Newline_partial + 2) < HText_getNumOfLines())) { - /* and we MAY display at least a couple of lines on the top. - * + && ((Newline_partial + display_lines) < HText_getNumOfLines())) { + /* ^^^^^^^^^^^^^ + * and we MAY display the page in one stage: + * incremental rendering of the first page reported annoying + * on slow network connection. */ NumOfLines_partial = HText_getNumOfLines(); HText_pageDisplay(Newline_partial, ""); diff --git a/WWW/Library/Implementation/HTMIME.c b/WWW/Library/Implementation/HTMIME.c index 82c0c8f1..d7b11a15 100644 --- a/WWW/Library/Implementation/HTMIME.c +++ b/WWW/Library/Implementation/HTMIME.c @@ -360,6 +360,13 @@ PRIVATE void HTMIME_put_character ARGS2( else if (chndl < 0) {/* got something but we don't recognize it */ chndl = UCLYhndl_for_unrec; + if (chndl < 0) + /* + ** UCLYhndl_for_unrec not defined :-( + ** fallback to UCLYhndl_for_unspec + ** which always valid. + */ + chndl = UCLYhndl_for_unspec; /* always >= 0 */ if (UCCanTranslateFromTo(chndl, current_char_set)) { chartrans_ok = YES; @@ -414,46 +421,9 @@ PRIVATE void HTMIME_put_character ARGS2( HTPassEightBitRaw = TRUE; } } else if (p_out->enc == UCT_ENC_CJK) { - if (LYRawMode) { - if ((!strcmp(p_in->MIMEname, - "euc-jp") || - !strcmp(p_in->MIMEname, - "shift_jis")) && - (!strcmp(p_out->MIMEname, - "euc-jp") || - !strcmp(p_out->MIMEname, - "shift_jis"))) { - HTCJK = JAPANESE; - } else if (!strcmp(p_in->MIMEname, - "euc-cn") && - !strcmp(p_out->MIMEname, - "euc-cn")) { - HTCJK = CHINESE; - } else if (!strcmp(p_in->MIMEname, - "big-5") && - !strcmp(p_out->MIMEname, - "big-5")) { - HTCJK = TAIPEI; - } else if (!strcmp(p_in->MIMEname, - "euc-kr") && - !strcmp(p_out->MIMEname, - "euc-kr")) { - HTCJK = KOREAN; - } else { - HTCJK = NOCJK; - } - } else { - HTCJK = NOCJK; - } + Set_HTCJK(p_in->MIMEname, p_out->MIMEname); } - /* - ** Check for an iso-8859-# we don't know. - FM - */ - } else if - (!strncmp(cp4, "iso-8859-", 9) && - isdigit((unsigned char)cp4[9]) && - !strncmp(LYchar_set_names[current_char_set], - "Other ISO Latin", 15)) { + } else { /* ** Hope it's a match, for now. - FM */ diff --git a/WWW/Library/Implementation/HTPlain.c b/WWW/Library/Implementation/HTPlain.c index 2744b7df..f46616f7 100644 --- a/WWW/Library/Implementation/HTPlain.c +++ b/WWW/Library/Implementation/HTPlain.c @@ -155,7 +155,7 @@ PRIVATE void HTPlain_put_character ARGS2( HText_appendCharacter(me->text, c); } else if ((unsigned char)c > 160) { if (!HTPassEightBitRaw && - !((me->outUCLYhndl == 0) || + !((me->outUCLYhndl == LATIN1) || (me->outUCI->enc & (UCT_CP_SUPERSETOF_LAT1)))) { int len, high, low, i, diff = 1; CONST char * name; diff --git a/WWW/Library/Implementation/HTTCP.c b/WWW/Library/Implementation/HTTCP.c index 2eb3b458..76447fe0 100644 --- a/WWW/Library/Implementation/HTTCP.c +++ b/WWW/Library/Implementation/HTTCP.c @@ -121,7 +121,7 @@ extern int sys_nerr; unsigned long _fork_func (void *arglist) { - return (unsigned long)(phost = gethostbyname(host)); + return (unsigned long)(phost = gethostbyname(host)); } #endif /* _WINDOWS_NSL */ @@ -324,15 +324,16 @@ PUBLIC int HTParseInet ARGS2( { char *port; int dotcount_ip = 0; /* for dotted decimal IP addr */ + int success = 0; #ifndef _WINDOWS_NSL char *host = NULL; - struct hostent *phost; /* Pointer to host - See netdb.h */ #endif /* _WINDOWS_NSL */ if (!str) { CTRACE(tfp, "HTParseInet: Can't parse `NULL'.\n"); return -1; } + CTRACE(tfp, "HTParseInet: parsing `%s'.\n", str); if (HTCheckForInterrupt()) { CTRACE (tfp, "HTParseInet: INTERRUPTED for '%s'.\n", str); return -1; @@ -428,48 +429,120 @@ PUBLIC int HTParseInet ARGS2( */ { /* - ** Pipe, child pid, and status buffers. + ** Pipe, child pid, status buffers, cycle count, select() + ** control variables. */ pid_t fpid, waitret = (pid_t)0; - int pfd[2], cstat, cst1 = 0; + int pfd[2], cstat, cst1 = 0, cycle = 0; + fd_set readfds; + struct timeval timeout; pipe(pfd); if ((fpid = fork()) == 0 ) { + struct hostent *phost; /* Pointer to host - See netdb.h */ /* ** Child - for the long call. + ** Child won't use read side. -BL */ + close(pfd[0]); phost = gethostbyname(host); - cst1 = 0; +#ifdef MVS + CTRACE(tfp, "HTParseInet: gethostbyname() returned %d\n", phost); +#endif /* MVS */ + /* - ** Return value (or nulls). + ** Send length of subsequent value to parent (as a + ** native int). */ - if (OK_HOST(phost)) { + if (OK_HOST(phost)) + cstat = phost->h_length; + else + cstat = 0; + write(pfd[1], &cstat, sizeof cstat); + + if (cstat) { + /* + ** Return value through pipe... + */ write(pfd[1], phost->h_addr, phost->h_length); _exit(0); } else { - write(pfd[1], &cst1, 4); - _exit(1); /* return an error code */ + /* + ** ... or return error as exit code. + */ + _exit(1); } } /* - ** (parent) Wait until lookup finishes, or interrupt. + ** (parent) Wait until lookup finishes, or interrupt, + ** or cycled too many times (just in case) -BL */ - cstat = 0; - while (cstat <= 0) { + + close(pfd[1]); /* parent won't use write side -BL */ + + while (cycle < 50) { + /* + ** Avoid infinite loop in the face of the unexpected. -BL + */ + cycle++; + + timeout.tv_sec = 1; + timeout.tv_usec = 0; + FD_ZERO(&readfds); + FD_SET(pfd[0], &readfds); +#ifndef USE_SLANG + /* + ** This allows us to abort immediately, not after 1-second + ** timeout, when user hits abort key. Can't do this when + ** using SLANG (or at least I don't know how), so SLANG + ** users must live with up-to-1s timeout. -BL + */ + FD_SET(0, &readfds); /* stdin -BL */ +#endif /* USE_SLANG */ + /* - ** Exit when data sent. + ** Return when data received, interrupted, or failed. + ** If nothing is waiting, we sleep for 1 second in + ** select(), to be nice to the system. -BL */ - IOCTL(pfd[0], FIONREAD, &cstat); - if (cstat > 0) +#ifdef SOCKS + if (socks_flag) + cst1 = Rselect(pfd[0] + 1, (void *)&readfds, NULL, NULL, &timeout); + else +#endif /* SOCKS */ + cst1 = select(pfd[0] + 1, (void *)&readfds, NULL, NULL, &timeout); + + if ((cst1 > 0) && FD_ISSET(pfd[0], &readfds)) { + /* + ** First get length of address. -BL + */ + cst1 = read(pfd[0], (void *)&cstat, sizeof cstat); + if (cstat == sizeof soc_in->sin_addr) { + /* + ** Then get address itself. -BL + */ + cst1 = read(pfd[0], (void *)&soc_in->sin_addr, cstat); + if (cst1 == cstat) success = 1; + } + /* + ** Make sure child is cleaned up. -BL + */ + waitret = waitpid(fpid, &cst1, WNOHANG); + if (!WIFEXITED(cst1) && !WIFSIGNALED(cst1)) { + kill(fpid, SIGKILL); + waitret = waitpid(fpid, &cst1, WNOHANG); + } break; + } + /* - ** Exit if child exited. + ** End loop if child exited. */ - if ((waitret = waitpid(fpid, &cst1, WNOHANG)) > 0) { + if ((waitret = waitpid(fpid, &cst1, WNOHANG)) > 0) break; - } + /* ** Abort if interrupt key pressed. */ @@ -479,83 +552,43 @@ PUBLIC int HTParseInet ARGS2( waitpid(fpid, NULL, 0); FREE(host); close(pfd[0]); - close(pfd[1]); return HT_INTERRUPTED; } - /* - ** Be nice to the system. - */ - sleep(1); } + close(pfd[0]); if (waitret <= 0) { waitret = waitpid(fpid, &cst1, WNOHANG); } - if (WIFEXITED(cst1)) { - CTRACE(tfp, "HTParseInet: NSL_FORK child %d exited, status 0x%x.\n", - (int)waitret, cst1); - } else if (WIFSIGNALED(cst1)) { - CTRACE(tfp, "HTParseInet: NSL_FORK child %d got signal, status 0x%x!\n", - (int)waitret, cst1); + if (waitret > 0) { + if (WIFEXITED(cst1)) { + CTRACE(tfp, "HTParseInet: NSL_FORK child %d exited, status 0x%x.\n", + (int)waitret, cst1); + } else if (WIFSIGNALED(cst1)) { + CTRACE(tfp, "HTParseInet: NSL_FORK child %d got signal, status 0x%x!\n", + (int)waitret, cst1); #ifdef WCOREDUMP - if (WCOREDUMP(cst1)) { - CTRACE(tfp, "HTParseInet: NSL_FORK child %d dumped core!\n", - (int)waitret); + if (WCOREDUMP(cst1)) { + CTRACE(tfp, "HTParseInet: NSL_FORK child %d dumped core!\n", + (int)waitret); } #endif /* WCOREDUMP */ - } else if (WIFSTOPPED(cst1)) { - CTRACE(tfp, "HTParseInet: NSL_FORK child %d is stopped, status 0x%x!\n", - (int)waitret, cst1); - } - /* - ** Read as much as we can - should be the address. - */ - IOCTL(pfd[0], FIONREAD, &cstat); - if (cstat < 4) { - CTRACE(tfp, "HTParseInet: NSL_FORK child returns only %d bytes.\n", - cstat); - CTRACE(tfp, " Trying again without forking.\n"); - phost = gethostbyname(host); /* See netdb.h */ - if (!OK_HOST(phost)) { - CTRACE(tfp, "HTParseInet: Can't find internet node name `%s'.\n", - host); - memset((void *)&soc_in->sin_addr, 0, sizeof(soc_in->sin_addr)); - } else { - memcpy((void *)&soc_in->sin_addr, - phost->h_addr, phost->h_length); + } else if (WIFSTOPPED(cst1)) { + CTRACE(tfp, "HTParseInet: NSL_FORK child %d is stopped, status 0x%x!\n", + (int)waitret, cst1); } -#ifdef NOTDEFINED - cstat = read(pfd[0], (void *)&soc_in->sin_addr , 4); -#endif /* NOTDEFINED */ - } else { - cstat = read(pfd[0], (void *)&soc_in->sin_addr , cstat); } - close(pfd[0]); - close(pfd[1]); - } - if (soc_in->sin_addr.s_addr == 0) { - CTRACE(tfp, "HTParseInet: Can't find internet node name `%s'.\n", - host); -#ifndef _WINDOWS_NSL - FREE(host); -#endif /* _WINDOWS_NSL */ - return -1; + if (!success) { + memset((void *)&soc_in->sin_addr, 0, sizeof(soc_in->sin_addr)); + goto failed; + } } -#ifndef _WINDOWS_NSL - FREE(host); -#endif /* _WINDOWS_NSL */ -#ifdef MVS - CTRACE(tfp, "HTParseInet: gethostbyname() returned %d\n", phost); -#endif /* MVS */ - #else /* Not NSL_FORK: */ #ifdef DJGPP soc_in->sin_addr.s_addr = htonl(resolve(host)); - FREE(host); if (soc_in->sin_addr.s_addr == 0) { - CTRACE(tfp, "HTTPAccess: Can't find internet node name `%s'.\n",host); - return -1; /* Fail? */ + goto failed; } -#else +#else /* !NSL_FORK, !DJGPP: */ #ifdef _WINDOWS_NSL { #ifdef __BORLANDC__ @@ -585,38 +618,35 @@ PUBLIC int HTParseInet ARGS2( return HT_INTERRUPTED; }; }; -#else /* !_WINDOWS_NSL */ - phost = gethostbyname(host); /* See netdb.h */ -#endif /* _WINDOWS_NSL */ +#else /* !NSL_FORK, !DJGPP, !_WINDOWS_NSL: */ + { + struct hostent *phost; + phost = gethostbyname(host); /* See netdb.h */ #ifdef MVS - CTRACE(tfp, "HTParseInet: gethostbyname() returned %d\n", phost); + CTRACE(tfp, "HTParseInet: gethostbyname() returned %d\n", phost); #endif /* MVS */ - if (!phost) { - CTRACE(tfp, "HTParseInet: Can't find internet node name `%s'.\n", - host); -#ifndef _WINDOWS_NSL - FREE(host); -#endif /* _WINDOWS_NSL */ - return -1; /* Fail? */ + if (!phost) goto failed; +#if defined(VMS) && defined(CMU_TCP) + /* + ** In LIBCMU, phost->h_length contains not the length of one address + ** (four bytes) but the number of bytes in *h_addr, i.e. some multiple + ** of four. Thus we need to hard code the value here, and remember to + ** change it if/when IP addresses change in size. :-( LIBCMU is no + ** longer supported, and CMU users are encouraged to obtain and use + ** SOCKETSHR/NETLIB instead. - S. Bjorndahl + */ + memcpy((void *)&soc_in->sin_addr, phost->h_addr, 4); +#else + memcpy((void *)&soc_in->sin_addr, phost->h_addr, phost->h_length); +#endif /* VMS && CMU_TCP */ } +#endif /* !NSL_FORK, !DJGPP, !_WINDOWS_NSL */ +#endif /* !NSL_FORK, !DJGPP */ +#endif /* !NSL_FORK */ #ifndef _WINDOWS_NSL FREE(host); #endif /* _WINDOWS_NSL */ -#if defined(VMS) && defined(CMU_TCP) - /* - ** In LIBCMU, phost->h_length contains not the length of one address - ** (four bytes) but the number of bytes in *h_addr, i.e. some multiple - ** of four. Thus we need to hard code the value here, and remember to - ** change it if/when IP addresses change in size. :-( LIBCMU is no - ** longer supported, and CMU users are encouraged to obtain and use - ** SOCKETSHR/NETLIB instead. - S. Bjorndahl - */ - memcpy((void *)&soc_in->sin_addr, phost->h_addr, 4); -#else - memcpy((void *)&soc_in->sin_addr, phost->h_addr, phost->h_length); -#endif /* VMS && CMU_TCP */ -#endif /* DJGPP */ -#endif /* NSL_FORK */ + } CTRACE(tfp, "HTParseInet: Parsed address as port %d, IP address %d.%d.%d.%d\n", @@ -628,6 +658,14 @@ PUBLIC int HTParseInet ARGS2( #endif /* Internet vs. Decnet */ return 0; /* OK */ + +failed: + CTRACE(tfp, "HTParseInet: Can't find internet node name `%s'.\n", + host); +#ifndef _WINDOWS_NSL + FREE(host); +#endif /* _WINDOWS_NSL */ + return -1; } /* Free our name for the host on which we are - FM diff --git a/WWW/Library/Implementation/HTUtils.h b/WWW/Library/Implementation/HTUtils.h index 100dd390..a4afa28b 100644 --- a/WWW/Library/Implementation/HTUtils.h +++ b/WWW/Library/Implementation/HTUtils.h @@ -79,6 +79,10 @@ #endif /* HAVE_CONFIG_H */ +#ifndef LY_MAXPATH +#define LY_MAXPATH 256 +#endif + #ifndef GCC_UNUSED #define GCC_UNUSED /* nothing */ #endif diff --git a/WWW/Library/Implementation/SGML.c b/WWW/Library/Implementation/SGML.c index 20aaa33e..5ecbf3ea 100644 --- a/WWW/Library/Implementation/SGML.c +++ b/WWW/Library/Implementation/SGML.c @@ -196,7 +196,7 @@ PRIVATE void set_chartrans_handling ARGS3( context->T.trans_from_uni) { context->current_tag_charset = UCGetLYhndl_byMIME("utf-8"); } else { - context->current_tag_charset = 0; + context->current_tag_charset = LATIN1; } } @@ -396,7 +396,7 @@ PRIVATE char replace_buf [64]; /* buffer for replacement strings */ PRIVATE BOOL FoundEntity = FALSE; #define IncludesLatin1Enc \ - (context->outUCLYhndl == 0 || \ + (context->outUCLYhndl == LATIN1 || \ (context->outUCI && \ (context->outUCI->enc & (UCT_CP_SUPERSETOF_LAT1)))) diff --git a/WWW/Library/Implementation/UCMap.h b/WWW/Library/Implementation/UCMap.h index 5a8c1210..23d88515 100644 --- a/WWW/Library/Implementation/UCMap.h +++ b/WWW/Library/Implementation/UCMap.h @@ -1,4 +1,3 @@ - #ifndef UCMAP_H #define UCMAP_H @@ -33,16 +32,51 @@ extern int UCTransCharStr PARAMS(( extern UCode_t UCTransToUni PARAMS(( char ch_in, int charset_in)); -extern int UCGetLYhndl_byMIME PARAMS(( - CONST char * p)); extern int UCGetRawUniMode_byLYhndl PARAMS(( int i)); +extern int UCGetLYhndl_byMIME PARAMS(( + CONST char * p)); /* returns -1 if name not recognized */ +extern int safeUCGetLYhndl_byMIME PARAMS(( + CONST char * p)); /* returns LATIN1 if MIME name not recognized */ extern int UCLYhndl_for_unspec; extern int UCLYhndl_for_unrec; extern int UCLYhndl_HTFile_for_unspec; extern int UCLYhndl_HTFile_for_unrec; +/* easy to type: */ +#define LATIN1 UCGetLYhndl_byMIME("iso-8859-1") + +/* +In general, Lynx translates letters from document charset to display charset. +If document charset is not specified or not recognized by Lynx, we fall back +to different assumptions below, read also lynx.cfg for info. + +UCLYhndl_for_unspec - assume this as charset for documents that don't + specify a charset parameter in HTTP headers or via META + this corresponds to "assume_charset" + +UCLYhndl_HTFile_for_unspec - assume this as charset of local file + this corresponds to "assume_local_charset" + +UCLYhndl_for_unrec - in case a charset parameter is not recognized; + this corresponds to "assume_unrec_charset" + +UCLYhndl_HTFile_for_unrec - the same but only for local files, + currently not used. + + +current_char_set - this corresponds to "display charset", + declared in LYCharSets.c and really important. + +All external charset information is available in so called MIME format. +For internal needs Lynx uses charset handlers as integers +from UCGetLYhndl_byMIME(). However, there is no way to recover +from user's error in configuration file lynx.cfg or command line switches, +those unrecognized MIME names are assumed as LATIN1 (via safeUCGetLYhndl...). +*/ + + #define UCTRANS_NOTFOUND (-4) #endif /* UCMAP_H */ diff --git a/cfg_defs.sh b/cfg_defs.sh new file mode 100755 index 00000000..8cffb2e0 --- /dev/null +++ b/cfg_defs.sh @@ -0,0 +1,45 @@ +#!/bin/sh +# Translate the lynx_cfg.h and config.cache data into a table, useful for +# display at runtime. + +cat <<EOF +#ifndef CFG_DEFS_H +#define CFG_DEFS_H 1 + +static CONST struct { + CONST char *name; + CONST char *value; +} config_cache[] = { +EOF +sed -e '/^#/d' \ + -e 's/"/\\"/g' \ + -e "s/'/\"/g" \ + -e 's/^.[^=]*_cv_/ { "/' \ + -e 's/=${[^=]*="/", "/' \ + -e 's/=${[^=]*=/", "/' \ + -e 's/"}$/}/' \ + -e 's/}$/" },/' \ + config.cache | sort +cat <<EOF +}; + +static CONST struct { + CONST char *name; + CONST char *value; +} config_defines[] = { +EOF +fgrep '#define' lynx_cfg.h |sort | +sed -e 's@ @ @g' \ + -e 's@ @ @g' \ + -e 's@[ ]*#define @@' \ + -e 's@[ ]*/\*.*\*/@@' \ + -e 's@"$@@' \ + -e 's@"@@' \ + -e 's@ @", "@' \ + -e 's@^@ { "@' \ + -e 's@$@" },@' +cat <<EOF +}; + +#endif /* CFG_DEFS_H */ +EOF diff --git a/config.hin b/config.hin index 31c07103..1696196b 100644 --- a/config.hin +++ b/config.hin @@ -29,6 +29,7 @@ #undef HAVE_CBREAK #undef HAVE_CURSESX_H #undef HAVE_CUSERID +#undef HAVE_DEFINE_KEY #undef HAVE_DIRENT_H /* defined by AC_HEADER_DIRENT */ #undef HAVE_FCNTL_H /* have <fcntl.h> */ #undef HAVE_GETBKGD /* defined by CF_COLOR_CURSES */ @@ -69,7 +70,6 @@ #undef LONG_LIST /* CF_ARG_DISABLE(long-list) */ #undef LYNXCGI_LINKS /* CF_ARG_ENABLE(cgi-links) */ #undef LYNX_CFG_FILE /* $libdir/lynx.cfg */ -#undef LYNX_COMPILE_OPTS /* $libdir/lynx_help/lynx_site.txt */ #undef LYNX_LSS_FILE /* $libdir/lynx.lss */ #undef LY_FIND_LEAKS /* configure --disable-leaks */ #undef MKDIR_PATH /* CF_PATH_PROG(mkdir) */ diff --git a/configure b/configure index 0ba20fa5..62291326 100755 --- a/configure +++ b/configure @@ -1017,45 +1017,12 @@ test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -for ac_prog in mawk gawk nawk awk -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:1026: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_AWK="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -AWK="$ac_cv_prog_AWK" -if test -n "$AWK"; then - echo "$ac_t""$AWK" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -test -n "$AWK" && break -done - for ac_prog in lint alint lclint tdlint 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:1059: checking for $ac_word" >&5 +echo "configure:1026: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LINT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1085,9 +1052,9 @@ done echo $ac_n "checking for AIX""... $ac_c" 1>&6 -echo "configure:1089: checking for AIX" >&5 +echo "configure:1056: checking for AIX" >&5 cat > conftest.$ac_ext <<EOF -#line 1091 "configure" +#line 1058 "configure" #include "confdefs.h" #ifdef _AIX yes @@ -1109,7 +1076,7 @@ rm -f conftest* echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -echo "configure:1113: checking for POSIXized ISC" >&5 +echo "configure:1080: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then @@ -1135,7 +1102,7 @@ fi echo $ac_n "checking if you want to see long compiling messages""... $ac_c" 1>&6 -echo "configure:1139: checking if you want to see long compiling messages" >&5 +echo "configure:1106: checking if you want to see long compiling messages" >&5 # Check whether --enable-echo or --disable-echo was given. if test "${enable_echo+set}" = set; then @@ -1183,7 +1150,7 @@ fi echo $ac_n "checking if you want to check memory-leaks""... $ac_c" 1>&6 -echo "configure:1187: checking if you want to check memory-leaks" >&5 +echo "configure:1154: checking if you want to check memory-leaks" >&5 # Check whether --enable-find-leaks or --disable-find-leaks was given. if test "${enable_find_leaks+set}" = set; then @@ -1207,7 +1174,7 @@ EOF echo $ac_n "checking if you want to enable debug-code""... $ac_c" 1>&6 -echo "configure:1211: checking if you want to enable debug-code" >&5 +echo "configure:1178: checking if you want to enable debug-code" >&5 # Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then @@ -1252,7 +1219,7 @@ fi if test -n "$GCC" then echo $ac_n "checking if you want to turn on gcc warnings""... $ac_c" 1>&6 -echo "configure:1256: checking if you want to turn on gcc warnings" >&5 +echo "configure:1223: checking if you want to turn on gcc warnings" >&5 # Check whether --enable-warnings or --disable-warnings was given. if test "${enable_warnings+set}" = set; then @@ -1292,9 +1259,9 @@ EOF if test -n "$GCC" then echo "checking for gcc __attribute__ directives" 1>&6 -echo "configure:1296: checking for gcc __attribute__ directives" >&5 +echo "configure:1263: checking for gcc __attribute__ directives" >&5 cat > conftest.$ac_ext <<EOF -#line 1298 "configure" +#line 1265 "configure" #include "confdefs.h" #include "conftest.h" #include "conftest.i" @@ -1332,7 +1299,7 @@ EOF EOF ;; esac - if { (eval echo configure:1336: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + if { (eval echo configure:1303: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then test -n "$verbose" && echo "$ac_t""... $cf_attribute" 1>&6 cat conftest.h >>confdefs.h # else @@ -1349,11 +1316,11 @@ fi if test -n "$GCC" then cat > conftest.$ac_ext <<EOF -#line 1353 "configure" +#line 1320 "configure" int main(int argc, char *argv[]) { return argv[argc-1] == 0; } EOF echo "checking for gcc warning options" 1>&6 -echo "configure:1357: checking for gcc warning options" >&5 +echo "configure:1324: checking for gcc warning options" >&5 cf_save_CFLAGS="$CFLAGS" EXTRA_CFLAGS="-W -Wall" cf_warn_CONST="" @@ -1371,7 +1338,7 @@ echo "configure:1357: checking for gcc warning options" >&5 Wstrict-prototypes $cf_warn_CONST do CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt" - if { (eval echo configure:1375: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + if { (eval echo configure:1342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt" test "$cf_opt" = Wcast-qual && EXTRA_CFLAGS="$EXTRA_CFLAGS -DXTSTRINGDEFINES" @@ -1389,7 +1356,7 @@ fi echo $ac_n "checking if you want full utility pathnames""... $ac_c" 1>&6 -echo "configure:1393: checking if you want full utility pathnames" >&5 +echo "configure:1360: checking if you want full utility pathnames" >&5 # Check whether --enable-full-paths or --disable-full-paths was given. if test "${enable_full_paths+set}" = set; then @@ -1410,7 +1377,7 @@ echo "$ac_t""$with_full_paths" 1>&6 echo $ac_n "checking for system mailer""... $ac_c" 1>&6 -echo "configure:1414: checking for system mailer" >&5 +echo "configure:1381: checking for system mailer" >&5 if eval "test \"`echo '$''{'cf_cv_SYSTEM_MAIL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1437,7 +1404,7 @@ EOF echo $ac_n "checking system mail flags""... $ac_c" 1>&6 -echo "configure:1441: checking system mail flags" >&5 +echo "configure:1408: checking system mail flags" >&5 if eval "test \"`echo '$''{'cf_cv_system_mail_flags'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1465,7 +1432,7 @@ if test "$with_full_paths" = yes ; then # Extract the first word of "chmod", so it can be a program name with args. set dummy chmod; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1469: checking for $ac_word" >&5 +echo "configure:1436: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_CHMOD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1496,7 +1463,7 @@ fi else echo $ac_n "checking for chmod""... $ac_c" 1>&6 -echo "configure:1500: checking for chmod" >&5 +echo "configure:1467: checking for chmod" >&5 echo "$ac_t""$CHMOD" 1>&6 fi @@ -1530,7 +1497,7 @@ if test "$with_full_paths" = yes ; then # Extract the first word of "compress", so it can be a program name with args. set dummy compress; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1534: checking for $ac_word" >&5 +echo "configure:1501: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_COMPRESS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1561,7 +1528,7 @@ fi else echo $ac_n "checking for compress""... $ac_c" 1>&6 -echo "configure:1565: checking for compress" >&5 +echo "configure:1532: checking for compress" >&5 echo "$ac_t""$COMPRESS" 1>&6 fi @@ -1595,7 +1562,7 @@ if test "$with_full_paths" = yes ; then # Extract the first word of "cp", so it can be a program name with args. set dummy cp; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1599: checking for $ac_word" >&5 +echo "configure:1566: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_COPY'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1626,7 +1593,7 @@ fi else echo $ac_n "checking for cp""... $ac_c" 1>&6 -echo "configure:1630: checking for cp" >&5 +echo "configure:1597: checking for cp" >&5 echo "$ac_t""$COPY" 1>&6 fi @@ -1660,7 +1627,7 @@ if test "$with_full_paths" = yes ; then # Extract the first word of "gzip", so it can be a program name with args. set dummy gzip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1664: checking for $ac_word" >&5 +echo "configure:1631: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GZIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1691,7 +1658,7 @@ fi else echo $ac_n "checking for gzip""... $ac_c" 1>&6 -echo "configure:1695: checking for gzip" >&5 +echo "configure:1662: checking for gzip" >&5 echo "$ac_t""$GZIP" 1>&6 fi @@ -1725,7 +1692,7 @@ if test "$with_full_paths" = yes ; then # Extract the first word of "mkdir", so it can be a program name with args. set dummy mkdir; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1729: checking for $ac_word" >&5 +echo "configure:1696: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MKDIR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1756,7 +1723,7 @@ fi else echo $ac_n "checking for mkdir""... $ac_c" 1>&6 -echo "configure:1760: checking for mkdir" >&5 +echo "configure:1727: checking for mkdir" >&5 echo "$ac_t""$MKDIR" 1>&6 fi @@ -1790,7 +1757,7 @@ if test "$with_full_paths" = yes ; then # Extract the first word of "mv", so it can be a program name with args. set dummy mv; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1794: checking for $ac_word" >&5 +echo "configure:1761: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MV'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1821,7 +1788,7 @@ fi else echo $ac_n "checking for mv""... $ac_c" 1>&6 -echo "configure:1825: checking for mv" >&5 +echo "configure:1792: checking for mv" >&5 echo "$ac_t""$MV" 1>&6 fi @@ -1855,7 +1822,7 @@ if test "$with_full_paths" = yes ; then # Extract the first word of "rm", so it can be a program name with args. set dummy rm; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1859: checking for $ac_word" >&5 +echo "configure:1826: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_RM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1886,7 +1853,7 @@ fi else echo $ac_n "checking for rm""... $ac_c" 1>&6 -echo "configure:1890: checking for rm" >&5 +echo "configure:1857: checking for rm" >&5 echo "$ac_t""$RM" 1>&6 fi @@ -1920,7 +1887,7 @@ if test "$with_full_paths" = yes ; then # Extract the first word of "tar", so it can be a program name with args. set dummy tar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1924: checking for $ac_word" >&5 +echo "configure:1891: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_TAR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1951,7 +1918,7 @@ fi else echo $ac_n "checking for tar""... $ac_c" 1>&6 -echo "configure:1955: checking for tar" >&5 +echo "configure:1922: checking for tar" >&5 echo "$ac_t""$TAR" 1>&6 fi @@ -1985,7 +1952,7 @@ if test "$with_full_paths" = yes ; then # Extract the first word of "touch", so it can be a program name with args. set dummy touch; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1989: checking for $ac_word" >&5 +echo "configure:1956: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_TOUCH'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2016,7 +1983,7 @@ fi else echo $ac_n "checking for touch""... $ac_c" 1>&6 -echo "configure:2020: checking for touch" >&5 +echo "configure:1987: checking for touch" >&5 echo "$ac_t""$TOUCH" 1>&6 fi @@ -2050,7 +2017,7 @@ if test "$with_full_paths" = yes ; then # Extract the first word of "gunzip", so it can be a program name with args. set dummy gunzip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2054: checking for $ac_word" >&5 +echo "configure:2021: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_UNCOMPRESS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2081,7 +2048,7 @@ fi else echo $ac_n "checking for gunzip""... $ac_c" 1>&6 -echo "configure:2085: checking for gunzip" >&5 +echo "configure:2052: checking for gunzip" >&5 echo "$ac_t""$UNCOMPRESS" 1>&6 fi @@ -2115,7 +2082,7 @@ if test "$with_full_paths" = yes ; then # Extract the first word of "unzip", so it can be a program name with args. set dummy unzip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2119: checking for $ac_word" >&5 +echo "configure:2086: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_UNZIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2146,7 +2113,7 @@ fi else echo $ac_n "checking for unzip""... $ac_c" 1>&6 -echo "configure:2150: checking for unzip" >&5 +echo "configure:2117: checking for unzip" >&5 echo "$ac_t""$UNZIP" 1>&6 fi @@ -2180,7 +2147,7 @@ if test "$with_full_paths" = yes ; then # Extract the first word of "uudecode", so it can be a program name with args. set dummy uudecode; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2184: checking for $ac_word" >&5 +echo "configure:2151: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_UUDECODE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2211,7 +2178,7 @@ fi else echo $ac_n "checking for uudecode""... $ac_c" 1>&6 -echo "configure:2215: checking for uudecode" >&5 +echo "configure:2182: checking for uudecode" >&5 echo "$ac_t""$UUDECODE" 1>&6 fi @@ -2245,7 +2212,7 @@ if test "$with_full_paths" = yes ; then # Extract the first word of "zcat", so it can be a program name with args. set dummy zcat; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2249: checking for $ac_word" >&5 +echo "configure:2216: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_ZCAT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2276,7 +2243,7 @@ fi else echo $ac_n "checking for zcat""... $ac_c" 1>&6 -echo "configure:2280: checking for zcat" >&5 +echo "configure:2247: checking for zcat" >&5 echo "$ac_t""$ZCAT" 1>&6 fi @@ -2310,7 +2277,7 @@ if test "$with_full_paths" = yes ; then # Extract the first word of "zip", so it can be a program name with args. set dummy zip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2314: checking for $ac_word" >&5 +echo "configure:2281: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_ZIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2341,7 +2308,7 @@ fi else echo $ac_n "checking for zip""... $ac_c" 1>&6 -echo "configure:2345: checking for zip" >&5 +echo "configure:2312: checking for zip" >&5 echo "$ac_t""$ZIP" 1>&6 fi @@ -2394,7 +2361,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:2398: checking for ${CC-cc} option to accept ANSI C" >&5 +echo "configure:2365: 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 @@ -2418,7 +2385,7 @@ for cf_arg in "-DCC_HAS_PROTOS" \ do CFLAGS="$cf_save_CFLAGS $cf_arg" cat > conftest.$ac_ext <<EOF -#line 2422 "configure" +#line 2389 "configure" #include "confdefs.h" #ifndef CC_HAS_PROTOS @@ -2434,7 +2401,7 @@ int main() { struct s2 {int (*f) (double a);}; ; return 0; } EOF -if { (eval echo configure:2438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2405: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_ansi_cc="$cf_arg"; break else @@ -2462,12 +2429,12 @@ fi fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2466: checking for working const" >&5 +echo "configure:2433: 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 2471 "configure" +#line 2438 "configure" #include "confdefs.h" int main() { @@ -2516,7 +2483,7 @@ ccp = (char const *const *) p; ; return 0; } EOF -if { (eval echo configure:2520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2558,7 +2525,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:2562: checking for strcmp in -lc_s" >&5 +echo "configure:2529: 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 @@ -2566,7 +2533,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc_s $LIBS" cat > conftest.$ac_ext <<EOF -#line 2570 "configure" +#line 2537 "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 @@ -2577,7 +2544,7 @@ int main() { strcmp() ; return 0; } EOF -if { (eval echo configure:2581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2666,7 +2633,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:2670: checking for $ac_word" >&5 +echo "configure:2637: 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 @@ -2710,17 +2677,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:2714: checking for $ac_hdr" >&5 +echo "configure:2681: 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 2719 "configure" +#line 2686 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2691: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2764,17 +2731,17 @@ ultrix*) do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2768: checking for $ac_hdr" >&5 +echo "configure:2735: 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 2773 "configure" +#line 2740 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2778: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2812,16 +2779,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:2816: checking if we should use compile options $TRY_CFLAGS" >&5 +echo "configure:2783: checking if we should use compile options $TRY_CFLAGS" >&5 cat > conftest.$ac_ext <<EOF -#line 2818 "configure" +#line 2785 "configure" #include "confdefs.h" #include <stdio.h> int main() { FILE *fp = stdin ; return 0; } EOF -if { (eval echo configure:2825: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_result=yes else @@ -2839,7 +2806,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:2843: checking if you want socks library" >&5 +echo "configure:2810: 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 @@ -2859,7 +2826,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:2863: checking if you want socks5 library" >&5 +echo "configure:2830: 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 @@ -2925,7 +2892,7 @@ cat >> confdefs.h <<\EOF EOF cat > conftest.$ac_ext <<EOF -#line 2929 "configure" +#line 2896 "configure" #include "confdefs.h" #include <stdio.h> @@ -2934,7 +2901,7 @@ int main() { accept((char *)0) ; return 0; } EOF -if { (eval echo configure:2938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then : else echo "configure: failed program was:" >&5 @@ -2964,9 +2931,9 @@ cat >> confdefs.h <<\EOF EOF echo $ac_n "checking if the socks library uses socks4 prefix""... $ac_c" 1>&6 -echo "configure:2968: checking if the socks library uses socks4 prefix" >&5 +echo "configure:2935: checking if the socks library uses socks4 prefix" >&5 cat > conftest.$ac_ext <<EOF -#line 2970 "configure" +#line 2937 "configure" #include "confdefs.h" #include <socks.h> @@ -2975,7 +2942,7 @@ int main() { Rinit((char *)0) ; return 0; } EOF -if { (eval echo configure:2979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cat >> confdefs.h <<\EOF #define USE_SOCKS4_PREFIX 1 @@ -2987,14 +2954,14 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 2991 "configure" +#line 2958 "configure" #include "confdefs.h" #include <socks.h> int main() { SOCKSinit((char *)0) ; return 0; } EOF -if { (eval echo configure:2998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cf_use_socks4=no else @@ -3063,7 +3030,7 @@ else cf_test_netlibs=no echo $ac_n "checking for network libraries""... $ac_c" 1>&6 -echo "configure:3067: checking for network libraries" >&5 +echo "configure:3034: checking for network libraries" >&5 if eval "test \"`echo '$''{'cf_cv_netlibs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3074,12 +3041,12 @@ cf_test_netlibs=yes for ac_func in gethostname do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3078: checking for $ac_func" >&5 +echo "configure:3045: 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 3083 "configure" +#line 3050 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3102,7 +3069,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3125,7 +3092,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gethostname in -lnsl""... $ac_c" 1>&6 -echo "configure:3129: checking for gethostname in -lnsl" >&5 +echo "configure:3096: 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 @@ -3133,7 +3100,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $cf_cv_netlibs $LIBS" cat > conftest.$ac_ext <<EOF -#line 3137 "configure" +#line 3104 "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 @@ -3144,7 +3111,7 @@ int main() { gethostname() ; return 0; } EOF -if { (eval echo configure:3148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3177,7 +3144,7 @@ else echo $ac_n "checking for gethostname in -lsocket""... $ac_c" 1>&6 -echo "configure:3181: checking for gethostname in -lsocket" >&5 +echo "configure:3148: 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 @@ -3185,7 +3152,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $cf_cv_netlibs $LIBS" cat > conftest.$ac_ext <<EOF -#line 3189 "configure" +#line 3156 "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 @@ -3196,7 +3163,7 @@ int main() { gethostname() ; return 0; } EOF -if { (eval echo configure:3200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3240,21 +3207,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:3244: checking for -linet" >&5 +echo "configure:3211: 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 3251 "configure" +#line 3218 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:3258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_lib_inet=yes else @@ -3277,12 +3244,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:3281: checking for $ac_func" >&5 +echo "configure:3248: 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 3286 "configure" +#line 3253 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3305,7 +3272,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3328,7 +3295,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:3332: checking for socket in -lsocket" >&5 +echo "configure:3299: 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 @@ -3336,7 +3303,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $cf_cv_netlibs $LIBS" cat > conftest.$ac_ext <<EOF -#line 3340 "configure" +#line 3307 "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 @@ -3347,7 +3314,7 @@ int main() { socket() ; return 0; } EOF -if { (eval echo configure:3351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3380,7 +3347,7 @@ else echo $ac_n "checking for socket in -lbsd""... $ac_c" 1>&6 -echo "configure:3384: checking for socket in -lbsd" >&5 +echo "configure:3351: 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 @@ -3388,7 +3355,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lbsd $cf_cv_netlibs $LIBS" cat > conftest.$ac_ext <<EOF -#line 3392 "configure" +#line 3359 "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 @@ -3399,7 +3366,7 @@ int main() { socket() ; return 0; } EOF -if { (eval echo configure:3403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3444,12 +3411,12 @@ fi for ac_func in gethostbyname do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3448: checking for $ac_func" >&5 +echo "configure:3415: 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 3453 "configure" +#line 3420 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3472,7 +3439,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3495,7 +3462,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:3499: checking for gethostbyname in -lnsl" >&5 +echo "configure:3466: 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 @@ -3503,7 +3470,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $cf_cv_netlibs $LIBS" cat > conftest.$ac_ext <<EOF -#line 3507 "configure" +#line 3474 "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 @@ -3514,7 +3481,7 @@ int main() { gethostbyname() ; return 0; } EOF -if { (eval echo configure:3518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3555,12 +3522,12 @@ done for ac_func in strcasecmp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3559: checking for $ac_func" >&5 +echo "configure:3526: 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 3564 "configure" +#line 3531 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3583,7 +3550,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3606,7 +3573,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6 -echo "configure:3610: checking for strcasecmp in -lresolv" >&5 +echo "configure:3577: 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 @@ -3614,7 +3581,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $cf_cv_netlibs $LIBS" cat > conftest.$ac_ext <<EOF -#line 3618 "configure" +#line 3585 "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 @@ -3625,7 +3592,7 @@ int main() { strcasecmp() ; return 0; } EOF -if { (eval echo configure:3629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3671,7 +3638,7 @@ test $cf_test_netlibs = no && echo "$cf_cv_netlibs" >&6 fi echo $ac_n "checking for screen type""... $ac_c" 1>&6 -echo "configure:3675: checking for screen type" >&5 +echo "configure:3642: checking for screen type" >&5 if eval "test \"`echo '$''{'cf_cv_screen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3706,12 +3673,12 @@ case $cf_cv_screen in curses) echo $ac_n "checking for initscr""... $ac_c" 1>&6 -echo "configure:3710: checking for initscr" >&5 +echo "configure:3677: 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 3715 "configure" +#line 3682 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char initscr(); below. */ @@ -3734,7 +3701,7 @@ initscr(); ; return 0; } EOF -if { (eval echo configure:3738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_initscr=yes" else @@ -3755,7 +3722,7 @@ else case $host_os in #(vi freebsd*) #(vi echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6 -echo "configure:3759: checking for tgoto in -lmytinfo" >&5 +echo "configure:3726: 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 @@ -3763,7 +3730,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lmytinfo $LIBS" cat > conftest.$ac_ext <<EOF -#line 3767 "configure" +#line 3734 "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 @@ -3774,7 +3741,7 @@ int main() { tgoto() ; return 0; } EOF -if { (eval echo configure:3778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3797,7 +3764,7 @@ fi ;; hpux10.*) echo $ac_n "checking for initscr in -lcur_colr""... $ac_c" 1>&6 -echo "configure:3801: checking for initscr in -lcur_colr" >&5 +echo "configure:3768: 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 @@ -3805,7 +3772,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcur_colr $LIBS" cat > conftest.$ac_ext <<EOF -#line 3809 "configure" +#line 3776 "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 @@ -3816,7 +3783,7 @@ int main() { initscr() ; return 0; } EOF -if { (eval echo configure:3820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3840,7 +3807,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for initscr in -lHcurses""... $ac_c" 1>&6 -echo "configure:3844: checking for initscr in -lHcurses" >&5 +echo "configure:3811: 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 @@ -3848,7 +3815,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lHcurses $LIBS" cat > conftest.$ac_ext <<EOF -#line 3852 "configure" +#line 3819 "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 @@ -3859,7 +3826,7 @@ int main() { initscr() ; return 0; } EOF -if { (eval echo configure:3863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3905,12 +3872,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:3909: checking for tgoto" >&5 +echo "configure:3876: 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 3914 "configure" +#line 3881 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char tgoto(); below. */ @@ -3933,7 +3900,7 @@ tgoto(); ; return 0; } EOF -if { (eval echo configure:3937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_tgoto=yes" else @@ -3954,7 +3921,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:3958: checking for tgoto in -l$cf_term_lib" >&5 +echo "configure:3925: 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 @@ -3962,7 +3929,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$cf_term_lib $LIBS" cat > conftest.$ac_ext <<EOF -#line 3966 "configure" +#line 3933 "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 @@ -3973,7 +3940,7 @@ int main() { tgoto() ; return 0; } EOF -if { (eval echo configure:3977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4003,7 +3970,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:4007: checking for initscr in -l$cf_curs_lib" >&5 +echo "configure:3974: 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 @@ -4011,7 +3978,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$cf_curs_lib $LIBS" cat > conftest.$ac_ext <<EOF -#line 4015 "configure" +#line 3982 "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 @@ -4022,7 +3989,7 @@ int main() { initscr() ; return 0; } EOF -if { (eval echo configure:4026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4048,16 +4015,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:4052: checking if we can link with $cf_curs_lib library" >&5 +echo "configure:4019: checking if we can link with $cf_curs_lib library" >&5 cat > conftest.$ac_ext <<EOF -#line 4054 "configure" +#line 4021 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> int main() { initscr() ; return 0; } EOF -if { (eval echo configure:4061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cf_result=yes else @@ -4071,16 +4038,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:4075: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5 +echo "configure:4042: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5 cat > conftest.$ac_ext <<EOF -#line 4077 "configure" +#line 4044 "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:4084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cf_result=no else @@ -4090,14 +4057,14 @@ else LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS" cat > conftest.$ac_ext <<EOF -#line 4094 "configure" +#line 4061 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> int main() { initscr() ; return 0; } EOF -if { (eval echo configure:4101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cf_result=yes else @@ -4119,14 +4086,14 @@ fi echo $ac_n "checking for curses performance tradeoff""... $ac_c" 1>&6 -echo "configure:4123: checking for curses performance tradeoff" >&5 +echo "configure:4090: 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 4130 "configure" +#line 4097 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -4140,11 +4107,11 @@ int main() { ; return 0; } EOF -if { (eval echo configure:4144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 4148 "configure" +#line 4115 "configure" #include "confdefs.h" #define CURS_PERFORMANCE @@ -4159,7 +4126,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:4163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_curs_performance=yes else @@ -4184,13 +4151,13 @@ EOF ncurses) echo $ac_n "checking for ncurses header file""... $ac_c" 1>&6 -echo "configure:4188: checking for ncurses header file" >&5 +echo "configure:4155: 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 4194 "configure" +#line 4161 "configure" #include "confdefs.h" #include <curses.h> int main() { @@ -4207,7 +4174,7 @@ make an error ; return 0; } EOF -if { (eval echo configure:4211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_ncurses_header=predefined else @@ -4293,7 +4260,7 @@ done ;; esac echo $ac_n "checking for ncurses version""... $ac_c" 1>&6 -echo "configure:4297: checking for ncurses version" >&5 +echo "configure:4264: 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 @@ -4318,7 +4285,7 @@ Autoconf "old" #endif EOF cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out" - { (eval echo configure:4322: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; } + { (eval echo configure:4289: \"$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" @@ -4327,7 +4294,7 @@ EOF else cat > conftest.$ac_ext <<EOF -#line 4331 "configure" +#line 4298 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -4350,7 +4317,7 @@ int main() exit(0); } EOF -if { (eval echo configure:4354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then cf_cv_ncurses_version=`cat $cf_tempfile` @@ -4375,7 +4342,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:4379: checking for Gpm_Open in -lgpm" >&5 +echo "configure:4346: 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 @@ -4383,7 +4350,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgpm $LIBS" cat > conftest.$ac_ext <<EOF -#line 4387 "configure" +#line 4354 "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 @@ -4394,7 +4361,7 @@ int main() { Gpm_Open() ; return 0; } EOF -if { (eval echo configure:4398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4410,7 +4377,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:4414: checking for initscr in -lgpm" >&5 +echo "configure:4381: 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 @@ -4418,7 +4385,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgpm $LIBS" cat > conftest.$ac_ext <<EOF -#line 4422 "configure" +#line 4389 "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 @@ -4429,7 +4396,7 @@ int main() { initscr() ; return 0; } EOF -if { (eval echo configure:4433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4460,7 +4427,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:4464: checking for tgoto in -lmytinfo" >&5 +echo "configure:4431: 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 @@ -4468,7 +4435,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lmytinfo $LIBS" cat > conftest.$ac_ext <<EOF -#line 4472 "configure" +#line 4439 "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 @@ -4479,7 +4446,7 @@ int main() { tgoto() ; return 0; } EOF -if { (eval echo configure:4483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4507,12 +4474,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:4511: checking for initscr" >&5 +echo "configure:4478: 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 4516 "configure" +#line 4483 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char initscr(); below. */ @@ -4535,7 +4502,7 @@ initscr(); ; return 0; } EOF -if { (eval echo configure:4539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_initscr=yes" else @@ -4555,17 +4522,17 @@ else cf_save_LIBS="$LIBS" echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6 -echo "configure:4559: checking for initscr in -lncurses" >&5 +echo "configure:4526: checking for initscr in -lncurses" >&5 LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <<EOF -#line 4562 "configure" +#line 4529 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> int main() { initscr() ; return 0; } EOF -if { (eval echo configure:4569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cf_cv_have_lib_ncurses=yes @@ -4592,17 +4559,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:4596: checking for -lncurses in $cf_libdir" >&5 +echo "configure:4563: checking for -lncurses in $cf_libdir" >&5 LIBS="-L$cf_libdir -lncurses $cf_save_LIBS" cat > conftest.$ac_ext <<EOF -#line 4599 "configure" +#line 4566 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> int main() { initscr() ; return 0; } EOF -if { (eval echo configure:4606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cf_cv_have_lib_ncurses=yes @@ -4634,7 +4601,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:4638: checking if we can link ncurses without $cf_ncurses_LIBS" >&5 +echo "configure:4605: 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'$//'` @@ -4643,14 +4610,14 @@ echo "configure:4638: checking if we can link ncurses without $cf_ncurses_LIBS" fi done cat > conftest.$ac_ext <<EOF -#line 4647 "configure" +#line 4614 "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:4654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -4667,20 +4634,20 @@ fi slang) echo $ac_n "checking for slang header file""... $ac_c" 1>&6 -echo "configure:4671: checking for slang header file" >&5 +echo "configure:4638: 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 4677 "configure" +#line 4644 "configure" #include "confdefs.h" #include <slang.h> int main() { printf("%s\n", SLANG_VERSION) ; return 0; } EOF -if { (eval echo configure:4684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_slang_header=predefined else @@ -4764,7 +4731,7 @@ cf_cv_lib_termcap=none # HP-UX 9.x terminfo has setupterm, but no tigetstr. if test "$termlib" = none; then echo $ac_n "checking for tigetstr in -ltermlib""... $ac_c" 1>&6 -echo "configure:4768: checking for tigetstr in -ltermlib" >&5 +echo "configure:4735: 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 @@ -4772,7 +4739,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermlib $LIBS" cat > conftest.$ac_ext <<EOF -#line 4776 "configure" +#line 4743 "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 @@ -4783,7 +4750,7 @@ int main() { tigetstr() ; return 0; } EOF -if { (eval echo configure:4787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4806,7 +4773,7 @@ fi fi if test "$cf_cv_lib_termcap" = none; then echo $ac_n "checking for tgoto in -ltermlib""... $ac_c" 1>&6 -echo "configure:4810: checking for tgoto in -ltermlib" >&5 +echo "configure:4777: 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 @@ -4814,7 +4781,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermlib $LIBS" cat > conftest.$ac_ext <<EOF -#line 4818 "configure" +#line 4785 "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 @@ -4825,7 +4792,7 @@ int main() { tgoto() ; return 0; } EOF -if { (eval echo configure:4829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4849,7 +4816,7 @@ fi if test "$cf_cv_lib_termcap" = none; then # allow curses library for broken AIX system. echo $ac_n "checking for initscr in -lcurses""... $ac_c" 1>&6 -echo "configure:4853: checking for initscr in -lcurses" >&5 +echo "configure:4820: 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 @@ -4857,7 +4824,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcurses $LIBS" cat > conftest.$ac_ext <<EOF -#line 4861 "configure" +#line 4828 "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 @@ -4868,7 +4835,7 @@ int main() { initscr() ; return 0; } EOF -if { (eval echo configure:4872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4889,7 +4856,7 @@ else fi echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6 -echo "configure:4893: checking for tgoto in -ltermcap" >&5 +echo "configure:4860: 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 @@ -4897,7 +4864,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext <<EOF -#line 4901 "configure" +#line 4868 "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 @@ -4908,7 +4875,7 @@ int main() { tgoto() ; return 0; } EOF -if { (eval echo configure:4912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4931,7 +4898,7 @@ fi fi if test "$cf_cv_lib_termcap" = none; then echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6 -echo "configure:4935: checking for tgoto in -ltermcap" >&5 +echo "configure:4902: 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 @@ -4939,7 +4906,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext <<EOF -#line 4943 "configure" +#line 4910 "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 @@ -4950,7 +4917,7 @@ int main() { tgoto() ; return 0; } EOF -if { (eval echo configure:4954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4973,7 +4940,7 @@ fi fi if test "$cf_cv_lib_termcap" = none; then echo $ac_n "checking for tgoto in -lncurses""... $ac_c" 1>&6 -echo "configure:4977: checking for tgoto in -lncurses" >&5 +echo "configure:4944: 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 @@ -4981,7 +4948,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <<EOF -#line 4985 "configure" +#line 4952 "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 @@ -4992,7 +4959,7 @@ int main() { tgoto() ; return 0; } EOF -if { (eval echo configure:4996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5022,12 +4989,12 @@ fi cf_slang_LIBS2="$LIBS" echo $ac_n "checking for acos""... $ac_c" 1>&6 -echo "configure:5026: checking for acos" >&5 +echo "configure:4993: 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 5031 "configure" +#line 4998 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char acos(); below. */ @@ -5050,7 +5017,7 @@ acos(); ; return 0; } EOF -if { (eval echo configure:5054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_acos=yes" else @@ -5069,7 +5036,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for acos in -lm""... $ac_c" 1>&6 -echo "configure:5073: checking for acos in -lm" >&5 +echo "configure:5040: 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 @@ -5077,7 +5044,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS $LIBS" cat > conftest.$ac_ext <<EOF -#line 5081 "configure" +#line 5048 "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 @@ -5088,7 +5055,7 @@ int main() { acos() ; return 0; } EOF -if { (eval echo configure:5092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5128,12 +5095,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:5132: checking for SLtt_get_screen_size" >&5 +echo "configure:5099: 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 5137 "configure" +#line 5104 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char SLtt_get_screen_size(); below. */ @@ -5156,7 +5123,7 @@ SLtt_get_screen_size(); ; return 0; } EOF -if { (eval echo configure:5160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_SLtt_get_screen_size=yes" else @@ -5176,17 +5143,17 @@ else cf_save_LIBS="$LIBS" echo $ac_n "checking for SLtt_get_screen_size in -lslang""... $ac_c" 1>&6 -echo "configure:5180: checking for SLtt_get_screen_size in -lslang" >&5 +echo "configure:5147: checking for SLtt_get_screen_size in -lslang" >&5 LIBS="-lslang $LIBS" cat > conftest.$ac_ext <<EOF -#line 5183 "configure" +#line 5150 "configure" #include "confdefs.h" #include <slang.h> int main() { SLtt_get_screen_size() ; return 0; } EOF -if { (eval echo configure:5190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cf_cv_have_lib_slang=yes @@ -5213,17 +5180,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:5217: checking for -lslang in $cf_libdir" >&5 +echo "configure:5184: checking for -lslang in $cf_libdir" >&5 LIBS="-L$cf_libdir -lslang $cf_save_LIBS" cat > conftest.$ac_ext <<EOF -#line 5220 "configure" +#line 5187 "configure" #include "confdefs.h" #include <slang.h> int main() { SLtt_get_screen_size() ; return 0; } EOF -if { (eval echo configure:5227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cf_cv_have_lib_slang=yes @@ -5254,7 +5221,7 @@ esac cf_slang_LIBS3="$LIBS" echo $ac_n "checking if we can link slang without termcap""... $ac_c" 1>&6 -echo "configure:5258: checking if we can link slang without termcap" >&5 +echo "configure:5225: 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 @@ -5262,14 +5229,14 @@ else fi LIBS=`echo ".$cf_slang_LIBS3" | sed -e "s@$cf_exclude@@" -e 's@^.@@'` cat > conftest.$ac_ext <<EOF -#line 5266 "configure" +#line 5233 "configure" #include "confdefs.h" #include <slang.h> int main() { SLtt_get_screen_size() ; return 0; } EOF -if { (eval echo configure:5273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cf_result=yes else @@ -5289,7 +5256,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:5293: checking for location of config-file" >&5 +echo "configure:5260: 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" @@ -5297,23 +5264,14 @@ EOF echo "$ac_t""$LYNX_CFG_FILE" 1>&6 -echo $ac_n "checking for location of site specific options-file""... $ac_c" 1>&6 -echo "configure:5302: checking for location of site specific options-file" >&5 -LYNX_COMPILE_OPTS=$cf_libdir/lynx_site.txt -cat >> confdefs.h <<EOF -#define LYNX_COMPILE_OPTS "$LYNX_COMPILE_OPTS" -EOF - -echo "$ac_t""$LYNX_COMPILE_OPTS" 1>&6 - echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:5312: checking for ANSI C header files" >&5 +echo "configure:5270: 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 5317 "configure" +#line 5275 "configure" #include "confdefs.h" #include <stdlib.h> #include <stdarg.h> @@ -5321,7 +5279,7 @@ else #include <float.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5283: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -5338,7 +5296,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 5342 "configure" +#line 5300 "configure" #include "confdefs.h" #include <string.h> EOF @@ -5356,7 +5314,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 5360 "configure" +#line 5318 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -5377,7 +5335,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <<EOF -#line 5381 "configure" +#line 5339 "configure" #include "confdefs.h" #include <ctype.h> #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -5388,7 +5346,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:5392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -5412,12 +5370,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:5416: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:5374: 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 5421 "configure" +#line 5379 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/time.h> @@ -5426,7 +5384,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:5430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -5451,12 +5409,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:5455: checking for $ac_hdr that defines DIR" >&5 +echo "configure:5413: 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 5460 "configure" +#line 5418 "configure" #include "confdefs.h" #include <sys/types.h> #include <$ac_hdr> @@ -5464,7 +5422,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:5468: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -5489,7 +5447,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:5493: checking for opendir in -ldir" >&5 +echo "configure:5451: 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 @@ -5497,7 +5455,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <<EOF -#line 5501 "configure" +#line 5459 "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 @@ -5508,7 +5466,7 @@ int main() { opendir() ; return 0; } EOF -if { (eval echo configure:5512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5530,7 +5488,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:5534: checking for opendir in -lx" >&5 +echo "configure:5492: 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 @@ -5538,7 +5496,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <<EOF -#line 5542 "configure" +#line 5500 "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 @@ -5549,7 +5507,7 @@ int main() { opendir() ; return 0; } EOF -if { (eval echo configure:5553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5588,17 +5546,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:5592: checking for $ac_hdr" >&5 +echo "configure:5550: 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 5597 "configure" +#line 5555 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5560: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -5626,13 +5584,13 @@ done echo $ac_n "checking termio.h and termios.h""... $ac_c" 1>&6 -echo "configure:5630: checking termio.h and termios.h" >&5 +echo "configure:5588: 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 5636 "configure" +#line 5594 "configure" #include "confdefs.h" #if HAVE_TERMIO_H @@ -5645,7 +5603,7 @@ int main() { putchar (0x0a) ; return 0; } EOF -if { (eval echo configure:5649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5607: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_termio_and_termios=yes else @@ -5668,17 +5626,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:5672: checking for $ac_hdr" >&5 +echo "configure:5630: 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 5677 "configure" +#line 5635 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -5715,17 +5673,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:5719: checking for $ac_hdr" >&5 +echo "configure:5677: 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 5724 "configure" +#line 5682 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5687: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -5755,17 +5713,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:5759: checking for $ac_hdr" >&5 +echo "configure:5717: 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 5764 "configure" +#line 5722 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5727: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -5806,13 +5764,13 @@ fi echo $ac_n "checking for union wait""... $ac_c" 1>&6 -echo "configure:5810: checking for union wait" >&5 +echo "configure:5768: 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 5816 "configure" +#line 5774 "configure" #include "confdefs.h" $cf_wait_headers int main() { @@ -5823,7 +5781,7 @@ int x; ; return 0; } EOF -if { (eval echo configure:5827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cf_cv_type_unionwait=no echo compiles ok w/o union wait 1>&5 @@ -5834,7 +5792,7 @@ else rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 5838 "configure" +#line 5796 "configure" #include "confdefs.h" $cf_wait_headers int main() { @@ -5849,7 +5807,7 @@ union wait x; ; return 0; } EOF -if { (eval echo configure:5853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cf_cv_type_unionwait=yes echo compiles ok with union wait and possibly macros too 1>&5 @@ -5876,20 +5834,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:5880: checking if union wait can be used as wait-arg" >&5 +echo "configure:5838: 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 5886 "configure" +#line 5844 "configure" #include "confdefs.h" $cf_wait_headers int main() { union wait x; wait(&x) ; return 0; } EOF -if { (eval echo configure:5893: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5851: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_arg_union_wait=yes else @@ -5909,20 +5867,20 @@ EOF echo $ac_n "checking if union wait can be used as waitpid-arg""... $ac_c" 1>&6 -echo "configure:5913: checking if union wait can be used as waitpid-arg" >&5 +echo "configure:5871: 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 5919 "configure" +#line 5877 "configure" #include "confdefs.h" $cf_wait_headers int main() { union wait x; waitpid(0, &x, 0) ; return 0; } EOF -if { (eval echo configure:5926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_arg_union_waitpid=yes else @@ -5944,12 +5902,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:5948: checking for uid_t in sys/types.h" >&5 +echo "configure:5906: 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 5953 "configure" +#line 5911 "configure" #include "confdefs.h" #include <sys/types.h> EOF @@ -5978,7 +5936,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:5982: checking type of array argument to getgroups" >&5 +echo "configure:5940: 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 @@ -5986,7 +5944,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <<EOF -#line 5990 "configure" +#line 5948 "configure" #include "confdefs.h" /* Thanks to Mike Rendell for this test. */ @@ -6011,7 +5969,7 @@ main() } EOF -if { (eval echo configure:6015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -6025,7 +5983,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext <<EOF -#line 6029 "configure" +#line 5987 "configure" #include "confdefs.h" #include <unistd.h> EOF @@ -6049,12 +6007,12 @@ EOF echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:6053: checking for pid_t" >&5 +echo "configure:6011: 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 6058 "configure" +#line 6016 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -6082,12 +6040,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:6086: checking for uid_t in sys/types.h" >&5 +echo "configure:6044: 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 6091 "configure" +#line 6049 "configure" #include "confdefs.h" #include <sys/types.h> EOF @@ -6116,12 +6074,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:6120: checking for mode_t" >&5 +echo "configure:6078: 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 6125 "configure" +#line 6083 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -6152,17 +6110,17 @@ fi ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 -echo "configure:6156: checking for vfork.h" >&5 +echo "configure:6114: 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 6161 "configure" +#line 6119 "configure" #include "confdefs.h" #include <vfork.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6166: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -6187,18 +6145,18 @@ else fi echo $ac_n "checking for working vfork""... $ac_c" 1>&6 -echo "configure:6191: checking for working vfork" >&5 +echo "configure:6149: 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:6197: checking for vfork" >&5 +echo "configure:6155: 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 6202 "configure" +#line 6160 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char vfork(); below. */ @@ -6221,7 +6179,7 @@ vfork(); ; return 0; } EOF -if { (eval echo configure:6225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vfork=yes" else @@ -6242,7 +6200,7 @@ fi else cat > conftest.$ac_ext <<EOF -#line 6246 "configure" +#line 6204 "configure" #include "confdefs.h" /* Thanks to Paul Eggert for this test. */ #include <stdio.h> @@ -6337,7 +6295,7 @@ main() { } } EOF -if { (eval echo configure:6341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_vfork_works=yes else @@ -6361,13 +6319,13 @@ fi echo $ac_n "checking if we should use fcntl or ioctl""... $ac_c" 1>&6 -echo "configure:6365: checking if we should use fcntl or ioctl" >&5 +echo "configure:6323: 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 6371 "configure" +#line 6329 "configure" #include "confdefs.h" #include <sys/types.h> @@ -6379,7 +6337,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:6383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cf_cv_fionbio=ioctl else @@ -6388,7 +6346,7 @@ else rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 6392 "configure" +#line 6350 "configure" #include "confdefs.h" #include <sys/types.h> @@ -6405,7 +6363,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:6409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cf_cv_fionbio=fcntl else @@ -6428,20 +6386,20 @@ EOF echo $ac_n "checking for broken/missing definition of remove""... $ac_c" 1>&6 -echo "configure:6432: checking for broken/missing definition of remove" >&5 +echo "configure:6390: 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 6438 "configure" +#line 6396 "configure" #include "confdefs.h" #include <stdio.h> int main() { remove("dummy") ; return 0; } EOF -if { (eval echo configure:6445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cf_cv_baddef_remove=no else @@ -6449,7 +6407,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 6453 "configure" +#line 6411 "configure" #include "confdefs.h" #include <stdio.h> int __unlink(name) { return unlink(name); } @@ -6457,7 +6415,7 @@ int main() { remove("dummy") ; return 0; } EOF -if { (eval echo configure:6461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cf_cv_baddef_remove=yes else @@ -6481,13 +6439,13 @@ EOF echo $ac_n "checking for lstat""... $ac_c" 1>&6 -echo "configure:6485: checking for lstat" >&5 +echo "configure:6443: 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 6491 "configure" +#line 6449 "configure" #include "confdefs.h" #include <sys/types.h> @@ -6496,7 +6454,7 @@ int main() { lstat(".", (struct stat *)0) ; return 0; } EOF -if { (eval echo configure:6500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_func_lstat=yes else @@ -6528,12 +6486,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6532: checking for $ac_func" >&5 +echo "configure:6490: 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 6537 "configure" +#line 6495 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -6556,7 +6514,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:6560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6586,12 +6544,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6590: checking for $ac_func" >&5 +echo "configure:6548: 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 6595 "configure" +#line 6553 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -6614,7 +6572,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:6618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6645,12 +6603,12 @@ for ac_func in strstr do echo $ac_n "checking for $ac_func declaration""... $ac_c" 1>&6 -echo "configure:6649: checking for $ac_func declaration" >&5 +echo "configure:6607: 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 6654 "configure" +#line 6612 "configure" #include "confdefs.h" #include <string.h> int main() { @@ -6659,11 +6617,11 @@ extern int ${ac_func}(); #endif ; return 0; } EOF -if { (eval echo configure:6663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6621: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 6667 "configure" +#line 6625 "configure" #include "confdefs.h" #include <string.h> int main() { @@ -6672,7 +6630,7 @@ int (*p)() = ${ac_func}; #endif ; return 0; } EOF -if { (eval echo configure:6676: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_decl_$ac_func=yes" @@ -6714,12 +6672,12 @@ for ac_func in getgrgid getgrnam do echo $ac_n "checking for $ac_func declaration""... $ac_c" 1>&6 -echo "configure:6718: checking for $ac_func declaration" >&5 +echo "configure:6676: 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 6723 "configure" +#line 6681 "configure" #include "confdefs.h" #include <stdio.h> @@ -6730,11 +6688,11 @@ extern int ${ac_func}(); #endif ; return 0; } EOF -if { (eval echo configure:6734: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6692: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 6738 "configure" +#line 6696 "configure" #include "confdefs.h" #include <stdio.h> @@ -6745,7 +6703,7 @@ int (*p)() = ${ac_func}; #endif ; return 0; } EOF -if { (eval echo configure:6749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_decl_$ac_func=yes" @@ -6787,13 +6745,13 @@ done echo $ac_n "checking if TRUE/FALSE are defined""... $ac_c" 1>&6 -echo "configure:6791: checking if TRUE/FALSE are defined" >&5 +echo "configure:6749: 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 6797 "configure" +#line 6755 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -6802,7 +6760,7 @@ int main() { int x = TRUE, y = FALSE ; return 0; } EOF -if { (eval echo configure:6806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_bool_defs=yes else @@ -6829,13 +6787,13 @@ fi echo $ac_n "checking declaration of errno""... $ac_c" 1>&6 -echo "configure:6833: checking declaration of errno" >&5 +echo "configure:6791: checking declaration of errno" >&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 6839 "configure" +#line 6797 "configure" #include "confdefs.h" #if HAVE_STDLIB_H @@ -6848,7 +6806,7 @@ int main() { long x = (long) errno ; return 0; } EOF -if { (eval echo configure:6852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6810: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval 'cf_cv_dcl_'errno'=yes' else @@ -6878,9 +6836,9 @@ cf_result=`echo $cf_result | tr '[a-z]' '[A-Z]'` EOF echo $ac_n "checking existence of errno""... $ac_c" 1>&6 -echo "configure:6882: checking existence of errno" >&5 +echo "configure:6840: checking existence of errno" >&5 cat > conftest.$ac_ext <<EOF -#line 6884 "configure" +#line 6842 "configure" #include "confdefs.h" #undef errno @@ -6890,7 +6848,7 @@ int main() { errno = 2 ; return 0; } EOF -if { (eval echo configure:6894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval 'cf_cv_have_'errno'=yes' else @@ -6920,20 +6878,20 @@ EOF echo $ac_n "checking for setlocale()""... $ac_c" 1>&6 -echo "configure:6924: checking for setlocale()" >&5 +echo "configure:6882: 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 6930 "configure" +#line 6888 "configure" #include "confdefs.h" #include <locale.h> int main() { setlocale(LC_ALL, "") ; return 0; } EOF -if { (eval echo configure:6937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cf_cv_locale=yes else @@ -6954,13 +6912,13 @@ EOF echo $ac_n "checking if NGROUPS is defined""... $ac_c" 1>&6 -echo "configure:6958: checking if NGROUPS is defined" >&5 +echo "configure:6916: 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 6964 "configure" +#line 6922 "configure" #include "confdefs.h" #if HAVE_SYS_PARAM_H @@ -6974,7 +6932,7 @@ int main() { int x = NGROUPS ; return 0; } EOF -if { (eval echo configure:6978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_ngroups=yes else @@ -6982,7 +6940,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 6986 "configure" +#line 6944 "configure" #include "confdefs.h" #if HAVE_SYS_PARAM_H @@ -6996,7 +6954,7 @@ int main() { int x = NGROUPS_MAX ; return 0; } EOF -if { (eval echo configure:7000: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6958: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_ngroups=NGROUPS_MAX else @@ -7030,13 +6988,13 @@ for cf_name in sys_nerr sys_errlist do echo $ac_n "checking declaration of $cf_name""... $ac_c" 1>&6 -echo "configure:7034: checking declaration of $cf_name" >&5 +echo "configure:6992: checking declaration of $cf_name" >&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 7040 "configure" +#line 6998 "configure" #include "confdefs.h" #if HAVE_STDLIB_H @@ -7049,7 +7007,7 @@ int main() { long x = (long) $cf_name ; return 0; } EOF -if { (eval echo configure:7053: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval 'cf_cv_dcl_'$cf_name'=yes' else @@ -7079,9 +7037,9 @@ cf_result=`echo $cf_result | tr '[a-z]' '[A-Z]'` EOF echo $ac_n "checking existence of $cf_name""... $ac_c" 1>&6 -echo "configure:7083: checking existence of $cf_name" >&5 +echo "configure:7041: checking existence of $cf_name" >&5 cat > conftest.$ac_ext <<EOF -#line 7085 "configure" +#line 7043 "configure" #include "confdefs.h" #undef $cf_name @@ -7091,7 +7049,7 @@ int main() { $cf_name = 2 ; return 0; } EOF -if { (eval echo configure:7095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval 'cf_cv_have_'$cf_name'=yes' else @@ -7122,13 +7080,13 @@ done echo $ac_n "checking if struct utmp is declared""... $ac_c" 1>&6 -echo "configure:7126: checking if struct utmp is declared" >&5 +echo "configure:7084: 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 7132 "configure" +#line 7090 "configure" #include "confdefs.h" #include <sys/types.h> @@ -7137,7 +7095,7 @@ int main() { struct utmp x; char *y = &x.ut_host[0] ; return 0; } EOF -if { (eval echo configure:7141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_have_utmp=yes else @@ -7145,14 +7103,14 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 7149 "configure" +#line 7107 "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:7156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7114: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_have_utmp=utmpx else @@ -7183,7 +7141,7 @@ EOF if test $cf_cv_screen != slang ; then echo $ac_n "checking if curses supports alternate-character set""... $ac_c" 1>&6 -echo "configure:7187: checking if curses supports alternate-character set" >&5 +echo "configure:7145: 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 @@ -7191,7 +7149,7 @@ else for mapname in acs_map _acs_map do cat > conftest.$ac_ext <<EOF -#line 7195 "configure" +#line 7153 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -7200,7 +7158,7 @@ int main() { chtype x = $mapname['l']; $mapname['m'] = 0 ; return 0; } EOF -if { (eval echo configure:7204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cf_cv_alt_char_set=$mapname break @@ -7223,13 +7181,13 @@ EOF echo $ac_n "checking if curses supports fancy attributes""... $ac_c" 1>&6 -echo "configure:7227: checking if curses supports fancy attributes" >&5 +echo "configure:7185: 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 7233 "configure" +#line 7191 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -7242,7 +7200,7 @@ attrset(A_UNDERLINE|A_BOLD|A_REVERSE); ; return 0; } EOF -if { (eval echo configure:7246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cf_cv_fancy_curses=yes else @@ -7262,7 +7220,7 @@ EOF echo $ac_n "checking for ncurses version""... $ac_c" 1>&6 -echo "configure:7266: checking for ncurses version" >&5 +echo "configure:7224: 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 @@ -7287,7 +7245,7 @@ Autoconf "old" #endif EOF cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out" - { (eval echo configure:7291: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; } + { (eval echo configure:7249: \"$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" @@ -7296,7 +7254,7 @@ EOF else cat > conftest.$ac_ext <<EOF -#line 7300 "configure" +#line 7258 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -7319,7 +7277,7 @@ int main() exit(0); } EOF -if { (eval echo configure:7323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then cf_cv_ncurses_version=`cat $cf_tempfile` @@ -7339,13 +7297,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:7343: checking for obsolete/broken version of ncurses" >&5 +echo "configure:7301: 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 7349 "configure" +#line 7307 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -7359,7 +7317,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:7363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_ncurses_broken=no else @@ -7384,13 +7342,13 @@ fi echo $ac_n "checking if curses supports color attributes""... $ac_c" 1>&6 -echo "configure:7388: checking if curses supports color attributes" >&5 +echo "configure:7346: 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 7394 "configure" +#line 7352 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -7405,7 +7363,7 @@ chtype x = COLOR_BLUE; ; return 0; } EOF -if { (eval echo configure:7409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cf_cv_color_curses=yes else @@ -7432,7 +7390,7 @@ fi echo $ac_n "checking declaration of size-change""... $ac_c" 1>&6 -echo "configure:7436: checking declaration of size-change" >&5 +echo "configure:7394: 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 @@ -7446,7 +7404,7 @@ do CFLAGS="$cf_save_CFLAGS" test -n "$cf_opts" && CFLAGS="$CFLAGS -D$cf_opts" cat > conftest.$ac_ext <<EOF -#line 7450 "configure" +#line 7408 "configure" #include "confdefs.h" #include <sys/types.h> #if HAVE_TERMIOS_H @@ -7485,7 +7443,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:7489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_sizechange=yes else @@ -7517,20 +7475,20 @@ EOF echo $ac_n "checking if ttytype is declared in curses library""... $ac_c" 1>&6 -echo "configure:7521: checking if ttytype is declared in curses library" >&5 +echo "configure:7479: 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 7527 "configure" +#line 7485 "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:7534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cf_cv_have_ttytype=yes else @@ -7551,18 +7509,19 @@ EOF for ac_func in \ cbreak \ + define_key \ keypad \ use_default_colors \ wborder \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7561: checking for $ac_func" >&5 +echo "configure:7520: 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 7566 "configure" +#line 7525 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -7585,7 +7544,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:7589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7615,7 +7574,7 @@ fi echo $ac_n "checking if experimental forms-based options screen should be used""... $ac_c" 1>&6 -echo "configure:7619: checking if experimental forms-based options screen should be used" >&5 +echo "configure:7578: checking if experimental 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 @@ -7639,7 +7598,7 @@ EOF echo $ac_n "checking if experimental persistent-cookie logic should be used""... $ac_c" 1>&6 -echo "configure:7643: checking if experimental persistent-cookie logic should be used" >&5 +echo "configure:7602: checking if experimental 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 @@ -7663,7 +7622,7 @@ EOF echo $ac_n "checking if color-style code should be used""... $ac_c" 1>&6 -echo "configure:7667: checking if color-style code should be used" >&5 +echo "configure:7626: 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 @@ -7711,7 +7670,7 @@ EOF echo "$ac_t""yes" 1>&6 echo $ac_n "checking for location of style-sheet file""... $ac_c" 1>&6 -echo "configure:7715: checking for location of style-sheet file" >&5 +echo "configure:7674: 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" @@ -7724,7 +7683,7 @@ esac echo $ac_n "checking if partial-display should be used""... $ac_c" 1>&6 -echo "configure:7728: checking if partial-display should be used" >&5 +echo "configure:7687: checking if partial-display should be used" >&5 # Check whether --enable-partial or --disable-partial was given. if test "${enable_partial+set}" = set; then @@ -7753,7 +7712,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:7757: checking if you want to use default-colors" >&5 +echo "configure:7716: 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 @@ -7778,7 +7737,7 @@ EOF fi echo $ac_n "checking if you want to use extended HTML DTD logic""... $ac_c" 1>&6 -echo "configure:7782: checking if you want to use extended HTML DTD logic" >&5 +echo "configure:7741: 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 @@ -7802,7 +7761,7 @@ EOF echo $ac_n "checking if you want to use external commands""... $ac_c" 1>&6 -echo "configure:7806: checking if you want to use external commands" >&5 +echo "configure:7765: 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 @@ -7826,7 +7785,7 @@ EOF echo $ac_n "checking if you want to use setfont support""... $ac_c" 1>&6 -echo "configure:7830: checking if you want to use setfont support" >&5 +echo "configure:7789: 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 @@ -7850,7 +7809,7 @@ EOF echo $ac_n "checking if you want cgi-link support""... $ac_c" 1>&6 -echo "configure:7854: checking if you want cgi-link support" >&5 +echo "configure:7813: 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 @@ -7869,7 +7828,7 @@ fi echo "$ac_t""$enableval" 1>&6 echo $ac_n "checking if you want exec-links support""... $ac_c" 1>&6 -echo "configure:7873: checking if you want exec-links support" >&5 +echo "configure:7832: 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 @@ -7888,7 +7847,7 @@ fi echo "$ac_t""$enableval" 1>&6 echo $ac_n "checking if you want exec-scripts support""... $ac_c" 1>&6 -echo "configure:7892: checking if you want exec-scripts support" >&5 +echo "configure:7851: 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 @@ -7907,7 +7866,7 @@ fi echo "$ac_t""$enableval" 1>&6 echo $ac_n "checking if you want internal-links feature""... $ac_c" 1>&6 -echo "configure:7911: checking if you want internal-links feature" >&5 +echo "configure:7870: 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 @@ -7931,7 +7890,7 @@ EOF echo $ac_n "checking if you want to fork NSL requests""... $ac_c" 1>&6 -echo "configure:7935: checking if you want to fork NSL requests" >&5 +echo "configure:7894: 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 @@ -7955,7 +7914,7 @@ EOF echo $ac_n "checking if you want to log URL requests via syslog""... $ac_c" 1>&6 -echo "configure:7959: checking if you want to log URL requests via syslog" >&5 +echo "configure:7918: 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 @@ -7979,7 +7938,7 @@ EOF echo $ac_n "checking if you want to underline links""... $ac_c" 1>&6 -echo "configure:7983: checking if you want to underline links" >&5 +echo "configure:7942: checking if you want to underline links" >&5 # Check whether --enable-underlines or --disable-underlines was given. if test "${enable_underlines+set}" = set; then @@ -8003,7 +7962,7 @@ EOF echo $ac_n "checking if help files should be gzip'ed""... $ac_c" 1>&6 -echo "configure:8007: checking if help files should be gzip'ed" >&5 +echo "configure:7966: 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 @@ -8032,7 +7991,7 @@ fi echo $ac_n "checking if you want to use zlib for decompression of some gzip files""... $ac_c" 1>&6 -echo "configure:8036: checking if you want to use zlib for decompression of some gzip files" >&5 +echo "configure:7995: 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 @@ -8049,12 +8008,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:8053: checking for gzopen" >&5 +echo "configure:8012: 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 8058 "configure" +#line 8017 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char gzopen(); below. */ @@ -8077,7 +8036,7 @@ gzopen(); ; return 0; } EOF -if { (eval echo configure:8081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_gzopen=yes" else @@ -8097,17 +8056,17 @@ else cf_save_LIBS="$LIBS" echo $ac_n "checking for gzopen in -lz""... $ac_c" 1>&6 -echo "configure:8101: checking for gzopen in -lz" >&5 +echo "configure:8060: checking for gzopen in -lz" >&5 LIBS="-lz $LIBS" cat > conftest.$ac_ext <<EOF -#line 8104 "configure" +#line 8063 "configure" #include "confdefs.h" #include <zlib.h> int main() { gzopen("name","mode") ; return 0; } EOF -if { (eval echo configure:8111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cf_cv_have_lib_z=yes @@ -8134,17 +8093,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:8138: checking for -lz in $cf_libdir" >&5 +echo "configure:8097: checking for -lz in $cf_libdir" >&5 LIBS="-L$cf_libdir -lz $cf_save_LIBS" cat > conftest.$ac_ext <<EOF -#line 8141 "configure" +#line 8100 "configure" #include "confdefs.h" #include <zlib.h> int main() { gzopen("name","mode") ; return 0; } EOF -if { (eval echo configure:8148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cf_cv_have_lib_z=yes @@ -8185,7 +8144,7 @@ fi # 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:8189: checking if directory-editor code should be used" >&5 +echo "configure:8148: 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 @@ -8211,7 +8170,7 @@ EOF echo $ac_n "checking if you wish to allow extracting from archives via DirEd""... $ac_c" 1>&6 -echo "configure:8215: checking if you wish to allow extracting from archives via DirEd" >&5 +echo "configure:8174: 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 @@ -8230,7 +8189,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:8234: checking if you wish to allow users to redefine DirEd keys" >&5 +echo "configure:8193: 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 @@ -8256,7 +8215,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:8260: checking if you wish to allow permissions commands via DirEd" >&5 +echo "configure:8219: 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 @@ -8282,7 +8241,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:8286: checking if you wish to allow executable-permission commands via DirEd" >&5 +echo "configure:8245: 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 @@ -8301,7 +8260,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:8305: checking if you wish to allow "tar" commands from DirEd" >&5 +echo "configure:8264: 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 @@ -8327,7 +8286,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:8331: checking if you wish to allow "uudecode" commands from DirEd" >&5 +echo "configure:8290: 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 @@ -8353,7 +8312,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:8357: checking if you wish to allow "zip" and "unzip" commands from DirEd" >&5 +echo "configure:8316: 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 @@ -8379,7 +8338,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:8383: checking if you wish to allow "gzip" and "gunzip" commands from DirEd" >&5 +echo "configure:8342: 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 @@ -8406,7 +8365,7 @@ fi fi echo $ac_n "checking if you want long-directory listings""... $ac_c" 1>&6 -echo "configure:8410: checking if you want long-directory listings" >&5 +echo "configure:8369: 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 @@ -8432,7 +8391,7 @@ fi echo "$ac_t""$enableval" 1>&6 echo $ac_n "checking if parent-directory references are permitted""... $ac_c" 1>&6 -echo "configure:8436: checking if parent-directory references are permitted" >&5 +echo "configure:8395: 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 @@ -8610,7 +8569,6 @@ s%@make_include_left@%$make_include_left%g s%@make_include_right@%$make_include_right%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_DATA@%$INSTALL_DATA%g -s%@AWK@%$AWK%g s%@LINT@%$LINT%g s%@ECHO_LD@%$ECHO_LD%g s%@RULE_CC@%$RULE_CC%g diff --git a/configure.in b/configure.in index 9516eb67..ebe613dd 100644 --- a/configure.in +++ b/configure.in @@ -22,7 +22,6 @@ AC_PROG_RANLIB AC_PROG_MAKE_SET CF_MAKE_INCLUDE AC_PROG_INSTALL -AC_PROG_AWK AC_CHECK_PROGS(LINT, lint alint lclint tdlint, []) AC_AIX @@ -351,11 +350,6 @@ LYNX_CFG_FILE=$cf_libdir/lynx.cfg AC_DEFINE_UNQUOTED(LYNX_CFG_FILE,"$LYNX_CFG_FILE") AC_MSG_RESULT($LYNX_CFG_FILE) -AC_MSG_CHECKING(for location of site specific options-file) -LYNX_COMPILE_OPTS=$cf_libdir/lynx_site.txt -AC_DEFINE_UNQUOTED(LYNX_COMPILE_OPTS,"$LYNX_COMPILE_OPTS") -AC_MSG_RESULT($LYNX_COMPILE_OPTS) - dnl -------------------------------------------------------------------------- dnl Checks for standard headers dnl -------------------------------------------------------------------------- @@ -434,6 +428,7 @@ if test $cf_cv_screen != slang ; then CF_TTYTYPE AC_CHECK_FUNCS( \ cbreak \ + define_key \ keypad \ use_default_colors \ wborder \ diff --git a/lynx.cfg b/lynx.cfg index 369a0559..a6a343b8 100644 --- a/lynx.cfg +++ b/lynx.cfg @@ -278,8 +278,9 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # command line option, the value for ASSUME_CHARSET or -assume_charset # is used. It works for both text/plain and text/html files. # This option may interfere with "raw mode" toggling when local files -# are viewed (it is "stronger" than the effective change of the charset -# assumption caused by changing "raw mode"), so only use when necessary. +# are viewed (it is "stronger" than "assume_charset" or the effective change +# of the charset assumption caused by changing "raw mode"), +# so only use when necessary. # #ASSUME_LOCAL_CHARSET:iso-8859-1 diff --git a/lynx_help/keystrokes/cookie_help.html b/lynx_help/keystrokes/cookie_help.html index 0fd5b255..6a22b394 100644 --- a/lynx_help/keystrokes/cookie_help.html +++ b/lynx_help/keystrokes/cookie_help.html @@ -10,7 +10,7 @@ The Cookie Jar Page displays all of the unexpired cookies you have accumulated in the hypothetical <em>Cookie Jar</em>. The cookies are obtained via <em>Set-Cookie</em> MIME headers in replies from http servers, -and are used for <A HREF="../Lynx_users_guide.html#30">State Management</A> +and are used for <A HREF="../Lynx_users_guide.html#Cookies">State Management</A> across successive requests to the servers. <p>The cookies are listed by <em>domain</em> (server's Fully Qualified diff --git a/lynx_help/keystrokes/visited_help.html b/lynx_help/keystrokes/visited_help.html index ebb03a70..0a6874f3 100644 --- a/lynx_help/keystrokes/visited_help.html +++ b/lynx_help/keystrokes/visited_help.html @@ -20,8 +20,8 @@ the URLs differ due to appended fragments), and is supplementary to the <p>You may <A HREF="movement_help.html">select</A> any link on the Visited Links Page to retrieve a document that you had previously visited, or you can use this list to save such links in your <A HREF="bookmark_help.html" ->bookmark files</A>, or to <A HREF="../Lynx_users_guide.html#9">Download</A> -them. +>bookmark files</A>, or to <A HREF="../Lynx_users_guide.html#RemoteSource" +>Download</A> them. <p>In contrast to the History Page, the Visited Links Page includes any links which were retrieved for '<em>d</em>'ownloading or were passed to diff --git a/lynx_help/lynx_help_main.html b/lynx_help/lynx_help_main.html index 0871f1d9..79327f27 100644 --- a/lynx_help/lynx_help_main.html +++ b/lynx_help/lynx_help_main.html @@ -51,13 +51,13 @@ href="http://www.stonehand.com/doc/comments.html" >Keep Your Comments Legal</a> </ul> <li><a -href="http://ugweb.cs.ualberta.ca/~gerald/validate/" ->A Kinder, Gentler HTML Validator</a> +href="http://validator.w3.org/" +>W3C HTML Validation Service</a> <li><a href="http://www.webtechs.com/html-val-svc/" >WebTechs HTML Validation Service</a> <li><a href="http://www.ncsa.uiuc.edu/General/Internet/WWW/HTMLPrimer.html" >HTML Primer</a> -| <a href="http://kuhttp.cc.ukans.edu/lynx_help/HTML_quick.html" +| <a href="http://www.cc.ukans.edu/~acs/docs/other/HTML_quick.shtml" >HTML Quick Reference Guide</a> </ul> diff --git a/makefile.in b/makefile.in index 6a217647..e86e68aa 100644 --- a/makefile.in +++ b/makefile.in @@ -16,8 +16,6 @@ CFLAGS = @CFLAGS@ DEFS = @DEFS@ CPPFLAGS = @CPPFLAGS@ -AWK = @AWK@ - LIBS = @LIBS@ INSTALL = @INSTALL@ @@ -42,6 +40,9 @@ mandir= @mandir@/man1 ## Where you want the lynx.cfg file installed libdir= @libdir@ +## Where you want the doc-files installed +docdir= @libdir@/lynx_doc + ## Where you want the help-files installed helpdir= @libdir@/lynx_help @@ -129,11 +130,20 @@ SITE_DEFS = # Your defines here # defines which have configure options (see INSTALLATION, Section II-1c.): # -DARCHIVE_ONLY # -DDIRED_SUPPORT +# -DDISP_PARTIAL +# -DDONT_TRACK_INTERNAL_LINKS +# -DEXEC_LINKS +# -DEXEC_SCRIPTS # -DEXP_CHARTRANS_AUTOSWITCH +# -DEXP_FORMS_OPTIONS +# -DEXP_PERSISTENT_COOKIES # -DLINKEDSTYLES # -DLONG_LIST +# -DLYNXCGI_LINKS # -DLY_FIND_LEAKS +# -DNCURSES # -DNO_CHANGE_EXECUTE_PERMS +# -DNO_EXTENDED_HTMLDTD # -DNO_PARENT_DIR_REFERENCE # -DNSL_FORK # -DOK_GZIP @@ -142,17 +152,21 @@ SITE_DEFS = # Your defines here # -DOK_TAR # -DOK_UUDECODE # -DOK_ZIP +# -DSOCKS # -DSYSLOG_REQUESTED_URLS # -DUNDERLINE_LINKS # -DUSE_COLOR_STYLE +# -DUSE_DEFAULT_COLORS +# -DUSE_EXTERNALS # -DUSE_HASH # -DUSE_SLANG +# -DUSE_SOCKS5 # -DUSE_ZLIB # # for installation of local execution links, please see the file userdefs.h # TESTED: Linux FreeBSD SunOS Solaris IRIX CLIX HP-UX AIX SCO -all lynx$x: LYHelp.h +all lynx$x: cfg_defs.h LYHelp.h cd WWW/Library/unix && $(MAKE) CC="$(CC)" \ LY_CFLAGS="$(CFLAGS)" \ CPPFLAGS="$(CPPFLAGS)" \ @@ -181,9 +195,9 @@ clean: rm -f WWW/Library/*/*.[aob] rm -f WWW/Library/*/.created cd src && $(MAKE) clean - rm -f *.b src/lynx$x core Lynx.leaks LYHelp.h + rm -f *.b src/lynx$x core Lynx.leaks cfg_defs.h LYHelp.h -depend: LYHelp.h +depend: cfg_defs.h LYHelp.h cd WWW/Library/unix && $(MAKE) $@ cd src && $(MAKE) $@ @@ -229,9 +243,10 @@ save: compress: tar cd ..; rm -f $(lynxname).tar.Z; compress -f -v $(lynxname).tar -install: lynx$x install-bin install-man install-cfg @INSTALL_LSS@ install-log +install: lynx$x install-bin install-man install-cfg @INSTALL_LSS@ @echo @echo "Use $(MAKE) install-help to install the help-files" + @echo "Use $(MAKE) install-doc to install extra documentation files" @echo install-bin: $(bindir) @@ -241,6 +256,12 @@ install-bin: $(bindir) install-man : $(mandir) $(INSTALL_DATA) $(srcdir)/lynx.man $(mandir)/lynx.1 +install-doc : $(docdir) + @echo Copying sample files + (cd $(srcdir) && tar cf - C[HO]* PROBLEMS README samples test ) | \ + ( cd $(docdir) && tar xf - ) + -rm -f $(libdir)/lynx.tmp + install-help : $(helpdir) (cd $(helpdir) && rm -rf *) @echo Constructing sed-script @@ -269,10 +290,6 @@ install-help : $(helpdir) fi ; \ )' -rm -f $(helpdir)/help_files.sed - @echo Copying sample files - (cd $(srcdir) && tar cf - C[HO]* PROBLEMS README samples test ) | \ - ( cd $(helpdir) && tar xf - ) - -rm -f $(libdir)/lynx.tmp @echo Updating $(libdir)/lynx.cfg sh -c 'if test -f $(libdir)/lynx.cfg ; then \ mv $(libdir)/lynx.cfg $(libdir)/lynx.tmp ; \ @@ -309,6 +326,10 @@ LYHelp.h : LYHelp.hin @echo @echo '**********************************************' +cfg_defs.h : $(srcdir)/cfg_defs.sh + @rm -f $@ + sh $(srcdir)/cfg_defs.sh >$@ + install-cfg : $(libdir) -mv -f $(libdir)/lynx.cfg $(libdir)/lynx.oldcfg $(INSTALL_DATA) $(srcdir)/lynx.cfg $(libdir)/lynx.cfg @@ -317,18 +338,13 @@ install-lss : $(libdir) -mv -f $(libdir)/lynx.lss $(libdir)/lynx.oldlss $(INSTALL_DATA) $(srcdir)/samples/lynx.lss $(libdir)/lynx.lss -install-log : $(libdir) config.cache - -@sed -e '/^#/d' \ - -e 's/^.._cv_\(.*\)=.*=\(.*\)\}/\1=\2/g' \ - config.cache | \ - $(AWK) -F= '{printf "%-30s = %s\n",$$1,$$2}' |sort > $(libdir)/lynx_site.txt - uninstall: -rm -f $(bindir)/lynx$x -rm -f $(mandir)/lynx.1 -rm -f $(libdir)/lynx.cfg -rm -f $(libdir)/lynx.lss - -rm -rf $(libdir)/lynx_help + -rm -rf $(helpdir) + -rm -rf $(docdir) -$(bindir) $(mandir) $(libdir) $(helpdir) : +$(bindir) $(mandir) $(libdir) $(helpdir) $(docdir) : $(srcdir)/mkdirs.sh $@ diff --git a/samples/lynx-keymaps b/samples/lynx-keymaps index f3847931..311aa8bc 100644 --- a/samples/lynx-keymaps +++ b/samples/lynx-keymaps @@ -1,4 +1,7 @@ -# This is a sample key sequence definition file. +# This is a sample key sequence definition file. It is used by Lynx when built +# with ncurses or slang, to augment the definitions from your terminal's +# termcap or terminfo description. + # Lines that start with a '#' are comment lines. Blank lines are ignored. # The 'setkey' function may be used in two ways: @@ -80,3 +83,21 @@ setkey "^[[K" END # setkey "^[<" HOME setkey "^[>" END +# +# Other special escapes: +# \a bell +# \b backspace +# \f form-feed +# \n newline (line-feed) +# \r carriage-return +# \t tab +# \v vertical tab +# \<number> octal number, up to 3 digits, e.g., "\033". +# \d<number> decimal number, up to 3 digits, e.g., "\d99" +# \x<number> hexidecimal number, up to 2 digits, e.g., "\xFF" +# +# For Unix-systems (which have termcap or terminfo) you may also use symbols +# that refer to the termcap/terminfo, by referencing the name bracketed by +# "^(" and ")", e.g., +setkey "^(cuu1)" UPARROW +setkey "^(up)" UPARROW diff --git a/src/AttrList.h b/src/AttrList.h index cacb02e4..b58456ff 100644 --- a/src/AttrList.h +++ b/src/AttrList.h @@ -56,7 +56,7 @@ typedef struct _linkedlist { } linked_list; #endif -#define HText_characterStyle if(TRACE)fprintf(stderr,"HTC called from %s/%d\n",__FILE__,__LINE__);_internal_HTC +#define HText_characterStyle CTRACE(tfp,"HTC called from %s/%d\n",__FILE__,__LINE__);_internal_HTC #undef HText_characterStyle #define HText_characterStyle _internal_HTC diff --git a/src/GridText.c b/src/GridText.c index 5d7d2e0f..be443759 100644 --- a/src/GridText.c +++ b/src/GridText.c @@ -3200,7 +3200,6 @@ PRIVATE void remove_special_attr_chars ARGS1( PUBLIC void HText_endAppend ARGS1( HText *, text) { - int cur_line, cur_char, cur_shift; HTLine *line_ptr; if (!text) @@ -3227,9 +3226,6 @@ PUBLIC void HText_endAppend ARGS1( * Get the first line. */ line_ptr = text->last_line->next; - cur_char = line_ptr->size; - cur_line = 0; - cur_shift = 0; /* * Remove the blank lines at the end of document. @@ -3256,9 +3252,10 @@ PUBLIC void HText_endAppend ARGS1( * Fix up the anchor structure values and * create the hightext strings. - FM */ - HText_trimHightext(HTMainText, FALSE); + HText_trimHightext(text, FALSE); } + /* ** This function gets the hightext from the text by finding the char ** position, and brings the anchors in line with the text by adding the text @@ -4071,15 +4068,19 @@ PUBLIC void HText_pageDisplay ARGS2( CTRACE(tfp, "GridText: HText_pageDisplay at line %d started\n", line_num); #ifdef DISP_PARTIAL - if (display_partial && !debug_display_partial) + if (display_partial && detected_forms_input_partial) { /* ** Garbage is reported from forms input fields in incremental mode. ** So we start HText_trimHightext() to forget this side effect. ** This function was split-out from HText_endAppend(). ** It may not be the best solution but it works. - LP ** (TRUE = to disable annoying repeated trace messages) + ** + ** Side effect is reported from multiply call of HText_trimHightext. */ HText_trimHightext(HTMainText, TRUE); + } + detected_forms_input_partial = FALSE; #endif display_page(HTMainText, line_num-1, target); @@ -6343,6 +6344,11 @@ PUBLIC int HText_beginInput ARGS3( CTRACE(tfp,"Entering HText_beginInput\n"); +#ifdef DISP_PARTIAL + if (display_partial) + detected_forms_input_partial = TRUE; /* trimHightext temp fix */ +#endif + if (a == NULL || f == NULL) outofmem(__FILE__, "HText_beginInput"); @@ -7043,16 +7049,10 @@ PUBLIC void HText_SubmitForm ARGS4( HTMainText->node_anchor->charset && *HTMainText->node_anchor->charset) { target_cs = UCGetLYhndl_byMIME(HTMainText->node_anchor->charset); - if (target_cs >= 0) { - target_csname = HTMainText->node_anchor->charset; - } else { - target_cs = UCLYhndl_for_unspec; - if (target_cs >= 0) - target_csname = LYCharSet_UC[target_cs].MIMEname; + if (target_cs < 0) { + target_cs = UCLYhndl_for_unspec; /* always >= 0 */ } - } - if (target_cs < 0) { - target_cs = UCLYhndl_for_unspec; + target_csname = LYCharSet_UC[target_cs].MIMEname; } /* diff --git a/src/HTInit.c b/src/HTInit.c index aac98355..9e6eccf1 100644 --- a/src/HTInit.c +++ b/src/HTInit.c @@ -160,13 +160,8 @@ PUBLIC void HTFormatInit NOARGS /* These should override everything else. */ HTLoadTypesConfigFile(personal_type_map); } else { - char buffer[256]; -#ifdef VMS - sprintf(buffer, "sys$login:%s", personal_type_map); -#else - sprintf(buffer, "%s/%s", (Home_Dir() ? Home_Dir() : ""), - personal_type_map); -#endif + char buffer[LY_MAXPATH]; + LYAddPathToHome(buffer, sizeof(buffer), personal_type_map); HTLoadTypesConfigFile(buffer); } @@ -227,7 +222,6 @@ PRIVATE int ExitWithError PARAMS((char *txt)); PRIVATE int PassesTest PARAMS((struct MailcapEntry *mc)); #define LINE_BUF_SIZE 2048 -#define TMPFILE_NAME_SIZE 256 PRIVATE char *GetCommand ARGS2( char *, s, @@ -482,7 +476,7 @@ PRIVATE int PassesTest ARGS1( struct MailcapEntry *, mc) { int result; - char *cmd, TmpFileName[TMPFILE_NAME_SIZE]; + char *cmd, TmpFileName[LY_MAXPATH]; /* * Make sure we have a command @@ -852,13 +846,8 @@ PUBLIC void HTFileInit NOARGS /* These should override everything else. */ HTLoadExtensionsConfigFile(personal_extension_map); } else { - char buffer[256]; -#ifdef VMS - sprintf(buffer, "sys$login:%s", personal_extension_map); -#else - sprintf(buffer, "%s/%s", (Home_Dir() ? Home_Dir() : ""), - personal_extension_map); -#endif /* VMS */ + char buffer[LY_MAXPATH]; + LYAddPathToHome(buffer, sizeof(buffer), personal_extension_map); /* These should override everything else. */ HTLoadExtensionsConfigFile(buffer); } diff --git a/src/HTML.c b/src/HTML.c index ac10f00e..c54761d6 100644 --- a/src/HTML.c +++ b/src/HTML.c @@ -113,8 +113,9 @@ PRIVATE void change_paragraph_style PARAMS((HTStructured * me, #define VERBOSE_IMG(value,src_type,string) \ ((verbose_img) ? (newtitle = MakeNewTitle(value,src_type)): string) -PRIVATE char * MakeNewTitle PARAMS((CONST char ** value, int src_type)); -PRIVATE char * MakeNewImageValue PARAMS((CONST char ** value)); +PRIVATE char* MakeNewTitle PARAMS((CONST char ** value, int src_type)); +PRIVATE char* MakeNewImageValue PARAMS((CONST char ** value)); +PRIVATE char* MakeNewMapValue PARAMS((const char ** value, const char* mapstr)); /* Set an internal flag that the next call to a stack-affecting method ** is only internal and the stack manipulation should be skipped. - kw @@ -636,7 +637,7 @@ PRIVATE void HTML_start_element ARGS6( char *I_value = NULL; char *I_name = NULL; char *temp = NULL; - int dest_char_set = -1; + int dest_char_set = UCLYhndl_for_unrec; HTParentAnchor *dest = NULL; /* An anchor's destination */ BOOL dest_ismap = FALSE; /* Is dest an image map script? */ BOOL UseBASE = TRUE; /* Resoved vs. BASE if present? */ @@ -1096,12 +1097,13 @@ PRIVATE void HTML_start_element ARGS6( dest_char_set = UCGetLYhndl_byMIME(value[HTML_LINK_CHARSET]); if (dest_char_set < 0) dest_char_set = UCLYhndl_for_unrec; + if (dest_char_set < 0) /* recover if not defined :-( */ + dest_char_set = UCLYhndl_for_unspec; /* always >= 0 */ } - if (dest && dest_char_set >= 0) + if (dest) HTAnchor_setUCInfoStage(dest, dest_char_set, UCT_STAGE_PARSER, UCT_SETBY_LINK); - dest_char_set = -1; } UPDATE_STYLE; if (!HText_hasToolbar(me->text) && @@ -2532,6 +2534,8 @@ PRIVATE void HTML_start_element ARGS6( dest_char_set = UCGetLYhndl_byMIME(temp); if (dest_char_set < 0) { dest_char_set = UCLYhndl_for_unrec; + if (dest_char_set < 0) /* recover if not defined :-( */ + dest_char_set = UCLYhndl_for_unspec; /* always >= 0 */ } } if (title != NULL || dest_ismap == TRUE || dest_char_set >= 0) { @@ -2543,7 +2547,7 @@ PRIVATE void HTML_start_element ARGS6( HTAnchor_setTitle(dest, title); if (dest && dest_ismap) dest->isISMAPScript = TRUE; - if (dest && dest_char_set >= 0) { + if (dest) { /* ** Load the anchor's chartrans structures. ** This should be done more intelligently @@ -2560,7 +2564,6 @@ PRIVATE void HTML_start_element ARGS6( FREE(temp); dest = NULL; dest_ismap = FALSE; - dest_char_set = -1; FREE(title); } me->CurrentANum = HText_beginAnchor(me->text, @@ -2732,11 +2735,11 @@ PRIVATE void HTML_start_element ARGS6( LYTrimTail(alt_string); if (*alt_string == '\0') { if (map_href) { - StrAllocCopy(alt_string, (title ? - title : "[USEMAP]")); + StrAllocCopy(alt_string, (title ? title : + MakeNewMapValue(value,"USEMAP"))); } else if (dest_ismap) { - StrAllocCopy(alt_string, (title ? - title : "[ISMAP]")); + StrAllocCopy(alt_string, (title ? title : + MakeNewMapValue(value,"ISMAP"))); } else if (me->inA == TRUE && dest) { StrAllocCopy(alt_string, (title ? @@ -2755,13 +2758,13 @@ PRIVATE void HTML_start_element ARGS6( } } else if (map_href) { - StrAllocCopy(alt_string, (title ? - title : "[USEMAP]")); + StrAllocCopy(alt_string, (title ? title : + MakeNewMapValue(value,"USEMAP"))); } else if ((dest_ismap == TRUE) || (me->inA && present && present[HTML_IMG_ISMAP])) { - StrAllocCopy(alt_string, (title ? - title : "[ISMAP]")); + StrAllocCopy(alt_string, (title ? title : + MakeNewMapValue(value,"ISMAP"))); } else if (me->inA == TRUE && dest) { StrAllocCopy(alt_string, (title ? @@ -2780,7 +2783,7 @@ PRIVATE void HTML_start_element ARGS6( title : "")); } if (*alt_string == '\0' && map_href) { - StrAllocCopy(alt_string, "[USEMAP]"); + StrAllocCopy(alt_string, MakeNewMapValue(value,"USEMAP")); } CTRACE(tfp, "HTML IMG: USEMAP=%d ISMAP=%d ANCHOR=%d PARA=%d\n", @@ -2842,7 +2845,7 @@ PRIVATE void HTML_start_element ARGS6( if (dest_ismap) { HTML_put_character(me, ' '); me->in_word = NO; - HTML_put_string(me, "[ISMAP]"); + HTML_put_string(me, MakeNewMapValue(value,"ISMAP")); } else if (dest) { HTML_put_character(me, ' '); me->in_word = NO; @@ -3010,7 +3013,7 @@ PRIVATE void HTML_start_element ARGS6( if (dest_ismap) { HTML_put_character(me, ' ');/* space char may be ignored */ me->in_word = NO; - HTML_put_string(me, "[ISMAP]"); + HTML_put_string(me, MakeNewMapValue(value,"ISMAP")); } else if (dest) { HTML_put_character(me, ' ');/* space char may be ignored */ me->in_word = NO; @@ -7447,7 +7450,6 @@ PUBLIC int HTLoadError ARGS3( return -number; } - PRIVATE char * MakeNewTitle ARGS2(CONST char **, value, int, src_type) { char *ptr; @@ -7463,6 +7465,7 @@ PRIVATE char * MakeNewTitle ARGS2(CONST char **, value, int, src_type) StrAllocCat(newtitle, "]"); return newtitle; } + PRIVATE char * MakeNewImageValue ARGS1(CONST char **, value) { char *ptr; @@ -7478,3 +7481,23 @@ PRIVATE char * MakeNewImageValue ARGS1(CONST char **, value) StrAllocCat(newtitle, "]-Submit"); return newtitle; } + +PRIVATE char * MakeNewMapValue ARGS2(const char **, value, const char*, mapstr) +{ + char *ptr; + char *newtitle = NULL; + + StrAllocCopy(newtitle, "["); + StrAllocCat(newtitle,mapstr); /* ISMAP or USEMAP */ + if ( verbose_img ) { + StrAllocCat(newtitle,":"); + ptr = strrchr(value[HTML_IMG_SRC], '/'); + if (!ptr) { + StrAllocCat(newtitle, value[HTML_IMG_SRC]); + } else { + StrAllocCat(newtitle, ptr + 1); + } + } + StrAllocCat(newtitle, "]"); + return newtitle; +} diff --git a/src/LYCharSets.c b/src/LYCharSets.c index 415d1584..5858b4e1 100644 --- a/src/LYCharSets.c +++ b/src/LYCharSets.c @@ -25,7 +25,11 @@ PUBLIC BOOLEAN LYHaveCJKCharacterSet = FALSE; PUBLIC BOOLEAN DisplayCharsetMatchLocale = TRUE; extern void UCInit NOARGS; extern int UCInitialized; -PUBLIC int LYNumCharsets = 0; /* Will be initialized later by UC_Register. */ +PUBLIC int LYNumCharsets = 0; /* Will be initialized later by UC_Register. */ +PUBLIC int current_char_set = -1; /* will be intitialized later in LYMain.c */ +PUBLIC CONST char** p_entity_values = NULL; /* Pointer, for HTML_put_entity()*/ + /* obsolete and probably not used(???) */ + /* will be initialized in HTMLUseCharacterSet */ /* * INSTRUCTIONS for adding new character sets which do not have @@ -451,15 +455,6 @@ PUBLIC int LYlowest_eightbit[MAXCHARSETS]={ 128 /* Transparent (???) */ }; -/* - * The default character set. - * -------------------------- - * Use lynx.cfg and/or user - * 'o'ptions (.lynxrc) to - * set a different default. - */ -PUBLIC CONST char** p_entity_values = ISO_Latin1; /* Pointer to translation */ -PUBLIC int current_char_set = 0; /* Index for translation */ /* * Function to set the handling of selected character sets @@ -467,12 +462,9 @@ PUBLIC int current_char_set = 0; /* Index for translation */ */ PUBLIC void HTMLSetCharacterHandling ARGS1(int,i) { - int chndl = -2; - if (LYCharSet_UC[i].enc != UCT_ENC_CJK) { - chndl = UCGetLYhndl_byMIME("iso-8859-1"); + int chndl = safeUCGetLYhndl_byMIME(UCAssume_MIMEcharset); - if (UCAssume_MIMEcharset) - chndl = UCGetLYhndl_byMIME(UCAssume_MIMEcharset); + if (LYCharSet_UC[i].enc != UCT_ENC_CJK) { HTCJK = NOCJK; kanji_code = NOKANJI; @@ -480,7 +472,7 @@ PUBLIC void HTMLSetCharacterHandling ARGS1(int,i) ((LYCharSet_UC[i].codepoints & UCT_CP_SUPERSETOF_LAT1) || (LYCharSet_UC[i].like8859 & UCT_R_HIGH8BIT)); - if (i == (chndl < 0 ? 0 : chndl)) { + if (i == chndl) { LYRawMode = LYUseDefaultRawMode ? TRUE : FALSE; } else { LYRawMode = LYUseDefaultRawMode ? FALSE : TRUE; @@ -498,76 +490,72 @@ PUBLIC void HTMLSetCharacterHandling ARGS1(int,i) HTPassHighCtrlNum = FALSE; - } else if (!strncmp(LYchar_set_names[i], "Chinese", 7)) { - HTCJK = LYUseDefaultRawMode ? CHINESE : NOCJK; - LYRawMode = (HTCJK != NOCJK) ? TRUE : FALSE; - kanji_code = EUC; - HTPassEightBitRaw = FALSE; - HTPassEightBitNum = FALSE; - HTPassHighCtrlRaw = (HTCJK != NOCJK) ? TRUE : FALSE; - HTPassHighCtrlNum = FALSE; - - } else if (!strncmp(LYchar_set_names[i], "Japanese (EUC-JP)", 17)) { - HTCJK = LYUseDefaultRawMode ? JAPANESE : NOCJK; - LYRawMode = (HTCJK != NOCJK) ? TRUE : FALSE; - kanji_code = EUC; - HTPassEightBitRaw = FALSE; - HTPassEightBitNum = FALSE; - HTPassHighCtrlRaw = (HTCJK != NOCJK) ? TRUE : FALSE; - HTPassHighCtrlNum = FALSE; - - } else if (!strncmp(LYchar_set_names[i], "Japanese (Shift_JIS)", 20)) { - HTCJK = LYUseDefaultRawMode ? JAPANESE : NOCJK; - LYRawMode = (HTCJK != NOCJK) ? TRUE : FALSE; - kanji_code = SJIS; - HTPassEightBitRaw = FALSE; - HTPassEightBitNum = FALSE; - HTPassHighCtrlRaw = (HTCJK != NOCJK) ? TRUE : FALSE; - HTPassHighCtrlNum = FALSE; - - } else if (!strncmp(LYchar_set_names[i], "Korean", 6)) { - HTCJK = LYUseDefaultRawMode ? KOREAN : NOCJK; - LYRawMode = (HTCJK != NOCJK) ? TRUE : FALSE; - kanji_code = EUC; - HTPassEightBitRaw = FALSE; - HTPassEightBitNum = FALSE; - HTPassHighCtrlRaw = (HTCJK != NOCJK) ? TRUE : FALSE; - HTPassHighCtrlNum = FALSE; + } else { /* CJK encoding: */ + CONST char *mime = LYCharSet_UC[i].MIMEname; - } else if (!strncmp(LYchar_set_names[i], "Taipei (Big5)", 13)) { - HTCJK = LYUseDefaultRawMode ? TAIPEI : NOCJK; - LYRawMode = (HTCJK != NOCJK) ? TRUE : FALSE; - kanji_code = EUC; - HTPassEightBitRaw = FALSE; - HTPassEightBitNum = FALSE; - HTPassHighCtrlRaw = (HTCJK != NOCJK) ? TRUE : FALSE; - HTPassHighCtrlNum = FALSE; + if (!strcmp(mime, "euc-cn")) { + HTCJK = LYUseDefaultRawMode ? CHINESE : NOCJK; + LYRawMode = (HTCJK != NOCJK) ? TRUE : FALSE; + kanji_code = EUC; + HTPassEightBitRaw = FALSE; + HTPassEightBitNum = FALSE; + HTPassHighCtrlRaw = (HTCJK != NOCJK) ? TRUE : FALSE; + HTPassHighCtrlNum = FALSE; + + } else if (!strcmp(mime, "euc-jp")) { + HTCJK = LYUseDefaultRawMode ? JAPANESE : NOCJK; + LYRawMode = (HTCJK != NOCJK) ? TRUE : FALSE; + kanji_code = EUC; + HTPassEightBitRaw = FALSE; + HTPassEightBitNum = FALSE; + HTPassHighCtrlRaw = (HTCJK != NOCJK) ? TRUE : FALSE; + HTPassHighCtrlNum = FALSE; + + } else if (!strcmp(mime, "shift_jis")) { + HTCJK = LYUseDefaultRawMode ? JAPANESE : NOCJK; + LYRawMode = (HTCJK != NOCJK) ? TRUE : FALSE; + kanji_code = SJIS; + HTPassEightBitRaw = FALSE; + HTPassEightBitNum = FALSE; + HTPassHighCtrlRaw = (HTCJK != NOCJK) ? TRUE : FALSE; + HTPassHighCtrlNum = FALSE; + + } else if (!strcmp(mime, "euc-kr")) { + HTCJK = LYUseDefaultRawMode ? KOREAN : NOCJK; + LYRawMode = (HTCJK != NOCJK) ? TRUE : FALSE; + kanji_code = EUC; + HTPassEightBitRaw = FALSE; + HTPassEightBitNum = FALSE; + HTPassHighCtrlRaw = (HTCJK != NOCJK) ? TRUE : FALSE; + HTPassHighCtrlNum = FALSE; + + } else if (!strcmp(mime, "big5")) { + HTCJK = LYUseDefaultRawMode ? TAIPEI : NOCJK; + LYRawMode = (HTCJK != NOCJK) ? TRUE : FALSE; + kanji_code = EUC; + HTPassEightBitRaw = FALSE; + HTPassEightBitNum = FALSE; + HTPassHighCtrlRaw = (HTCJK != NOCJK) ? TRUE : FALSE; + HTPassHighCtrlNum = FALSE; - } else { - HTCJK = NOCJK; - kanji_code = NOKANJI; - HTPassEightBitRaw = LYUseDefaultRawMode ? FALSE : TRUE; - LYRawMode = HTPassEightBitRaw; - HTPassEightBitNum = FALSE; - HTPassHighCtrlRaw = FALSE; - HTPassHighCtrlNum = FALSE; + } } + /* + * Comment for coding below: + * UCLYhndl_for_unspec is "current" state with LYRawMode, + * but UCAssume_MIMEcharset is independent from LYRawMode: + * holds the history and may be changed from 'O'ptions menu only. - LP + */ if (LYRawMode) { - UCLYhndl_for_unspec = i; + UCLYhndl_for_unspec = i; /* UCAssume_MIMEcharset not changed! */ } else { - if (chndl == -2) { - chndl = UCGetLYhndl_byMIME("iso-8859-1"); - - if (UCAssume_MIMEcharset) - chndl = UCGetLYhndl_byMIME(UCAssume_MIMEcharset); - } - if (chndl != i && chndl >= 0 && + if (chndl != i && (LYCharSet_UC[i].enc != UCT_ENC_CJK || LYCharSet_UC[chndl].enc != UCT_ENC_CJK)) { - UCLYhndl_for_unspec = chndl; + UCLYhndl_for_unspec = chndl; /* fall to UCAssume_MIMEcharset */ } else { - UCLYhndl_for_unspec = UCGetLYhndl_byMIME("iso-8859-1"); + UCLYhndl_for_unspec = LATIN1; /* UCAssume_MIMEcharset not changed! */ } } @@ -588,21 +576,42 @@ PUBLIC void HTMLSetCharacterHandling ARGS1(int,i) } /* - * Function to set the LYDefaultRawMode value - * based on the selected character set. - FM + * Function to set HTCJK based on "in" and "out" charsets. */ -PUBLIC void HTMLSetRawModeDefault ARGS1(int,i) +PUBLIC void Set_HTCJK ARGS2( + CONST char *, inMIMEname, + CONST char *, outMIMEname) { - if (!strncmp(LYchar_set_names[i], "Western (ISO-8859-1)", 20) || - !strncmp(LYchar_set_names[i], "Chinese", 7) || - !strncmp(LYchar_set_names[i], "Japanese (EUC-JP)", 17) || - !strncmp(LYchar_set_names[i], "Japanese (Shift_JIS)", 20) || - !strncmp(LYchar_set_names[i], "Korean", 6) || - !strncmp(LYchar_set_names[i], "Taipei (Big5)", 13)) { - LYDefaultRawMode = TRUE; + if (LYRawMode) { + if ((!strcmp(inMIMEname, "euc-jp") || + !strcmp(inMIMEname, "shift_jis")) && + (!strcmp(outMIMEname, "euc-jp") || + !strcmp(outMIMEname, "shift_jis"))) { + HTCJK = JAPANESE; + } else if (!strcmp(inMIMEname, "euc-cn") && + !strcmp(outMIMEname, "euc-cn")) { + HTCJK = CHINESE; + } else if (!strcmp(inMIMEname, "big5") && + !strcmp(outMIMEname, "big5")) { + HTCJK = TAIPEI; + } else if (!strcmp(inMIMEname, "euc-kr") && + !strcmp(outMIMEname, "euc-kr")) { + HTCJK = KOREAN; + } else { + HTCJK = NOCJK; + } } else { - LYDefaultRawMode = FALSE; + HTCJK = NOCJK; } +} + +/* + * Function to set the LYDefaultRawMode value + * based on the selected character set. - FM + */ +PRIVATE void HTMLSetRawModeDefault ARGS1(int,i) +{ + LYDefaultRawMode = (LYCharSet_UC[i].enc == UCT_ENC_CJK); return; } @@ -616,32 +625,15 @@ PUBLIC void HTMLSetUseDefaultRawMode ARGS2( BOOLEAN, modeflag) { if (LYCharSet_UC[i].enc != UCT_ENC_CJK) { - int chndl = UCGetLYhndl_byMIME("iso-8859-1"); - if (UCAssume_MIMEcharset) - chndl = UCGetLYhndl_byMIME(UCAssume_MIMEcharset); + int chndl = safeUCGetLYhndl_byMIME(UCAssume_MIMEcharset); if (i == chndl) LYUseDefaultRawMode = modeflag; else LYUseDefaultRawMode = (!modeflag); - } else if (!strncmp(LYchar_set_names[i], "Western (ISO-8859-1)", 20) || - !strncmp(LYchar_set_names[i], "Chinese", 7) || - !strncmp(LYchar_set_names[i], "Japanese (EUC-JP)", 17) || - !strncmp(LYchar_set_names[i], "Japanese (Shift_JIS)", 20) || - !strncmp(LYchar_set_names[i], "Korean", 6) || - !strncmp(LYchar_set_names[i], "Taipei (Big5)", 13)) { - if (modeflag == TRUE) { - LYUseDefaultRawMode = TRUE; - } else { - LYUseDefaultRawMode = FALSE; - } - } else { - if (modeflag == FALSE) { - LYUseDefaultRawMode = TRUE; - } else { - LYUseDefaultRawMode = FALSE; - } - } + } else /* CJK encoding: */ + LYUseDefaultRawMode = modeflag; + return; } @@ -649,17 +641,9 @@ PUBLIC void HTMLSetUseDefaultRawMode ARGS2( * Function to set the LYHaveCJKCharacterSet value * based on the selected character set. - FM */ -PUBLIC void HTMLSetHaveCJKCharacterSet ARGS1(int,i) +PRIVATE void HTMLSetHaveCJKCharacterSet ARGS1(int,i) { - if (!strncmp(LYchar_set_names[i], "Chinese", 7) || - !strncmp(LYchar_set_names[i], "Japanese (EUC-JP)", 17) || - !strncmp(LYchar_set_names[i], "Japanese (Shift_JIS)", 20) || - !strncmp(LYchar_set_names[i], "Korean", 6) || - !strncmp(LYchar_set_names[i], "Taipei (Big5)", 13)) { - LYHaveCJKCharacterSet = TRUE; - } else { - LYHaveCJKCharacterSet = FALSE; - } + LYHaveCJKCharacterSet = (LYCharSet_UC[i].enc == UCT_ENC_CJK); return; } @@ -671,6 +655,8 @@ PUBLIC void HTMLSetHaveCJKCharacterSet ARGS1(int,i) */ PRIVATE void HTMLSetDisplayCharsetMatchLocale ARGS1(int,i) { + BOOLEAN match; + if (LYHaveCJKCharacterSet) { /* ** We have no intention to pass CJK via UCTransChar if that happened. @@ -686,22 +672,23 @@ PRIVATE void HTMLSetDisplayCharsetMatchLocale ARGS1(int,i) ** rarely matches locale. (In fact, MS Windows codepoints locale are ** never seen on UNIX). */ - DisplayCharsetMatchLocale = FALSE; + match = FALSE; } else { - DisplayCharsetMatchLocale = TRUE; /* guess, but see below */ + match = TRUE; /* guess, but see below */ #if !defined(LOCALE) - DisplayCharsetMatchLocale = FALSE; + match = FALSE; #else if (UCForce8bitTOUPPER) { /* ** Force disable locale (from lynx.cfg) */ - DisplayCharsetMatchLocale = FALSE; + match = FALSE; } #endif } + DisplayCharsetMatchLocale = match; return; } @@ -880,8 +867,9 @@ PUBLIC UCode_t HTMLGetEntityUCValue ARGS1( * Function to select a character set and then set the * character handling and LYHaveCJKCharacterSet flag. - FM */ -PUBLIC void HTMLUseCharacterSet ARGS1(int,i) +PUBLIC void HTMLUseCharacterSet ARGS1(int, i) { + HTMLSetRawModeDefault(i); p_entity_values = LYCharSets[i]; HTMLSetCharacterHandling(i); /* set LYRawMode and CJK attributes */ HTMLSetHaveCJKCharacterSet(i); @@ -897,17 +885,5 @@ PUBLIC int LYCharSetsDeclared NOPARAMS { UCInit(); - if (UCAssume_MIMEcharset && *UCAssume_MIMEcharset) { - UCLYhndl_for_unspec = UCGetLYhndl_byMIME(UCAssume_MIMEcharset); - } else { - UCLYhndl_for_unspec = UCGetLYhndl_byMIME("iso-8859-1"); - } - if (UCAssume_localMIMEcharset && *UCAssume_localMIMEcharset) - UCLYhndl_HTFile_for_unspec = - UCGetLYhndl_byMIME(UCAssume_localMIMEcharset); - if (UCAssume_unrecMIMEcharset && *UCAssume_unrecMIMEcharset) - UCLYhndl_for_unrec = - UCGetLYhndl_byMIME(UCAssume_unrecMIMEcharset); - return UCInitialized; } diff --git a/src/LYCharSets.h b/src/LYCharSets.h index 746f84c2..33c6ef76 100644 --- a/src/LYCharSets.h +++ b/src/LYCharSets.h @@ -9,7 +9,7 @@ #endif /* !UCMAP_H */ extern BOOLEAN LYHaveCJKCharacterSet; -extern BOOLEAN DisplayCharsetMatchLocale; +extern BOOLEAN DisplayCharsetMatchLocale; /* * LYchar_set_name[current_char_set] points to the currently active set. @@ -31,11 +31,10 @@ extern int LYlowest_eightbit[]; extern int LYNumCharsets; extern LYUCcharset LYCharSet_UC[]; extern void HTMLSetCharacterHandling PARAMS((int i)); -extern void HTMLSetRawModeDefault PARAMS((int i)); extern void HTMLSetUseDefaultRawMode PARAMS((int i, BOOLEAN modeflag)); -extern void HTMLSetHaveCJKCharacterSet PARAMS((int i)); extern void HTMLUseCharacterSet PARAMS((int i)); extern UCode_t HTMLGetEntityUCValue PARAMS((CONST char *name)); +extern void Set_HTCJK PARAMS((CONST char *inMIMEname, CONST char *outMIMEname)); extern CONST char * LYEntityNames[]; extern CONST char * HTMLGetEntityName PARAMS((UCode_t code)); diff --git a/src/LYCharUtils.c b/src/LYCharUtils.c index cc53b72f..8dda30ef 100644 --- a/src/LYCharUtils.c +++ b/src/LYCharUtils.c @@ -2517,7 +2517,7 @@ PUBLIC void LYHandleMETA ARGS4( HTStructured *, me, CONST BOOL*, present, CONST char **, value, - char **, include) + char **, include GCC_UNUSED) { char *http_equiv = NULL, *name = NULL, *content = NULL; char *href = NULL, *id_string = NULL, *temp = NULL; @@ -2708,6 +2708,7 @@ PUBLIC void LYHandleMETA ARGS4( } else if (!(me->node_anchor->charset && *me->node_anchor->charset) && !strcasecomp((http_equiv ? http_equiv : ""), "Content-Type")) { LYUCcharset * p_in = NULL; + LYUCcharset * p_out = NULL; LYUCFullyTranslateString(&content, me->tag_charset, me->tag_charset, NO, NO, YES, st_other); LYTrimHead(content); @@ -2745,6 +2746,8 @@ PUBLIC void LYHandleMETA ARGS4( * Got something but we don't recognize it. */ chndl = UCLYhndl_for_unrec; + if (chndl < 0) /* UCLYhndl_for_unrec not defined :-( */ + chndl = UCLYhndl_for_unspec; /* always >= 0 */ if (UCCanTranslateFromTo(chndl, current_char_set)) { chartrans_ok = YES; HTAnchor_setUCInfoStage(me->node_anchor, chndl, @@ -2753,13 +2756,12 @@ PUBLIC void LYHandleMETA ARGS4( } } if (chartrans_ok) { - LYUCcharset * p_out = - HTAnchor_setUCInfoStage(me->node_anchor, - current_char_set, - UCT_STAGE_HTEXT, - UCT_SETBY_DEFAULT); p_in = HTAnchor_getUCInfoStage(me->node_anchor, UCT_STAGE_PARSER); + p_out = HTAnchor_setUCInfoStage(me->node_anchor, + current_char_set, + UCT_STAGE_HTEXT, + UCT_SETBY_DEFAULT); if (!p_out) { /* * Try again. @@ -2791,37 +2793,30 @@ PUBLIC void LYHandleMETA ARGS4( HTPassEightBitRaw = TRUE; } } else if (p_out->enc == UCT_ENC_CJK) { - if (LYRawMode) { - if ((!strcmp(p_in->MIMEname, "euc-jp") || - !strcmp(p_in->MIMEname, "shift_jis")) && - (!strcmp(p_out->MIMEname, "euc-jp") || - !strcmp(p_out->MIMEname, "shift_jis"))) { - HTCJK = JAPANESE; - } else if (!strcmp(p_in->MIMEname, "euc-cn") && - !strcmp(p_out->MIMEname, "euc-cn")) { - HTCJK = CHINESE; - } else if (!strcmp(p_in->MIMEname, "big5") && - !strcmp(p_out->MIMEname, "big5")) { - HTCJK = TAIPEI; - } else if (!strcmp(p_in->MIMEname, "euc-kr") && - !strcmp(p_out->MIMEname, "euc-kr")) { - HTCJK = KOREAN; - } else { - HTCJK = NOCJK; - } - } else { - HTCJK = NOCJK; - } + Set_HTCJK(p_in->MIMEname, p_out->MIMEname); } LYGetChartransInfo(me); - /* - * Fall through to old behavior. - */ - } else if (!strncmp(cp1, "us-ascii", 8) || - !strncmp(cp1, "iso-8859-1", 10)) { - StrAllocCopy(me->node_anchor->charset, "iso-8859-1"); - HTCJK = NOCJK; - + /* + ** Update the chartrans info homologously to + ** a Content-Type MIME header with a charset + ** parameter. - FM + */ + if (me->UCLYhndl != chndl) { + HTAnchor_setUCInfoStage(me->node_anchor, chndl, + UCT_STAGE_MIME, + UCT_SETBY_STRUCTURED); + HTAnchor_setUCInfoStage(me->node_anchor, chndl, + UCT_STAGE_PARSER, + UCT_SETBY_STRUCTURED); + me->inUCLYhndl = HTAnchor_getUCLYhndl(me->node_anchor, + UCT_STAGE_PARSER); + me->inUCI = HTAnchor_getUCInfoStage(me->node_anchor, + UCT_STAGE_PARSER); + } + UCSetTransParams(&me->T, + me->inUCLYhndl, me->inUCI, + me->outUCLYhndl, me->outUCI); + } else { /* * Hope it's a match, for now. - FM */ @@ -2834,41 +2829,6 @@ PUBLIC void LYHandleMETA ARGS4( HTPassEightBitRaw = TRUE; HTAlert(me->node_anchor->charset); - } else if (!strncmp(cp1, "euc-jp", 6) && HTCJK == JAPANESE) { - StrAllocCopy(me->node_anchor->charset, "euc-jp"); - - } else if (!strncmp(cp1, "shift_jis", 9) && HTCJK == JAPANESE) { - StrAllocCopy(me->node_anchor->charset, "shift_jis"); - - } else if (!strncmp(cp1, "iso-2022-jp", 11) && - HTCJK == JAPANESE) { - StrAllocCopy(me->node_anchor->charset, "iso-2022-jp"); - - } else if (!strncmp(cp1, "iso-2022-jp-2", 13) && - HTCJK == JAPANESE) { - StrAllocCopy(me->node_anchor->charset, "iso-2022-jp-2"); - - } else if (!strncmp(cp1, "euc-kr", 6) && HTCJK == KOREAN) { - StrAllocCopy(me->node_anchor->charset, "euc-kr"); - - } else if (!strncmp(cp1, "iso-2022-kr", 11) && HTCJK == KOREAN) { - StrAllocCopy(me->node_anchor->charset, "iso-2022-kr"); - - } else if ((!strncmp(cp1, "big5", 4) || - !strncmp(cp1, "cn-big5", 7)) && - HTCJK == TAIPEI) { - StrAllocCopy(me->node_anchor->charset, "big5"); - - } else if (!strncmp(cp1, "euc-cn", 6) && HTCJK == CHINESE) { - StrAllocCopy(me->node_anchor->charset, "euc-cn"); - - } else if ((!strncmp(cp1, "gb2312", 6) || - !strncmp(cp1, "cn-gb", 5)) && - HTCJK == CHINESE) { - StrAllocCopy(me->node_anchor->charset, "gb2312"); - - } else if (!strncmp(cp1, "iso-2022-cn", 11) && HTCJK == CHINESE) { - StrAllocCopy(me->node_anchor->charset, "iso-2022-cn"); } FREE(cp3); @@ -3103,7 +3063,7 @@ PUBLIC void LYHandleP ARGS5( HTStructured *, me, CONST BOOL*, present, CONST char **, value, - char **, include, + char **, include GCC_UNUSED, BOOL, start) { if (TRUE) { @@ -3211,7 +3171,7 @@ PUBLIC void LYHandleSELECT ARGS5( HTStructured *, me, CONST BOOL*, present, CONST char **, value, - char **, include, + char **, include GCC_UNUSED, BOOL, start) { int i; diff --git a/src/LYCookie.c b/src/LYCookie.c index c82dd592..e586cf04 100644 --- a/src/LYCookie.c +++ b/src/LYCookie.c @@ -1832,8 +1832,21 @@ PUBLIC void LYLoadCookies ARGS1 ( { FILE *cookie_handle; char buf[5000]; /* should be long enough for a cookie line */ - static char domain[256], path[256], name[256], value[4100]; + static char domain[256], path[LY_MAXPATH], name[256], value[4100]; static char what[8], secure[8], expires_a[16]; + static struct { + char *s; + size_t n; + } tok_values[] = { + { domain, sizeof(domain) }, + { what, sizeof(what) }, + { path, sizeof(path) }, + { secure, sizeof(secure) }, + { expires_a, sizeof(expires_a) }, + { name, sizeof(name) }, + { value, sizeof(value) }, + { NULL, 0 } + }; time_t expires; cookie_handle = fopen(cookie_file, "r+"); @@ -1843,13 +1856,17 @@ PUBLIC void LYLoadCookies ARGS1 ( while (!feof(cookie_handle)) { cookie *moo; int tok_loop; - char *tok_values[] = {domain, what, path, secure, expires_a, name, value, NULL}; char *tok_out, *tok_ptr; + char *j; - fgets(buf, 4999, cookie_handle); /* test return value */ + j = fgets(buf, sizeof(buf)-1, cookie_handle); + + if((j == NULL) || (buf[0] == '\0' || buf[0] == '\n')) { + continue; + } /* - * Tokenise the cookie line into it's component parts - + * Tokenise the cookie line into its component parts - * this only works for Netscape style cookie files at the * moment. It may be worth investigating an alternative * format for Lynx because the Netscape format isn't all @@ -1860,10 +1877,10 @@ PUBLIC void LYLoadCookies ARGS1 ( */ tok_ptr = buf; tok_out = LYstrsep(&tok_ptr, "\t"); - for (tok_loop = 0; tok_out && tok_values[tok_loop]; tok_loop++) { + for (tok_loop = 0; tok_out && tok_values[tok_loop].s; tok_loop++) { CTRACE(tfp, ">%d:%p:%p:[%s]:%s\n", - tok_loop, tok_values[tok_loop], tok_out, tok_out, buf); - strcpy(tok_values[tok_loop], tok_out); + tok_loop, tok_values[tok_loop].s, tok_out, tok_out, buf); + LYstrncpy(tok_values[tok_loop].s, tok_out, tok_values[tok_loop].n); /* * It looks like strtok ignores a leading delimiter, * which makes things a bit more interesting. Something @@ -1873,7 +1890,7 @@ PUBLIC void LYLoadCookies ARGS1 ( tok_out = LYstrsep(&tok_ptr, "\t"); } expires = atol(expires_a); - fprintf(stderr, "COOKIE: expires %s\n", ctime(&expires)); + CTRACE(tfp, "COOKIE: expires %s\n", ctime(&expires)); /* * This fails when the path is blank @@ -2438,7 +2455,8 @@ PUBLIC void cookie_add_acceptlist ARGS1( domain_entry *de2 = NULL; HTList *hl; char **str = (char **)calloc(1, sizeof(acceptstr)); - char *strsmall = (char *)calloc(1, sizeof(acceptstr)); + char *astr = NULL; + char *strsmall = NULL; int isexisting = FALSE; /* is this the first cookie we're handling? if so, initialize the @@ -2451,7 +2469,9 @@ PUBLIC void cookie_add_acceptlist ARGS1( total_cookies = 0; } - *str = acceptstr; + StrAllocCopy(astr, acceptstr); + + *str = astr; for(; (strsmall = LYstrsep(str, ","));) { if(strsmall == NULL) @@ -2490,6 +2510,7 @@ PUBLIC void cookie_add_acceptlist ARGS1( FREE(str); FREE(strsmall); + FREE(astr); } @@ -2505,7 +2526,8 @@ PUBLIC void cookie_add_rejectlist ARGS1( domain_entry *de2 = NULL; HTList *hl; char **str = (char **)calloc(1, sizeof(rejectstr)); - char *strsmall = (char *)calloc(1, sizeof(rejectstr)); + char *rstr = NULL; + char *strsmall = NULL; int isexisting = FALSE; /* is this the first cookie we're handling? if so, initialize the @@ -2518,7 +2540,9 @@ PUBLIC void cookie_add_rejectlist ARGS1( total_cookies = 0; } - *str = rejectstr; + StrAllocCopy(rstr, rejectstr); + + *str = rstr; for(; (strsmall = LYstrsep(str, ","));) { if(strsmall == NULL) @@ -2557,6 +2581,7 @@ PUBLIC void cookie_add_rejectlist ARGS1( FREE(str); FREE(strsmall); + FREE(rstr); } #ifdef GLOBALDEF_IS_MACRO diff --git a/src/LYCurses.c b/src/LYCurses.c index 4bbd8758..b6d149fa 100644 --- a/src/LYCurses.c +++ b/src/LYCurses.c @@ -762,6 +762,10 @@ PUBLIC void start_curses NOARGS #if defined(SIGWINCH) && defined(NCURSES_VERSION) size_change(0); #endif /* SIGWINCH */ +#if defined(USE_KEYMAPS) && defined(NCURSES_VERSION) + if (-1 == lynx_initialize_keymaps ()) + exit (-1); +#endif /* * This is a workaround for a bug in SVr4 curses, observed on Solaris diff --git a/src/LYCurses.h b/src/LYCurses.h index 9df3b749..a0275449 100644 --- a/src/LYCurses.h +++ b/src/LYCurses.h @@ -99,6 +99,11 @@ extern void LYsubwindow PARAMS((WINDOW * param)); # endif /* NCURSES */ +#if defined(NCURSES_VERSION) && defined(HAVE_DEFINE_KEY) +#include <term.h> +#define USE_KEYMAPS 1 +#endif + #else # if defined(VMS) && defined(__GNUC__) # include <LYGCurses.h> @@ -186,17 +191,19 @@ extern unsigned int Lynx_Color_Flags; #endif #ifdef USE_SLANG + #if !defined(VMS) && !defined(DJGPP) #define USE_SLANG_MOUSE 1 -#endif /* USE_SLANG */ +#endif -#if ((SLANG_VERSION >= 10000) && !defined(__DJGPP__)) -#define USE_SLANG_KEYMAPS 1 -#endif /* SLANG_VERSION >= 10000 */ +#if !defined(__DJGPP__) +#define USE_KEYMAPS 1 +#endif #define SL_LYNX_USE_COLOR 1 #define SL_LYNX_USE_BLINK 2 #define SL_LYNX_OVERRIDE_COLOR 4 + #define start_bold() LYaddAttr(1) #define start_reverse() LYaddAttr(2) #define start_underline() LYaddAttr(4) diff --git a/src/LYForms.c b/src/LYForms.c index eb44fa14..ff64cb2d 100644 --- a/src/LYForms.c +++ b/src/LYForms.c @@ -804,8 +804,8 @@ redraw: SLsmg_gotorc((LYlines - 1), (LYcols - 1)); SLsmg_refresh(); #else - wstart_reverse(form_window); wmove(form_window, ((i + 1) - window_offset), 2); + wstart_reverse(form_window); paddstr(form_window, width, opt_ptr->name); wstop_reverse(form_window); /* diff --git a/src/LYGlobalDefs.h b/src/LYGlobalDefs.h index ebc78984..37550ce3 100644 --- a/src/LYGlobalDefs.h +++ b/src/LYGlobalDefs.h @@ -250,10 +250,13 @@ extern BOOLEAN enable_scrollback; /* Clear screen before displaying new page */ extern BOOLEAN keep_mime_headers; /* Include mime headers and * * force source dump */ extern BOOLEAN no_url_redirection; /* Don't follow URL redirections */ +#ifdef DISP_PARTIAL extern BOOLEAN display_partial; /* Display document during download */ extern int Newline_partial; /* -//- "current" newline position */ extern int NumOfLines_partial; /* -//- "current" number of lines */ extern BOOLEAN debug_display_partial; /* show with MessageSecs delay */ +extern BOOLEAN detected_forms_input_partial; /* trimHightext temp fix */ +#endif extern char *form_post_data; /* User data for post form */ extern char *form_get_data; /* User data for get form */ extern char *http_error_file; /* Place HTTP status code in this file */ @@ -287,8 +290,6 @@ extern BOOLEAN LYRawMode; extern BOOLEAN LYDefaultRawMode; extern BOOLEAN LYUseDefaultRawMode; extern char *UCAssume_MIMEcharset; -extern char *UCAssume_localMIMEcharset; -extern char *UCAssume_unrecMIMEcharset; extern BOOLEAN UCSaveBookmarksInUnicode; /* in titles, chars >127 save as &#xUUUU */ extern BOOLEAN UCForce8bitTOUPPER; /* disable locale case-conversion for >127 */ extern BOOLEAN LYisConfiguredForX; diff --git a/src/LYKeymap.c b/src/LYKeymap.c index e5614d8a..17674b03 100644 --- a/src/LYKeymap.c +++ b/src/LYKeymap.c @@ -8,8 +8,6 @@ #include <LYLeaks.h> -#define TABLESIZE(v) (sizeof(v)/sizeof(v[0])) - PRIVATE CONST DocAddress keymap_anchor = {"LYNXKEYMAP", NULL, NULL}; struct _HTStream diff --git a/src/LYMail.c b/src/LYMail.c index 3d1138f3..d61413d5 100644 --- a/src/LYMail.c +++ b/src/LYMail.c @@ -883,7 +883,9 @@ PUBLIC void reply_by_mail ARGS3( #if defined(DOSPATH) || defined(VMS) char *command = NULL; #endif +#ifndef NO_ANONYMOUS_EMAIL static char *personal_name = NULL; +#endif char subject[80]; #ifdef VMS char *address_ptr1 = NULL, *address_ptr2 = NULL; diff --git a/src/LYMain.c b/src/LYMain.c index 9d7f174a..3322b390 100644 --- a/src/LYMain.c +++ b/src/LYMain.c @@ -293,8 +293,6 @@ PUBLIC BOOLEAN LYRawMode; PUBLIC BOOLEAN LYDefaultRawMode; PUBLIC BOOLEAN LYUseDefaultRawMode = TRUE; PUBLIC char *UCAssume_MIMEcharset = NULL; -PUBLIC char *UCAssume_localMIMEcharset = NULL; -PUBLIC char *UCAssume_unrecMIMEcharset = NULL; PUBLIC BOOLEAN UCSaveBookmarksInUnicode = FALSE; PUBLIC BOOLEAN UCForce8bitTOUPPER = FALSE; /* override locale for case-conversion? */ PUBLIC int LYlines = 24; @@ -357,6 +355,7 @@ PUBLIC BOOLEAN LYQuitDefaultYes = QUIT_DEFAULT_YES; #ifdef DISP_PARTIAL PUBLIC BOOLEAN display_partial = TRUE; /* Display document during download */ PUBLIC BOOLEAN debug_display_partial = FALSE; /* Show with MessageSecs delay */ +PUBLIC BOOLEAN detected_forms_input_partial = FALSE; /* trimHightext temp fix */ #endif /* These are declared in cutil.h for current freeWAIS libraries. - FM */ @@ -479,8 +478,6 @@ PRIVATE void free_lynx_globals NOARGS FREE(lynx_lss_file); #endif FREE(UCAssume_MIMEcharset); - FREE(UCAssume_unrecMIMEcharset); - FREE(UCAssume_localMIMEcharset); for (i = 0; i < nlinks; i++) { FREE(links[i].lname); } @@ -754,19 +751,6 @@ PUBLIC int main ARGS2( StrAllocCopy(URLDomainPrefixes, URL_DOMAIN_PREFIXES); StrAllocCopy(URLDomainSuffixes, URL_DOMAIN_SUFFIXES); StrAllocCopy(XLoadImageCommand, XLOADIMAGE_COMMAND); - /* - * Set up the compilation default character set. - FM - */ - for (i = 0; LYchar_set_names[i]; i++) { - if (!strncmp(CHARACTER_SET, LYchar_set_names[i], - strlen(CHARACTER_SET))) { - current_char_set=i; - break; - } - } - if (!LYchar_set_names[i]) - current_char_set = i = 0; - HTMLSetRawModeDefault(i); /* * Disable news posting if the compilation-based @@ -1032,12 +1016,8 @@ PUBLIC int main ARGS2( /* * Set up the TRACE log path, and logging if appropriate. - FM */ -#ifdef VMS - StrAllocCopy(LYTraceLogPath, "sys$login:Lynx.trace"); -#else - StrAllocCopy(LYTraceLogPath, (Home_Dir() ? Home_Dir() : "")); - StrAllocCat(LYTraceLogPath, "/Lynx.trace"); -#endif /* VMS */ + LYAddPathToHome(LYTraceLogPath = malloc(LY_MAXPATH), LY_MAXPATH, "Lynx.trace"); + if (TRACE && LYUseTraceLog) { #if defined(__DJGPP__) || defined(_WINDOWS) _fmode = O_TEXT; @@ -1147,10 +1127,11 @@ PUBLIC int main ARGS2( } fclose(fp); -#if defined(USE_SLANG_KEYMAPS) +#if defined(USE_KEYMAPS) && defined(USE_SLANG) if (-1 == lynx_initialize_keymaps ()) exit (-1); #endif + /* * Make sure we have the character sets declared. * This will initialize the CHARTRANS handling. - KW @@ -1159,6 +1140,22 @@ PUBLIC int main ARGS2( fprintf(stderr, "\nLynx character sets not declared.\n\n"); exit(-1); } + /* + * (**) in Lynx, UCLYhndl_HTFile_for_unspec and UCLYhndl_for_unrec may be + * valid or not, but current_char_set and UCLYhndl_for_unspec SHOULD + * ALWAYS be a valid charset. Initialized here and may be changed later + * from lynx.cfg/command_line/options_menu. - LP (**) + */ + /* + * Set up the compilation default character set. - FM + */ + current_char_set = safeUCGetLYhndl_byMIME(CHARACTER_SET); + /* + * Set up HTTP default for unlabeled charset (iso-8859-1). + */ + UCLYhndl_for_unspec = LATIN1; + StrAllocCopy(UCAssume_MIMEcharset, + LYCharSet_UC[UCLYhndl_for_unspec].MIMEname); #if defined(USE_HASH) /* @@ -1199,7 +1196,7 @@ PUBLIC int main ARGS2( * inform the user and exit. */ if ((fp = fopen(lynx_lss_file, "r")) == NULL) { - fprintf(stderr, "\nLynxile file %s is not available.\n\n", + fprintf(stderr, "\nLynx file %s is not available.\n\n", lynx_lss_file); } else @@ -1502,15 +1499,7 @@ PUBLIC int main ARGS2( * cookies file, probably. - RP */ if(LYCookieFile == NULL) { -#ifdef VMS - /* I really don't know if this is going to work on VMS. Someone - * who knows needs to take a look. - BJP - */ - StrAllocCopy(LYCookieFile, "sys$login:cookies"); -#else - StrAllocCopy(LYCookieFile, Home_Dir()); - StrAllocCat(LYCookieFile, "/cookies"); -#endif /* VMS */ + LYAddPathToHome(LYCookieFile = malloc(LY_MAXPATH), LY_MAXPATH, "cookies"); } else { if ((cp = strchr(LYCookieFile, '~'))) { temp = NULL; @@ -1534,6 +1523,22 @@ PUBLIC int main ARGS2( LYLoadCookies(LYCookieFile); #endif +#ifdef SIGTSTP + /* + * Block Control-Z suspending if requested. - FM + */ + if (no_suspend) + (void) signal(SIGTSTP,SIG_IGN); +#endif /* SIGTSTP */ + + /* + * Finish setting up for an INTERACTIVE session. + * Done here so that URL guessing in LYEnsureAbsoluteURL() can be + * interruptible (terminal is in raw mode, select() works). -BL + */ + if (!dump_output_immediately) { + setup(terminal); + } /* * If startfile is a file URL and the host is defaulted, * force in "//localhost", and if it's not an absolute URL, @@ -1587,14 +1592,6 @@ PUBLIC int main ARGS2( rlogin_ok = !no_outside_rlogin && rlogin_ok; } -#ifdef SIGTSTP - /* - * Block Control-Z suspending if requested. - FM - */ - if (no_suspend) - (void) signal(SIGTSTP,SIG_IGN); -#endif /* SIGTSTP */ - /* * Check for a valid HEAD request. - FM */ @@ -1722,17 +1719,14 @@ PUBLIC int main ARGS2( #endif /* SIGTSTP */ } else { /* - * Finish setting up and start an - * INTERACTIVE session. - FM + * Start an INTERACTIVE session. - FM */ - if (setup(terminal)) { - if (x_display != NULL && *x_display != '\0') { - LYisConfiguredForX = TRUE; - } - ena_csi((LYlowest_eightbit[current_char_set] > 155)); - status = mainloop(); - cleanup(); + if (x_display != NULL && *x_display != '\0') { + LYisConfiguredForX = TRUE; } + ena_csi((LYlowest_eightbit[current_char_set] > 155)); + status = mainloop(); + cleanup(); } exit(status); @@ -1890,14 +1884,13 @@ static int assume_charset_fun ARGS3( char **, argv GCC_UNUSED, char *, next_arg) { - if (next_arg == 0) { - UCLYhndl_for_unspec = UCGetLYhndl_byMIME("iso-8859-1"); - } else { - LYLowerCase(next_arg); - StrAllocCopy(UCAssume_MIMEcharset, next_arg); - if (UCAssume_MIMEcharset && *UCAssume_MIMEcharset) - UCLYhndl_for_unspec = UCGetLYhndl_byMIME(UCAssume_MIMEcharset); - } + UCLYhndl_for_unspec = safeUCGetLYhndl_byMIME(next_arg); + StrAllocCopy(UCAssume_MIMEcharset, + LYCharSet_UC[UCLYhndl_for_unspec].MIMEname); +/* this may be a memory for bogus typo - + StrAllocCopy(UCAssume_MIMEcharset, next_arg); + LYLowerCase(UCAssume_MIMEcharset); */ + return 0; } @@ -1907,15 +1900,7 @@ static int assume_local_charset_fun ARGS3( char **, argv GCC_UNUSED, char *, next_arg) { - if (next_arg == 0) { - UCLYhndl_HTFile_for_unspec = UCGetLYhndl_byMIME("iso-8859-1"); - } else { - LYLowerCase(next_arg); - StrAllocCopy(UCAssume_localMIMEcharset, next_arg); - if (UCAssume_localMIMEcharset && *UCAssume_localMIMEcharset) - UCLYhndl_HTFile_for_unspec = - UCGetLYhndl_byMIME(UCAssume_localMIMEcharset); - } + UCLYhndl_HTFile_for_unspec = safeUCGetLYhndl_byMIME(next_arg); return 0; } @@ -1925,14 +1910,7 @@ static int assume_unrec_charset_fun ARGS3( char **, argv GCC_UNUSED, char *, next_arg) { - if (next_arg == 0) { - UCLYhndl_for_unrec = UCGetLYhndl_byMIME("iso-8859-1"); - } else { - LYLowerCase(next_arg); - StrAllocCopy(UCAssume_unrecMIMEcharset, next_arg); - if (UCAssume_unrecMIMEcharset && *UCAssume_unrecMIMEcharset) - UCLYhndl_for_unrec = UCGetLYhndl_byMIME(UCAssume_unrecMIMEcharset); - } + UCLYhndl_for_unrec = safeUCGetLYhndl_byMIME(next_arg); return 0; } diff --git a/src/LYMainLoop.c b/src/LYMainLoop.c index a65bee19..bba831b3 100644 --- a/src/LYMainLoop.c +++ b/src/LYMainLoop.c @@ -4344,8 +4344,8 @@ check_goto_URL: */ if (strcmp((curdoc.title ? curdoc.title : ""), SHOWINFO_TITLE)) { - if (!showinfo(&curdoc, lines_in_file, - &newdoc, owner_address)) + if (showinfo(&curdoc, lines_in_file, + &newdoc, owner_address) < 0) break; StrAllocCopy(newdoc.title, SHOWINFO_TITLE); FREE(newdoc.post_data); @@ -4381,7 +4381,8 @@ check_goto_URL: if (strcmp((curdoc.title ? curdoc.title : ""), PRINT_OPTIONS_TITLE)) { - if (print_options(&newdoc.address, lines_in_file) < 0) + if (print_options(&newdoc.address, + &curdoc.address, lines_in_file) < 0) break; StrAllocCopy(newdoc.title, PRINT_OPTIONS_TITLE); FREE(newdoc.post_data); diff --git a/src/LYOptions.c b/src/LYOptions.c index 41017171..50643fb8 100644 --- a/src/LYOptions.c +++ b/src/LYOptions.c @@ -837,7 +837,6 @@ draw_options: * character set if changed. - FM */ if (CurrentCharSet != current_char_set) { - HTMLSetRawModeDefault(current_char_set); LYUseDefaultRawMode = TRUE; HTMLUseCharacterSet(current_char_set); CurrentCharSet = current_char_set; @@ -2237,7 +2236,7 @@ PRIVATE int popup_choice ARGS6( if (!(form_window = newwin(bottom - top, (Lnum + width + 4), top, (lx - 1))) && !(form_window = newwin(bottom - top, 0, top, 0))) { - _statusline(POPUP_FAILED); + HTAlert(POPUP_FAILED); return(orig_choice); } scrollok(form_window, TRUE); @@ -2395,9 +2394,6 @@ redraw: term_options = FALSE; c = LYgetch(); if (term_options || c == 3 || c == 7) { - /* - * Control-C or Control-G - */ cmd = LYK_QUIT; } else { cmd = keymap[c+1]; @@ -3115,9 +3111,10 @@ static char * cookies_string = "cookies"; static char * cookies_ignore_all_string = "ignore"; static char * cookies_up_to_user_string = "ask user"; static char * cookies_accept_all_string = "accept all"; -static char * display_string = "display"; +static char * x_display_string = "display"; static char * editor_string = "editor"; static char * emacs_keys_string = "emacs_keys"; + #ifdef ALLOW_USERS_TO_CHANGE_EXEC_WITHIN_OPTIONS #define EXEC_ALWAYS 2 #define EXEC_LOCAL 1 @@ -3131,6 +3128,7 @@ static OptValues exec_links_values[] = { #endif { 0, 0, 0 }}; #endif /* ALLOW_USERS_TO_CHANGE_EXEC_WITHIN_OPTIONS */ + static char * keypad_mode_string = "keypad_mode"; static OptValues keypad_mode_values[] = { { NUMBERS_AS_ARROWS, "Numbers act as arrows", "number_arrows" }, @@ -3415,8 +3413,8 @@ PUBLIC int postoptions ARGS1( } } - /* Display: INPUT */ - if (!strcmp(data[i].tag, display_string)) { + /* X Display: INPUT */ + if (!strcmp(data[i].tag, x_display_string)) { LYsetXDisplay(data[i].value); } @@ -3487,9 +3485,14 @@ PUBLIC int postoptions ARGS1( LYShowCursor = GetOptValues(bool_values, data[i].value); } - /* User Mode: Default: */ + /* User Mode: SELECT */ if (!strcmp(data[i].tag, user_mode_string)) { user_mode = GetOptValues(user_mode_values, data[i].value); + if (user_mode == NOVICE_MODE) { + display_lines = (LYlines - 4); + } else { + display_lines = LYlines-2; + } } /* Verbose Images: ON/OFF */ @@ -3611,7 +3614,6 @@ PUBLIC int postoptions ARGS1( * Set the LYUseDefaultRawMode value and character * handling if LYRawMode was changed. - FM */ - HTMLSetRawModeDefault(current_char_set); LYUseDefaultRawMode = TRUE; HTMLUseCharacterSet(current_char_set); } @@ -3651,6 +3653,16 @@ PUBLIC int postoptions ARGS1( return(NULLFILE); } +PRIVATE char *NewSecureValue NOARGS +{ + FREE(secure_value); + if ((secure_value = malloc(80)) != 0) { + sprintf(secure_value, "%ld", (long)secure_value + (long)time(0)); + return secure_value; + } + return "?"; +} + /* * Okay, someone wants to change options. So, lets gen up a form for them * and pass it around. Gor, this is ugly. Be a lot easier in Bourne with @@ -3685,7 +3697,7 @@ PUBLIC int gen_options ARGS1( StrAllocCopy(*newfile, any_filename); LYforce_no_cache = TRUE; - BeginInternalPage(fp0, OPTIONS_TITLE, OPTIONS_HELP); + BeginInternalPage(fp0, OPTIONS_TITLE, NULL); /* help link below */ /* * I do C, not HTML. Feel free to pretty this up. @@ -3696,10 +3708,8 @@ PUBLIC int gen_options ARGS1( * (or was it CUTE?) telnet one shot password to allow ftp to self. * to prevent spoofing. */ - FREE(secure_value); - StrAllocCopy(secure_value, "FIXMEtest=the&encoding"); fprintf(fp0,"<input name=\"%s\" type=\"hidden\" value=\"%s\">\n", - secure_string, secure_value); + secure_string, NewSecureValue()); /* * visible text begins here @@ -3740,11 +3750,7 @@ PUBLIC int gen_options ARGS1( cookies_accept_all_string); EndSelect(fp0); - /* Display: Input */ - PutLabel(fp0, "Display"); - PutTextInput(fp0, display_string, NOTEMPTY(x_display), text_len, ""); - - /* Editor: Input */ + /* Editor: INPUT */ PutLabel(fp0, "Editor"); PutTextInput(fp0, editor_string, NOTEMPTY(editor), text_len, DISABLED(no_editor || system_editor)); @@ -3848,7 +3854,7 @@ PUBLIC int gen_options ARGS1( PutOptValues(fp0, LYShowCursor, bool_values); EndSelect(fp0); - /* User Mode: Default: */ + /* User Mode: SELECT */ PutLabel(fp0, "User mode"); BeginSelect(fp0, user_mode_string); PutOptValues(fp0, user_mode, user_mode_values); @@ -3867,6 +3873,10 @@ PUBLIC int gen_options ARGS1( EndSelect(fp0); + /* X Display: INPUT */ + PutLabel(fp0, "X Display"); + PutTextInput(fp0, x_display_string, NOTEMPTY(x_display), text_len, ""); + /* * Bookmark Options */ @@ -4003,7 +4013,7 @@ PUBLIC int gen_options ARGS1( PutTextInput(fp0, preferred_doc_lang_string, NOTEMPTY(language), cset_len+2, ""); - /* User Agent: INPUT */ + /* User Agent: INPUT */ if (!no_useragent) { PutLabel(fp0, "User-Agent header"); PutTextInput(fp0, user_agent_string, diff --git a/src/LYPrint.c b/src/LYPrint.c index 24c824ee..8b95de3a 100644 --- a/src/LYPrint.c +++ b/src/LYPrint.c @@ -1244,8 +1244,9 @@ PRIVATE int remove_quotes ARGS1( * LYNXPRINT://MAIL_FILE/lines=# mail the file * LYNXPRINT://PRINTER/lines=#/number=# print to printer number # */ -PUBLIC int print_options ARGS2( +PUBLIC int print_options ARGS3( char **, newfile, + char **, printed_url, int, lines_in_file) { static char tempfile[256]; @@ -1256,7 +1257,6 @@ PUBLIC int print_options ARGS2( FILE *fp0; lynx_printer_item_type *cur_printer; - pages = lines_in_file/66 + 1; LYRemoveTemp(tempfile); if ((fp0 = LYOpenTemp(tempfile, HTML_SUFFIX, "w")) == NULL) { @@ -1271,13 +1271,17 @@ PUBLIC int print_options ARGS2( BeginInternalPage(fp0, PRINT_OPTIONS_TITLE, PRINT_OPTIONS_HELP); fprintf(fp0, "<pre>\n"); + + /* pages = lines_in_file/66 + 1; */ pages = (lines_in_file+65)/66; sprintf(buffer, " \ -<em>You print the document:</em> %s\n \ - <em>Number of lines:</em> %d\n \ - <em>Number of pages:</em> %d page%s (approximately)\n", - tempfile, lines_in_file, pages, (pages > 1 ? "s" : "")); - fputs(buffer,fp0); +<em>Document:</em> %s\n \ +<em>Number of lines:</em> %d\n \ +<em>Number of pages:</em> %d page%s (approximately)\n", + *printed_url, + lines_in_file, + pages, (pages > 1 ? "s" : "")); + fputs(buffer, fp0); if (no_print || no_disk_save || child_lynx || no_mail) fprintf(fp0, " <em>Some print functions have been disabled!</em>\n"); diff --git a/src/LYPrint.h b/src/LYPrint.h index 5229e368..12efe47c 100644 --- a/src/LYPrint.h +++ b/src/LYPrint.h @@ -1,4 +1,3 @@ - #ifndef LYPRINT_H #define LYPRINT_H @@ -7,7 +6,8 @@ #endif /* LYSTRUCTS_H */ extern int printfile PARAMS((document *newdoc)); -extern int print_options PARAMS((char **newfile, int lines_in_file)); +extern int print_options PARAMS((char **newfile, + char **printed_url, int lines_in_file)); #endif /* LYPRINT_H */ diff --git a/src/LYReadCFG.c b/src/LYReadCFG.c index f68c0d94..bf422aa6 100644 --- a/src/LYReadCFG.c +++ b/src/LYReadCFG.c @@ -489,27 +489,27 @@ Config_Type; static int assume_charset_fun ARGS1( char *, value) { + UCLYhndl_for_unspec = safeUCGetLYhndl_byMIME(value); + StrAllocCopy(UCAssume_MIMEcharset, + LYCharSet_UC[UCLYhndl_for_unspec].MIMEname); +/* this may be a memory for bogus typo - StrAllocCopy(UCAssume_MIMEcharset, value); - LYLowerCase(UCAssume_MIMEcharset); - UCLYhndl_for_unspec = UCGetLYhndl_byMIME(UCAssume_MIMEcharset); + LYLowerCase(UCAssume_MIMEcharset); */ + return 0; } static int assume_local_charset_fun ARGS1( char *, value) { - StrAllocCopy(UCAssume_localMIMEcharset, value); - LYLowerCase(UCAssume_localMIMEcharset); - UCLYhndl_HTFile_for_unspec = UCGetLYhndl_byMIME(UCAssume_localMIMEcharset); + UCLYhndl_HTFile_for_unspec = safeUCGetLYhndl_byMIME(value); return 0; } static int assume_unrec_charset_fun ARGS1( char *, value) { - StrAllocCopy(UCAssume_unrecMIMEcharset, value); - LYLowerCase(UCAssume_unrecMIMEcharset); - UCLYhndl_for_unrec = UCGetLYhndl_byMIME(UCAssume_unrecMIMEcharset); + UCLYhndl_for_unrec = safeUCGetLYhndl_byMIME(value); return 0; } @@ -523,13 +523,11 @@ static int character_set_fun ARGS1( for (i = 0; LYchar_set_names[i]; i++) { /* search by name, compatibility */ if (!strncmp(value, LYchar_set_names[i], len)) { current_char_set = i; - HTMLSetRawModeDefault(current_char_set); return 0; } } - current_char_set = UCGetLYhndl_byMIME(value); /* by MIME */ - HTMLSetRawModeDefault(current_char_set); + current_char_set = safeUCGetLYhndl_byMIME(value); /* by MIME */ return 0; } diff --git a/src/LYShowInfo.c b/src/LYShowInfo.c index 7b88643c..9ab29041 100644 --- a/src/LYShowInfo.c +++ b/src/LYShowInfo.c @@ -21,6 +21,44 @@ #include <LYLocal.h> #endif /* DIRED_SUPPORT */ +#ifdef HAVE_CONFIG_H +#define HAVE_CFG_DEFS_H + +#define PutDefs(table, n) fprintf(fp0, "%-35s %s\n", table[n].name, table[n].value) + +PRIVATE char *lynx_compile_opts NOARGS +{ + static char tempfile[256]; +#include <cfg_defs.h> + unsigned n; + FILE *fp0; + + if (strlen(tempfile) == 0) { + if ((fp0 = LYOpenTemp (tempfile, HTML_SUFFIX, "w")) == 0) { + HTAlert(CANNOT_OPEN_TEMP); + tempfile[0] = '\0'; + return(0); + } + BeginInternalPage (fp0, CONFIG_DEF_TITLE, (char *)0); + fprintf(fp0, "<pre>\n"); + fprintf(fp0, "\n<em>config.cache</em>\n"); + for (n = 0; n < TABLESIZE(config_cache); n++) { + PutDefs(config_cache, n); + } + fprintf(fp0, "\n<em>lynx_cfg.h</em>\n"); + for (n = 0; n < TABLESIZE(config_defines); n++) { + PutDefs(config_defines, n); + } + fprintf(fp0, "</pre>\n"); + EndInternalPage(fp0); + LYCloseTempFP(fp0); + } + return tempfile; +} +#else +#undef HAVE_CFG_DEFS_H +#endif + /* * Showinfo prints a page of info about the current file and the link * that the cursor is on. @@ -49,7 +87,7 @@ PUBLIC int showinfo ARGS4( LYRemoveTemp(tempfile); if ((fp0 = LYOpenTemp (tempfile, HTML_SUFFIX, "w")) == 0) { HTAlert(CANNOT_OPEN_TEMP); - return(0); + return(-1); } LYLocalFileToURL(info_url, tempfile); @@ -76,12 +114,12 @@ PUBLIC int showinfo ARGS4( fprintf(fp0, "<title>%s</title>\n</head>\n<body>\n", SHOWINFO_TITLE); -#ifdef LYNX_COMPILE_OPTS +#ifdef HAVE_CFG_DEFS_H fprintf(fp0, "<h1>%s %s (<a href=\"%s\">%s</a>) - <a href=\"%s\">compile time settings</a></h1>\n", LYNX_NAME, LYNX_VERSION, (LYNX_RELEASE ? LYNX_WWW_HOME : LYNX_WWW_DIST), (LYNX_RELEASE ? "major release" : "development version"), - LYNX_COMPILE_OPTS); + lynx_compile_opts()); #else fprintf(fp0, "<h1>%s %s (<a href=\"%s\">%s</a>)</h1>\n", LYNX_NAME, LYNX_VERSION, @@ -354,5 +392,5 @@ PUBLIC int showinfo ARGS4( FREE(Address); FREE(Title); - return(1); + return(0); } diff --git a/src/LYStrings.c b/src/LYStrings.c index 7ee93c99..58fb3452 100644 --- a/src/LYStrings.c +++ b/src/LYStrings.c @@ -56,37 +56,47 @@ PUBLIC int get_mouse_link NOARGS PRIVATE int set_clicked_link ARGS2(int,x,int,y) { - int i; - - /* Loop over the links and see if we can get a match */ - for(i=0; i < nlinks && mouse_link == -1; i++) { - /* Check the first line of the link */ - if ( links[i].hightext != NULL && - links[i].ly == y && - (x - links[i].lx) < (int)strlen(links[i].hightext ) ) { - mouse_link=i; - } - /* Check the second line */ - if (links[i].hightext2 != NULL && - 1+links[i].ly == y && - (x - links[i].hightext2_offset) < (int)strlen(links[i].hightext2) ) { - mouse_link=i; + int left = 6; + int right = LYcols-6; + /* yes, I am assuming that my screen will be a certain width. */ + int i; + int c = -1; + + if (y == (LYlines-1)) { + if (x < left) c = LTARROW; + else if (x > right) c = '\b'; + else c = PGDOWN; + } else if (y == 0) { + if (x < left) c = LTARROW; + else if (x > right) c = '\b'; + else c = PGUP; + } else { + /* Loop over the links and see if we can get a match */ + for (i = 0; i < nlinks; i++) { + /* Check the first line of the link */ + if ( links[i].hightext != NULL && + links[i].ly == y && + (x - links[i].lx) < (int)strlen(links[i].hightext ) ) { + mouse_link = i; + break; + } + /* Check the second line */ + if (links[i].hightext2 != NULL && + 1+links[i].ly == y && + (x - links[i].hightext2_offset) < (int)strlen(links[i].hightext2) ) { + mouse_link = i; + break; + } + } + /* + * If a link was hit, we must look for a key which will activate + * LYK_ACTIVATE We expect to find LYK_ACTIVATE (it's usually mapped to + * the Enter key). + */ + if (mouse_link >= 0) + c = lookup_keymap(LYK_ACTIVATE); } - } - /* If no link was found, just return a do-nothing code */ - if (mouse_link == -1) return -1; - - /* If a link was hit, we must look for a key which will activate LYK_ACTIVATE - ** We expect to find LYK_ACTIVATE (it's usually mapped to the Enter key). - **/ - if ((i = lookup_keymap(LYK_ACTIVATE)) >= 0) - return i; - - /* Whoops! Nothing's defined as LYK_ACTIVATE! - Well, who are we to argue with the user? - Forget about the mouse click */ - mouse_link = -1; - return -1; + return c; } @@ -100,7 +110,7 @@ PUBLIC char *LYstrncpy ARGS3( int, n) { char *val; - int len=strlen(src); + int len = strlen(src); if (n < 0) n = 0; @@ -300,9 +310,7 @@ PRIVATE int sl_parse_mouse_event ARGS3(int *, x, int *, y, int *, button) *y = SLang_getkey () - 33; return 0; } -#endif -#if defined(USE_SLANG_MOUSE) PRIVATE int sl_read_mouse_event NOARGS { int mouse_x, mouse_y, button; @@ -333,198 +341,439 @@ PUBLIC void ena_csi ARGS1( csi_is_csi = flag; } -#if defined(USE_SLANG_KEYMAPS) -static SLKeyMap_List_Type *Keymap_List; +#if defined(USE_KEYMAPS) +#ifdef USE_SLANG +#define define_key(string, code) \ + SLkm_define_keysym (string, code, Keymap_List) +#define expand_substring(dst, first, last) \ + SLexpand_escaped_string(dst, first, last) +static SLKeyMap_List_Type *Keymap_List; /* This value should be larger than anything in LYStrings.h */ #define MOUSE_KEYSYM 0x1000 +#endif + + +#define SQUOTE '\'' +#define DQUOTE '"' +#define ESCAPE '\\' +#define LPAREN '(' +#define RPAREN ')' + +/* + * For ncurses, we use the predefined keysyms, since that lets us also reuse + * the CSI logic and other special cases for VMS, NCSA telnet, etc. + */ +#ifdef USE_SLANG +#define DEFINE_KEY(string,lynx,curses) {string,lynx} +#else +#define DEFINE_KEY(string,lynx,curses) {string,curses} +#endif typedef struct { - char *name; - int keysym; + char *string; + int value; } Keysym_String_List; static Keysym_String_List Keysym_Strings [] = { - {"UPARROW", UPARROW}, - {"DNARROW", DNARROW}, - {"RTARROW", RTARROW}, - {"LTARROW", LTARROW}, - {"PGDOWN", PGDOWN}, - {"PGUP", PGUP}, - {"HOME", HOME}, - {"END", END_KEY}, - {"F1", F1}, - {"DO_KEY", DO_KEY}, - {"FIND_KEY", FIND_KEY}, - {"SELECT_KEY", SELECT_KEY}, - {"INSERT_KEY", INSERT_KEY}, - {"REMOVE_KEY", REMOVE_KEY}, - {"DO_NOTHING", DO_NOTHING}, - {NULL, -1} + DEFINE_KEY( "UPARROW", UPARROW, KEY_UP ), + DEFINE_KEY( "DNARROW", DNARROW, KEY_DOWN ), + DEFINE_KEY( "RTARROW", RTARROW, KEY_RIGHT ), + DEFINE_KEY( "LTARROW", LTARROW, KEY_LEFT ), + DEFINE_KEY( "PGDOWN", PGDOWN, KEY_NPAGE ), + DEFINE_KEY( "PGUP", PGUP, KEY_PPAGE ), + DEFINE_KEY( "HOME", HOME, KEY_HOME ), + DEFINE_KEY( "END", END_KEY, KEY_END ), + DEFINE_KEY( "F1", F1, KEY_F(1) ), + DEFINE_KEY( "DO_KEY", DO_KEY, KEY_F(16) ), + DEFINE_KEY( "FIND_KEY", FIND_KEY, KEY_FIND ), + DEFINE_KEY( "SELECT_KEY", SELECT_KEY, KEY_SELECT ), + DEFINE_KEY( "INSERT_KEY", INSERT_KEY, KEY_IC ), + DEFINE_KEY( "REMOVE_KEY", REMOVE_KEY, KEY_DC ), + DEFINE_KEY( "DO_NOTHING", DO_NOTHING, 0 ), + DEFINE_KEY( NULL, -1, ERR ) }; -PRIVATE int map_string_to_keysym (char *str, int *keysym) +#ifdef NCURSES_VERSION +/* + * Ncurses stores the termcap/terminfo names in arrays sorted to match the + * array of strings in the TERMTYPE struct. + */ +PRIVATE int lookup_tiname (char *name, NCURSES_CONST char *const *names) { - Keysym_String_List *k; + int code; - k = Keysym_Strings; - while (k->name != NULL) - { - if (0 == strcmp (k->name, str)) - { - *keysym = k->keysym; - return 0; - } - k++; - } - fprintf (stderr, "Keysym %s is unknown\n", str); - *keysym = -1; - return -1; + for (code = 0; names[code] != 0; code++) + if (!strcmp(names[code], name)) + return code; + return -1; } - -/* The second argument may either be a string or and integer */ -PRIVATE int setkey_cmd (int argc GCC_UNUSED, SLcmd_Cmd_Table_Type *table) +PRIVATE char *expand_tiname (char *first, size_t len, char **result) { - char *keyseq; - int keysym; + char name[BUFSIZ]; + int code; + + strncpy(name, first, len); + name[len] = '\0'; + if ((code = lookup_tiname(name, strnames)) >= 0 + || (code = lookup_tiname(name, strfnames)) >= 0) { + strcpy(*result, cur_term->type.Strings[code]); + (*result) += strlen(*result); + } + return first + len; +} - keyseq = table->string_args [1]; - switch (table->arg_type[2]) - { - case SLANG_INT_TYPE: - keysym = table->int_args[2]; +PRIVATE char *expand_tichar (char *first, char **result) +{ + int ch; + int limit = 0; + int radix = 0; + int value = 0; + char *name = 0; + + switch (ch = *first++) { + case 'E': case 'e': value = 27; break; + case 'a': name = "bel"; break; + case 'b': value = '\b'; break; + case 'f': value = '\f'; break; + case 'n': value = '\n'; break; + case 'r': value = '\r'; break; + case 't': value = '\t'; break; + case 'v': value = '\v'; break; + case 'd': radix = 10; limit = 3; break; + case 'x': radix = 16; limit = 2; break; + default: + if (isdigit(ch)) { + radix = 8; + limit = 3; + first--; + } else { + value = *first; + } break; + } - case SLANG_STRING_TYPE: - if (-1 == map_string_to_keysym (table->string_args[2], &keysym)) - return -1; - break; + if (radix != 0) { + char *last; + int save = first[limit]; + first[limit] = '\0'; + value = strtol(first, &last, radix); + first[limit] = save; + first = last; + } - default: - return -1; - } + if (name != 0) { + (void) expand_tiname(name, strlen(name), result); + } else { + **result = value; + (*result) += 1; + } - return SLkm_define_keysym (keyseq, keysym, Keymap_List); + return first; +} + +PRIVATE void expand_substring (char* dst, char* first, char* last) +{ + int ch; + while (first < last) { + switch (ch = *first++) { + case ESCAPE: + first = expand_tichar(first, &dst); + break; + case '^': + ch = *first++; + if (ch == LPAREN) { + char *s = strchr(first, RPAREN); + if (s == 0) + s = first + strlen(first); + first = expand_tiname(first, s-first, &dst); + } else if (ch == '?') { /* ASCII delete? */ + *dst++ = 127; + } else if ((ch & 0x3f) < 0x20) { /* ASCII control char? */ + *dst++ = (ch & 0x1f); + } else { + *dst++ = '^'; + first--; /* not legal... */ + } + break; + case 0: /* convert nulls for terminfo */ + ch = 0200; + /* FALLTHRU */ + default: + *dst++ = ch; + break; + } + } + *dst = '\0'; } +#endif -PRIVATE int unsetkey_cmd (int argc GCC_UNUSED, SLcmd_Cmd_Table_Type *table) +PRIVATE void unescaped_char ARGS2(char*, parse, int*,keysym) { - SLang_undefine_key (table->string_args[1], Keymap_List); - if (SLang_Error) return -1; - return 0; + size_t len = strlen(parse); + char buf[BUFSIZ]; + + if (len >= 3) { + expand_substring(buf, parse + 1, parse + len - 1); + if (strlen(buf) == 1) + *keysym = *buf; + } } -static SLcmd_Cmd_Type Keymap_Cmd_Table [] = +PRIVATE BOOLEAN unescape_string ARGS2(char*, src, char *, dst) { - {setkey_cmd, "setkey", "SG"}, - {unsetkey_cmd, "unsetkey", "S"}, - {NULL} -}; + BOOLEAN ok = FALSE; + + if (*src == SQUOTE) { + int keysym; + unescaped_char(src, &keysym); + if (keysym >= 0) { + dst[0] = keysym; + dst[1] = '\0'; + ok = TRUE; + } + } else if (*src == DQUOTE) { + expand_substring(dst, src + 1, src + strlen(src) - 1); + ok = TRUE; + } + return ok; +} -PRIVATE int read_keymap_file NOARGS +PRIVATE int map_string_to_keysym ARGS2(char*, str, int*,keysym) { - char line[1024]; - FILE *fp; - char file[1024]; - char *home; - char *keymap_file; - int ret; - SLcmd_Cmd_Table_Type tbl; - int linenum; + *keysym = -1; + + if (*str == SQUOTE) { + unescaped_char(str, keysym); + } else if (isdigit(*str)) { + char *tmp; + long value = strtol(str, &tmp, 0); + if (!isalnum(*tmp)) + *keysym = value; + } else { + Keysym_String_List *k; -#ifdef VMS - keymap_file = "lynx.keymaps"; - home = "SYS$LOGIN:"; -#else -#ifdef FNAMES_8_3 - keymap_file = "/_lynxkey.map"; -#else - keymap_file = "/.lynx-keymaps"; -#endif /* FNAMES_8_3 */ - home = getenv ("HOME"); - if (home == NULL) home = ""; -#endif + k = Keysym_Strings; + while (k->string != NULL) { + if (0 == strcmp (k->string, str)) { + *keysym = k->value; + break; + } + k++; + } + } - sprintf (file, "%s%s", home, keymap_file); + return (*keysym); +} - if (NULL == (fp = fopen (file, "r"))) - return 0; +/* + * Starting at a nonblank character, skip over a token, counting quoted and + * escaped characters. + */ +PRIVATE char *skip_keysym ARGS1(char *, parse) +{ + int quoted = 0; + int escaped = 0; + + while (*parse) { + if (escaped) { + escaped = 0; + } else if (quoted) { + if (*parse == ESCAPE) { + escaped = 1; + } else if (*parse == quoted) { + quoted = 0; + } + } else if (*parse == ESCAPE) { + escaped = 1; + } else if (*parse == DQUOTE || *parse == SQUOTE) { + quoted = *parse; + } else if (isspace(*parse)) { + break; + } + parse++; + } + return (quoted || escaped) ? 0 : parse; +} - tbl.table = Keymap_Cmd_Table; +/* + * The first token is the string to define, the second is the name (of the + * keysym) to define it to. + */ +PRIVATE int setkey_cmd (char *parse) +{ + char *s, *t; + int keysym; + char buf[BUFSIZ]; + + if ((s = skip_keysym(parse)) != 0) { + if (isspace(*s)) { + *s++ = '\0'; + s = LYSkipBlanks(s); + if ((t = skip_keysym(s)) == 0) + return -1; + if (t != s) + *t = '\0'; + if (map_string_to_keysym (s, &keysym) >= 0 + && unescape_string(parse, buf)) { + return define_key(buf, keysym); + } + } + } + return -1; +} - linenum = 0; - ret = 0; - while (NULL != fgets (line, sizeof (line), fp)) - { +PRIVATE int unsetkey_cmd (char *parse) +{ + char *s = skip_keysym(parse); + if (s != parse) { + *s = '\0'; +#ifdef NCURSES_VERSION + /* + * This won't work with Slang. Remove the definition for the given + * keysym. + */ + { + int keysym; + if (map_string_to_keysym (parse, &keysym) >= 0) + define_key((char *)0, keysym); + } +#endif +#ifdef USE_SLANG + /* Slang implements this, for undefining the string which is associated + * with a keysym (the reverse of what we normally want, but may + * occasionally find useful). + */ + SLang_undefine_key (parse, Keymap_List); + if (SLang_Error) return -1; +#endif + } + return 0; +} + +#ifdef FNAMES_8_3 +#define FNAME_LYNX_KEYMAPS "_lynxkey.map" +#else +#define FNAME_LYNX_KEYMAPS ".lynx-keymaps" +#endif /* FNAMES_8_3 */ + +PRIVATE int read_keymap_file NOARGS +{ + static struct { + CONST char *name; + int (*func) PARAMS((char *s)); + } table[] = { + {"setkey", setkey_cmd }, + {"unsetkey", unsetkey_cmd }, + }; + + char line[1024]; + FILE *fp; + char file[LY_MAXPATH]; + int ret; + int linenum; + size_t n; + + LYAddPathToHome(file, sizeof(file), FNAME_LYNX_KEYMAPS); + + if ((fp = fopen (file, "r")) == 0) + return 0; + + linenum = 0; + ret = 0; + while ((fgets (line, sizeof (line), fp) != 0) && (ret == 0)) + { char *s = LYSkipBlanks(line); linenum++; if ((*s == 0) || (*s == '#')) - continue; + continue; - if (-1 == SLcmd_execute_string (s, &tbl)) - { - ret = -1; - break; - } - } + for (n = 0; n < TABLESIZE(table); n++) { + size_t len = strlen(table[n].name); + if (strlen(s) > len + && !strncmp(s, table[n].name, len)) { + if ((*(table[n].func))(LYSkipBlanks(s+len)) < 0) { + ret = -1; + break; + } + } + } + } - fclose (fp); + fclose (fp); - if (ret == -1) - fprintf (stderr, "Error processing line %d of %s\n", linenum, file); + if (ret == -1) + fprintf (stderr, "Error processing line %d of %s\n", linenum, file); - return ret; + return ret; +} + +PRIVATE void setup_vtXXX_keymap NOARGS +{ + static Keysym_String_List table[] = { + DEFINE_KEY( "\033[A", UPARROW, KEY_UP ), + DEFINE_KEY( "\033OA", UPARROW, KEY_UP ), + DEFINE_KEY( "\033[B", DNARROW, KEY_DOWN ), + DEFINE_KEY( "\033OB", DNARROW, KEY_DOWN ), + DEFINE_KEY( "\033[C", RTARROW, KEY_RIGHT ), + DEFINE_KEY( "\033OC", RTARROW, KEY_RIGHT ), + DEFINE_KEY( "\033[D", LTARROW, KEY_LEFT ), + DEFINE_KEY( "\033OD", LTARROW, KEY_LEFT ), + DEFINE_KEY( "\033[1~", FIND_KEY, KEY_FIND ), + DEFINE_KEY( "\033[2~", INSERT_KEY, KEY_IC ), + DEFINE_KEY( "\033[3~", REMOVE_KEY, KEY_DC ), + DEFINE_KEY( "\033[4~", SELECT_KEY, KEY_SELECT ), + DEFINE_KEY( "\033[5~", PGUP, KEY_PPAGE ), + DEFINE_KEY( "\033[6~", PGDOWN, KEY_NPAGE ), + DEFINE_KEY( "\033[8~", END_KEY, KEY_END ), + DEFINE_KEY( "\033[7~", HOME, KEY_HOME), + DEFINE_KEY( "\033[28~", F1, KEY_F(0) ), + DEFINE_KEY( "\033[29~", DO_KEY, KEY_F(6) ), + }; + size_t n; + for (n = 0; n < TABLESIZE(table); n++) + define_key(table[n].string, table[n].value); } PUBLIC int lynx_initialize_keymaps NOARGS { - int i; - char keybuf[2]; +#ifdef USE_SLANG + int i; + char keybuf[2]; - if (NULL == (Keymap_List = SLang_create_keymap ("Lynx", NULL))) - return -1; + if (NULL == (Keymap_List = SLang_create_keymap ("Lynx", NULL))) + return -1; - keybuf[1] = 0; - for (i = 1; i < 256; i++) - { + keybuf[1] = 0; + for (i = 1; i < 256; i++) + { keybuf[0] = (char) i; - SLkm_define_keysym (keybuf, i, Keymap_List); - } + define_key (keybuf, i); + } - SLkm_define_keysym ("\033[A", UPARROW, Keymap_List); - SLkm_define_keysym ("\033OA", UPARROW, Keymap_List); - SLkm_define_keysym ("\033[B", DNARROW, Keymap_List); - SLkm_define_keysym ("\033OB", DNARROW, Keymap_List); - SLkm_define_keysym ("\033[C", RTARROW, Keymap_List); - SLkm_define_keysym ("\033OC", RTARROW, Keymap_List); - SLkm_define_keysym ("\033[D", LTARROW, Keymap_List); - SLkm_define_keysym ("\033OD", LTARROW, Keymap_List); - SLkm_define_keysym ("\033[1~", FIND_KEY, Keymap_List); - SLkm_define_keysym ("\033[2~", INSERT_KEY, Keymap_List); - SLkm_define_keysym ("\033[3~", REMOVE_KEY, Keymap_List); - SLkm_define_keysym ("\033[4~", SELECT_KEY, Keymap_List); - SLkm_define_keysym ("\033[5~", PGUP, Keymap_List); - SLkm_define_keysym ("\033[6~", PGDOWN, Keymap_List); - SLkm_define_keysym ("\033[8~", END_KEY, Keymap_List); - SLkm_define_keysym ("\033[7~", HOME, Keymap_List); - SLkm_define_keysym ("\033[28~", F1, Keymap_List); - SLkm_define_keysym ("\033[29~", DO_KEY, Keymap_List); - - SLkm_define_keysym ("\033[M", MOUSE_KEYSYM, Keymap_List); - - if (SLang_Error - || (-1 == read_keymap_file ())) - SLang_exit_error ("Unable to initialize keymaps"); - - return 0; + setup_vtXXX_keymap(); + define_key ("\033[M", MOUSE_KEYSYM); + + if (SLang_Error + || (-1 == read_keymap_file ())) + SLang_exit_error ("Unable to initialize keymaps"); + return 0; +#else + setup_vtXXX_keymap(); + return read_keymap_file(); +#endif } +#endif /* USE_KEYMAPS */ + +#if defined(USE_KEYMAPS) && defined(USE_SLANG) + /* We cannot guarantee the type for 'GetChar', and should not use a cast. */ PRIVATE int myGetChar NOARGS { @@ -552,11 +801,14 @@ PUBLIC int LYgetch NOARGS return keysym; } -#else + +#else /* !USE_KEYMAPS */ /* * LYgetch() translates some escape sequences and may fake noecho. */ +#define found_CSI(first,second) ((second) == '[' || (first) == 155) + PUBLIC int LYgetch NOARGS { int a, b, c, d = -1; @@ -583,7 +835,7 @@ re_read: #endif /* IGNORE_CTRL_C */ return(7); /* use ^G to cancel whatever called us. */ } - } + } #endif /* !USE_SLANG || VMS */ #ifdef USE_GETCHAR @@ -657,7 +909,7 @@ re_read: case 'q': c = END_KEY; break; /* keypad on pc ncsa telnet */ case 'M': #ifdef USE_SLANG_MOUSE - if ((c == 27) && (b == '[')) + if (found_CSI(c,b)) { c = sl_read_mouse_event (); } @@ -701,11 +953,11 @@ re_read: c = '0'; /* keypad 0 */ break; case '1': /** VTxxx Find **/ - if ((b == '[' || c == 155) && (d=GetChar()) == '~') + if (found_CSI(c,b) && (d=GetChar()) == '~') c = FIND_KEY; break; case '2': - if (b == '[' || c == 155) { + if (found_CSI(c,b)) { if ((d=GetChar())=='~') /** VTxxx Insert **/ c = INSERT_KEY; else if ((d == '8' || @@ -721,23 +973,23 @@ re_read: } break; case '3': /** VTxxx Delete **/ - if ((b == '[' || c == 155) && (d=GetChar()) == '~') + if (found_CSI(c,b) && (d=GetChar()) == '~') c = REMOVE_KEY; break; case '4': /** VTxxx Select **/ - if ((b == '[' || c == 155) && (d=GetChar()) == '~') + if (found_CSI(c,b) && (d=GetChar()) == '~') c = SELECT_KEY; break; case '5': /** VTxxx PrevScreen **/ - if ((b == '[' || c == 155) && (d=GetChar()) == '~') + if (found_CSI(c,b) && (d=GetChar()) == '~') c = PGUP; break; case '6': /** VTxxx NextScreen **/ - if ((b == '[' || c == 155) && (d=GetChar()) == '~') + if (found_CSI(c,b) && (d=GetChar()) == '~') c = PGDOWN; break; case '[': /** Linux F1-F5: ^[[[A etc. **/ - if (b == '[' || c == 155) { + if (found_CSI(c,b)) { if ((d=GetChar()) == 'A') c = F1; break; @@ -747,7 +999,7 @@ re_read: CTRACE_SLEEP(MessageSecs); break; } - if (isdigit(a) && (b == '[' || c == 155) && d != -1 && d != '~') + if (isdigit(a) && found_CSI(c,b) && d != -1 && d != '~') d = GetChar(); } #if HAVE_KEYPAD @@ -852,43 +1104,31 @@ re_read: #endif /* KEY_DC */ #ifdef NCURSES_MOUSE_VERSION case KEY_MOUSE: - { + { #ifndef DOSPATH - MEVENT event; - int err; - - c = -1; - mouse_link = -1; - err=getmouse(&event); - if (event.bstate & BUTTON1_CLICKED) { - c = set_clicked_link(event.x, event.y); - } else if (event.bstate & BUTTON3_CLICKED) { - c = LYReverseKeymap (LYK_PREV_DOC); - } + MEVENT event; + int err; + + c = -1; + mouse_link = -1; + err = getmouse(&event); + if (event.bstate & BUTTON1_CLICKED) { + c = set_clicked_link(event.x, event.y); + } else if (event.bstate & BUTTON3_CLICKED) { + c = LYReverseKeymap (LYK_PREV_DOC); + } #else /* pdcurses version */ - int left,right; - /* yes, I am assuming that my screen will be a certain width. */ - left = 6; - right = LYcols-6; - c = -1; - mouse_link = -1; - request_mouse_pos(); - if (Mouse_status.button[0] & BUTTON_CLICKED) { - if (Mouse_status.y == (LYlines-1)) { - if (Mouse_status.x < left) c=LTARROW; - else if (Mouse_status.x > right) c='\b'; - else c = PGDOWN; - } else if (Mouse_status.y == 0) { - if (Mouse_status.x < left) c=LTARROW; - else if (Mouse_status.x > right) c='\b'; - else c = PGUP; - } else { - c = set_clicked_link(Mouse_status.x, Mouse_status.y); + c = -1; + mouse_link = -1; + request_mouse_pos(); + if (BUTTON_STATUS(1) & BUTTON_CLICKED) { + c = set_clicked_link(MOUSE_X_POS, MOUSE_Y_POS); + } else if (BUTTON_STATUS(3) & BUTTON_CLICKED) { + c = LYReverseKeymap (LYK_PREV_DOC); } - } #endif /* DOSPATH */ - } - break; + } + break; #endif /* NCURSES_MOUSE_VERSION */ } } @@ -931,7 +1171,7 @@ re_read: } } #endif /* DGJPP_KEYHANDLER */ -#if defined(USE_SLANG) && defined(__DJGPP__) && !defined(DJGPP_KEYHANDLER) && !defined(USE_SLANG_KEYMAPS) +#if defined(USE_SLANG) && defined(__DJGPP__) && !defined(DJGPP_KEYHANDLER) && !defined(USE_KEYMAPS) else { switch(c) { case SL_KEY_DOWN: /* The four arrow keys ... */ @@ -964,7 +1204,7 @@ re_read: break; } } -#endif /* USE_SLANG && __DJGPP__ && !DJGPP_KEYHANDLER && !USE_SLANG_KEYMAPS */ +#endif /* USE_SLANG && __DJGPP__ && !DJGPP_KEYHANDLER && !USE_KEYMAPS */ #if (defined(__DJGPP__) || defined(_WINDOWS)) if (c > 659) @@ -983,7 +1223,7 @@ re_read: } } -#endif /* NOT USE_SLANG_KEYMAPS */ +#endif /* NOT USE_KEYMAPS */ /* * Convert a null-terminated string to lowercase diff --git a/src/LYStrings.h b/src/LYStrings.h index ccd78dee..14cb46cf 100644 --- a/src/LYStrings.h +++ b/src/LYStrings.h @@ -144,7 +144,7 @@ typedef struct _EditFieldData { #define LYE_AIX (LYE_LKCMD +1) /* Hex 97 */ -#if defined(USE_SLANG_KEYMAPS) +#if defined(USE_KEYMAPS) extern int lynx_initialize_keymaps NOPARAMS; #endif @@ -184,7 +184,7 @@ extern int current_lineedit; extern char * LYLineeditNames[]; extern char * LYLineEditors[]; -/* Push a chacter through the linedit machinery */ +/* Push a character through the lineedit machinery */ #define EditBinding(c) (LYLineEditors[current_lineedit][c]) #define LYLineEdit(e,c,m) LYEdit1(e,c,EditBinding(c),m) diff --git a/src/LYUtils.c b/src/LYUtils.c index caebd6b0..bbf90ac1 100644 --- a/src/LYUtils.c +++ b/src/LYUtils.c @@ -1,4 +1,5 @@ #include <HTUtils.h> +#include <HTTCP.h> #include <HTParse.h> #include <HTAccess.h> #include <HTCJK.h> @@ -4147,7 +4148,8 @@ PUBLIC BOOLEAN LYExpandHostForURL ARGS3( char *Host = NULL, *HostColon = NULL, *host = NULL; char *Path = NULL; char *Fragment = NULL; - struct hostent *phost; + int hoststat; + SockA sock; BOOLEAN GotHost = FALSE; BOOLEAN Startup = (helpfilepath == NULL); @@ -4222,7 +4224,8 @@ PUBLIC BOOLEAN LYExpandHostForURL ARGS3( fprintf(stdout, "Looking up '%s' first.\n", host); } #ifndef DJGPP - if ((phost = gethostbyname(host)) != NULL) + sock.sin_port = htons(80); + if ((hoststat = HTParseInet(&sock, host)) == 0) #else if (resolve(host) != 0) #endif /* DJGPP */ @@ -4243,7 +4246,11 @@ PUBLIC BOOLEAN LYExpandHostForURL ARGS3( FREE(Str); FREE(MsgStr); return GotHost; +#ifndef DJGPP + } else if (LYCursesON && ((hoststat == HT_INTERRUPTED) || HTCheckForInterrupt())) { +#else /* DJGPP */ } else if (LYCursesON && HTCheckForInterrupt()) { +#endif /* DJGPP */ /* * Give the user chance to interrupt lookup cycles. - KW & FM */ @@ -4339,7 +4346,8 @@ PUBLIC BOOLEAN LYExpandHostForURL ARGS3( fprintf(stdout, "Looking up '%s', guessing...\n", host); } #ifndef DJGPP - GotHost = ((phost = gethostbyname(host)) != NULL); + sock.sin_port = htons(80); + GotHost = ((hoststat = HTParseInet(&sock, host)) == 0); #else GotHost = (resolve(host) != 0); #endif /* DJGPP */ @@ -4350,7 +4358,12 @@ PUBLIC BOOLEAN LYExpandHostForURL ARGS3( /* * Give the user chance to interrupt lookup cycles. - KW */ - if (LYCursesON && HTCheckForInterrupt()) { +#ifndef DJGPP + if (LYCursesON && ((hoststat == HT_INTERRUPTED) || HTCheckForInterrupt())) +#else /* DJGPP */ + if (LYCursesON && HTCheckForInterrupt()) +#endif /* DJGPP */ + { CTRACE(tfp, "LYExpandHostForURL: Interrupted while '%s' failed to resolve.\n", host); FREE(Str); @@ -5827,6 +5840,26 @@ PUBLIC void LYLocalFileToURL ARGS2( #endif /* DOSPATH */ } +PUBLIC int LYOpenInternalPage ARGS2( + FILE *, fp0, + char **, newfile) +{ + static char tempfile[256]; + static char local_address[256]; + + LYRemoveTemp(tempfile); + if ((fp0 = LYOpenTemp(tempfile, HTML_SUFFIX, "w")) == NULL) { + HTAlert(CANNOT_OPEN_TEMP); + return(-1); + } + + LYLocalFileToURL(local_address, tempfile); + StrAllocCopy(*newfile, local_address); + LYforce_no_cache = TRUE; /* don't cache this doc */ + + return(0); /* OK */ +} + PUBLIC void BeginInternalPage ARGS3( FILE *, fp0, char*, Title, @@ -5854,16 +5887,15 @@ PUBLIC void BeginInternalPage ARGS3( if ((user_mode == NOVICE_MODE) && LYwouldPush(Title) && (HelpURL != 0)) { - fprintf(fp0, "<h1>%s (%s), help on <a href=\"%s%s\">%s</a></h1>\n", - LYNX_NAME, LYNX_VERSION, - helpfilepath, HelpURL, Title); + fprintf(fp0, "<h1>%s (%s Version %s), <a href=\"%s%s\">help</a></h1>\n", + Title, LYNX_NAME, LYNX_VERSION, + helpfilepath, HelpURL); } else { - fprintf(fp0, "<h1>%s (%s Version %s)</h1>\n", + fprintf(fp0, "<h1>%s (%s Version %s)</h1>\n", Title, LYNX_NAME, LYNX_VERSION); } } - PUBLIC void EndInternalPage ARGS1( FILE *, fp0) { diff --git a/src/LYUtils.h b/src/LYUtils.h index fee1718e..687007c1 100644 --- a/src/LYUtils.h +++ b/src/LYUtils.h @@ -13,6 +13,8 @@ #define LYIsHtmlSep(ch) ((ch) == '/') +#define TABLESIZE(v) (sizeof(v)/sizeof(v[0])) + extern BOOLEAN LYAddSchemeForURL PARAMS((char **AllocatedString, char *default_scheme)); extern BOOLEAN LYCachedTemp PARAMS((char *result, char **cached)); extern BOOLEAN LYCanDoHEAD PARAMS((CONST char *address)); @@ -40,6 +42,7 @@ extern int LYSystem PARAMS((char *command)); extern int is_url PARAMS((char *filename)); extern int number2arrows PARAMS((int number)); extern time_t LYmktime PARAMS((char *string, BOOL absolute)); +extern int LYOpenInternalPage PARAMS((FILE *fp0, char **newfile)); extern void BeginInternalPage PARAMS((FILE *fp0, char *Title, char *HelpURL)); extern void EndInternalPage PARAMS((FILE *fp0)); extern void HTAddSugFilename PARAMS((char *fname)); diff --git a/src/LYrcFile.c b/src/LYrcFile.c index c5326615..78639b05 100644 --- a/src/LYrcFile.c +++ b/src/LYrcFile.c @@ -10,10 +10,16 @@ #include <LYLeaks.h> +#ifdef FNAMES_8_3 +#define FNAME_LYNXRC "lynx.rc" +#else +#define FNAME_LYNXRC ".lynxrc" +#endif /* FNAMES_8_3 */ + PUBLIC void read_rc NOPARAMS { char line_buffer[256]; - char rcfile[256]; + char rcfile[LY_MAXPATH]; FILE *fp; char *cp, *cp2; int number_sign; @@ -25,15 +31,7 @@ PUBLIC void read_rc NOPARAMS /* * Make an RC file name. */ -#ifdef DJGPP - sprintf(rcfile, "%s/lynx.rc", Home_Dir()); -#else -#ifdef VMS - sprintf(rcfile, "sys$login:.lynxrc"); -#else - sprintf(rcfile, "%s/.lynxrc", Home_Dir()); -#endif /* VMS */ -#endif /* DJGPP */ + LYAddPathToHome(rcfile, sizeof(rcfile), FNAME_LYNXRC); /* * Open the RC file for reading. @@ -251,7 +249,6 @@ PUBLIC void read_rc NOPARAMS for (; LYchar_set_names[i]; i++) { if (!strncmp(cp, LYchar_set_names[i], strlen(cp))) { current_char_set=i; - HTMLSetRawModeDefault(i); break; } } @@ -549,7 +546,7 @@ PUBLIC void read_rc NOPARAMS PUBLIC int save_rc NOPARAMS { - char rcfile[256]; + char rcfile[LY_MAXPATH]; FILE *fp; int i; int MBM_c; @@ -557,15 +554,7 @@ PUBLIC int save_rc NOPARAMS /* * Make a name. */ -#ifdef DJGPP - sprintf(rcfile, "%s/lynx.rc", Home_Dir()); -#else -#ifdef VMS - sprintf(rcfile, "sys$login:.lynxrc"); -#else - sprintf(rcfile, "%s/.lynxrc", Home_Dir()); -#endif /* VMS */ -#endif /* DJGPP */ + LYAddPathToHome(rcfile, sizeof(rcfile), FNAME_LYNXRC); /* * Open the file for write. @@ -854,7 +843,7 @@ PUBLIC int save_rc NOPARAMS * Lineedit mode. */ fprintf(fp, "\ -# linedit_mode specifies the key binding used for inputting strings in\n\ +# lineedit_mode specifies the key binding used for inputting strings in\n\ # prompts and forms. If lineedit_mode is set to \"Default Binding\" then\n\ # the following control characters are used for moving and deleting:\n\ #\n\ diff --git a/src/UCAux.c b/src/UCAux.c index 01ea1593..6847b150 100644 --- a/src/UCAux.c +++ b/src/UCAux.c @@ -37,9 +37,9 @@ PUBLIC BOOL UCCanTranslateFromTo ARGS2( return YES; if (from < 0 || to < 0) return NO; - if (from == 0) + if (from == LATIN1) return UCCanTranslateUniTo(to); - if (to == 0 || LYCharSet_UC[to].enc == UCT_ENC_UTF8) + if (to == LATIN1 || LYCharSet_UC[to].enc == UCT_ENC_UTF8) return UCCanUniTranslateFrom(from); { CONST char * fromname = LYCharSet_UC[from].MIMEname; @@ -102,7 +102,7 @@ PUBLIC BOOL UCNeedNotTranslate ARGS2( } if (to < 0) return NO; /* ??? */ - if (to == 0) { + if (to == LATIN1) { if (LYCharSet_UC[from].codepoints & (UCT_CP_SUBSETOF_LAT1)) return YES; } @@ -113,7 +113,7 @@ PUBLIC BOOL UCNeedNotTranslate ARGS2( if (LYCharSet_UC[to].enc == UCT_ENC_UTF8) { return NO; } - if (from == 0) { + if (from == LATIN1) { if (LYCharSet_UC[from].codepoints & (UCT_CP_SUPERSETOF_LAT1)) return YES; } @@ -121,14 +121,7 @@ PUBLIC BOOL UCNeedNotTranslate ARGS2( if (HTCJK == NOCJK) /* Use that global flag, for now. */ return NO; if (HTCJK == JAPANESE && - /* - ** Always strip the "x-" from "x-euc-jp", - ** or convert "x-shift-jis" to "shift_jis", - ** before calling this function, and so - ** don't check for them here. - FM - */ (!strcmp(fromname, "euc-jp") || - !strncmp(fromname, "iso-2022-jp",11) || !strcmp(fromname, "shift_jis"))) return YES; /* ??? */ return NO; /* If not handled by (from == to) above. */ @@ -185,7 +178,7 @@ PUBLIC void UCSetTransParams ARGS5( pT->trans_C0_to_uni = (p_in->enc == UCT_ENC_8BIT_C0 || p_out->enc == UCT_ENC_8BIT_C0); } else { - /* + /* ** Initialize local flags. - FM */ BOOL intm_ucs = FALSE; @@ -222,7 +215,7 @@ PUBLIC void UCSetTransParams ARGS5( ** equivalent to them, i.e. if we have UCS without ** having to do a table translation. */ - intm_ucs = (cs_in == 0 || pT->decode_utf8 || + intm_ucs = (cs_in == LATIN1 || pT->decode_utf8 || (p_in->codepoints & (UCT_CP_SUBSETOF_LAT1|UCT_CP_SUBSETOF_UCS2))); /* @@ -277,7 +270,7 @@ PUBLIC void UCSetTransParams ARGS5( */ pT->use_raw_char_in = (!pT->output_utf8 && cs_in == cs_out && - !pT->trans_C0_to_uni); + !pT->trans_C0_to_uni); /* ** This should be set TRUE when we expect to have ** done translation to Unicode or had the equivalent @@ -412,7 +405,7 @@ PUBLIC BOOL UCConvertUniToUtf8 ARGS2( if (code <= 0 || code > 0x7fffffffL) { *ch = '\0'; - return NO; + return NO; } if (code < 0x800L) { diff --git a/src/UCdomap.c b/src/UCdomap.c index 0392457b..146538e0 100644 --- a/src/UCdomap.c +++ b/src/UCdomap.c @@ -23,6 +23,7 @@ #include <UCMap.h> #include <UCDefs.h> #include <LYCharSets.h> +#include <LYStrings.h> /* * Include tables & parameters. @@ -1274,7 +1275,7 @@ PUBLIC long int UCTransToUni ARGS2( ch_iu = (unsigned char)ch_in; #ifndef UC_NO_SHORTCUTS - if (charset_in == 0) + if (charset_in == LATIN1) return ch_iu; if ((unsigned char)ch_in < 128 && (unsigned char)ch_in >= 32) return ch_iu; @@ -1502,27 +1503,34 @@ PUBLIC int UCGetRawUniMode_byLYhndl ARGS1( } /* - * Currently the charset name has to match exactly -- not substring - * matching as was done before (see HTMIME.c, HTML.c). + * Get Lynx internal charset handler from MIME name, + * return -1 if we got NULL or did not recognize value. + * According to RFC, MIME headers should match case-insensitively. */ PUBLIC int UCGetLYhndl_byMIME ARGS1( - CONST char *, UC_MIMEcharset) + CONST char *, value) { int i; int LYhndl = -1; + char *UC_MIMEcharset = NULL; - if (!UC_MIMEcharset || !(*UC_MIMEcharset)) + if (!value || !(*value)) { + CTRACE(tfp, "UCGetLYhndl_byMIME: NULL argument instead of MIME name.\n"); return -1; + } + + StrAllocCopy(UC_MIMEcharset, value); + LYLowerCase(UC_MIMEcharset); for (i = 0; (i < MAXCHARSETS && i < LYNumCharsets && - LYchar_set_names[i] && LYhndl < 0); i++) { + LYchar_set_names[i]); i++) { if (LYCharSet_UC[i].MIMEname && !strcmp(UC_MIMEcharset, LYCharSet_UC[i].MIMEname)) { - LYhndl = i; + return i; } } - if (LYhndl < 0) { + { /* * Not yet found, try synonyms. - FM */ @@ -1625,9 +1633,12 @@ PUBLIC int UCGetLYhndl_byMIME ARGS1( } if (!strcmp(UC_MIMEcharset, "koi-8")) { /* accentsoft bugosity */ return UCGetLYhndl_byMIME("koi8-r"); - } + } } - return LYhndl; /* returns -1 if no charset found by that MIME name */ + /* no more synonyms if come here... */ + + CTRACE(tfp, "UCGetLYhndl_byMIME: unrecognized MIME name \"%s\"\n", value); + return -1; /* returns -1 if no charset found by that MIME name */ } /* @@ -2059,3 +2070,19 @@ PUBLIC void UCInit NOARGS * check function UCGetLYhndl_byMIME in this file. */ } + +/* + * Safe variant of UCGetLYhndl_byMIME, with blind recovery from typo + * in user input: lynx.cfg, userdefs.h, switches from command line. + */ +PUBLIC int safeUCGetLYhndl_byMIME ARGS1 (CONST char *, value) +{ + int i = UCGetLYhndl_byMIME(value); + + if (i == -1) { /* was user's typo or not yet recognized value */ + i = LATIN1; /* error recovery? */ + CTRACE(tfp, "safeUCGetLYhndl_byMIME: ISO-8859-1 assumed.\n"); + } + + return(i); +} diff --git a/userdefs.h b/userdefs.h index f3a2067a..22cf6fde 100644 --- a/userdefs.h +++ b/userdefs.h @@ -344,16 +344,14 @@ #define TEMP_SPACE "/tmp/" /******************************** - * Don't let the user enter his/her email address when sending a message. - * Anonymous mail makes it far too easy for a user to spoof someone else's - * email address. - * This requires that your mailer agent put in the From: field for you. - * - * The default should be to uncomment this line but there probably are too - * many mail agents out there that won't do the right thing if there is no - * From: line. + * Comment this line out to let the user enter his/her email address + * when sending a message. There should be no need to do this unless + * your mailer agent does not put in the From: field for you. (If your + * mailer agent does not automatically put in the From: field, you should + * upgrade, because anonymous mail makes it far too easy for a user to + * spoof someone else's email address.) */ -/* #define NO_ANONYMOUS_EMAIL TRUE */ +#define NO_ANONYMOUS_EMAIL TRUE /******************************** * LIST_FORMAT defines the display for local files when LONG_LIST @@ -1218,7 +1216,7 @@ * the version definition with the Project Version on checkout. Just * ignore it. - kw */ /* $Format: "#define LYNX_VERSION \"$ProjectVersion$\""$ */ -#define LYNX_VERSION "2.8.1dev.25" +#define LYNX_VERSION "2.8.1dev.26" #define LYNX_WWW_HOME "http://lynx.browser.org/" #define LYNX_WWW_DIST "http://www.slcc.edu/lynx/current/" #define LYNX_RELEASE FALSE |