diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 1999-04-13 09:48:41 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 1999-04-13 09:48:41 -0400 |
commit | b223937ff728f8242329bedb9c660e81da253e9a (patch) | |
tree | bbf056969500f54306deda5db38ff2a6198f3ce9 | |
parent | 327b7c16889c9d95ec076d695c970da11dc32a2b (diff) | |
download | lynx-snapshots-b223937ff728f8242329bedb9c660e81da253e9a.tar.gz |
snapshot of project "lynx", label v2-8-2dev_22
88 files changed, 6172 insertions, 3267 deletions
diff --git a/CHANGES b/CHANGES index 2b31a95d..f64c7a73 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,109 @@ Changes since Lynx 2.8 release ================================================================================ +1999-04-13 (2.8.2dev.22) +* correct a missing include for LYLeaks.h in UCAuto.c - TD +* implement HTML source caching. In this implementation, each document kept in + cache has associated with it a temporary file containing the HTML source for + the document (well, not all of them -- only those using the HTTP protocol, on + the premise that file:// documents are probably local and ftp:// documents + are probably not HTML). The temporary file is deleted when the document is + uncached. For certain operations, instead of reloading the document via + HTLoad<mumble>(), the source file is reparsed with HTParseFile(). The cached + document also remembers certain parser settings (screen size, historical vs. + minimal vs. valid comment parsing, and the like), and is regenerated from + source if it is fetched out of cache under different settings. This behavior + is selectable by a configure option --enable-source-cache and by a lynx.cfg + option SOURCE_CACHE; I didn't add a command-line argument or an options menu + entry, as this didn't seem to be the sort of thing one would want to change + at runtime. (Scott Bigham <dsb@cs.duke.edu>) +* amend HTConfirmDefault() logic so that a second character will cause the + default response to be returned, e.g,. so that pressing "qq" will make + Lynx exit (reported by John Bley) - TD +* change the PUTS("\n") calls in HTFile.c to PUTC('\n') since that would be + a little more efficient (noted by KW) - TD +* minor cleanup: remove obsolete parameters from command-line parsing functions + in LYMain.c, add newlines in HTFile.c for readability of html - LP +* change default STARTFILE to the current directory, "." - PW +* revised lynx-dev.html - PW +* lynx.cfg and farther included cfg files can be edited from LYNXCFG:/ page + with the default editor and changes can be activated for the same lynx + session. NOT allowed for restricted users (LYRestricted) and occasionally + for user mode other than ADVANCED. This is an *experimental* code + (reload_read_cfg() in LYMain.c - more work required): currently command-line + switches may be lost when overriden by lynx.cfg changes, file paths like + lynx_temp_space and LYCookieFile should not be changed (unwanted results) -LP +* retest PARSE_DEBUG ifdef's (LYMain.c, LYReadCFG.c), minor corrections + but found no specific reason for LP's problem with tables, except possibly + different effect from "&(value)" versus "(&value)" - TD +* fix the problem of reading included lynx.cfg files by changing LYReadCFG.c + table signature (now it is more close to one in LYMain.c). The problem was + the ignoring of *some* values got from the included cfg file (at least for + DJGPP2.02/gcc2.8.1 build). Probably we calculate the addresses of variables + on a later stage now. - LP +* DOSPATH changes: local directory style now configurable from lynx.cfg + (LONG_LIST defined). Unlike UNIX it is not "ls -l" by default + but a more compact form (date and size present, from lynx.cfg example) - LP +* cookies: domains now match case insensitively (reported by Paul Wagner + <paul.wagner@mci.com>) - LP +* correct an ifdef in LYGetFile.c for config-page - LP +* reading of long local directories now benefits from partial mode and fully + interruptable. Split out print_local_dir() function from HTLoadFile() - LP +* behave sanely if NSL_FORK fork() fails -BL +* NSL_FORK try for dns_patience *seconds*, not dns_patience select() calls, + which might have been shortened by keyboard input -BL +* fix some screwy comment indentation -BL +* add section on editing TEXTAREA to user's guide - PW +* add a null-pointer check in LYCookie.c (Bill Nottingham <notting@redhat.com>) +* revise changes ifdef'ing LY_FIND_LEAKS by making atexit a no-op function + since the DOS port depends on atexit to keep the DOS BREAK function properly + set on exit. Put back atexit, and ifdef's each place where atexit isn't + needed except when finding leaks - DK +* modify LYMain.c on DOS, fixing the determination of BREAK status to be + independent of SLANG or PDCurses - DK +* spawn a new function, www_user_search_internals, to begin cancelling the + effects of cut-n-paste coding in www_user_search. The body of + www_user_search_internals used to be duplicated at two points in + www_user_search. See comment in GridText.c for more details. (John Bley) +* big pile of unneeded #includes removed (John Bley) +* remove obsolete files from the distribution (John Bley) + WWW/Library/Implementation/HTWriter.* +* one malloc check, fix --disable-ftp (John Bley) +* fixes for compiler warnings when building for OpenVMS 6.2 using DEC C and the + SOCKETSHR library (reported by Andy Harper) - TD +* add cpp -H option for HPUX bundled C compiler, which otherwise does not + have enough symbol table space (reported by JS). Also, modify ifdefs + for <stdarg.h> vs <varargs.h> to avoid including the former when ANSI_VARARGS + is not defined since HPUX had a broken <stdarg.h> - TD +* changed OMIT_SCN_KEEPING ifdef to 0 (inactive) in LYCurses.c and in HTML.c, + still enabling the Style_className:HTML.c keeping and making lynx with lss + slightly slower than it could be (though faster then dev21). If somebody + wishes to fix a bug, here is a description: If contents of some tag that has + corresponding color style occupies more than 2 screens, after navigating to + the page, on which the content of that block starts, and then pressing PGDN + PGDN PGUP, the effect (color style) of that tag will be lost. The same + (loosing style) happens when jumping to the anchor that is in such block and + is located not on the 1st page. IMO this is something with style stack. If + this will be fixed, then keeping of Style_className:HTML.c can be omitted + again -VH +* Fixed the bug in lynx with lss support -when displaying html pieces such as + <b> A <b> B </b> C </b>, only 'AB' was drawn in style corresponding to <b> -VH +* added HTML source syntax highlighting (when option -prettysrc that is added + is given to lynx). It's available for lynx compiled with and without lss + support (it can be much more beatiful when compiled with lss support - read + lynx.cfg for description). This functionality coexists with old source view + and with -preparsed logic (ie different commandline options make source view + logic different) VH +* HTChunkPutc was inlined in SGML.c for better performance -VH +* Keeping of Style_className was omitted in HTML.c to increase performance of + lynx compiled with lss support. -VH +* perfomance of lynx compiled with lss support is increased ~ by 15-20% for + normal documents, and by up to 50% for documents with a lot of tags VH +* fixed bug in lynx compiled with lss support that caused it to load local CSS + stylesheets - lynx didn't understand their syntax so it was exiting VH +* added type information for attributes in HTMLDTD.c (it's used in source + syntax highlighting mode) VH +* sample .lss files are updated to support source syntax highlighting VH 1999-03-30 (2.8.2dev.21) * disable LYatexit if memory-leak testing is not configured. * fixes for unhighlighting problems with color-style support (Vlad Harchev) @@ -10,7 +113,7 @@ Changes since Lynx 2.8 release and change link to more suitable location for rfc1945 - PW * correct logic of --disable-full-paths configure option (reported by Georg Schwarz) - TD -* fix problems building on OpenVMS with DECC 6.2 (reported by Andy Harper +* fix problems building on OpenVMS with DECC 6.2 (reported by Andy Harper <Andy.Harper@kcl.ac.uk>) + remove 'DEBUG' definition from build scripts since it is defined in the source code. @@ -29,9 +132,8 @@ Changes since Lynx 2.8 release message is shown - LW * Fix of HTUnEscapeSome in HTParse.c for non-ASCII - KW, PG * tidy up around ed_offset initialization in GridText.c - KED - (the patch as given will not compile on a non-ANSI compiler because it uses - aggregate initialization, and it's not clear why the ed_offset variable - must be initialized since the variable is sprintf'd before use - TD) + (the patch as given did not compile on a non-ANSI compiler because it used + aggregate initialization - TD) * add samples/mild-colors.lss (Vlad Harchev) * add samples/blue-background.lss (from Sergey Svishchev <svs@ropnet.ru>) * documentation updates for INSTALLATION and PROBLEMS - PW diff --git a/INSTALLATION b/INSTALLATION index 2bf44ac3..b7d59bb0 100644 --- a/INSTALLATION +++ b/INSTALLATION @@ -265,7 +265,8 @@ II. Compile instructions -- UNIX ./po subdirectory. --disable-long-list (prevent defining LONG_LIST) - Use this option to disable long "ls -l" directory listings. + Use this option to disable long "ls -l" directory listings (when + enabled, the actual directory style is configurable from lynx.cfg). --disable-menu-options (define NO_OPTION_MENU) Disable the menu-style options screen. (See --disable-forms-options). @@ -363,6 +364,10 @@ II. Compile instructions -- UNIX directory. (Currently there is no protection against conflict if several lynx copies active from the same account). + --enable-source-cache (define SOURCE_CACHE) + Use this option to compile-in support for caching HTML pages locally, + in files. + --enable-syslog (define SYSLOG_REQUESTED_URLS) Use this option to log NSL requests via syslog(). diff --git a/WWW/Library/Implementation/CommonMakefile b/WWW/Library/Implementation/CommonMakefile index c176beda..ff548663 100644 --- a/WWW/Library/Implementation/CommonMakefile +++ b/WWW/Library/Implementation/CommonMakefile @@ -75,7 +75,7 @@ CERNLIBBIN = $(WWW)/bin COMMON = $(LOB)/HTParse.o $(LOB)/HTAccess.o $(LOB)/HTTP.o \ $(LOB)/HTFile.o $(LOB)/HTBTree.o $(LOB)/HTFTP.o $(LOB)/HTTCP.o \ $(LOB)/SGML.o $(LOB)/HTMLDTD.o $(LOB)/HTChunk.o \ - $(LOB)/HTPlain.o $(LOB)/HTWriter.o \ + $(LOB)/HTPlain.o \ $(LOB)/HTMLGen.o \ $(LOB)/HTAtom.o $(LOB)/HTAnchor.o $(LOB)/HTStyle.o \ $(LOB)/HTList.o $(LOB)/HTString.o \ @@ -92,7 +92,7 @@ CFILES = $(CMN)HTParse.c $(CMN)HTAccess.c $(CMN)HTTP.c $(CMN)HTFile.c \ $(CMN)HTBTree.c \ $(CMN)HTFTP.c $(CMN)HTTCP.c $(CMN)SGML.c \ $(CMN)HTMLDTD.c \ - $(CMN)HTPlain.c $(CMN)HTWriter.c \ + $(CMN)HTPlain.c \ $(CMN)HTMLGen.c \ $(CMN)HTChunk.c $(CMN)HTAtom.c $(CMN)HTAnchor.c $(CMN)HTStyle.c \ $(CMN)HTList.c $(CMN)HTString.c $(CMN)HTRules.c \ @@ -107,7 +107,7 @@ CFILES = $(CMN)HTParse.c $(CMN)HTAccess.c $(CMN)HTTP.c $(CMN)HTFile.c \ HFILES = $(CMN)HTParse.h $(CMN)HTAccess.h $(CMN)HTTP.h $(CMN)HTFile.h \ $(CMN)HTBTree.h $(CMN)HTFTP.h $(CMN)HTTCP.h \ $(CMN)SGML.h $(CMN)HTML.h $(CMN)HTMLDTD.h $(CMN)HTChunk.h \ - $(CMN)HTPlain.h $(CMN)HTWriter.h \ + $(CMN)HTPlain.h \ $(CMN)HTFWriter.h $(CMN)HTMLGen.h \ $(CMN)HTStream.h \ $(CMN)HTAtom.h $(CMN)HTAnchor.h $(CMN)HTStyle.h \ @@ -284,10 +284,6 @@ $(LOB)/HTWAIS.o : $(OE) $(CMN)HTWAIS.c $(CMN)HTUtils.h $(CMN)HTList.h $(LOB)/HTWSRC.o : $(OE) $(CMN)HTWSRC.c $(CMN)HTUtils.h $(CMN)HTList.h $(COMPILE) $(CMN)HTWSRC.c -$(LOB)/HTWriter.o : $(OE) $(CMN)HTWriter.c $(CMN)HTWriter.h $(CMN)HTStream.h - $(COMPILE) $(CMN)HTWriter.c - - # Access Authorization $(LOB)/HTAAUtil.o : $(OE) $(CMN)HTAAUtil.c $(CMN)HTAAUtil.h \ diff --git a/WWW/Library/Implementation/HTAABrow.c b/WWW/Library/Implementation/HTAABrow.c index ca7979fe..0f72cc71 100644 --- a/WWW/Library/Implementation/HTAABrow.c +++ b/WWW/Library/Implementation/HTAABrow.c @@ -837,7 +837,9 @@ PUBLIC char *HTAA_composeAuth ARGS4( ** Setup atexit() freeing if not done already. - FM */ if (!free_HTAAGlobalsSet) { +#ifdef LY_FIND_LEAKS atexit(free_HTAAGlobals); +#endif free_HTAAGlobalsSet = TRUE; } @@ -1065,7 +1067,9 @@ PUBLIC BOOL HTAA_shouldRetryWithAuth ARGS4( ** Setup atexit() freeing if not done already. - FM */ if (!free_HTAAGlobalsSet) { +#ifdef LY_FIND_LEAKS atexit(free_HTAAGlobals); +#endif free_HTAAGlobalsSet = TRUE; } diff --git a/WWW/Library/Implementation/HTAAProt.c b/WWW/Library/Implementation/HTAAProt.c index 27e038f9..7a607e66 100644 --- a/WWW/Library/Implementation/HTAAProt.c +++ b/WWW/Library/Implementation/HTAAProt.c @@ -607,7 +607,9 @@ PRIVATE void save_gid_info ARGS2(char *, name, int, user) if (!known_grp) { known_grp = HTList_new(); if (!uidgid_cache_inited) { +#ifdef LY_FIND_LEAKS atexit(clear_uidgid_cache); +#endif uidgid_cache_inited = YES; } } @@ -624,7 +626,9 @@ PRIVATE void save_uid_info ARGS2(char *, name, int, user) if (!known_pwd) { known_pwd = HTList_new(); if (!uidgid_cache_inited) { +#ifdef LY_FIND_LEAKS atexit(clear_uidgid_cache); +#endif uidgid_cache_inited = YES; } } diff --git a/WWW/Library/Implementation/HTAAUtil.c b/WWW/Library/Implementation/HTAAUtil.c index 30dc677d..c978d24d 100644 --- a/WWW/Library/Implementation/HTAAUtil.c +++ b/WWW/Library/Implementation/HTAAUtil.c @@ -498,7 +498,9 @@ PUBLIC void HTAA_setupReader ARGS3(char *, start_of_headers, (size_t)(sizeof(char)*(buffer_length + 1))); } if (buffer == NULL) outofmem(__FILE__, "HTAA_setupReader"); +#ifdef LY_FIND_LEAKS atexit(FreeHTAAUtil); +#endif start_pointer = buffer; if (start_of_headers) { strncpy(buffer, start_of_headers, length); diff --git a/WWW/Library/Implementation/HTAccess.c b/WWW/Library/Implementation/HTAccess.c index 9d49018d..cc180e88 100644 --- a/WWW/Library/Implementation/HTAccess.c +++ b/WWW/Library/Implementation/HTAccess.c @@ -105,7 +105,9 @@ PUBLIC BOOL HTRegisterProtocol ARGS1( { if (!protocols) { protocols = HTList_new(); +#ifdef LY_FIND_LEAKS atexit(free_protocols); +#endif } HTList_addObject(protocols, protocol); return YES; diff --git a/WWW/Library/Implementation/HTAnchor.c b/WWW/Library/Implementation/HTAnchor.c index aa6a8875..22af2bfb 100644 --- a/WWW/Library/Implementation/HTAnchor.c +++ b/WWW/Library/Implementation/HTAnchor.c @@ -377,7 +377,9 @@ PUBLIC HTAnchor * HTAnchor_findAddress ARGS1( adult_table = (HTList **)calloc(HASH_SIZE, sizeof(HTList *)); if (!adult_table) outofmem(__FILE__, "HTAnchor_findAddress"); +#ifdef LY_FIND_LEAKS atexit(free_adult_table); +#endif } if (!adult_table[hash]) adult_table[hash] = HTList_new(); diff --git a/WWW/Library/Implementation/HTAssoc.c b/WWW/Library/Implementation/HTAssoc.c index f5dcbf11..05b631cd 100644 --- a/WWW/Library/Implementation/HTAssoc.c +++ b/WWW/Library/Implementation/HTAssoc.c @@ -18,9 +18,7 @@ #include <HTUtils.h> -#include <HTAAUtil.h> #include <HTAssoc.h> -#include <HTString.h> #include <LYLeaks.h> diff --git a/WWW/Library/Implementation/HTAtom.c b/WWW/Library/Implementation/HTAtom.c index 66e666dd..44ac6c7a 100644 --- a/WWW/Library/Implementation/HTAtom.c +++ b/WWW/Library/Implementation/HTAtom.c @@ -54,7 +54,9 @@ PUBLIC HTAtom * HTAtom_for ARGS1(CONST char *, string) for (i = 0; i < HASH_SIZE; i++) hash_table[i] = (HTAtom *) 0; initialised = YES; +#ifdef LY_FIND_LEAKS atexit(free_atoms); +#endif } /* Generate hash function diff --git a/WWW/Library/Implementation/HTChunk.c b/WWW/Library/Implementation/HTChunk.c index 7cab693c..0149dfff 100644 --- a/WWW/Library/Implementation/HTChunk.c +++ b/WWW/Library/Implementation/HTChunk.c @@ -70,6 +70,8 @@ PUBLIC void HTChunkFree ARGS1 (HTChunk *,ch) /* Append a character ** ------------------ */ +/* Warning: the code of this function is defined as macro in SGML.c. Change + the macro or undefine it in SGML.c when changing this function. -VH */ PUBLIC void HTChunkPutc ARGS2 (HTChunk *,ch, char,c) { if (ch->size >= ch->allocated) { diff --git a/WWW/Library/Implementation/HTFTP.c b/WWW/Library/Implementation/HTFTP.c index 4ec025ab..bd077644 100644 --- a/WWW/Library/Implementation/HTFTP.c +++ b/WWW/Library/Implementation/HTFTP.c @@ -636,7 +636,9 @@ PRIVATE int get_connection ARGS2( /* ** Set up freeing at exit. - FM */ +#ifdef LY_FIND_LEAKS atexit(free_FTPGlobals); +#endif firstuse = FALSE; } diff --git a/WWW/Library/Implementation/HTFile.c b/WWW/Library/Implementation/HTFile.c index 3a16e31e..3b82c090 100644 --- a/WWW/Library/Implementation/HTFile.c +++ b/WWW/Library/Implementation/HTFile.c @@ -23,7 +23,11 @@ #include <HTUtils.h> #ifndef VMS -/* #define LONG_LIST */ /* Define this for long style unix listings (ls -l) */ +#ifdef DOSPATH +#define LONG_LIST /* Define this for long style unix listings (ls -l), + the actual style is configurable from lynx.cfg */ +#define lstat stat +#endif /* #define NO_PARENT_DIR_REFERENCE */ /* Define this for no parent links */ #endif /* !VMS */ @@ -53,7 +57,6 @@ #include <HTAnchor.h> #include <HTAtom.h> #include <HTAAProt.h> -#include <HTWriter.h> #include <HTFWriter.h> #include <HTInit.h> #include <HTBTree.h> @@ -404,7 +407,7 @@ PRIVATE void LYListFmtParse ARGS5( } FREE(buf); END(HTML_PRE); - PUTS("\n"); + PUTC('\n'); FREE(str); } #endif /* LONG_LIST */ @@ -458,7 +461,9 @@ PUBLIC void HTSetSuffix5 ARGS5( */ if (!HTSuffixes) { HTSuffixes = HTList_new(); +#ifdef LY_FIND_LEAKS atexit(free_suffixes); +#endif } HTList_addObject(HTSuffixes, suff); @@ -516,6 +521,8 @@ PRIVATE void free_suffixes NOARGS } #endif /* LY_FIND_LEAKS */ +extern void HTDisplayPartial NOARGS; + /* Send README file. ** ----------------- ** @@ -565,6 +572,7 @@ Bug removed thanks to joe@athena.mit.edu */ #endif /* NOTDEFINED */ } END(HTML_PRE); + HTDisplayPartial(); fclose(fp); } } @@ -1310,26 +1318,26 @@ PUBLIC BOOL HTDirTitles ARGS3( #endif /* DIRED_SUPPORT */ START(HTML_HEAD); - PUTS("\n"); + PUTC('\n'); START(HTML_TITLE); PUTS(*printable ? printable : WELCOME_MSG); PUTS(SEGMENT_DIRECTORY); END(HTML_TITLE); - PUTS("\n"); + PUTC('\n'); END(HTML_HEAD); - PUTS("\n"); + PUTC('\n'); #ifdef DIRED_SUPPORT START(HTML_H2); PUTS(*printable ? SEGMENT_CURRENT_DIR : ""); PUTS(*printable ? printable : WELCOME_MSG); END(HTML_H2); - PUTS("\n"); + PUTC('\n'); #else START(HTML_H1); PUTS(*printable ? printable : WELCOME_MSG); END(HTML_H1); - PUTS("\n"); + PUTC('\n'); #endif /* DIRED_SUPPORT */ if (((0 == strncasecomp(printable, "vmsysu:", 7)) && (cp = strchr(printable, '.')) != NULL && @@ -1455,6 +1463,7 @@ PUBLIC BOOL HTDirTitles ARGS3( PUTS("/"); } END(HTML_A); + PUTC('\n'); } #endif /* !NO_PARENT_DIR_REFERENCE */ @@ -1463,6 +1472,361 @@ PUBLIC BOOL HTDirTitles ARGS3( return(need_parent_link); } +PRIVATE int print_local_dir ARGS5( + DIR *, dp, + char *, localname, + HTParentAnchor *, anchor, + HTFormat, format_out, + HTStream *, sink) +{ + HTStructured *target; /* HTML object */ + HTStructuredClass targetClass; + STRUCT_DIRENT * dirbuf; + char *logical = NULL; + char *pathname = NULL; + char *tail = NULL; + BOOL present[HTML_A_ATTRIBUTES]; + char * tmpfilename = NULL; + BOOL need_parent_link = FALSE; + struct stat file_info; + int status; + + CTRACE(tfp, "print_local_dir() started\n"); + + logical = HTAnchor_address((HTAnchor*)anchor); + pathname = HTParse(logical, "", + PARSE_PATH + PARSE_PUNCTUATION); + + if (!strcmp(pathname,"/")) { + /* + ** Root path. + */ + StrAllocCopy (tail, "/foo/.."); + } else { + char *p = strrchr(pathname, '/'); /* find last slash */ + + if (!p) { + /* + ** This probably should not happen, + ** but be prepared if it does. - KW + */ + StrAllocCopy (tail, "/foo/.."); + } else { + /* + ** Take slash off the beginning. + */ + StrAllocCopy(tail, (p + 1)); + } + } + FREE(pathname); + + if (UCLYhndl_HTFile_for_unspec >= 0) { + HTAnchor_setUCInfoStage(anchor, + UCLYhndl_HTFile_for_unspec, + UCT_STAGE_PARSER, + UCT_SETBY_DEFAULT); + } + + target = HTML_new(anchor, format_out, sink); + targetClass = *target->isa; /* Copy routine entry points */ + + { int i; + for (i = 0; i < HTML_A_ATTRIBUTES; i++) + present[i] = (i == HTML_A_HREF); + } + + /* + ** The need_parent_link flag will be set if an + ** "Up to <parent>" link was not created for a + ** readable parent in HTDirTitles() because + ** LONG_LIST is defined and NO_PARENT_DIR_REFERENCE + ** is not defined so that need we to create the + ** link via an LYListFmtParse() call. - FM + */ + need_parent_link = HTDirTitles(target, + (HTAnchor *)anchor, FALSE); + +#ifdef DIRED_SUPPORT + if (strncmp(anchor->address, "lynxcgi:", 8)) { + HTAnchor_setFormat((HTParentAnchor *) anchor, WWW_DIRED); + lynx_edit_mode = TRUE; + } +#endif /* DIRED_SUPPORT */ + if (HTDirReadme == HT_DIR_README_TOP) + do_readme(target, localname); + + + { + HTBTree * bt = HTBTree_new((HTComparer)strcmp); + int num_of_entries = 0; /* lines counter */ + + _HTProgress (gettext("Reading directory...")); + status = HT_LOADED; /* assume we don't get interrupted */ + while ((dirbuf = readdir(dp)) != NULL) { + /* + ** While there are directory entries to be read... + */ + char * dirname = NULL; + +#ifndef DOSPATH + if (dirbuf->d_ino == 0) + /* + ** If the entry is not being used, skip it. + */ + continue; +#endif + /* + ** Skip self, parent if handled in HTDirTitles() + ** or if NO_PARENT_DIR_REFERENCE is not defined, + ** and any dot files if no_dotfiles is set or + ** show_dotfiles is not set. - FM + */ + if (!strcmp(dirbuf->d_name, ".") /* self */ || + (!strcmp(dirbuf->d_name, "..") /* parent */ && + need_parent_link == FALSE) || + ((strcmp(dirbuf->d_name, "..")) && + (dirbuf->d_name[0] == '.' && + (no_dotfiles || !show_dotfiles)))) + continue; + + StrAllocCopy(tmpfilename, localname); + if (strcmp(localname, "/")) + /* + ** If filename is not root directory. + */ + StrAllocCat(tmpfilename, "/"); + + StrAllocCat(tmpfilename, dirbuf->d_name); + stat(tmpfilename, &file_info); + if (S_ISDIR(file_info.st_mode)) +#ifndef DIRED_SUPPORT + HTSprintf0(&dirname, "D%s",dirbuf->d_name); + else + HTSprintf0(&dirname, "F%s",dirbuf->d_name); + /* D & F to have first directories, then files */ +#else + { + if (dir_list_style == MIXED_STYLE) + HTSprintf0(&dirname, " %s/", dirbuf->d_name); + else if (!strcmp(dirbuf->d_name, "..")) + HTSprintf0(&dirname, "A%s", dirbuf->d_name); + else + HTSprintf0(&dirname, "D%s", dirbuf->d_name); + } + else if (dir_list_style == MIXED_STYLE) + HTSprintf0(&dirname, " %s", dirbuf->d_name); + else if (dir_list_style == FILES_FIRST) + HTSprintf0(&dirname, "C%s", dirbuf->d_name); + /* C & D to have first files, then directories */ + else + HTSprintf0(&dirname, "F%s", dirbuf->d_name); +#endif /* !DIRED_SUPPORT */ + /* + ** Sort dirname in the tree bt. + */ + HTBTree_add(bt, dirname); + +#ifdef DISP_PARTIAL + /* optimize for expensive operation: */ + if (num_of_entries % (partial_threshold > 0 ? + partial_threshold : display_lines) + == 0) { + if (HTCheckForInterrupt()) { + status = HT_PARTIAL_CONTENT; + break; + } + } + num_of_entries++; +#endif /* DISP_PARTIAL */ + + } /* end while directory entries left to read */ + + if (status != HT_PARTIAL_CONTENT) + _HTProgress (gettext("OK")); + else + CTRACE(tfp, "Reading the directory interrupred by user\n"); + + + /* + ** Run through tree printing out in order. + */ + { + HTBTElement * next_element = HTBTree_next(bt,NULL); + /* pick up the first element of the list */ + int num_of_entries_partial = 0; /* lines counter */ + + char state; + /* I for initial (.. file), + D for directory file, + F for file */ + +#ifdef DIRED_SUPPORT + char test; +#endif /* DIRED_SUPPORT */ + state = 'I'; + + while (next_element != NULL) { + char *entry, *file_extra; + + StrAllocCopy(tmpfilename,localname); + if (strcmp(localname, "/")) + /* + ** If filename is not root directory. + */ + StrAllocCat(tmpfilename, "/"); + + StrAllocCat(tmpfilename, + (char *)HTBTree_object(next_element)+1); + /* + ** Append the current entry's filename + ** to the path. + */ + HTSimplify(tmpfilename); + /* + ** Output the directory entry. + */ + if (strcmp((char *) + (HTBTree_object(next_element)), "D..") && + strcmp((char *) + (HTBTree_object(next_element)), "A..")) + { +#ifdef DIRED_SUPPORT + test = (*(char *)(HTBTree_object(next_element)) + == 'D' ? 'D' : 'F'); + if (state != test) { +#ifndef LONG_LIST + if (dir_list_style == FILES_FIRST) { + if (state == 'F') { + END(HTML_DIR); + PUTC('\n'); + } + } else if (dir_list_style != MIXED_STYLE) + if (state == 'D') { + END(HTML_DIR); + PUTC('\n'); + } +#endif /* !LONG_LIST */ + state = + (*(char *)(HTBTree_object(next_element)) + == 'D' ? 'D' : 'F'); + START(HTML_H2); + if (dir_list_style != MIXED_STYLE) { + START(HTML_EM); + PUTS(state == 'D' + ? LABEL_SUBDIRECTORIES + : LABEL_FILES); + END(HTML_EM); + } + END(HTML_H2); + PUTC('\n'); +#ifndef LONG_LIST + START(HTML_DIR); + PUTC('\n'); +#endif /* !LONG_LIST */ + } +#else + if (state != *(char *)(HTBTree_object( + next_element))) { +#ifndef LONG_LIST + if (state == 'D') { + END(HTML_DIR); + PUTC('\n'); + } +#endif /* !LONG_LIST */ + state = + (*(char *)(HTBTree_object(next_element)) + == 'D' ? 'D' : 'F'); + START(HTML_H2); + START(HTML_EM); + PUTS(state == 'D' + ? LABEL_SUBDIRECTORIES + : LABEL_FILES); + END(HTML_EM); + END(HTML_H2); + PUTC('\n'); +#ifndef LONG_LIST + START(HTML_DIR); + PUTC('\n'); +#endif /* !LONG_LIST */ + } +#endif /* DIRED_SUPPORT */ +#ifndef LONG_LIST + START(HTML_LI); +#endif /* !LONG_LIST */ + } + entry = (char*)HTBTree_object(next_element)+1; + file_extra = NULL; + +#ifdef LONG_LIST + LYListFmtParse(list_format, tmpfilename, target, + entry, tail); +#else + HTDirEntry(target, tail, entry); + PUTS(entry); + END(HTML_A); + if (file_extra) { + PUTS(file_extra); + FREE(file_extra); + } + MAYBE_END(HTML_LI); + PUTC('\n'); +#endif /* LONG_LIST */ + + next_element = HTBTree_next(bt, next_element); + /* pick up the next element of the list; + if none, return NULL*/ + + /* optimize for expensive operation: */ +#ifdef DISP_PARTIAL + if (num_of_entries_partial % + (partial_threshold > 0 ? partial_threshold : display_lines) + == 0) { + /* num_of_entries, num_of_entries_partial... */ + /* HTReadProgress...(bytes, 0); */ + HTDisplayPartial(); + + if (HTCheckForInterrupt()) { + _HTProgress (TRANSFER_INTERRUPTED); + status = HT_PARTIAL_CONTENT; + break; + } + } + num_of_entries_partial++; +#endif /* DISP_PARTIAL */ + + } /* end while next_element */ + + if (status == HT_LOADED) { + if (state == 'I') { + START(HTML_P); + PUTS("Empty Directory"); + } +#ifndef LONG_LIST + else + END(HTML_DIR); +#endif /* !LONG_LIST */ + } + } /* end printing out the tree in order */ + + closedir(dp); + FREE(logical); + FREE(tmpfilename); + FREE(tail); + HTBTreeAndObject_free(bt); + + if (status == HT_LOADED) { + if (HTDirReadme == HT_DIR_README_BOTTOM) + do_readme(target, localname); + FREE_TARGET; + } else { + ABORT_TARGET; + } + } + return status; /* document loaded, maybe partial */ +} + + + /* Load a document. ** ---------------- ** @@ -1931,16 +2295,7 @@ PUBLIC int HTLoadFile ARGS4( /* ** If localname is a directory. */ - HTStructured *target; /* HTML object */ - HTStructuredClass targetClass; DIR *dp; - STRUCT_DIRENT * dirbuf; - char *logical = NULL; - char *pathname = NULL; - char *tail = NULL; - BOOL present[HTML_A_ATTRIBUTES]; - char * tmpfilename = NULL; - BOOL need_parent_link = FALSE; struct stat file_info; CTRACE(tfp, "%s is a directory\n", localname); @@ -1983,288 +2338,14 @@ PUBLIC int HTLoadFile ARGS4( /* ** Directory access is allowed and possible. */ - logical = HTAnchor_address((HTAnchor*)anchor); - pathname = HTParse(logical, "", - PARSE_PATH + PARSE_PUNCTUATION); - - if (!strcmp(pathname,"/")) { - /* - ** Root path. - */ - StrAllocCopy (tail, "/foo/.."); - } else { - char *p = strrchr(pathname, '/'); /* find last slash */ - - if (!p) { - /* - ** This probably should not happen, - ** but be prepared if it does. - KW - */ - StrAllocCopy (tail, "/foo/.."); - } else { - /* - ** Take slash off the beginning. - */ - StrAllocCopy(tail, (p + 1)); - } - } - FREE(pathname); - - if (UCLYhndl_HTFile_for_unspec >= 0) { - HTAnchor_setUCInfoStage(anchor, - UCLYhndl_HTFile_for_unspec, - UCT_STAGE_PARSER, - UCT_SETBY_DEFAULT); - } - - target = HTML_new(anchor, format_out, sink); - targetClass = *target->isa; /* Copy routine entry points */ - - { int i; - for (i = 0; i < HTML_A_ATTRIBUTES; i++) - present[i] = (i == HTML_A_HREF); - } - - /* - ** The need_parent_link flag will be set if an - ** "Up to <parent>" link was not created for a - ** readable parent in HTDirTitles() because - ** LONG_LIST is defined and NO_PARENT_DIR_REFERENCE - ** is not defined so that need we to create the - ** link via an LYListFmtParse() call. - FM - */ - need_parent_link = HTDirTitles(target, - (HTAnchor *)anchor, FALSE); - -#ifdef DIRED_SUPPORT - if (strncmp(anchor->address, "lynxcgi:", 8)) { - HTAnchor_setFormat((HTParentAnchor *) anchor, WWW_DIRED); - lynx_edit_mode = TRUE; - } -#endif /* DIRED_SUPPORT */ - if (HTDirReadme == HT_DIR_README_TOP) - do_readme(target, localname); - { - HTBTree * bt = HTBTree_new((HTComparer)strcmp); - - status = HT_LOADED; /* assume we don't get interrupted */ - while ((dirbuf = readdir(dp)) != NULL) { - /* - ** While there are directory entries to be read... - */ - char * dirname = NULL; - -#ifndef DOSPATH - if (dirbuf->d_ino == 0) - /* - ** If the entry is not being used, skip it. - */ - continue; -#endif - /* - ** Skip self, parent if handled in HTDirTitles() - ** or if NO_PARENT_DIR_REFERENCE is not defined, - ** and any dot files if no_dotfiles is set or - ** show_dotfiles is not set. - FM - */ - if (!strcmp(dirbuf->d_name, ".") /* self */ || - (!strcmp(dirbuf->d_name, "..") /* parent */ && - need_parent_link == FALSE) || - ((strcmp(dirbuf->d_name, "..")) && - (dirbuf->d_name[0] == '.' && - (no_dotfiles || !show_dotfiles)))) - continue; - - StrAllocCopy(tmpfilename, localname); - if (strcmp(localname, "/")) - /* - ** If filename is not root directory. - */ - StrAllocCat(tmpfilename, "/"); - - StrAllocCat(tmpfilename, dirbuf->d_name); - stat(tmpfilename, &file_info); - if (S_ISDIR(file_info.st_mode)) -#ifndef DIRED_SUPPORT - HTSprintf0(&dirname, "D%s",dirbuf->d_name); - else - HTSprintf0(&dirname, "F%s",dirbuf->d_name); - /* D & F to have first directories, then files */ -#else - { - if (dir_list_style == MIXED_STYLE) - HTSprintf0(&dirname, " %s/", dirbuf->d_name); - else if (!strcmp(dirbuf->d_name, "..")) - HTSprintf0(&dirname, "A%s", dirbuf->d_name); - else - HTSprintf0(&dirname, "D%s", dirbuf->d_name); - } - else if (dir_list_style == MIXED_STYLE) - HTSprintf0(&dirname, " %s", dirbuf->d_name); - else if (dir_list_style == FILES_FIRST) - HTSprintf0(&dirname, "C%s", dirbuf->d_name); - /* C & D to have first files, then directories */ - else - HTSprintf0(&dirname, "F%s", dirbuf->d_name); -#endif /* !DIRED_SUPPORT */ - /* - ** Sort dirname in the tree bt. - */ - HTBTree_add(bt, dirname); - } - - /* - ** Run through tree printing out in order. - */ - { - HTBTElement * next_element = HTBTree_next(bt,NULL); - /* pick up the first element of the list */ - char state; - /* I for initial (.. file), - D for directory file, - F for file */ - -#ifdef DIRED_SUPPORT - char test; -#endif /* DIRED_SUPPORT */ - state = 'I'; - while (next_element != NULL) { - char *entry, *file_extra; - - if (HTCheckForInterrupt()) { - _HTProgress ("Data transfer interrupted."); - status = HT_PARTIAL_CONTENT; - break; - } - StrAllocCopy(tmpfilename,localname); - if (strcmp(localname, "/")) - /* - ** If filename is not root directory. - */ - StrAllocCat(tmpfilename, "/"); - - StrAllocCat(tmpfilename, - (char *)HTBTree_object(next_element)+1); - /* - ** Append the current entry's filename - ** to the path. - */ - HTSimplify(tmpfilename); - /* - ** Output the directory entry. - */ - if (strcmp((char *) - (HTBTree_object(next_element)), "D..") && - strcmp((char *) - (HTBTree_object(next_element)), "A..")) - { -#ifdef DIRED_SUPPORT - test = (*(char *)(HTBTree_object(next_element)) - == 'D' ? 'D' : 'F'); - if (state != test) { -#ifndef LONG_LIST - if (dir_list_style == FILES_FIRST) { - if (state == 'F') - END(HTML_DIR); - } else if (dir_list_style != MIXED_STYLE) - if (state == 'D') - END(HTML_DIR); -#endif /* !LONG_LIST */ - state = - (*(char *)(HTBTree_object(next_element)) - == 'D' ? 'D' : 'F'); - START(HTML_H2); - if (dir_list_style != MIXED_STYLE) { - START(HTML_EM); - PUTS(state == 'D' - ? LABEL_SUBDIRECTORIES - : LABEL_FILES); - END(HTML_EM); - } - END(HTML_H2); -#ifndef LONG_LIST - START(HTML_DIR); -#endif /* !LONG_LIST */ - } -#else - if (state != *(char *)(HTBTree_object( - next_element))) { -#ifndef LONG_LIST - if (state == 'D') - END(HTML_DIR); -#endif /* !LONG_LIST */ - state = - (*(char *)(HTBTree_object(next_element)) - == 'D' ? 'D' : 'F'); - START(HTML_H2); - START(HTML_EM); - PUTS(state == 'D' - ? LABEL_SUBDIRECTORIES - : LABEL_FILES); - END(HTML_EM); - END(HTML_H2); -#ifndef LONG_LIST - START(HTML_DIR); -#endif /* !LONG_LIST */ - } -#endif /* DIRED_SUPPORT */ -#ifndef LONG_LIST - START(HTML_LI); -#endif /* !LONG_LIST */ - } - entry = (char*)HTBTree_object(next_element)+1; - file_extra = NULL; - -#ifdef LONG_LIST - LYListFmtParse(list_format, tmpfilename, target, - entry, tail); -#else - HTDirEntry(target, tail, entry); - PUTS(entry); - END(HTML_A); - if (file_extra) { - PUTS(file_extra); - FREE(file_extra); - } - MAYBE_END(HTML_LI); -#endif /* LONG_LIST */ - - next_element = HTBTree_next(bt, next_element); - /* pick up the next element of the list; - if none, return NULL*/ - } - if (status == HT_LOADED) { - if (state == 'I') { - START(HTML_P); - PUTS("Empty Directory"); - } -#ifndef LONG_LIST - else - END(HTML_DIR); -#endif /* !LONG_LIST */ - } - } - /* end while directory entries left to read */ - closedir(dp); - FREE(logical); - FREE(tmpfilename); - FREE(tail); - HTBTreeAndObject_free(bt); - - if (status == HT_LOADED) { - if (HTDirReadme == HT_DIR_README_BOTTOM) - do_readme(target, localname); - FREE_TARGET; - } else { - ABORT_TARGET; - } - FREE(localname); - FREE(nodename); - return status; /* document loaded, maybe partial */ - } + status = print_local_dir(dp, localname, + anchor, format_out, sink); + FREE(localname); + FREE(nodename); + return status; /* document loaded, maybe partial */ - } /* end if localname is directory */ + } /* end if localname is a directory */ } /* end if file stat worked */ diff --git a/WWW/Library/Implementation/HTFormat.c b/WWW/Library/Implementation/HTFormat.c index 9ca69568..f06692a3 100644 --- a/WWW/Library/Implementation/HTFormat.c +++ b/WWW/Library/Implementation/HTFormat.c @@ -96,7 +96,7 @@ PUBLIC void HTSetPresentation ARGS6( pres->rep = HTAtom_for(representation); pres->rep_out = WWW_PRESENT; /* Fixed for now ... :-) */ - pres->converter = HTSaveAndExecute; /* Fixed for now ... */ + pres->converter = HTSaveAndExecute; /* Fixed for now ... */ pres->quality = quality; pres->secs = secs; pres->secs_per_byte = secs_per_byte; @@ -110,7 +110,9 @@ PUBLIC void HTSetPresentation ARGS6( */ if (!HTPresentations) { HTPresentations = HTList_new(); +#ifdef LY_FIND_LEAKS atexit(HTFreePresentations); +#endif } if (strcmp(representation, "*")==0) { @@ -153,7 +155,9 @@ PUBLIC void HTSetConversion ARGS7( */ if (!HTPresentations) { HTPresentations = HTList_new(); +#ifdef LY_FIND_LEAKS atexit(HTFreePresentations); +#endif } HTList_addObject(HTPresentations, pres); @@ -478,11 +482,12 @@ PUBLIC float HTStackValue ARGS4( ** ------------------------------------------- ** ** Repaint the page only when necessary. +** This is a traverse call for HText_pageDisplay() - it works!. ** */ -#ifdef DISP_PARTIAL -PRIVATE void HTDisplayPartial NOARGS +PUBLIC void HTDisplayPartial NOARGS { +#ifdef DISP_PARTIAL if (display_partial) { /* ** HText_getNumOfLines() = "current" number of lines received @@ -491,7 +496,7 @@ PRIVATE void HTDisplayPartial NOARGS ** We update NumOfLines_partial only when we repaint the display. ** -1 is the special value: ** This is a synchronization flag switched to 0 when HText_new() - ** starts a new HTMainText object - all hypertext functions use it, + ** starts a new HTMainText object - all HText_ functions use it, ** lines counter in particular [we call it from HText_getNumOfLines()]. ** ** Otherwise HTMainText holds info from the previous document @@ -502,25 +507,27 @@ PRIVATE void HTDisplayPartial NOARGS ** So repaint the page only when necessary: */ if ((NumOfLines_partial != -1) - /* new hypertext document available */ + /* new HText object available */ && ((Newline_partial + display_lines) > NumOfLines_partial) /* current page not complete... */ - && (partial_threshold > 0 ? ((Newline_partial + partial_threshold) < HText_getNumOfLines()) : - ((Newline_partial + display_lines) < HText_getNumOfLines()))) { + && (partial_threshold > 0 ? + ((Newline_partial + partial_threshold) < HText_getNumOfLines()) : + ((Newline_partial + display_lines) < HText_getNumOfLines())) /* * Originally we rendered by increments of 2 lines, * but that got annoying on slow network connections. * Then we switched to full-pages. Now it's configurable. - * If partial_threshold < 0, then it's a full page + * If partial_threshold <= 0, then it's a full page */ + ) { NumOfLines_partial = HText_getNumOfLines(); HText_pageDisplay(Newline_partial, ""); } } +#else /* nothing */ +#endif /* DISP_PARTIAL */ } -#else -#define HTDisplayPartial() /*nothing*/ -#endif + /* Push data from a socket down a stream ** ------------------------------------- @@ -714,7 +721,7 @@ finished: ** always fp still open, target stream still valid. */ PUBLIC int HTFileCopy ARGS2( - FILE *, fp, + FILE *, fp, HTStream*, sink) { HTStreamClass targetClass; @@ -764,6 +771,50 @@ PUBLIC int HTFileCopy ARGS2( return rv; } +#ifdef SOURCE_CACHE +/* Push data from an HTChunk down a stream +** --------------------------------------- +** +** This routine is responsible for creating and PRESENTING any +** graphic (or other) objects described by the file. +** +** State of memory and target stream on entry: +** HTChunk* (chunk) and target (sink) assumed valid. +** +** Return values: +** HT_LOADED All data sent. +** +** State of memory and target stream on return: +** always chunk unchanged, target stream still valid. +*/ +PUBLIC int HTMemCopy ARGS2( + HTChunk *, chunk, + HTStream *, sink) +{ + HTStreamClass targetClass = *(sink->isa); + int bytes = 0; + CONST char *data = chunk->data; + + HTReadProgress(0, 0); + for (;;) { + /* Push the data down the stream a piece at a time, in case we're + ** running a large document on a slow machine. + */ + int n = INPUT_BUFFER_SIZE; + if (n > chunk->size - bytes) + n = chunk->size - bytes; + if (n == 0) + break; + (*targetClass.put_block)(sink, data, n); + bytes += n; + data += n; + HTReadProgress(bytes, 0); + HTDisplayPartial(); + } + return HT_LOADED; +} +#endif + #ifdef USE_ZLIB /* Push data from a gzip file pointer down a stream ** ------------------------------------- @@ -786,7 +837,7 @@ PUBLIC int HTFileCopy ARGS2( ** always gzfp still open, target stream still valid. */ PRIVATE int HTGzFileCopy ARGS2( - gzFile, gzfp, + gzFile, gzfp, HTStream*, sink) { HTStreamClass targetClass; @@ -979,7 +1030,7 @@ PUBLIC int HTParseFile ARGS5( HTFormat, rep_in, HTFormat, format_out, HTParentAnchor *, anchor, - FILE *, fp, + FILE *, fp, HTStream*, sink) { HTStream * stream; @@ -1026,9 +1077,57 @@ PUBLIC int HTParseFile ARGS5( return HT_LOADED; } +#ifdef SOURCE_CACHE +/* Parse a document in memory given format and memory block pointer +** +** This routine is responsible for creating and PRESENTING any +** graphic (or other) objects described by the file. +** +** State of memory and target stream on entry: +** HTChunk* (chunk) assumed valid, +** target (sink) usually NULL (will call stream stack). +** +** Return values: +** -501 Stream stack failed (cannot present or convert). +** HT_LOADED All data sent. +** +** Stat of memory and target stream on return: +** always chunk unchanged; target freed, aborted, or NULL. +*/ +PUBLIC int HTParseMem ARGS5( + HTFormat, rep_in, + HTFormat, format_out, + HTParentAnchor *, anchor, + HTChunk *, chunk, + HTStream *, sink) +{ + HTStream * stream; + HTStreamClass targetClass; + int rv; + + stream = HTStreamStack(rep_in, format_out, sink, anchor); + if (!stream) { + char *buffer = 0; + HTSprintf0(&buffer, CANNOT_CONVERT_I_TO_O, + HTAtom_name(rep_in), HTAtom_name(format_out)); + CTRACE(tfp, "HTFormat(in HTParseMem): %s\n", buffer); + rv = HTLoadError(sink, 501, buffer); + FREE(buffer); + return rv; + } + + /* Push the data down the stream + */ + targetClass = *(stream->isa); + rv = HTMemCopy(chunk, stream); + (*targetClass._free)(stream); + return HT_LOADED; +} +#endif + #ifdef USE_ZLIB PRIVATE int HTCloseGzFile ARGS1( - gzFile, gzfp) + gzFile, gzfp) { int gzres; if (gzfp == NULL) @@ -1064,7 +1163,7 @@ PUBLIC int HTParseGzFile ARGS5( HTFormat, rep_in, HTFormat, format_out, HTParentAnchor *, anchor, - gzFile, gzfp, + gzFile, gzfp, HTStream*, sink) { HTStream * stream; diff --git a/WWW/Library/Implementation/HTFormat.h b/WWW/Library/Implementation/HTFormat.h index 95302a1d..df10425c 100644 --- a/WWW/Library/Implementation/HTFormat.h +++ b/WWW/Library/Implementation/HTFormat.h @@ -284,6 +284,15 @@ extern float HTStackValue PARAMS(( #define NO_VALUE_FOUND -1e20 /* returned if none found */ +/* Display the page while transfer in progress +** ------------------------------------------- +** +** Repaint the page only when necessary. +** This is a traverse call for HText_pageDispaly() - it works!. +** +*/ +extern void HTDisplayPartial NOPARAMS; + /* HTCopy: Copy a socket to a stream @@ -312,6 +321,22 @@ extern int HTFileCopy PARAMS(( HTStream* sink)); +#ifdef SOURCE_CACHE +#include <HTChunk.h> +/* + +HTFileCopy: Copy a file to a stream + + This is used by the protocol engines to send data down a stream, typically one which + has been generated by HTStreamStack. It is currently called by HTParseFile + + */ +extern int HTMemCopy PARAMS(( + HTChunk * chunk, + HTStream* sink)); +#endif + + /* HTCopyNoCR: Copy a socket to a stream, stripping CR characters. @@ -377,6 +402,24 @@ extern int HTParseFile PARAMS(( FILE *fp, HTStream* sink)); +#ifdef SOURCE_CACHE +/* + +HTParseMem: Parse a document in memory + + This routine is called by protocols modules to load an object. uses + HTStreamStack and HTMemCopy. Returns HT_LOADED if successful, can also + return <0 for failure. + + */ +extern int HTParseMem PARAMS(( + HTFormat format_in, + HTFormat format_out, + HTParentAnchor *anchor, + HTChunk* chunk, + HTStream* sink)); +#endif + #ifdef USE_ZLIB #ifdef USE_ZLIB diff --git a/WWW/Library/Implementation/HTGopher.c b/WWW/Library/Implementation/HTGopher.c index 225d6dfb..6046e039 100644 --- a/WWW/Library/Implementation/HTGopher.c +++ b/WWW/Library/Implementation/HTGopher.c @@ -1802,6 +1802,8 @@ PRIVATE int HTLoadGopher ARGS4( } else { /* Not index */ command = (char *)malloc(strlen(selector)+2+1); + if (command == NULL) + outofmem(__FILE__, "HTLoadGopher"); de_escape(command, selector); } FREE(p1); diff --git a/WWW/Library/Implementation/HTLex.c b/WWW/Library/Implementation/HTLex.c index 20a5d7ba..59901fb3 100644 --- a/WWW/Library/Implementation/HTLex.c +++ b/WWW/Library/Implementation/HTLex.c @@ -15,7 +15,6 @@ #include <HTUtils.h> -#include <HTAAUtil.h> #include <HTLex.h> /* Implemented here */ #include <LYLeaks.h> diff --git a/WWW/Library/Implementation/HTMLDTD.c b/WWW/Library/Implementation/HTMLDTD.c index f71ab852..a631bce6 100644 --- a/WWW/Library/Implementation/HTMLDTD.c +++ b/WWW/Library/Implementation/HTMLDTD.c @@ -145,893 +145,913 @@ static CONST char* entities[] = { ** Lists must be in alphabetical order by attribute name ** The tag elements contain the number of attributes */ +#ifdef USE_PSRC +# define N HTMLA_NORMAL +# define i HTMLA_ANAME +# define h HTMLA_HREF +# define c HTMLA_CLASS +# define x HTMLA_AUXCLASS +# define T(t) , t +#else +# define T(t) +#endif + static attr a_attr[] = { /* Anchor attributes */ - { "ACCESSKEY" }, - { "CHARSET" }, - { "CLASS" }, - { "CLEAR" }, - { "COORDS" }, - { "DIR" }, - { "HREF" }, - { "ID" }, - { "ISMAP" }, - { "LANG" }, - { "MD" }, - { "NAME" }, - { "NOTAB" }, - { "ONCLICK" }, - { "ONMOUSEOUT" }, - { "ONMOUSEOVER" }, - { "REL" }, - { "REV" }, - { "SHAPE" }, - { "STYLE" }, - { "TABINDEX" }, - { "TARGET" }, - { "TITLE" }, - { "TYPE" }, - { "URN" }, - { 0 } /* Terminate list */ + { "ACCESSKEY" T(N) }, + { "CHARSET" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "COORDS" T(N) }, + { "DIR" T(N) }, + { "HREF" T(h) }, + { "ID" T(i) }, + { "ISMAP" T(N) }, + { "LANG" T(N) }, + { "MD" T(N) }, + { "NAME" T(i) }, + { "NOTAB" T(N) }, + { "ONCLICK" T(N) }, + { "ONMOUSEOUT" T(N) }, + { "ONMOUSEOVER" T(N) }, + { "REL" T(N) }, + { "REV" T(N) }, + { "SHAPE" T(N) }, + { "STYLE" T(N) }, + { "TABINDEX" T(N) }, + { "TARGET" T(N) }, + { "TITLE" T(N) }, + { "TYPE" T(N) }, + { "URN" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr address_attr[] = { /* ADDRESS attributes */ - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "NOWRAP" }, - { "STYLE" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "NOWRAP" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr applet_attr[] = { /* APPLET attributes */ - { "ALIGN" }, - { "ALT" }, - { "CLASS" }, - { "CLEAR" }, - { "CODE" }, - { "CODEBASE" }, - { "DIR" }, - { "DOWNLOAD" }, - { "HEIGHT" }, - { "HSPACE" }, - { "ID" }, - { "LANG" }, - { "NAME" }, - { "STYLE" }, - { "TITLE" }, - { "VSPACE" }, - { "WIDTH" }, - { 0 } /* Terminate list */ + { "ALIGN" T(N) }, + { "ALT" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "CODE" T(N) }, + { "CODEBASE" T(h) }, + { "DIR" T(N) }, + { "DOWNLOAD" T(N) }, + { "HEIGHT" T(N) }, + { "HSPACE" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "NAME" T(i) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { "VSPACE" T(N) }, + { "WIDTH" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr area_attr[] = { /* AREA attributes */ - { "ALT" }, - { "CLASS" }, - { "CLEAR" }, - { "COORDS" }, - { "DIR" }, - { "HREF" }, - { "ID" }, - { "LANG" }, - { "NOHREF" }, - { "NOTAB" }, - { "ONCLICK" }, - { "ONMOUSEOUT" }, - { "ONMOUSEOVER" }, - { "SHAPE" }, - { "STYLE" }, - { "TABINDEX" }, - { "TARGET" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "ALT" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "COORDS" T(N) }, + { "DIR" T(N) }, + { "HREF" T(h) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "NOHREF" T(N) }, + { "NOTAB" T(N) }, + { "ONCLICK" T(N) }, + { "ONMOUSEOUT" T(N) }, + { "ONMOUSEOVER" T(N) }, + { "SHAPE" T(N) }, + { "STYLE" T(N) }, + { "TABINDEX" T(N) }, + { "TARGET" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr base_attr[] = { /* BASE attributes */ - { "HREF" }, - { "TARGET" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "HREF" T(h) }, + { "TARGET" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr bgsound_attr[] = { /* BGSOUND attributes */ - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "LOOP" }, - { "SRC" }, - { "STYLE" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "LOOP" T(N) }, + { "SRC" T(h) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr body_attr[] = { /* BODY attributes */ - { "ALINK" }, - { "BACKGROUND" }, - { "BGCOLOR" }, - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "LINK" }, - { "ONLOAD" }, - { "ONUNLOAD" }, - { "STYLE" }, - { "TITLE" }, - { "TEXT" }, - { "VLINK" }, - { 0 } /* Terminate list */ + { "ALINK" T(N) }, + { "BACKGROUND" T(h) }, + { "BGCOLOR" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "LINK" T(N) }, + { "ONLOAD" T(N) }, + { "ONUNLOAD" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { "TEXT" T(N) }, + { "VLINK" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr bodytext_attr[] = { /* BODYTEXT attributes */ - { "CLASS" }, - { "CLEAR" }, - { "DATA" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "NAME" }, - { "OBJECT" }, - { "REF" }, - { "STYLE" }, - { "TITLE" }, - { "TYPE" }, - { "VALUE" }, - { "VALUETYPE" }, - { 0 } /* Terminate list */ + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DATA" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "NAME" T(N) }, + { "OBJECT" T(N) }, + { "REF" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { "TYPE" T(N) }, + { "VALUE" T(N) }, + { "VALUETYPE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr bq_attr[] = { /* BQ (BLOCKQUOTE) attributes */ - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "NOWRAP" }, - { "STYLE" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "NOWRAP" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr button_attr[] = { /* BUTTON attributes */ - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "DISABLED" }, - { "ID" }, - { "LANG" }, - { "NAME" }, - { "ONFOCUS" }, - { "ONBLUR" }, - { "STYLE" }, - { "TABINDEX" }, - { "TITLE" }, - { "TYPE" }, - { "VALUE" }, - { 0 } /* Terminate list */ + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "DISABLED" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "NAME" T(N) }, + { "ONFOCUS" T(N) }, + { "ONBLUR" T(N) }, + { "STYLE" T(N) }, + { "TABINDEX" T(N) }, + { "TITLE" T(N) }, + { "TYPE" T(N) }, + { "VALUE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr caption_attr[] = { /* CAPTION attributes */ - { "ACCESSKEY" }, - { "ALIGN" }, - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "STYLE" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "ACCESSKEY" T(N) }, + { "ALIGN" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr col_attr[] = { /* COL and COLGROUP attributes */ - { "ALIGN" }, - { "CHAR" }, - { "CHAROFF" }, - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "SPAN" }, - { "STYLE" }, - { "TITLE" }, - { "VALIGN" }, - { "WIDTH" }, - { 0 } /* Terminate list */ + { "ALIGN" T(N) }, + { "CHAR" T(N) }, + { "CHAROFF" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "SPAN" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { "VALIGN" T(N) }, + { "WIDTH" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr credit_attr[] = { /* CREDIT attributes */ - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "STYLE" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr div_attr[] = { /* DIV attributes */ - { "ALIGN" }, - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "STYLE" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "ALIGN" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr embed_attr[] = { /* EMBED attributes */ - { "ALIGN" }, /* (including, for now, those from FIG and IMG) */ - { "ALT" }, - { "BORDER" }, - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "HEIGHT" }, - { "ID" }, - { "IMAGEMAP" }, - { "ISMAP" }, - { "LANG" }, - { "MD" }, - { "NAME" }, - { "NOFLOW" }, - { "PARAMS" }, - { "SRC" }, - { "STYLE" }, - { "TITLE" }, - { "UNITS" }, - { "USEMAP" }, - { "WIDTH" }, - { 0 } /* Terminate list */ + { "ALIGN" T(N) }, /* (including, for now, those from FIG and IMG) */ + { "ALT" T(N) }, + { "BORDER" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "HEIGHT" T(N) }, + { "ID" T(i) }, + { "IMAGEMAP" T(N) }, + { "ISMAP" T(N) }, + { "LANG" T(N) }, + { "MD" T(N) }, + { "NAME" T(i) }, + { "NOFLOW" T(N) }, + { "PARAMS" T(N) }, + { "SRC" T(h) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { "UNITS" T(N) }, + { "USEMAP" T(N) }, + { "WIDTH" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr fig_attr[] = { /* FIG attributes */ - { "ALIGN" }, - { "BORDER" }, - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "HEIGHT" }, - { "ID" }, - { "IMAGEMAP" }, - { "ISOBJECT" }, - { "LANG" }, - { "MD" }, - { "NOFLOW" }, - { "SRC" }, - { "STYLE" }, - { "TITLE" }, - { "UNITS" }, - { "WIDTH" }, - { 0 } /* Terminate list */ + { "ALIGN" T(N) }, + { "BORDER" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "HEIGHT" T(N) }, + { "ID" T(i) }, + { "IMAGEMAP" T(N) }, + { "ISOBJECT" T(N) }, + { "LANG" T(N) }, + { "MD" T(N) }, + { "NOFLOW" T(N) }, + { "SRC" T(h) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { "UNITS" T(N) }, + { "WIDTH" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr fieldset_attr[] = { /* FIELDSET attributes */ - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "STYLE" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr fn_attr[] = { /* FN attributes */ - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "STYLE" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr font_attr[] = { /* FONT attributes */ - { "CLASS" }, - { "CLEAR" }, - { "COLOR" }, - { "DIR" }, - { "END" }, - { "FACE" }, - { "ID" }, - { "LANG" }, - { "SIZE" }, - { "STYLE" }, - { 0 } /* Terminate list */ + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "COLOR" T(N) }, + { "DIR" T(N) }, + { "END" T(N) }, + { "FACE" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "SIZE" T(N) }, + { "STYLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr form_attr[] = { /* FORM attributes */ - { "ACCEPT-CHARSET"}, /* HTML 4.0 draft - kw */ - { "ACTION"}, - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "ENCTYPE" }, - { "ID" }, - { "LANG" }, - { "METHOD" }, - { "ONSUBMIT" }, - { "SCRIPT" }, - { "STYLE" }, - { "SUBJECT" }, - { "TARGET" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "ACCEPT-CHARSET" T(N) }, /* HTML 4.0 draft - kw */ + { "ACTION" T(h) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "ENCTYPE" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "METHOD" T(N) }, + { "ONSUBMIT" T(N) }, + { "SCRIPT" T(N) }, + { "STYLE" T(N) }, + { "SUBJECT" T(N) }, + { "TARGET" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr frame_attr[] = { /* FRAME attributes */ - { "ID" }, - { "MARGINHEIGHT"}, - { "MARGINWIDTH" }, - { "NAME" }, - { "NORESIZE" }, - { "SCROLLING" }, - { "SRC" }, - { 0 } /* Terminate list */ + { "ID" T(i) }, + { "MARGINHEIGHT" T(N) }, + { "MARGINWIDTH" T(N) }, + { "NAME" T(N) }, + { "NORESIZE" T(N) }, + { "SCROLLING" T(N) }, + { "SRC" T(h) }, + { 0 T(N) } /* Terminate list */ }; static attr frameset_attr[] = { /* FRAMESET attributes */ - { "COLS"}, - { "ROWS" }, - { 0 } /* Terminate list */ + { "COLS" T(N) }, + { "ROWS" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr gen_attr[] = { /* Minimum HTML 3.0 */ - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "STYLE" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr glossary_attr[] = { /* DL (and DLC) attributes */ - { "CLASS" }, - { "CLEAR" }, - { "COMPACT" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "STYLE" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "COMPACT" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr h_attr[] = { /* H1 - H6 attributes */ - { "ALIGN" }, - { "CLASS" }, - { "CLEAR" }, - { "DINGBAT" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "MD" }, - { "NOWRAP" }, - { "SEQNUM" }, - { "SKIP" }, - { "SRC" }, - { "STYLE" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "ALIGN" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DINGBAT" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "MD" T(N) }, + { "NOWRAP" T(N) }, + { "SEQNUM" T(N) }, + { "SKIP" T(N) }, + { "SRC" T(h) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr hr_attr[] = { /* HR attributes */ - { "ALIGN" }, - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "ID" }, - { "MD" }, - { "NOSHADE" }, - { "SIZE" }, - { "SRC" }, - { "STYLE" }, - { "TITLE" }, - { "WIDTH" }, - { 0 } /* Terminate list */ + { "ALIGN" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "MD" T(N) }, + { "NOSHADE" T(N) }, + { "SIZE" T(N) }, + { "SRC" T(h) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { "WIDTH" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr iframe_attr[] = { /* IFRAME attributes */ - { "ALIGN" }, - { "FRAMEBORDER" }, - { "HEIGHT" }, - { "ID" }, - { "MARGINHEIGHT"}, - { "MARGINWIDTH" }, - { "NAME" }, - { "SCROLLING" }, - { "SRC" }, - { "STYLE" }, - { "WIDTH" }, - { 0 } /* Terminate list */ + { "ALIGN" T(N) }, + { "FRAMEBORDER" T(N) }, + { "HEIGHT" T(N) }, + { "ID" T(i) }, + { "MARGINHEIGHT" T(N) }, + { "MARGINWIDTH" T(N) }, + { "NAME" T(N) }, + { "SCROLLING" T(N) }, + { "SRC" T(h) }, + { "STYLE" T(N) }, + { "WIDTH" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr img_attr[] = { /* IMG attributes */ - { "ALIGN" }, - { "ALT" }, - { "BORDER" }, - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "HEIGHT" }, - { "ID" }, - { "ISMAP" }, - { "ISOBJECT" }, - { "LANG" }, - { "MD" }, - { "SRC" }, - { "STYLE" }, - { "TITLE" }, - { "UNITS" }, - { "USEMAP" }, - { "WIDTH" }, - { 0 } /* Terminate list */ + { "ALIGN" T(N) }, + { "ALT" T(N) }, + { "BORDER" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "HEIGHT" T(N) }, + { "ID" T(i) }, + { "ISMAP" T(N) }, + { "ISOBJECT" T(N) }, + { "LANG" T(N) }, + { "MD" T(N) }, + { "SRC" T(h) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { "UNITS" T(N) }, + { "USEMAP" T(h) }, + { "WIDTH" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr input_attr[] = { /* INPUT attributes */ - { "ACCEPT" }, - { "ACCEPT-CHARSET" }, /* RFC 2070 HTML i18n - kw */ - { "ALIGN" }, - { "ALT" }, - { "CHECKED" }, - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "DISABLED" }, - { "ERROR" }, - { "HEIGHT" }, - { "ID" }, - { "LANG" }, - { "MAX" }, - { "MAXLENGTH" }, - { "MD" }, - { "MIN" }, - { "NAME" }, - { "NOTAB" }, - { "ONBLUR" }, - { "ONCHANGE" }, - { "ONCLICK" }, - { "ONFOCUS" }, - { "ONSELECT" }, - { "SIZE" }, - { "SRC" }, - { "STYLE" }, - { "TABINDEX" }, - { "TITLE" }, - { "TYPE" }, - { "VALUE" }, - { "WIDTH" }, - { 0 } /* Terminate list */ + { "ACCEPT" T(N) }, + { "ACCEPT-CHARSET" T(N) }, /* RFC 2070 HTML i18n - kw */ + { "ALIGN" T(N) }, + { "ALT" T(N) }, + { "CHECKED" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "DISABLED" T(N) }, + { "ERROR" T(N) }, + { "HEIGHT" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "MAX" T(N) }, + { "MAXLENGTH" T(N) }, + { "MD" T(N) }, + { "MIN" T(N) }, + { "NAME" T(N) }, + { "NOTAB" T(N) }, + { "ONBLUR" T(N) }, + { "ONCHANGE" T(N) }, + { "ONCLICK" T(N) }, + { "ONFOCUS" T(N) }, + { "ONSELECT" T(N) }, + { "SIZE" T(N) }, + { "SRC" T(h) }, + { "STYLE" T(N) }, + { "TABINDEX" T(N) }, + { "TITLE" T(N) }, + { "TYPE" T(N) }, + { "VALUE" T(N) }, + { "WIDTH" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr isindex_attr[] = { /* ISINDEX attributes */ - { "ACTION" }, /* Not in spec. Lynx treats it as HREF. - FM */ - { "DIR" }, - { "HREF" }, /* HTML 3.0 attribute for search action. - FM */ - { "ID" }, - { "LANG" }, - { "PROMPT" }, /* HTML 3.0 attribute for prompt string. - FM */ - { "TITLE" }, - { 0 } /* Terminate list */ + { "ACTION" T(h) }, /* Not in spec. Lynx treats it as HREF. - FM */ + { "DIR" T(N) }, + { "HREF" T(h) }, /* HTML 3.0 attribute for search action. - FM */ + { "ID" T(i) }, + { "LANG" T(N) }, + { "PROMPT" T(N) }, /* HTML 3.0 attribute for prompt string. - FM */ + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr keygen_attr[] = { /* KEYGEN attributes */ - { "CHALLENGE" }, - { "CLASS" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "NAME" }, - { "STYLE" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "CHALLENGE" T(N) }, + { "CLASS" T(c) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "NAME" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr label_attr[] = { /* LABEL attributes */ - { "ACCESSKEY" }, - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "FOR" }, - { "ID" }, - { "LANG" }, - { "ONCLICK" }, - { "STYLE" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "ACCESSKEY" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "FOR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "ONCLICK" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr legend_attr[] = { /* LEGEND attributes */ - { "ACCESSKEY" }, - { "ALIGN" }, - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "STYLE" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "ACCESSKEY" T(N) }, + { "ALIGN" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr link_attr[] = { /* LINK attributes */ - { "CHARSET" }, /* RFC 2070 HTML i18n -- hint for UA -- - kw */ - { "CLASS" }, - { "HREF" }, - { "ID" }, - { "MEDIA" }, - { "REL" }, - { "REV" }, - { "STYLE" }, - { "TARGET" }, - { "TITLE" }, - { "TYPE" }, - { 0 } /* Terminate list */ + { "CHARSET" T(N) }, /* RFC 2070 HTML i18n -- hint for UA -- - kw */ + { "CLASS" T(c) }, + { "HREF" T(h) }, + { "ID" T(i) }, + { "MEDIA" T(N) }, + { "REL" T(N) }, + { "REV" T(N) }, + { "STYLE" T(N) }, + { "TARGET" T(N) }, + { "TITLE" T(N) }, + { "TYPE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr list_attr[] = { /* LI attributes */ - { "CLASS" }, - { "CLEAR" }, - { "DINGBAT" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "MD" }, - { "SKIP" }, - { "SRC" }, - { "STYLE" }, - { "TITLE" }, - { "TYPE" }, - { "VALUE" }, - { 0 } /* Terminate list */ + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DINGBAT" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "MD" T(N) }, + { "SKIP" T(N) }, + { "SRC" T(h) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { "TYPE" T(N) }, + { "VALUE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr map_attr[] = { /* MAP attributes */ - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "NAME" }, - { "STYLE" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "NAME" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr math_attr[] = { /* MATH attributes */ - { "BOX" }, - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "STYLE" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "BOX" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr meta_attr[] = { /* META attributes */ - { "CONTENT" }, - { "HTTP-EQUIV" }, - { "NAME" }, - { 0 } /* Terminate list */ + { "CONTENT" T(N) }, + { "HTTP-EQUIV" T(N) }, + { "NAME" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr nextid_attr[] = { /* NEXTID attributes */ - { "N" } + { "N" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr note_attr[] = { /* NOTE attributes */ - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "MD" }, - { "ROLE" }, - { "SRC" }, - { "STYLE" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "MD" T(N) }, + { "ROLE" T(x) }, + { "SRC" T(h) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr object_attr[] = { /* OBJECT attributes */ - { "ALIGN" }, - { "BORDER" }, - { "CLASS" }, - { "CLASSID" }, - { "CODEBASE" }, - { "CODETYPE" }, - { "DATA" }, - { "DECLARE" }, - { "DIR" }, - { "HEIGHT" }, - { "HSPACE" }, - { "ID" }, - { "ISMAP" }, - { "LANG" }, - { "NAME" }, - { "NOTAB" }, - { "SHAPES" }, - { "STANDBY" }, - { "STYLE" }, - { "TABINDEX" }, - { "TITLE" }, - { "TYPE" }, - { "USEMAP" }, - { "VSPACE" }, - { "WIDTH" }, - { 0 } /* Terminate list */ + { "ALIGN" T(N) }, + { "BORDER" T(N) }, + { "CLASS" T(c) }, + { "CLASSID" T(h) }, + { "CODEBASE" T(h) }, + { "CODETYPE" T(N) }, + { "DATA" T(h) }, + { "DECLARE" T(N) }, + { "DIR" T(N) }, + { "HEIGHT" T(N) }, + { "HSPACE" T(N) }, + { "ID" T(i) }, + { "ISMAP" T(N) }, + { "LANG" T(N) }, + { "NAME" T(N) }, + { "NOTAB" T(N) }, + { "SHAPES" T(N) }, + { "STANDBY" T(N) }, + { "STYLE" T(N) }, + { "TABINDEX" T(N) }, + { "TITLE" T(N) }, + { "TYPE" T(N) }, + { "USEMAP" T(h) }, + { "VSPACE" T(N) }, + { "WIDTH" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr olist_attr[] = { /* OL attributes */ - { "CLASS" }, - { "CLEAR" }, - { "COMPACT" }, - { "CONTINUE" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "SEQNUM" }, - { "START" }, - { "STYLE" }, - { "TITLE" }, - { "TYPE" }, - { 0 } /* Terminate list */ + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "COMPACT" T(N) }, + { "CONTINUE" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "SEQNUM" T(N) }, + { "START" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { "TYPE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr option_attr[] = { /* OPTION attributes */ - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "DISABLED" }, - { "ERROR" }, - { "ID" }, - { "LANG" }, - { "SELECTED" }, - { "SHAPE" }, - { "STYLE" }, - { "TITLE" }, - { "VALUE" }, - { 0 } /* Terminate list */ + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "DISABLED" T(N) }, + { "ERROR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "SELECTED" T(N) }, + { "SHAPE" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { "VALUE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr overlay_attr[] = { /* OVERLAY attributes */ - { "CLASS" }, - { "HEIGHT" }, - { "ID" }, - { "IMAGEMAP" }, - { "MD" }, - { "SRC" }, - { "STYLE" }, - { "TITLE" }, - { "UNITS" }, - { "WIDTH" }, - { "X" }, - { "Y" }, - { 0 } /* Terminate list */ + { "CLASS" T(c) }, + { "HEIGHT" T(N) }, + { "ID" T(i) }, + { "IMAGEMAP" T(N) }, + { "MD" T(N) }, + { "SRC" T(h) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { "UNITS" T(N) }, + { "WIDTH" T(N) }, + { "X" T(N) }, + { "Y" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr p_attr[] = { /* P attributes */ - { "ALIGN" }, - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "NOWRAP" }, - { "STYLE" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "ALIGN" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "NOWRAP" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr param_attr[] = { /* PARAM attributes */ - { "ACCEPT" }, - { "ACCEPT-CHARSET" }, - { "ACCEPT-ENCODING" }, - { "CLASS" }, - { "CLEAR" }, - { "DATA" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "NAME" }, - { "OBJECT" }, - { "REF" }, - { "STYLE" }, - { "TITLE" }, - { "TYPE" }, - { "VALUE" }, - { "VALUEREF" }, - { "VALUETYPE" }, - { 0 } /* Terminate list */ + { "ACCEPT" T(N) }, + { "ACCEPT-CHARSET" T(N) }, + { "ACCEPT-ENCODING" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DATA" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "NAME" T(N) }, + { "OBJECT" T(N) }, + { "REF" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { "TYPE" T(N) }, + { "VALUE" T(N) }, + { "VALUEREF" T(N) }, + { "VALUETYPE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr script_attr[] = { /* SCRIPT attributes */ - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "EVENT" }, - { "FOR" }, - { "ID" }, - { "LANG" }, - { "LANGUAGE" }, - { "NAME" }, - { "SCRIPTENGINE" }, - { "SRC" }, - { "STYLE" }, - { "TITLE" }, - { "TYPE" }, - { 0 } /* Terminate list */ + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "EVENT" T(N) }, + { "FOR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "LANGUAGE" T(N) }, + { "NAME" T(N) }, + { "SCRIPTENGINE" T(N) }, + { "SRC" T(h) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { "TYPE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr select_attr[] = { /* SELECT attributes */ - { "ALIGN" }, - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "DISABLED" }, - { "ERROR" }, - { "HEIGHT" }, - { "ID" }, - { "LANG" }, - { "MD" }, - { "MULTIPLE" }, - { "NAME" }, - { "NOTAB" }, - { "ONBLUR" }, - { "ONCHANGE" }, - { "ONFOCUS" }, - { "SIZE" }, - { "STYLE" }, - { "TABINDEX" }, - { "TITLE" }, - { "UNITS" }, - { "WIDTH" }, - { 0 } /* Terminate list */ + { "ALIGN" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "DISABLED" T(N) }, + { "ERROR" T(N) }, + { "HEIGHT" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "MD" T(N) }, + { "MULTIPLE" T(N) }, + { "NAME" T(N) }, + { "NOTAB" T(N) }, + { "ONBLUR" T(N) }, + { "ONCHANGE" T(N) }, + { "ONFOCUS" T(N) }, + { "SIZE" T(N) }, + { "STYLE" T(N) }, + { "TABINDEX" T(N) }, + { "TITLE" T(N) }, + { "UNITS" T(N) }, + { "WIDTH" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr style_attr[] = { /* STYLE attributes */ - { "DIR" }, - { "LANG" }, - { "NOTATION" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "DIR" T(N) }, + { "LANG" T(N) }, + { "NOTATION" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr tab_attr[] = { /* TAB attributes */ - { "ALIGN" }, - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "DP" }, - { "ID" }, - { "INDENT" }, - { "LANG" }, - { "STYLE" }, - { "TITLE" }, - { "TO" }, - { 0 } /* Terminate list */ + { "ALIGN" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "DP" T(N) }, + { "ID" T(i) }, + { "INDENT" T(N) }, + { "LANG" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { "TO" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr table_attr[] = { /* TABLE attributes */ - { "ALIGN" }, - { "BORDER" }, - { "CELLPADDING" }, - { "CELLSPACING" }, - { "CLASS" }, - { "CLEAR" }, - { "COLS" }, - { "COLSPEC" }, - { "DIR" }, - { "DP" }, - { "FRAME" }, - { "ID" }, - { "LANG" }, - { "NOFLOW" }, - { "NOWRAP" }, - { "RULES" }, - { "STYLE" }, - { "SUMMARY" }, - { "TITLE" }, - { "UNITS" }, - { "WIDTH" }, - { 0 } /* Terminate list */ + { "ALIGN" T(N) }, + { "BORDER" T(N) }, + { "CELLPADDING" T(N) }, + { "CELLSPACING" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "COLS" T(N) }, + { "COLSPEC" T(N) }, + { "DIR" T(N) }, + { "DP" T(N) }, + { "FRAME" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "NOFLOW" T(N) }, + { "NOWRAP" T(N) }, + { "RULES" T(N) }, + { "STYLE" T(N) }, + { "SUMMARY" T(N) }, + { "TITLE" T(N) }, + { "UNITS" T(N) }, + { "WIDTH" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr td_attr[] = { /* TD and TH attributes */ - { "ALIGN" }, - { "AXES" }, - { "AXIS" }, - { "CHAR" }, - { "CHAROFF" }, - { "CLASS" }, - { "CLEAR" }, - { "COLSPAN" }, - { "DIR" }, - { "DP" }, - { "ID" }, - { "LANG" }, - { "NOWRAP" }, - { "ROWSPAN" }, - { "STYLE" }, - { "TITLE" }, - { "VALIGN" }, - { 0 } /* Terminate list */ + { "ALIGN" T(N) }, + { "AXES" T(N) }, + { "AXIS" T(N) }, + { "CHAR" T(N) }, + { "CHAROFF" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "COLSPAN" T(N) }, + { "DIR" T(N) }, + { "DP" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "NOWRAP" T(N) }, + { "ROWSPAN" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { "VALIGN" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr textarea_attr[] = { /* TEXTAREA attributes */ - { "ACCEPT-CHARSET" }, /* RFC 2070 HTML i18n - kw */ - { "ALIGN" }, - { "CLASS" }, - { "CLEAR" }, - { "COLS" }, - { "DIR" }, - { "DISABLED" }, - { "ERROR" }, - { "ID" }, - { "LANG" }, - { "NAME" }, - { "NOTAB" }, - { "ONBLUR" }, - { "ONCHANGE" }, - { "ONFOCUS" }, - { "ONSELECT" }, - { "ROWS" }, - { "STYLE" }, - { "TABINDEX" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "ACCEPT-CHARSET" T(N) }, /* RFC 2070 HTML i18n - kw */ + { "ALIGN" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "COLS" T(N) }, + { "DIR" T(N) }, + { "DISABLED" T(N) }, + { "ERROR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "NAME" T(N) }, + { "NOTAB" T(N) }, + { "ONBLUR" T(N) }, + { "ONCHANGE" T(N) }, + { "ONFOCUS" T(N) }, + { "ONSELECT" T(N) }, + { "ROWS" T(N) }, + { "STYLE" T(N) }, + { "TABINDEX" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr tr_attr[] = { /* TR, THEAD, TFOOT, and TBODY attributes */ - { "ALIGN" }, - { "CHAR" }, - { "CHAROFF" }, - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "DP" }, - { "ID" }, - { "LANG" }, - { "NOWRAP" }, - { "STYLE" }, - { "TITLE" }, - { "VALIGN" }, - { 0 } /* Terminate list */ + { "ALIGN" T(N) }, + { "CHAR" T(N) }, + { "CHAROFF" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "DP" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "NOWRAP" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { "VALIGN" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr ulist_attr[] = { /* UL attributes */ - { "CLASS" }, - { "CLEAR" }, - { "COMPACT" }, - { "DINGBAT" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "MD" }, - { "PLAIN" }, - { "SRC" }, - { "STYLE" }, - { "TITLE" }, - { "TYPE" }, - { "WRAP" }, - { 0 } /* Terminate list */ + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "COMPACT" T(N) }, + { "DINGBAT" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "MD" T(N) }, + { "PLAIN" T(N) }, + { "SRC" T(h) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { "TYPE" T(N) }, + { "WRAP" T(N) }, + { 0 T(N) } /* Terminate list */ }; +#undef N +#undef i +#undef h +#undef c +#undef x + +#undef T + /* From Peter Flynn's intro to the HTML Pro DTD: %structure; @@ -1335,257 +1355,266 @@ static attr ulist_attr[] = { /* UL attributes */ ** ** Name, Attributes, No. of attributes, content, extra info... */ +#ifdef USE_PSRC +#define P(x) x , (sizeof x) -1 +#define NULL_HTTag NULL, 0 +#else +#define P(x) x +#define NULL_HTTag NULL +#endif + static CONST HTTag tags_old[HTML_ELEMENTS] = { - { "A" , a_attr, HTML_A_ATTRIBUTES, SGML_EMPTY,T_A}, - { "ABBREV" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_ABBREV}, - { "ACRONYM" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_ACRONYM}, - { "ADDRESS" , address_attr, HTML_ADDRESS_ATTRIBUTES, SGML_MIXED,T_ADDRESS}, - { "APPLET" , applet_attr, HTML_APPLET_ATTRIBUTES, SGML_MIXED,T_APPLET}, - { "AREA" , area_attr, HTML_AREA_ATTRIBUTES, SGML_EMPTY,T_AREA}, - { "AU" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_AU}, - { "AUTHOR" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_AUTHOR}, - { "B" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_B}, - { "BANNER" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_BANNER}, - { "BASE" , base_attr, HTML_BASE_ATTRIBUTES, SGML_EMPTY,T_BASE}, - { "BASEFONT", font_attr, HTML_FONT_ATTRIBUTES, SGML_EMPTY,T_BASEFONT}, - { "BDO" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_BDO}, - { "BGSOUND" , bgsound_attr, HTML_BGSOUND_ATTRIBUTES, SGML_EMPTY,T_BGSOUND}, - { "BIG" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_BIG}, - { "BLINK" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_BLINK}, - { "BLOCKQUOTE", bq_attr, HTML_BQ_ATTRIBUTES, SGML_MIXED,T_BLOCKQUOTE}, - { "BODY" , body_attr, HTML_BODY_ATTRIBUTES, SGML_MIXED,T_BODY}, - { "BODYTEXT", bodytext_attr,HTML_BODYTEXT_ATTRIBUTES, SGML_MIXED,T_BODYTEXT}, - { "BQ" , bq_attr, HTML_BQ_ATTRIBUTES, SGML_MIXED,T_BQ}, - { "BR" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_BR}, - { "BUTTON" , button_attr, HTML_BUTTON_ATTRIBUTES, SGML_MIXED,T_BUTTON}, - { "CAPTION" , caption_attr, HTML_CAPTION_ATTRIBUTES, SGML_MIXED,T_CAPTION}, - { "CENTER" , div_attr, HTML_DIV_ATTRIBUTES, SGML_MIXED,T_CENTER}, - { "CITE" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_CITE}, - { "CODE" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_CODE}, - { "COL" , col_attr, HTML_COL_ATTRIBUTES, SGML_EMPTY,T_COL}, - { "COLGROUP", col_attr, HTML_COL_ATTRIBUTES, SGML_EMPTY,T_COLGROUP}, - { "COMMENT" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_COMMENT}, - { "CREDIT" , credit_attr, HTML_CREDIT_ATTRIBUTES, SGML_MIXED,T_CREDIT}, - { "DD" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_DD}, - { "DEL" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_DEL}, - { "DFN" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_DFN}, - { "DIR" , ulist_attr, HTML_UL_ATTRIBUTES, SGML_MIXED,T_DIR}, - { "DIV" , div_attr, HTML_DIV_ATTRIBUTES, SGML_MIXED,T_DIV}, - { "DL" , glossary_attr, HTML_DL_ATTRIBUTES, SGML_MIXED,T_DL}, - { "DLC" , glossary_attr, HTML_DL_ATTRIBUTES, SGML_MIXED,T_DLC}, - { "DT" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_DT}, - { "EM" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_EM}, - { "EMBED" , embed_attr, HTML_EMBED_ATTRIBUTES, SGML_EMPTY,T_EMBED}, - { "FIELDSET", fieldset_attr,HTML_FIELDSET_ATTRIBUTES, SGML_MIXED,T_FIELDSET}, - { "FIG" , fig_attr, HTML_FIG_ATTRIBUTES, SGML_MIXED,T_FIG}, - { "FN" , fn_attr, HTML_FN_ATTRIBUTES, SGML_MIXED,T_FN}, - { "FONT" , font_attr, HTML_FONT_ATTRIBUTES, SGML_EMPTY,T_FONT}, - { "FORM" , form_attr, HTML_FORM_ATTRIBUTES, SGML_EMPTY,T_FORM}, - { "FRAME" , frame_attr, HTML_FRAME_ATTRIBUTES, SGML_EMPTY,T_FRAME}, - { "FRAMESET", frameset_attr,HTML_FRAMESET_ATTRIBUTES, SGML_MIXED,T_FRAMESET}, - { "H1" , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H1}, - { "H2" , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H2}, - { "H3" , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H3}, - { "H4" , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H4}, - { "H5" , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H5}, - { "H6" , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H6}, - { "HEAD" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_HEAD}, - { "HR" , hr_attr, HTML_HR_ATTRIBUTES, SGML_EMPTY,T_HR}, - { "HTML" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_HTML}, - { "HY" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_HY}, - { "I" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_I}, - { "IFRAME" , iframe_attr, HTML_IFRAME_ATTRIBUTES, SGML_MIXED,T_IFRAME}, - { "IMG" , img_attr, HTML_IMG_ATTRIBUTES, SGML_EMPTY,T_IMG}, - { "INPUT" , input_attr, HTML_INPUT_ATTRIBUTES, SGML_EMPTY,T_INPUT}, - { "INS" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_INS}, - { "ISINDEX" , isindex_attr, HTML_ISINDEX_ATTRIBUTES,SGML_EMPTY,T_ISINDEX}, - { "KBD" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_KBD}, - { "KEYGEN" , keygen_attr, HTML_KEYGEN_ATTRIBUTES, SGML_EMPTY,T_KEYGEN}, - { "LABEL" , label_attr, HTML_LABEL_ATTRIBUTES, SGML_MIXED,T_LABEL}, - { "LEGEND" , legend_attr, HTML_LEGEND_ATTRIBUTES, SGML_MIXED,T_LEGEND}, - { "LH" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_LH}, - { "LI" , list_attr, HTML_LI_ATTRIBUTES, SGML_EMPTY,T_LI}, - { "LINK" , link_attr, HTML_LINK_ATTRIBUTES, SGML_EMPTY,T_LINK}, - { "LISTING" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_LITTERAL,T_LISTING}, - { "MAP" , map_attr, HTML_MAP_ATTRIBUTES, SGML_MIXED,T_MAP}, - { "MARQUEE" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_MARQUEE}, - { "MATH" , math_attr, HTML_MATH_ATTRIBUTES, SGML_LITTERAL,T_MATH}, - { "MENU" , ulist_attr, HTML_UL_ATTRIBUTES, SGML_MIXED,T_MENU}, - { "META" , meta_attr, HTML_META_ATTRIBUTES, SGML_EMPTY,T_META}, - { "NEXTID" , nextid_attr, 1, SGML_EMPTY,T_NEXTID}, - { "NOFRAMES", gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_NOFRAMES}, - { "NOTE" , note_attr, HTML_NOTE_ATTRIBUTES, SGML_MIXED,T_NOTE}, - { "OBJECT" , object_attr, HTML_OBJECT_ATTRIBUTES, SGML_LITTERAL,T_OBJECT}, - { "OL" , olist_attr, HTML_OL_ATTRIBUTES, SGML_MIXED,T_OL}, - { "OPTION" , option_attr, HTML_OPTION_ATTRIBUTES, SGML_EMPTY,T_OPTION}, - { "OVERLAY" , overlay_attr, HTML_OVERLAY_ATTRIBUTES, SGML_EMPTY,T_OVERLAY}, - { "P" , p_attr, HTML_P_ATTRIBUTES, SGML_EMPTY,T_P}, - { "PARAM" , param_attr, HTML_PARAM_ATTRIBUTES, SGML_EMPTY,T_PARAM}, - { "PLAINTEXT", gen_attr, HTML_GEN_ATTRIBUTES, SGML_LITTERAL,T_PLAINTEXT}, - { "PRE" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_PRE}, - { "Q" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_Q}, - { "S" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_S}, - { "SAMP" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_SAMP}, - { "SCRIPT" , script_attr, HTML_SCRIPT_ATTRIBUTES, SGML_LITTERAL,T_SCRIPT}, - { "SELECT" , select_attr, HTML_SELECT_ATTRIBUTES, SGML_MIXED,T_SELECT}, - { "SHY" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_SHY}, - { "SMALL" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_SMALL}, - { "SPAN" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_SPAN}, - { "SPOT" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_SPOT}, - { "STRIKE" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_STRIKE}, - { "STRONG" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_STRONG}, - { "STYLE" , style_attr, HTML_STYLE_ATTRIBUTES, SGML_LITTERAL,T_STYLE}, - { "SUB" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_SUB}, - { "SUP" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_SUP}, - { "TAB" , tab_attr, HTML_TAB_ATTRIBUTES, SGML_EMPTY,T_TAB}, - { "TABLE" , table_attr, HTML_TABLE_ATTRIBUTES, SGML_MIXED,T_TABLE}, - { "TBODY" , tr_attr, HTML_TR_ATTRIBUTES, SGML_EMPTY,T_TBODY}, - { "TD" , td_attr, HTML_TD_ATTRIBUTES, SGML_EMPTY,T_TD}, - { "TEXTAREA", textarea_attr,HTML_TEXTAREA_ATTRIBUTES, SGML_LITTERAL,T_TEXTAREA}, - { "TEXTFLOW", bodytext_attr,HTML_BODYTEXT_ATTRIBUTES, SGML_MIXED,T_TEXTFLOW}, - { "TFOOT" , tr_attr, HTML_TR_ATTRIBUTES, SGML_EMPTY,T_TFOOT}, - { "TH" , td_attr, HTML_TD_ATTRIBUTES, SGML_EMPTY,T_TH}, - { "THEAD" , tr_attr, HTML_TR_ATTRIBUTES, SGML_EMPTY,T_THEAD}, - { "TITLE", gen_attr, HTML_GEN_ATTRIBUTES, SGML_RCDATA,T_TITLE}, - { "TR" , tr_attr, HTML_TR_ATTRIBUTES, SGML_EMPTY,T_TR}, - { "TT" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_TT}, - { "U" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_U}, - { "UL" , ulist_attr, HTML_UL_ATTRIBUTES, SGML_MIXED,T_UL}, - { "VAR" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_VAR}, - { "WBR" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_WBR}, - { "XMP" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_LITTERAL,T_XMP}, + { P("A") , a_attr, HTML_A_ATTRIBUTES, SGML_EMPTY,T_A}, + { P("ABBREV") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_ABBREV}, + { P("ACRONYM") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_ACRONYM}, + { P("ADDRESS") , address_attr, HTML_ADDRESS_ATTRIBUTES, SGML_MIXED,T_ADDRESS}, + { P("APPLET") , applet_attr, HTML_APPLET_ATTRIBUTES, SGML_MIXED,T_APPLET}, + { P("AREA") , area_attr, HTML_AREA_ATTRIBUTES, SGML_EMPTY,T_AREA}, + { P("AU") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_AU}, + { P("AUTHOR") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_AUTHOR}, + { P("B") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_B}, + { P("BANNER") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_BANNER}, + { P("BASE") , base_attr, HTML_BASE_ATTRIBUTES, SGML_EMPTY,T_BASE}, + { P("BASEFONT"), font_attr, HTML_FONT_ATTRIBUTES, SGML_EMPTY,T_BASEFONT}, + { P("BDO") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_BDO}, + { P("BGSOUND") , bgsound_attr, HTML_BGSOUND_ATTRIBUTES, SGML_EMPTY,T_BGSOUND}, + { P("BIG") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_BIG}, + { P("BLINK") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_BLINK}, + { P("BLOCKQUOTE"), bq_attr, HTML_BQ_ATTRIBUTES, SGML_MIXED,T_BLOCKQUOTE}, + { P("BODY") , body_attr, HTML_BODY_ATTRIBUTES, SGML_MIXED,T_BODY}, + { P("BODYTEXT"), bodytext_attr,HTML_BODYTEXT_ATTRIBUTES, SGML_MIXED,T_BODYTEXT}, + { P("BQ") , bq_attr, HTML_BQ_ATTRIBUTES, SGML_MIXED,T_BQ}, + { P("BR") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_BR}, + { P("BUTTON") , button_attr, HTML_BUTTON_ATTRIBUTES, SGML_MIXED,T_BUTTON}, + { P("CAPTION") , caption_attr, HTML_CAPTION_ATTRIBUTES, SGML_MIXED,T_CAPTION}, + { P("CENTER") , div_attr, HTML_DIV_ATTRIBUTES, SGML_MIXED,T_CENTER}, + { P("CITE") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_CITE}, + { P("CODE") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_CODE}, + { P("COL") , col_attr, HTML_COL_ATTRIBUTES, SGML_EMPTY,T_COL}, + { P("COLGROUP"), col_attr, HTML_COL_ATTRIBUTES, SGML_EMPTY,T_COLGROUP}, + { P("COMMENT") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_COMMENT}, + { P("CREDIT") , credit_attr, HTML_CREDIT_ATTRIBUTES, SGML_MIXED,T_CREDIT}, + { P("DD") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_DD}, + { P("DEL") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_DEL}, + { P("DFN") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_DFN}, + { P("DIR") , ulist_attr, HTML_UL_ATTRIBUTES, SGML_MIXED,T_DIR}, + { P("DIV") , div_attr, HTML_DIV_ATTRIBUTES, SGML_MIXED,T_DIV}, + { P("DL") , glossary_attr, HTML_DL_ATTRIBUTES, SGML_MIXED,T_DL}, + { P("DLC") , glossary_attr, HTML_DL_ATTRIBUTES, SGML_MIXED,T_DLC}, + { P("DT") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_DT}, + { P("EM") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_EM}, + { P("EMBED") , embed_attr, HTML_EMBED_ATTRIBUTES, SGML_EMPTY,T_EMBED}, + { P("FIELDSET"), fieldset_attr,HTML_FIELDSET_ATTRIBUTES, SGML_MIXED,T_FIELDSET}, + { P("FIG") , fig_attr, HTML_FIG_ATTRIBUTES, SGML_MIXED,T_FIG}, + { P("FN") , fn_attr, HTML_FN_ATTRIBUTES, SGML_MIXED,T_FN}, + { P("FONT") , font_attr, HTML_FONT_ATTRIBUTES, SGML_EMPTY,T_FONT}, + { P("FORM") , form_attr, HTML_FORM_ATTRIBUTES, SGML_EMPTY,T_FORM}, + { P("FRAME") , frame_attr, HTML_FRAME_ATTRIBUTES, SGML_EMPTY,T_FRAME}, + { P("FRAMESET"), frameset_attr,HTML_FRAMESET_ATTRIBUTES, SGML_MIXED,T_FRAMESET}, + { P("H1") , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H1}, + { P("H2") , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H2}, + { P("H3") , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H3}, + { P("H4") , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H4}, + { P("H5") , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H5}, + { P("H6") , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H6}, + { P("HEAD") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_HEAD}, + { P("HR") , hr_attr, HTML_HR_ATTRIBUTES, SGML_EMPTY,T_HR}, + { P("HTML") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_HTML}, + { P("HY") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_HY}, + { P("I") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_I}, + { P("IFRAME") , iframe_attr, HTML_IFRAME_ATTRIBUTES, SGML_MIXED,T_IFRAME}, + { P("IMG") , img_attr, HTML_IMG_ATTRIBUTES, SGML_EMPTY,T_IMG}, + { P("INPUT") , input_attr, HTML_INPUT_ATTRIBUTES, SGML_EMPTY,T_INPUT}, + { P("INS") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_INS}, + { P("ISINDEX") , isindex_attr, HTML_ISINDEX_ATTRIBUTES,SGML_EMPTY,T_ISINDEX}, + { P("KBD") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_KBD}, + { P("KEYGEN") , keygen_attr, HTML_KEYGEN_ATTRIBUTES, SGML_EMPTY,T_KEYGEN}, + { P("LABEL") , label_attr, HTML_LABEL_ATTRIBUTES, SGML_MIXED,T_LABEL}, + { P("LEGEND") , legend_attr, HTML_LEGEND_ATTRIBUTES, SGML_MIXED,T_LEGEND}, + { P("LH") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_LH}, + { P("LI") , list_attr, HTML_LI_ATTRIBUTES, SGML_EMPTY,T_LI}, + { P("LINK") , link_attr, HTML_LINK_ATTRIBUTES, SGML_EMPTY,T_LINK}, + { P("LISTING") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_LITTERAL,T_LISTING}, + { P("MAP") , map_attr, HTML_MAP_ATTRIBUTES, SGML_MIXED,T_MAP}, + { P("MARQUEE") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_MARQUEE}, + { P("MATH") , math_attr, HTML_MATH_ATTRIBUTES, SGML_LITTERAL,T_MATH}, + { P("MENU") , ulist_attr, HTML_UL_ATTRIBUTES, SGML_MIXED,T_MENU}, + { P("META") , meta_attr, HTML_META_ATTRIBUTES, SGML_EMPTY,T_META}, + { P("NEXTID") , nextid_attr, 1, SGML_EMPTY,T_NEXTID}, + { P("NOFRAMES"), gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_NOFRAMES}, + { P("NOTE") , note_attr, HTML_NOTE_ATTRIBUTES, SGML_MIXED,T_NOTE}, + { P("OBJECT") , object_attr, HTML_OBJECT_ATTRIBUTES, SGML_LITTERAL,T_OBJECT}, + { P("OL") , olist_attr, HTML_OL_ATTRIBUTES, SGML_MIXED,T_OL}, + { P("OPTION") , option_attr, HTML_OPTION_ATTRIBUTES, SGML_EMPTY,T_OPTION}, + { P("OVERLAY") , overlay_attr, HTML_OVERLAY_ATTRIBUTES, SGML_EMPTY,T_OVERLAY}, + { P("P") , p_attr, HTML_P_ATTRIBUTES, SGML_EMPTY,T_P}, + { P("PARAM") , param_attr, HTML_PARAM_ATTRIBUTES, SGML_EMPTY,T_PARAM}, + { P("PLAINTEXT"), gen_attr, HTML_GEN_ATTRIBUTES, SGML_LITTERAL,T_PLAINTEXT}, + { P("PRE") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_PRE}, + { P("Q") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_Q}, + { P("S") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_S}, + { P("SAMP") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_SAMP}, + { P("SCRIPT") , script_attr, HTML_SCRIPT_ATTRIBUTES, SGML_LITTERAL,T_SCRIPT}, + { P("SELECT") , select_attr, HTML_SELECT_ATTRIBUTES, SGML_MIXED,T_SELECT}, + { P("SHY") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_SHY}, + { P("SMALL") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_SMALL}, + { P("SPAN") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_SPAN}, + { P("SPOT") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_SPOT}, + { P("STRIKE") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_STRIKE}, + { P("STRONG") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_STRONG}, + { P("STYLE") , style_attr, HTML_STYLE_ATTRIBUTES, SGML_LITTERAL,T_STYLE}, + { P("SUB") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_SUB}, + { P("SUP") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_SUP}, + { P("TAB") , tab_attr, HTML_TAB_ATTRIBUTES, SGML_EMPTY,T_TAB}, + { P("TABLE") , table_attr, HTML_TABLE_ATTRIBUTES, SGML_MIXED,T_TABLE}, + { P("TBODY") , tr_attr, HTML_TR_ATTRIBUTES, SGML_EMPTY,T_TBODY}, + { P("TD") , td_attr, HTML_TD_ATTRIBUTES, SGML_EMPTY,T_TD}, + { P("TEXTAREA"), textarea_attr,HTML_TEXTAREA_ATTRIBUTES, SGML_LITTERAL,T_TEXTAREA}, + { P("TEXTFLOW"), bodytext_attr,HTML_BODYTEXT_ATTRIBUTES, SGML_MIXED,T_TEXTFLOW}, + { P("TFOOT") , tr_attr, HTML_TR_ATTRIBUTES, SGML_EMPTY,T_TFOOT}, + { P("TH") , td_attr, HTML_TD_ATTRIBUTES, SGML_EMPTY,T_TH}, + { P("THEAD") , tr_attr, HTML_TR_ATTRIBUTES, SGML_EMPTY,T_THEAD}, + { P("TITLE"), gen_attr, HTML_GEN_ATTRIBUTES, SGML_RCDATA,T_TITLE}, + { P("TR") , tr_attr, HTML_TR_ATTRIBUTES, SGML_EMPTY,T_TR}, + { P("TT") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_TT}, + { P("U") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_U}, + { P("UL") , ulist_attr, HTML_UL_ATTRIBUTES, SGML_MIXED,T_UL}, + { P("VAR") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_VAR}, + { P("WBR") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_WBR}, + { P("XMP") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_LITTERAL,T_XMP}, }; static CONST HTTag tags_new[HTML_ELEMENTS] = { - { "A" , a_attr, HTML_A_ATTRIBUTES, SGML_MIXED,T_A}, - { "ABBREV" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_ABBREV}, - { "ACRONYM" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_ACRONYM}, - { "ADDRESS" , address_attr, HTML_ADDRESS_ATTRIBUTES, SGML_MIXED,T_ADDRESS}, - { "APPLET" , applet_attr, HTML_APPLET_ATTRIBUTES, SGML_MIXED,T_APPLET}, - { "AREA" , area_attr, HTML_AREA_ATTRIBUTES, SGML_EMPTY,T_AREA}, - { "AU" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_AU}, - { "AUTHOR" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_AUTHOR}, - { "B" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_B}, - { "BANNER" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_BANNER}, - { "BASE" , base_attr, HTML_BASE_ATTRIBUTES, SGML_EMPTY,T_BASE}, - { "BASEFONT", font_attr, HTML_FONT_ATTRIBUTES, SGML_EMPTY,T_BASEFONT}, - { "BDO" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_BDO}, - { "BGSOUND" , bgsound_attr, HTML_BGSOUND_ATTRIBUTES, SGML_EMPTY,T_BGSOUND}, - { "BIG" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_BIG}, - { "BLINK" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_BLINK}, - { "BLOCKQUOTE", bq_attr, HTML_BQ_ATTRIBUTES, SGML_MIXED,T_BLOCKQUOTE}, - { "BODY" , body_attr, HTML_BODY_ATTRIBUTES, SGML_MIXED,T_BODY}, - { "BODYTEXT", bodytext_attr,HTML_BODYTEXT_ATTRIBUTES, SGML_MIXED,T_BODYTEXT}, - { "BQ" , bq_attr, HTML_BQ_ATTRIBUTES, SGML_MIXED,T_BQ}, - { "BR" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_BR}, - { "BUTTON" , button_attr, HTML_BUTTON_ATTRIBUTES, SGML_MIXED,T_BUTTON}, - { "CAPTION" , caption_attr, HTML_CAPTION_ATTRIBUTES, SGML_MIXED,T_CAPTION}, - { "CENTER" , div_attr, HTML_DIV_ATTRIBUTES, SGML_MIXED,T_CENTER}, - { "CITE" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_CITE}, - { "CODE" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_CODE}, - { "COL" , col_attr, HTML_COL_ATTRIBUTES, SGML_EMPTY,T_COL}, - { "COLGROUP", col_attr, HTML_COL_ATTRIBUTES, SGML_ELEMENT,T_COLGROUP}, - { "COMMENT" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_PCDATA,T_COMMENT}, - { "CREDIT" , credit_attr, HTML_CREDIT_ATTRIBUTES, SGML_MIXED,T_CREDIT}, - { "DD" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_DD}, - { "DEL" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_DEL}, - { "DFN" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_DFN}, - { "DIR" , ulist_attr, HTML_UL_ATTRIBUTES, SGML_MIXED,T_DIR}, - { "DIV" , div_attr, HTML_DIV_ATTRIBUTES, SGML_MIXED,T_DIV}, - { "DL" , glossary_attr, HTML_DL_ATTRIBUTES, SGML_MIXED,T_DL}, - { "DLC" , glossary_attr, HTML_DL_ATTRIBUTES, SGML_MIXED,T_DLC}, - { "DT" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_DT}, - { "EM" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_EM}, - { "EMBED" , embed_attr, HTML_EMBED_ATTRIBUTES, SGML_EMPTY,T_EMBED}, - { "FIELDSET", fieldset_attr,HTML_FIELDSET_ATTRIBUTES, SGML_MIXED,T_FIELDSET}, - { "FIG" , fig_attr, HTML_FIG_ATTRIBUTES, SGML_MIXED,T_FIG}, - { "FN" , fn_attr, HTML_FN_ATTRIBUTES, SGML_MIXED,T_FN}, - { "FONT" , font_attr, HTML_FONT_ATTRIBUTES, SGML_MIXED,T_FONT}, - { "FORM" , form_attr, HTML_FORM_ATTRIBUTES, SGML_MIXED,T_FORM}, - { "FRAME" , frame_attr, HTML_FRAME_ATTRIBUTES, SGML_EMPTY,T_FRAME}, - { "FRAMESET", frameset_attr,HTML_FRAMESET_ATTRIBUTES, SGML_ELEMENT,T_FRAMESET}, + { P("A") , a_attr, HTML_A_ATTRIBUTES, SGML_MIXED,T_A}, + { P("ABBREV") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_ABBREV}, + { P("ACRONYM") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_ACRONYM}, + { P("ADDRESS") , address_attr, HTML_ADDRESS_ATTRIBUTES, SGML_MIXED,T_ADDRESS}, + { P("APPLET") , applet_attr, HTML_APPLET_ATTRIBUTES, SGML_MIXED,T_APPLET}, + { P("AREA") , area_attr, HTML_AREA_ATTRIBUTES, SGML_EMPTY,T_AREA}, + { P("AU") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_AU}, + { P("AUTHOR") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_AUTHOR}, + { P("B") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_B}, + { P("BANNER") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_BANNER}, + { P("BASE") , base_attr, HTML_BASE_ATTRIBUTES, SGML_EMPTY,T_BASE}, + { P("BASEFONT"), font_attr, HTML_FONT_ATTRIBUTES, SGML_EMPTY,T_BASEFONT}, + { P("BDO") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_BDO}, + { P("BGSOUND") , bgsound_attr, HTML_BGSOUND_ATTRIBUTES, SGML_EMPTY,T_BGSOUND}, + { P("BIG") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_BIG}, + { P("BLINK") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_BLINK}, + { P("BLOCKQUOTE"), bq_attr, HTML_BQ_ATTRIBUTES, SGML_MIXED,T_BLOCKQUOTE}, + { P("BODY") , body_attr, HTML_BODY_ATTRIBUTES, SGML_MIXED,T_BODY}, + { P("BODYTEXT"), bodytext_attr,HTML_BODYTEXT_ATTRIBUTES, SGML_MIXED,T_BODYTEXT}, + { P("BQ") , bq_attr, HTML_BQ_ATTRIBUTES, SGML_MIXED,T_BQ}, + { P("BR") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_BR}, + { P("BUTTON") , button_attr, HTML_BUTTON_ATTRIBUTES, SGML_MIXED,T_BUTTON}, + { P("CAPTION") , caption_attr, HTML_CAPTION_ATTRIBUTES, SGML_MIXED,T_CAPTION}, + { P("CENTER") , div_attr, HTML_DIV_ATTRIBUTES, SGML_MIXED,T_CENTER}, + { P("CITE") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_CITE}, + { P("CODE") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_CODE}, + { P("COL") , col_attr, HTML_COL_ATTRIBUTES, SGML_EMPTY,T_COL}, + { P("COLGROUP"), col_attr, HTML_COL_ATTRIBUTES, SGML_ELEMENT,T_COLGROUP}, + { P("COMMENT") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_PCDATA,T_COMMENT}, + { P("CREDIT") , credit_attr, HTML_CREDIT_ATTRIBUTES, SGML_MIXED,T_CREDIT}, + { P("DD") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_DD}, + { P("DEL") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_DEL}, + { P("DFN") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_DFN}, + { P("DIR") , ulist_attr, HTML_UL_ATTRIBUTES, SGML_MIXED,T_DIR}, + { P("DIV") , div_attr, HTML_DIV_ATTRIBUTES, SGML_MIXED,T_DIV}, + { P("DL") , glossary_attr, HTML_DL_ATTRIBUTES, SGML_MIXED,T_DL}, + { P("DLC") , glossary_attr, HTML_DL_ATTRIBUTES, SGML_MIXED,T_DLC}, + { P("DT") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_DT}, + { P("EM") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_EM}, + { P("EMBED") , embed_attr, HTML_EMBED_ATTRIBUTES, SGML_EMPTY,T_EMBED}, + { P("FIELDSET"), fieldset_attr,HTML_FIELDSET_ATTRIBUTES, SGML_MIXED,T_FIELDSET}, + { P("FIG") , fig_attr, HTML_FIG_ATTRIBUTES, SGML_MIXED,T_FIG}, + { P("FN") , fn_attr, HTML_FN_ATTRIBUTES, SGML_MIXED,T_FN}, + { P("FONT") , font_attr, HTML_FONT_ATTRIBUTES, SGML_MIXED,T_FONT}, + { P("FORM") , form_attr, HTML_FORM_ATTRIBUTES, SGML_MIXED,T_FORM}, + { P("FRAME") , frame_attr, HTML_FRAME_ATTRIBUTES, SGML_EMPTY,T_FRAME}, + { P("FRAMESET"), frameset_attr,HTML_FRAMESET_ATTRIBUTES, SGML_ELEMENT,T_FRAMESET}, #ifndef EBCDIC /* S/390 -- gil -- 0177 */ - { "H1" , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H1}, - { "H2" , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H2}, - { "H3" , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H3}, - { "H4" , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H4}, - { "H5" , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H5}, - { "H6" , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H6}, + { P("H1") , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H1}, + { P("H2") , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H2}, + { P("H3") , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H3}, + { P("H4") , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H4}, + { P("H5") , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H5}, + { P("H6") , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H6}, #endif /* EBCDIC S/390 -- gil -- 0187 */ - { "HEAD" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_ELEMENT,T_HEAD}, - { "HR" , hr_attr, HTML_HR_ATTRIBUTES, SGML_EMPTY,T_HR}, - { "HTML" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_HTML}, - { "HY" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_HY}, + { P("HEAD") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_ELEMENT,T_HEAD}, + { P("HR") , hr_attr, HTML_HR_ATTRIBUTES, SGML_EMPTY,T_HR}, + { P("HTML") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_HTML}, + { P("HY") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_HY}, #ifdef EBCDIC - { "H1" , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H1}, - { "H2" , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H2}, - { "H3" , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H3}, - { "H4" , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H4}, - { "H5" , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H5}, - { "H6" , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H6}, + { P("H1") , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H1}, + { P("H2") , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H2}, + { P("H3") , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H3}, + { P("H4") , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H4}, + { P("H5") , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H5}, + { P("H6") , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H6}, #endif /* EBCDIC <heavy sigh> -- gil */ - { "I" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_I}, - { "IFRAME" , iframe_attr, HTML_IFRAME_ATTRIBUTES, SGML_MIXED,T_IFRAME}, - { "IMG" , img_attr, HTML_IMG_ATTRIBUTES, SGML_EMPTY,T_IMG}, - { "INPUT" , input_attr, HTML_INPUT_ATTRIBUTES, SGML_EMPTY,T_INPUT}, - { "INS" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_INS}, - { "ISINDEX" , isindex_attr, HTML_ISINDEX_ATTRIBUTES,SGML_EMPTY,T_ISINDEX}, - { "KBD" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_KBD}, - { "KEYGEN" , keygen_attr, HTML_KEYGEN_ATTRIBUTES, SGML_EMPTY,T_KEYGEN}, - { "LABEL" , label_attr, HTML_LABEL_ATTRIBUTES, SGML_MIXED,T_LABEL}, - { "LEGEND" , legend_attr, HTML_LEGEND_ATTRIBUTES, SGML_MIXED,T_LEGEND}, - { "LH" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_LH}, - { "LI" , list_attr, HTML_LI_ATTRIBUTES, SGML_MIXED,T_LI}, - { "LINK" , link_attr, HTML_LINK_ATTRIBUTES, SGML_EMPTY,T_LINK}, - { "LISTING" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_LITTERAL,T_LISTING}, - { "MAP" , map_attr, HTML_MAP_ATTRIBUTES, SGML_ELEMENT,T_MAP}, - { "MARQUEE" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_MARQUEE}, - { "MATH" , math_attr, HTML_MATH_ATTRIBUTES, SGML_LITTERAL,T_MATH}, - { "MENU" , ulist_attr, HTML_UL_ATTRIBUTES, SGML_MIXED,T_MENU}, - { "META" , meta_attr, HTML_META_ATTRIBUTES, SGML_EMPTY,T_META}, - { "NEXTID" , nextid_attr, 1, SGML_EMPTY,T_NEXTID}, - { "NOFRAMES", gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_NOFRAMES}, - { "NOTE" , note_attr, HTML_NOTE_ATTRIBUTES, SGML_MIXED,T_NOTE}, - { "OBJECT" , object_attr, HTML_OBJECT_ATTRIBUTES, SGML_LITTERAL,T_OBJECT}, - { "OL" , olist_attr, HTML_OL_ATTRIBUTES, SGML_MIXED,T_OL}, - { "OPTION" , option_attr, HTML_OPTION_ATTRIBUTES, SGML_PCDATA,T_OPTION}, - { "OVERLAY" , overlay_attr, HTML_OVERLAY_ATTRIBUTES, SGML_PCDATA,T_OVERLAY}, - { "P" , p_attr, HTML_P_ATTRIBUTES, SGML_MIXED,T_P}, - { "PARAM" , param_attr, HTML_PARAM_ATTRIBUTES, SGML_EMPTY,T_PARAM}, - { "PLAINTEXT", gen_attr, HTML_GEN_ATTRIBUTES, SGML_LITTERAL,T_PLAINTEXT}, - { "PRE" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_PRE}, - { "Q" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_Q}, - { "S" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_S}, - { "SAMP" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_SAMP}, - { "SCRIPT" , script_attr, HTML_SCRIPT_ATTRIBUTES, SGML_LITTERAL,T_SCRIPT}, - { "SELECT" , select_attr, HTML_SELECT_ATTRIBUTES, SGML_ELEMENT,T_SELECT}, - { "SHY" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_SHY}, - { "SMALL" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_SMALL}, - { "SPAN" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_SPAN}, - { "SPOT" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_SPOT}, - { "STRIKE" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_STRIKE}, - { "STRONG" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_STRONG}, - { "STYLE" , style_attr, HTML_STYLE_ATTRIBUTES, SGML_LITTERAL,T_STYLE}, - { "SUB" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_SUB}, - { "SUP" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_SUP}, - { "TAB" , tab_attr, HTML_TAB_ATTRIBUTES, SGML_EMPTY,T_TAB}, - { "TABLE" , table_attr, HTML_TABLE_ATTRIBUTES, SGML_ELEMENT,T_TABLE}, - { "TBODY" , tr_attr, HTML_TR_ATTRIBUTES, SGML_ELEMENT,T_TBODY}, - { "TD" , td_attr, HTML_TD_ATTRIBUTES, SGML_MIXED,T_TD}, - { "TEXTAREA", textarea_attr,HTML_TEXTAREA_ATTRIBUTES, SGML_LITTERAL,T_TEXTAREA}, - { "TEXTFLOW", bodytext_attr,HTML_BODYTEXT_ATTRIBUTES, SGML_MIXED,T_TEXTFLOW}, - { "TFOOT" , tr_attr, HTML_TR_ATTRIBUTES, SGML_ELEMENT,T_TFOOT}, - { "TH" , td_attr, HTML_TD_ATTRIBUTES, SGML_MIXED,T_TH}, - { "THEAD" , tr_attr, HTML_TR_ATTRIBUTES, SGML_ELEMENT,T_THEAD}, - { "TITLE" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_PCDATA,T_TITLE}, - { "TR" , tr_attr, HTML_TR_ATTRIBUTES, SGML_MIXED,T_TR}, - { "TT" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_TT}, - { "U" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_U}, - { "UL" , ulist_attr, HTML_UL_ATTRIBUTES, SGML_MIXED,T_UL}, - { "VAR" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_VAR}, - { "WBR" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_WBR}, - { "XMP" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_LITTERAL,T_XMP}, + { P("I") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_I}, + { P("IFRAME") , iframe_attr, HTML_IFRAME_ATTRIBUTES, SGML_MIXED,T_IFRAME}, + { P("IMG") , img_attr, HTML_IMG_ATTRIBUTES, SGML_EMPTY,T_IMG}, + { P("INPUT") , input_attr, HTML_INPUT_ATTRIBUTES, SGML_EMPTY,T_INPUT}, + { P("INS") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_INS}, + { P("ISINDEX") , isindex_attr, HTML_ISINDEX_ATTRIBUTES,SGML_EMPTY,T_ISINDEX}, + { P("KBD") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_KBD}, + { P("KEYGEN") , keygen_attr, HTML_KEYGEN_ATTRIBUTES, SGML_EMPTY,T_KEYGEN}, + { P("LABEL") , label_attr, HTML_LABEL_ATTRIBUTES, SGML_MIXED,T_LABEL}, + { P("LEGEND") , legend_attr, HTML_LEGEND_ATTRIBUTES, SGML_MIXED,T_LEGEND}, + { P("LH") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_LH}, + { P("LI") , list_attr, HTML_LI_ATTRIBUTES, SGML_MIXED,T_LI}, + { P("LINK") , link_attr, HTML_LINK_ATTRIBUTES, SGML_EMPTY,T_LINK}, + { P("LISTING") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_LITTERAL,T_LISTING}, + { P("MAP") , map_attr, HTML_MAP_ATTRIBUTES, SGML_ELEMENT,T_MAP}, + { P("MARQUEE") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_MARQUEE}, + { P("MATH") , math_attr, HTML_MATH_ATTRIBUTES, SGML_LITTERAL,T_MATH}, + { P("MENU") , ulist_attr, HTML_UL_ATTRIBUTES, SGML_MIXED,T_MENU}, + { P("META") , meta_attr, HTML_META_ATTRIBUTES, SGML_EMPTY,T_META}, + { P("NEXTID") , nextid_attr, 1, SGML_EMPTY,T_NEXTID}, + { P("NOFRAMES"), gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_NOFRAMES}, + { P("NOTE") , note_attr, HTML_NOTE_ATTRIBUTES, SGML_MIXED,T_NOTE}, + { P("OBJECT") , object_attr, HTML_OBJECT_ATTRIBUTES, SGML_LITTERAL,T_OBJECT}, + { P("OL") , olist_attr, HTML_OL_ATTRIBUTES, SGML_MIXED,T_OL}, + { P("OPTION") , option_attr, HTML_OPTION_ATTRIBUTES, SGML_PCDATA,T_OPTION}, + { P("OVERLAY") , overlay_attr, HTML_OVERLAY_ATTRIBUTES, SGML_PCDATA,T_OVERLAY}, + { P("P") , p_attr, HTML_P_ATTRIBUTES, SGML_MIXED,T_P}, + { P("PARAM") , param_attr, HTML_PARAM_ATTRIBUTES, SGML_EMPTY,T_PARAM}, + { P("PLAINTEXT"), gen_attr, HTML_GEN_ATTRIBUTES, SGML_LITTERAL,T_PLAINTEXT}, + { P("PRE") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_PRE}, + { P("Q") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_Q}, + { P("S") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_S}, + { P("SAMP") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_SAMP}, + { P("SCRIPT") , script_attr, HTML_SCRIPT_ATTRIBUTES, SGML_LITTERAL,T_SCRIPT}, + { P("SELECT") , select_attr, HTML_SELECT_ATTRIBUTES, SGML_ELEMENT,T_SELECT}, + { P("SHY") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_SHY}, + { P("SMALL") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_SMALL}, + { P("SPAN") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_SPAN}, + { P("SPOT") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_SPOT}, + { P("STRIKE") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_STRIKE}, + { P("STRONG") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_STRONG}, + { P("STYLE") , style_attr, HTML_STYLE_ATTRIBUTES, SGML_LITTERAL,T_STYLE}, + { P("SUB") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_SUB}, + { P("SUP") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_SUP}, + { P("TAB") , tab_attr, HTML_TAB_ATTRIBUTES, SGML_EMPTY,T_TAB}, + { P("TABLE") , table_attr, HTML_TABLE_ATTRIBUTES, SGML_ELEMENT,T_TABLE}, + { P("TBODY") , tr_attr, HTML_TR_ATTRIBUTES, SGML_ELEMENT,T_TBODY}, + { P("TD") , td_attr, HTML_TD_ATTRIBUTES, SGML_MIXED,T_TD}, + { P("TEXTAREA"), textarea_attr,HTML_TEXTAREA_ATTRIBUTES, SGML_LITTERAL,T_TEXTAREA}, + { P("TEXTFLOW"), bodytext_attr,HTML_BODYTEXT_ATTRIBUTES, SGML_MIXED,T_TEXTFLOW}, + { P("TFOOT") , tr_attr, HTML_TR_ATTRIBUTES, SGML_ELEMENT,T_TFOOT}, + { P("TH") , td_attr, HTML_TD_ATTRIBUTES, SGML_MIXED,T_TH}, + { P("THEAD") , tr_attr, HTML_TR_ATTRIBUTES, SGML_ELEMENT,T_THEAD}, + { P("TITLE") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_PCDATA,T_TITLE}, + { P("TR") , tr_attr, HTML_TR_ATTRIBUTES, SGML_MIXED,T_TR}, + { P("TT") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_TT}, + { P("U") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_U}, + { P("UL") , ulist_attr, HTML_UL_ATTRIBUTES, SGML_MIXED,T_UL}, + { P("VAR") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_VAR}, + { P("WBR") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_WBR}, + { P("XMP") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_LITTERAL,T_XMP}, }; +#undef P /* Dummy space, will be filled with the contents of either tags_new or tags_old on calling HTSwitchDTD - kw */ @@ -1621,7 +1650,8 @@ PUBLIC void HTSwitchDTD ARGS1( } PUBLIC HTTag HTTag_unrecognized = - { NULL, NULL, 0, SGML_EMPTY,T__UNREC_}; + + { NULL_HTTag, NULL, 0, SGML_EMPTY,T__UNREC_}; /* ** Utility Routine: Useful for people building HTML objects. diff --git a/WWW/Library/Implementation/HTMLDTD.h b/WWW/Library/Implementation/HTMLDTD.h index 59e8012b..600cf161 100644 --- a/WWW/Library/Implementation/HTMLDTD.h +++ b/WWW/Library/Implementation/HTMLDTD.h @@ -949,6 +949,15 @@ Attribute numbers #define HTML_UL_WRAP 13 #define HTML_UL_ATTRIBUTES 14 +#ifdef USE_PSRC +/* values of HTML attributes' types */ +#define HTMLA_NORMAL 0 /* nothing specific */ +#define HTMLA_ANAME 1 /* anchor name - 'id' or a's 'name' */ +#define HTMLA_HREF 2 /* href */ +#define HTMLA_CLASS 4 /* class name. */ +#define HTMLA_AUXCLASS 8 /* attribute, the value of which also designates + a class name */ +#endif extern CONST SGML_dtd HTML_dtd; extern void HTSwitchDTD PARAMS(( diff --git a/WWW/Library/Implementation/HTNews.c b/WWW/Library/Implementation/HTNews.c index 61858d30..5b16ee3c 100644 --- a/WWW/Library/Implementation/HTNews.c +++ b/WWW/Library/Implementation/HTNews.c @@ -213,7 +213,9 @@ PRIVATE BOOL initialize NOARGS #endif /* NeXTStep */ s = -1; /* Disconnected */ +#ifdef LY_FIND_LEAKS atexit(free_news_globals); +#endif return YES; } @@ -343,7 +345,9 @@ PRIVATE NNTPAuthResult HTHandleAuthInfo ARGS1( } } else { NNTP_AuthInfo = HTList_new(); +#ifdef LY_FIND_LEAKS atexit(free_NNTP_AuthInfo); +#endif } /* diff --git a/WWW/Library/Implementation/HTRules.c b/WWW/Library/Implementation/HTRules.c index b97a01aa..97df34e6 100644 --- a/WWW/Library/Implementation/HTRules.c +++ b/WWW/Library/Implementation/HTRules.c @@ -102,7 +102,9 @@ PUBLIC int HTAddRule ARGS3( } if (!rules) { +#ifdef LY_FIND_LEAKS atexit(HTClearRules); +#endif } #ifdef PUT_ON_HEAD temp->next = rules; @@ -290,7 +292,7 @@ char * HTTranslate ARGS1( ** returns 0 OK, < 0 syntax error. */ PUBLIC int HTSetConfiguration ARGS1( - CONST char *, config) + char *, config) { HTRuleOp op; char * line = NULL; diff --git a/WWW/Library/Implementation/HTRules.h b/WWW/Library/Implementation/HTRules.h index 06d2ea7a..61a90a4f 100644 --- a/WWW/Library/Implementation/HTRules.h +++ b/WWW/Library/Implementation/HTRules.h @@ -114,7 +114,7 @@ HTSetConfiguration: Load one line of configuration information the rule file, for example INI files for X resources. */ -extern int HTSetConfiguration PARAMS((CONST char * config)); +extern int HTSetConfiguration PARAMS((char * config)); /* diff --git a/WWW/Library/Implementation/HTTCP.c b/WWW/Library/Implementation/HTTCP.c index 99f0b8ff..243749eb 100644 --- a/WWW/Library/Implementation/HTTCP.c +++ b/WWW/Library/Implementation/HTTCP.c @@ -668,7 +668,9 @@ PUBLIC struct hostent * LYGetHostByName ARGS1( if (!valid_hostname(host)) { lynx_nsl_status = HT_NOT_ACCEPTABLE; +#ifdef NO_RECOVERY h_errno = NO_RECOVERY; +#endif return NULL; } @@ -693,11 +695,12 @@ PUBLIC struct hostent * LYGetHostByName ARGS1( { int got_rehostent = 0; /* - ** Pipe, child pid, status buffers, cycle count, select() + ** Pipe, child pid, status buffers, start time, select() ** control variables. - */ + */ pid_t fpid, waitret; - int pfd[2], selret, readret, waitstat = 0, cycle = 0; + int pfd[2], selret, readret, waitstat = 0; + time_t start_time = time(NULL); fd_set readfds; struct timeval timeout; int dns_patience = 30; /* how many seconds will we wait for DNS? */ @@ -723,18 +726,18 @@ PUBLIC struct hostent * LYGetHostByName ARGS1( struct hostent *phost; /* Pointer to host - See netdb.h */ /* ** Child - for the long call. - ** - ** Make sure parent can kill us at will. -BL - */ + ** + ** Make sure parent can kill us at will. -BL + */ (void) signal(SIGTERM, quench); /* - ** Also make sure the child does not run one of the - ** signal handlers that may have been installed by - ** Lynx if one of those signals occurs. For example - ** we don't want the child to remove temp files on - ** ^C, let the parent deal with that. - kw - */ + ** Also make sure the child does not run one of the + ** signal handlers that may have been installed by + ** Lynx if one of those signals occurs. For example + ** we don't want the child to remove temp files on + ** ^C, let the parent deal with that. - kw + */ (void) signal(SIGINT, quench); #ifndef NOSIGHUP (void) signal(SIGHUP, quench); @@ -814,11 +817,12 @@ PUBLIC struct hostent * LYGetHostByName ARGS1( close(pfd[1]); /* parent won't use write side -BL */ - while (cycle < dns_patience) { - /* - ** Avoid infinite loop in the face of the unexpected. -BL - */ - cycle++; + if (fpid < 0) { /* fork failed */ + close(pfd[0]); + goto failed; + } + + while (child_exited || time(NULL) - start_time < dns_patience) { FD_ZERO(&readfds); /* @@ -884,8 +888,8 @@ PUBLIC struct hostent * LYGetHostByName ARGS1( lynx_nsl_status = HT_ERROR; } /* - ** Make sure child is cleaned up. -BL - */ + ** Make sure child is cleaned up. -BL + */ if (!child_exited) waitret = waitpid(fpid, &waitstat, WNOHANG); if (!WIFEXITED(waitstat) && !WIFSIGNALED(waitstat)) { @@ -896,15 +900,15 @@ PUBLIC struct hostent * LYGetHostByName ARGS1( } /* - ** Clean up if child exited before & no data received. -BL - */ + ** Clean up if child exited before & no data received. -BL + */ if (child_exited) { waitret = waitpid(fpid, &waitstat, WNOHANG); break; } /* - ** If child exited, loop once more looking for data. -BL - */ + ** If child exited, loop once more looking for data. -BL + */ if ((waitret = waitpid(fpid, &waitstat, WNOHANG)) > 0) { /* ** Data will be arriving right now, so make sure we @@ -912,7 +916,6 @@ PUBLIC struct hostent * LYGetHostByName ARGS1( ** skip the interrupt check. -BL */ child_exited = 1; - cycle--; continue; } @@ -1000,7 +1003,7 @@ PUBLIC struct hostent * LYGetHostByName ARGS1( #else /* !NSL_FORK, !_WINDOWS_NSL: */ { struct hostent *phost; - phost = gethostbyname(host); /* See netdb.h */ + phost = gethostbyname((char *)host); /* See netdb.h */ #ifdef MVS CTRACE(tfp, "LYGetHostByName: gethostbyname() returned %d\n", phost); #endif /* MVS */ @@ -1262,7 +1265,9 @@ PRIVATE void get_host_details NOARGS return; /* Already done */ gethostname(name, namelength); /* Without domain */ StrAllocCopy(hostname, name); +#ifdef LY_FIND_LEAKS atexit(free_HTTCP_hostname); +#endif #ifdef UCX /* ** UCX doesn't give the complete domain name. diff --git a/WWW/Library/Implementation/HTUtils.h b/WWW/Library/Implementation/HTUtils.h index 9065ef01..b6f03d0b 100644 --- a/WWW/Library/Implementation/HTUtils.h +++ b/WWW/Library/Implementation/HTUtils.h @@ -335,7 +335,7 @@ are generally not the response status from any specific protocol. #define HT_BAD_EOF -12 /* Premature EOF */ #ifndef va_arg -# if HAVE_STDARG_H +# if HAVE_STDARG_H && ANSI_VARARGS # include <stdarg.h> # else # if HAVE_VARARGS_H diff --git a/WWW/Library/Implementation/HTWriter.c b/WWW/Library/Implementation/HTWriter.c deleted file mode 100644 index c4dba35b..00000000 --- a/WWW/Library/Implementation/HTWriter.c +++ /dev/null @@ -1,183 +0,0 @@ -/* FILE WRITER HTWrite.c -** =========== -** -*/ - -#include <HTUtils.h> - -#include <HTWriter.h> - -#define BUFFER_SIZE 4096 /* Tradeoff */ - -#include <LYLeaks.h> - -/* HTML Object -** ----------- -*/ - -struct _HTStream { - CONST HTStreamClass * isa; - - int soc; - char *write_pointer; - char buffer[BUFFER_SIZE]; -#ifdef NOT_ASCII - BOOL make_ascii; /* Are we writing to the net? */ -#endif -}; - - -/* Write the buffer out to the socket -** ---------------------------------- -*/ - -PRIVATE void flush ARGS1(HTStream *, me) -{ - char *read_pointer = me->buffer; - char *write_pointer = me->write_pointer; - -#ifdef NOT_ASCII - if (me->make_ascii) { - char * p; - for(p = me->buffer; p < me->write_pointer; p++) - *p = TOASCII(*p); - } -#endif - while (read_pointer < write_pointer) { - int status; - status = NETWRITE(me->soc, me->buffer, /* Put timeout? @@@ */ - write_pointer - read_pointer); - if (status<0) { - CTRACE(tfp, "HTWrite: Error: write() on socket returns %d !!!\n", status); - return; - } - read_pointer = read_pointer + status; - } - me->write_pointer = me->buffer; -} - - -/*_________________________________________________________________________ -** -** A C T I O N R O U T I N E S -*/ - -/* Character handling -** ------------------ -*/ - -PRIVATE void HTWriter_put_character ARGS2(HTStream *, me, char, c) -{ - if (me->write_pointer == &me->buffer[BUFFER_SIZE]) flush(me); - *me->write_pointer++ = c; -} - - - -/* String handling -** --------------- -** -** Strings must be smaller than this buffer size. -*/ -PRIVATE void HTWriter_put_string ARGS2(HTStream *, me, CONST char*, s) -{ - int l = strlen(s); - if (me->write_pointer + l > &me->buffer[BUFFER_SIZE]) flush(me); - strcpy(me->write_pointer, s); - me->write_pointer = me->write_pointer + l; -} - - -/* Buffer write. Buffers can (and should!) be big. -** ------------ -*/ -PRIVATE void HTWriter_write ARGS3(HTStream *, me, CONST char*, s, int, l) -{ - - CONST char *read_pointer = s; - CONST char *write_pointer = s+l; - - flush(me); /* First get rid of our buffer */ - - while (read_pointer < write_pointer) { - int status = NETWRITE(me->soc, (char *)read_pointer, - write_pointer - read_pointer); - if (status<0) { - CTRACE(tfp, "HTWriter_write: Error on socket output stream!!!\n"); - return; - } - read_pointer = read_pointer + status; - } -} - - - - -/* Free an HTML object -** ------------------- -** -** Note that the SGML parsing context is freed, but the created object is not, -** as it takes on an existence of its own unless explicitly freed. -*/ -PRIVATE void HTWriter_free ARGS1(HTStream *, me) -{ - flush(me); - NETCLOSE(me->soc); - FREE(me); -} - -PRIVATE void HTWriter_abort ARGS2(HTStream *, me, HTError, e GCC_UNUSED) -{ - HTWriter_free(me); -} - - -/* Structured Object Class -** ----------------------- -*/ -PRIVATE CONST HTStreamClass HTWriter = /* As opposed to print etc */ -{ - "SocketWriter", - HTWriter_free, - HTWriter_abort, - HTWriter_put_character, HTWriter_put_string, - HTWriter_write -}; - - -/* Subclass-specific Methods -** ------------------------- -*/ - -PUBLIC HTStream* HTWriter_new ARGS1(int, soc) -{ - HTStream* me = (HTStream*)malloc(sizeof(*me)); - if (me == NULL) outofmem(__FILE__, "HTML_new"); - me->isa = &HTWriter; - -#ifdef NOT_ASCII - me->make_ascii = NO; -#endif - me->soc = soc; - me->write_pointer = me->buffer; - return me; -} - -/* Subclass-specific Methods -** ------------------------- -*/ - -PUBLIC HTStream* HTASCIIWriter ARGS1(int, soc) -{ - HTStream* me = (HTStream*)malloc(sizeof(*me)); - if (me == NULL) outofmem(__FILE__, "HTML_new"); - me->isa = &HTWriter; - -#ifdef NOT_ASCII - me->make_ascii = YES; -#endif - me->soc = soc; - me->write_pointer = me->buffer; - return me; -} - diff --git a/WWW/Library/Implementation/HTWriter.h b/WWW/Library/Implementation/HTWriter.h deleted file mode 100644 index c5306351..00000000 --- a/WWW/Library/Implementation/HTWriter.h +++ /dev/null @@ -1,28 +0,0 @@ -/* */ - -/* Unix File or Socket Writer HTWriter.c -** -------------------------- -** -** This version of the stream object just writes to a socket. -** The socket is assumed open and closed afterward. -** -** There are two versions (identical on ASCII machines) -** one of which converts to ASCII on output. -** -** Bugs: -** strings written must be less than buffer size. -*/ - -#ifndef HTWRITE_H -#define HTWRITE_H - -#include <HTStream.h> - -extern HTStream * HTWriter_new PARAMS((int soc)); - -extern HTStream * HTASCIIWriter PARAMS((int soc)); - -#endif -/* - - */ diff --git a/WWW/Library/Implementation/LYexit.h b/WWW/Library/Implementation/LYexit.h index b8e7cd0c..4723344b 100644 --- a/WWW/Library/Implementation/LYexit.h +++ b/WWW/Library/Implementation/LYexit.h @@ -30,12 +30,8 @@ #define exit LYexit -#ifdef LY_FIND_LEAKS #define atexit LYatexit #define ATEXITSIZE 40 -#else -#define atexit(func) /*nothing*/ -#endif /* * Data structures diff --git a/WWW/Library/Implementation/SGML.c b/WWW/Library/Implementation/SGML.c index 91e0a0be..12003736 100644 --- a/WWW/Library/Implementation/SGML.c +++ b/WWW/Library/Implementation/SGML.c @@ -28,12 +28,67 @@ #include <HTChunk.h> #include <LYCharSets.h> -#include <LYCharVals.h> /* S/390 -- gil -- 0635 */ +#include <LYCharVals.h> /* S/390 -- gil -- 0635 */ #include <LYStrings.h> #include <LYLeaks.h> +#ifdef USE_COLOR_STYLE +# include <LYStyle.h> +# include <LYPrettySrc.h> +#endif + #define INVALID (-1) +#ifdef USE_PSRC + +# define PSRC(x) if (psrc_view) { x }; +# define NPSRC(x) if (!psrc_view) { x }; +# define IFDEFPSRC(x) x +# define IFNDEFPSRC(x) + +char* entity_string; /* this is used for printing entity name. + Unconditionally added since redundant assigments don't hurt much*/ + +PRIVATE void fake_put_character ARGS2( + void*, p GCC_UNUSED, + char, c GCC_UNUSED) +{ +} + +#define START TRUE +#define STOP FALSE + +#else +# define PSRC(x) +# define NPSRC(x) +# define IFDEFPSRC(x) +# define IFNDEFPSRC(x) x +#endif + + /* will use an inlined version */ +#ifdef USE_INLINE_PUTC +#undef HTChunkPutc +#define HTChunkPutc(ch,c)\ + if (ch->size >= ch->allocated) {\ + ch->allocated = ch->allocated + ch->growby;\ + ch->data = ch->data ? (char *)realloc(ch->data, ch->allocated)\ + : (char *)calloc(1, ch->allocated);\ + if (!ch->data)\ + outofmem(__FILE__, "HTChunkPutc");\ + }\ + ch->data[ch->size++] = c; +#endif + +#define PUTS(str) ((*context->actions->put_string)(context->target, str)) + + +#define OPT 0 /* don't make it 1 otherwise something wrong will be with + TagSoup parser mode - I was unable to undestand why it works incorrectly -HV*/ +#define OPT1 1 /* set to 1 for several optimizations */ + +/*the following macros are used for pretty source view. */ +#define IS_C(attr) (attr.type == HTMLA_CLASS) + PUBLIC HTCJKlang HTCJK = NOCJK; /* CJK enum value. */ PUBLIC BOOL HTPassEightBitRaw = FALSE; /* Pass 161-172,174-255 raw. */ PUBLIC BOOL HTPassEightBitNum = FALSE; /* Pass ^ numeric entities raw. */ @@ -71,7 +126,7 @@ struct _HTStream { CONST HTStreamClass * isa; /* inherited from HTStream */ CONST SGML_dtd *dtd; - CONST HTStructuredClass *actions; /* target class */ + CONST HTStructuredClass *actions; /* target class */ HTStructured *target; /* target object */ HTTag *current_tag; @@ -86,7 +141,7 @@ struct _HTStream { S_exclamation, S_comment, S_doctype, S_marked, S_sgmlent, S_sgmlele, S_sgmlatt, S_squoted, S_dquoted, S_end, S_entity, - S_esc, S_dollar, S_paren, S_nonascii_text, + S_esc, S_dollar, S_paren, S_nonascii_text, S_dollar_paren, S_esc_sq, S_dollar_sq, S_paren_sq, S_nonascii_text_sq, S_dollar_paren_sq, @@ -128,6 +183,50 @@ struct _HTStream { int csi_index; } ; +#ifdef USE_PSRC +static BOOL seen_letter_in_junk_tag; + +PRIVATE void HTMLSRC_apply_markup ARGS3( + HTStream*, context, + HTlexem, lexem, + BOOL, start) +{ + HT_tagspec* ts = *( ( start ? lexem_start : lexem_end ) + lexem); + + while (ts) { +#ifdef USE_COLOR_STYLE + if (ts->start) { + current_tag_style = ts->style; + force_current_tag_style = TRUE; + forced_classname = ts->class_name; + force_classname = TRUE; + } +#endif + CTRACE(tfp,ts->start ? "SRCSTART %d\n" : "SRCSTOP %d\n",(int)lexem); + if (ts->start) + (*context->actions->start_element)( + context->target, + ts->element, + ts->present, + (CONST char **)ts->value, + context->current_tag_charset, + (char **)&context->include); + else + (*context->actions->end_element)( + context->target, + ts->element, + (char **)&context->include); + ts = ts->next; + } +} + +# define PSRCSTART(x) HTMLSRC_apply_markup(context,HTL_##x,START) +# define PSRCSTOP(x) HTMLSRC_apply_markup(context,HTL_##x,STOP) + +PRIVATE BOOL cur_attr_is_href; +PRIVATE BOOL cur_attr_is_name; +#endif + PRIVATE void set_chartrans_handling ARGS3( HTStream *, context, HTParentAnchor *, anchor, @@ -166,9 +265,9 @@ PRIVATE void set_chartrans_handling ARGS3( ** Get the chartrans info for output to the HTML parser. - FM */ context->outUCI = HTAnchor_getUCInfoStage(anchor, - UCT_STAGE_STRUCTURED); + UCT_STAGE_STRUCTURED); context->outUCLYhndl = HTAnchor_getUCLYhndl(context->node_anchor, - UCT_STAGE_STRUCTURED); + UCT_STAGE_STRUCTURED); } /* ** Set the in->out transformation parameters. - FM @@ -257,10 +356,20 @@ PRIVATE void handle_attribute_name ARGS2( attr * attributes = tag->attributes; int high, low, i, diff; +#ifdef USE_PSRC + if (psrc_view) { + cur_attr_is_href = FALSE; + cur_attr_is_name = FALSE; + } +#endif /* ** Ignore unknown tag. - KW */ if (tag == context->unknown_tag) { +#ifdef USE_PSRC + if (psrc_view) + context->current_attribute_number = 1; /* anything !=INVALID */ +#endif return; } @@ -274,12 +383,30 @@ PRIVATE void handle_attribute_name ARGS2( diff = strcasecomp(attributes[i].name, s); if (diff == 0) { /* success: found it */ context->current_attribute_number = i; +#ifdef USE_PSRC + if (!psrc_view) { +#endif context->present[i] = YES; FREE(context->value[i]); #ifdef USE_COLOR_STYLE - current_is_class=(!strcasecomp("class", s)); +# ifdef USE_PSRC +# if !OPT1 + current_is_class = (!strcasecomp("class", s)); +# else + current_is_class = IS_C(attributes[i]); +# endif +# else + current_is_class = (!strcasecomp("class", s)); +# endif CTRACE(tfp, "SGML: found attribute %s, %d\n", s, current_is_class); #endif + +#ifdef USE_PSRC + } else { + cur_attr_is_name = (attributes[i].type == HTMLA_ANAME); + cur_attr_is_href = (attributes[i].type == HTMLA_HREF); + } +#endif return; } /* if */ @@ -336,11 +463,17 @@ PRIVATE BOOL put_special_unicodes ARGS2( /* ** Use Lynx special character for nbsp. */ +#ifdef USE_PSRC + if (!psrc_view) +#endif PUTC(HT_NON_BREAK_SPACE); } else if (code == CH_SHY) { /* ** Use Lynx special character for shy. */ +#ifdef USE_PSRC + if (!psrc_view) +#endif PUTC(LY_SOFT_HYPHEN); } else if (code == 8194 || code == 8201) { /* @@ -355,13 +488,22 @@ PRIVATE BOOL put_special_unicodes ARGS2( ** with a single '32' for all (but do line wrapping more fancy). ** Assume emsp as two ensp (below). */ +#ifdef USE_PSRC + if (!psrc_view) +#endif PUTC(HT_EN_SPACE); } else if (code == 8195) { /* ** Use Lynx special character for emsp. */ +#ifdef USE_PSRC + if (!psrc_view) { +#endif /* PUTC(HT_EN_SPACE); let's stay with a single space :) */ PUTC(HT_EN_SPACE); +#ifdef USE_PSRC + } +#endif } else { /* ** Return NO if nothing done. @@ -411,6 +553,16 @@ PRIVATE void handle_entity ARGS2( ** Check for special Unicodes. - FM */ if (put_special_unicodes(context, code)) { +#ifdef USE_PSRC + if (psrc_view) { + HTMLSRC_apply_markup(context,HTL_entity,START); + PUTC('&'); + PUTS(entity_string); + if (term) + PUTC(term); + HTMLSRC_apply_markup(context,HTL_entity,STOP); + } +#endif FoundEntity = TRUE; return; } @@ -422,6 +574,13 @@ PRIVATE void handle_entity ARGS2( uck < 256 && (uck < 127 || uck >= LYlowest_eightbit[context->outUCLYhndl])) { +#ifdef USE_PSRC + if (psrc_view) { + HTMLSRC_apply_markup(context,HTL_entity,START); + PUTC('&'); PUTS(entity_string); if (term) PUTC(term); + HTMLSRC_apply_markup(context,HTL_entity,STOP); + } else +#endif PUTC(FROMASCII((char)uck)); FoundEntity = TRUE; return; @@ -433,6 +592,16 @@ PRIVATE void handle_entity ARGS2( */ (uck = UCTransUniCharStr(replace_buf, 60, code, context->outUCLYhndl, 0) >= 0)) { +#ifdef USE_PSRC + if (psrc_view) { + HTMLSRC_apply_markup(context,HTL_entity,START); + PUTC('&'); + PUTS(entity_string); + if (term) + PUTC(term); + HTMLSRC_apply_markup(context,HTL_entity,STOP); + } else +#endif for (p = replace_buf; *p; p++) PUTC(*p); FoundEntity = TRUE; @@ -441,14 +610,41 @@ PRIVATE void handle_entity ARGS2( /* ** If we're displaying UTF-8, try that now. - FM */ +#ifndef USE_PSRC if (context->T.output_utf8 && PUTUTF8(code)) { FoundEntity = TRUE; return; } +#else + if (context->T.output_utf8 && (psrc_view ? + (UCPutUtf8_charstring((HTStream *)context->target, + (putc_func_t*)(&fake_put_character), code)): PUTUTF8(code) ) ) { + + if (psrc_view) { + HTMLSRC_apply_markup(context,HTL_entity,START); + PUTC('&'); PUTS(entity_string); if (term) PUTC(term); + HTMLSRC_apply_markup(context,HTL_entity,STOP); + } + + FoundEntity = TRUE; + return; + } +#endif /* ** If it's safe ASCII, use it. - FM */ if (code >= 32 && code < 127) { +#ifdef USE_PSRC + if (psrc_view) { + HTMLSRC_apply_markup(context,HTL_entity,START); + PUTC('&'); + PUTS(entity_string); + if (term) + PUTC(term); + HTMLSRC_apply_markup(context,HTL_entity,STOP); + } else +#endif + PUTC(FROMASCII((char)code)); FoundEntity = TRUE; return; @@ -462,6 +658,16 @@ PRIVATE void handle_entity ARGS2( if (!strcmp(s, "zwnj") || !strcmp(s, "zwj")) { CTRACE(tfp, "handle_entity: Ignoring '%s'.\n", s); +#ifdef USE_PSRC + if (psrc_view) { + HTMLSRC_apply_markup(context,HTL_entity,START); + PUTC('&'); + PUTS(entity_string); + if (term) + PUTC(term); + HTMLSRC_apply_markup(context,HTL_entity,STOP); + } +#endif FoundEntity = TRUE; return; } @@ -471,6 +677,16 @@ PRIVATE void handle_entity ARGS2( if (!strcmp(s, "lrm") || !strcmp(s, "rlm")) { CTRACE(tfp, "handle_entity: Ignoring '%s'.\n", s); +#ifdef USE_PSRC + if (psrc_view) { + HTMLSRC_apply_markup(context,HTL_entity,START); + PUTC('&'); + PUTS(entity_string); + if (term) + PUTC(term); + HTMLSRC_apply_markup(context,HTL_entity,STOP); + } +#endif FoundEntity = TRUE; return; } @@ -479,6 +695,10 @@ PRIVATE void handle_entity ARGS2( /* ** If entity string not found, display as text. */ +#ifdef USE_PSRC + if (psrc_view) + PSRCSTART(badseq); +#endif CTRACE(tfp, "SGML: Unknown entity '%s' %ld %ld\n", s, (long)code, uck); /* S/390 -- gil -- 0695 */ PUTC('&'); for (p = s; *p; p++) { @@ -486,6 +706,10 @@ PRIVATE void handle_entity ARGS2( } if (term != '\0') PUTC(term); +#ifdef USE_PSRC + if (psrc_view) + PSRCSTOP(badseq); +#endif } @@ -795,6 +1019,10 @@ PRIVATE void start_element ARGS1( HTStream *, context) { HTTag * new_tag = context->current_tag; +#if OPT1 + HTMLElement e = new_tag - context->dtd->tags; + BOOL ok = FALSE; +#endif #ifdef EXTENDED_HTMLDTD @@ -892,6 +1120,7 @@ PRIVATE void start_element ARGS1( /* ** Ugh, it is not an OPTION. - FM */ +#if !OPT1 if (!strcasecomp(new_tag->name, "INPUT") || !strcasecomp(new_tag->name, "TEXTAREA") || !strcasecomp(new_tag->name, "SELECT") || @@ -900,6 +1129,18 @@ PRIVATE void start_element ARGS1( !strcasecomp(new_tag->name, "LABEL") || !strcasecomp(new_tag->name, "LEGEND") || !strcasecomp(new_tag->name, "FORM")) { +#else + switch (e) { + case HTML_INPUT: case HTML_TEXTAREA: case HTML_SELECT: + case HTML_BUTTON: case HTML_FIELDSET: case HTML_LABEL: + case HTML_LEGEND: case HTML_FORM: + ok = TRUE; + break; + default: + break; + } + if (ok) { +#endif /* ** It is another form-related start tag, so terminate ** the current SELECT block and fall through. - FM @@ -935,7 +1176,11 @@ PRIVATE void start_element ARGS1( N->next = context->element_stack; N->tag = new_tag; context->element_stack = N; +#if !OPT } else if (!strcasecomp(new_tag->name, "META")) { +#else + } else if (e == HTML_META ) { +#endif /* ** Check for result of META tag. - KW & FM */ @@ -961,9 +1206,10 @@ PUBLIC HTTag * SGMLFindTag ARGS2( CONST char *, string) { int high, low, i, diff; + for (low = 0, high=dtd->number_of_tags; high > low; - diff < 0 ? (low = i+1) : (high = i)) { /* Binary search */ + diff < 0 ? (low = i+1) : (high = i)) { /* Binary search */ i = (low + (high-low)/2); diff = strcasecomp(dtd->tags[i].name, string); /* Case insensitive */ if (diff == 0) { /* success: found it */ @@ -1027,6 +1273,10 @@ PRIVATE void SGML_free ARGS1( for (i = 0; i < MAX_ATTRIBUTES; i++) FREE(context->value[i]); FREE(context); + +#ifdef USE_PSRC + sgml_in_psrc_was_initialized =FALSE; +#endif } PRIVATE void SGML_abort ARGS2( @@ -1065,6 +1315,11 @@ PRIVATE void SGML_abort ARGS2( for (i = 0; i < MAX_ATTRIBUTES; i++) FREE(context->value[i]); FREE(context); + +#ifdef USE_PSRC + sgml_in_psrc_was_initialized =FALSE; +#endif + } @@ -1191,7 +1446,7 @@ PRIVATE void SGML_character ARGS2( *(context->utf_buf_p) = '\0'; /* goto top; */ } - } /* end of context->T.decode_utf8 S/390 -- gil -- 0726 */ + } /* end of context->T.decode_utf8 S/390 -- gil -- 0726 */ #ifdef NOTDEFINED /* @@ -1265,7 +1520,7 @@ PRIVATE void SGML_character ARGS2( } goto top0a; } /* Next line end of ugly stuff for C0. - KW */ - } else { /* end of context->T.trans_to_uni S/390 -- gil -- 0791 */ + } else { /* end of context->T.trans_to_uni S/390 -- gil -- 0791 */ goto top0a; } @@ -1277,7 +1532,7 @@ PRIVATE void SGML_character ARGS2( /* ** We jump up to here from below if we have ** stuff in the recover, insert, or csi buffers -** to process. We zero saved_char_in, in effect +** to process. We zero saved_char_in, in effect ** as a flag that the octet in not that of the ** actual call to this function. This may be OK ** for now, for the stuff this function adds to @@ -1314,7 +1569,7 @@ top1: */ /* ** Works for both ASCII and EBCDIC. -- gil - */ /* S/390 -- gil -- 0811 */ + */ /* S/390 -- gil -- 0811 */ if (TOASCII(unsign_c) < 32 && c != '\t' && c != '\n' && c != '\r' && HTCJK == NOCJK) @@ -1347,7 +1602,7 @@ top1: /* ** Note that if we don't have a CJK input, then this ** is not the second byte of a CJK di-byte, and we're - ** trashing the input. That's why 8-bit characters + ** trashing the input. That's why 8-bit characters ** followed by, for example, '<' can cause the tag to ** be treated as text, not markup. We could try to deal ** with it by holding each first byte and then checking @@ -1382,7 +1637,7 @@ top1: PUTC(c); break; } - if (c == '&' && TOASCII(unsign_c) < 127 && /* S/390 -- gil -- 0898 */ + if (c == '&' && TOASCII(unsign_c) < 127 && /* S/390 -- gil -- 0898 */ (!context->element_stack || (context->element_stack->tag && (context->element_stack->tag->contents == SGML_MIXED || @@ -1432,7 +1687,7 @@ top1: PUTC(saved_char_in); saved_char_in = '\0'; /****************************************************************** - * I. LATIN-1 OR UCS2 TO DISPLAY CHARSET + * I. LATIN-1 OR UCS2 TO DISPLAY CHARSET ******************************************************************/ } else if ((chk = (context->T.trans_from_uni && TOASCII(unsign_c) >= 160)) && /* S/390 -- gil -- 0968 */ (uck = UCTransUniChar(unsign_c, @@ -1484,13 +1739,28 @@ top1: !(PASSHI8BIT || HTCJK != NOCJK) && !IncludesLatin1Enc) { int i; +#ifdef USE_PSRC + int psrc_view_backup = 0; +#endif string->size = 0; EntityName = HTMLGetEntityName((int)(unsign_c - 160)); for (i = 0; EntityName[i]; i++) HTChunkPutc(string, EntityName[i]); HTChunkTerminate(string); +#ifdef USE_PSRC + /* we need to disable it temporary*/ + if (psrc_view) { + psrc_view_backup =1; psrc_view =0; + } +#endif handle_entity(context, '\0'); +#ifdef USE_PSRC + /* we need to disable it temporary*/ + if (psrc_view_backup) + psrc_view = TRUE; +#endif + string->size = 0; if (!FoundEntity) PUTC(';'); @@ -1530,7 +1800,7 @@ top1: ** If we don't actually want the character, ** make it safe and output that now. - FM */ - } else if (TOASCII((unsigned char)c) < /* S/390 -- gil -- 0997 */ + } else if (TOASCII((unsigned char)c) < /* S/390 -- gil -- 0997 */ LYlowest_eightbit[context->outUCLYhndl] || (context->T.trans_from_uni && !HTPassEightBitRaw)) { #ifdef NOTUSED_FOTEMODS @@ -1586,7 +1856,7 @@ top1: ** In litteral mode, waits only for specific end tag (for ** compatibility with old servers, and for Lynx). - FM */ - case S_litteral: + case S_litteral: /*PSRC:this case not understood completely by HV, not done*/ HTChunkPutc(string, c); if (TOUPPER(c) != ((string->size == 1) ? '/' : @@ -1633,7 +1903,7 @@ top1: ** Handle possible named entity. */ case S_entity: - if (TOASCII(unsign_c) < 127 && (string->size ? /* S/390 -- gil -- 1029 */ + if (TOASCII(unsign_c) < 127 && (string->size ? /* S/390 -- gil -- 1029 */ isalnum((unsigned char)c) : isalpha((unsigned char)c))) { /* ** Accept valid ASCII character. - FM @@ -1644,7 +1914,15 @@ top1: ** It was an ampersand that's just text, so output ** the ampersand and recycle this character. - FM */ +#ifdef USE_PSRC + if (psrc_view) + PSRCSTART(badseq); +#endif PUTC('&'); +#ifdef USE_PSRC + if (psrc_view) + PSRCSTOP(badseq); +#endif context->state = S_text; goto top1; } else { @@ -1652,6 +1930,9 @@ top1: ** Terminate entity name and try to handle it. - FM */ HTChunkTerminate(string); +#ifdef USE_PSRC + entity_string = string->data; +#endif /* S/390 -- gil -- 1039 */ /* CTRACE(tfp, "%s: %d: %s\n", __FILE__, __LINE__, string->data); */ if (!strcmp(string->data, "zwnj") && @@ -1714,8 +1995,16 @@ top1: ** No 'x' or digit following the "&#" so recover ** them and recycle the character. - FM */ +#ifdef USE_PSRC + if (psrc_view) + PSRCSTART(badseq); +#endif PUTC('&'); PUTC('#'); +#ifdef USE_PSRC + if (psrc_view) + PSRCSTOP(badseq); +#endif context->state = S_text; goto top1; } @@ -1739,9 +2028,17 @@ top1: ** No hex digit following the "&#x" so recover ** them and recycle the character. - FM */ +#ifdef USE_PSRC + if (psrc_view) + PSRCSTART(badseq); +#endif PUTC('&'); PUTC('#'); PUTC('x'); +#ifdef USE_PSRC + if (psrc_view) + PSRCSTOP(badseq); +#endif context->isHex = FALSE; context->state = S_text; goto top1; @@ -1752,6 +2049,9 @@ top1: UCode_t code; int i; HTChunkTerminate(string); +#ifdef USE_PSRC + entity_string = string->data; +#endif if ((context->isHex ? sscanf(string->data, "%lx", &code) : sscanf(string->data, "%ld", &code)) == 1) { /* =============== work in ASCII below here =============== S/390 -- gil -- 1092 */ @@ -1932,6 +2232,16 @@ top1: ** We handled the value as a special character, ** so recycle the terminator or break. - FM */ +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTART(entity); + PUTS( (context->isHex ? "&#x" : "&#") ); + PUTS(entity_string); + if (c == ';') + PUTC(';'); + PSRCSTOP(entity); + } +#endif string->size = 0; context->isHex = FALSE; context->state = S_text; @@ -1947,7 +2257,19 @@ top1: uck < 256 && (uck < 127 || uck >= LYlowest_eightbit[context->outUCLYhndl])) { +#ifdef USE_PSRC + if (!psrc_view) { +#endif PUTC(FROMASCII((char)uck)); +#ifdef USE_PSRC + } else { + PSRCSTART(entity); + PUTS( (context->isHex ? "&#x" : "&#") ); + PUTS(entity_string); + PUTC(';'); + PSRCSTOP(entity); + } +#endif } else if ((uck == -4 || (context->T.repl_translated_C0 && uck > 0 && uck < 32)) && @@ -1957,6 +2279,15 @@ top1: (uck = UCTransUniCharStr(replace_buf, 60, code, context->outUCLYhndl, 0) >= 0)) { +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTART(entity); + PUTS( (context->isHex ? "&#x" : "&#") ); + PUTS(entity_string); + PUTC(';'); + PSRCSTOP(entity); + } else +#endif for (p = replace_buf; *p; p++) { PUTC(*p); } @@ -1981,6 +2312,15 @@ top1: /* ** Got an ASCII character (yippey). - FM */ +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTART(entity); + PUTS( (context->isHex ? "&#x" : "&#") ); + PUTS(entity_string); + PUTC(';'); + PSRCSTOP(entity); + } else +#endif PUTC(((char)FROMASCII(uck & 0xff))); /* =============== work in ASCII above here =============== S/390 -- gil -- 1118 */ } else if ((chk && uck == -4) && @@ -1991,6 +2331,15 @@ top1: /* ** Got a replacement string (yippey). - FM */ +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTART(entity); + PUTS( (context->isHex ? "&#x" : "&#") ); + PUTS(entity_string); + PUTC(';'); + PSRCSTOP(entity); + } else +#endif for (p = replace_buf; *p; p++) PUTC(*p); #endif /* NOTUSED_FOTEMODS */ @@ -2011,6 +2360,16 @@ top1: (context->isHex ? "&#x" : "&#"), replace_buf); } +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTART(badseq); + PUTS( (context->isHex ? "&#x" : "&#") ); + PUTS(entity_string); + if (c == ';') + PUTC(';'); + PSRCSTOP(badseq); + } +#endif string->size = 0; context->isHex = FALSE; context->state = S_text; @@ -2039,10 +2398,15 @@ top1: (TOASCII(code) > 127 && code < 160 && !HTPassHighCtrlNum)) { /* - ** Unhandled or illegal value. Recover the + ** Unhandled or illegal value. Recover the ** "&#" or "&#x" and digit(s), and recycle ** the terminator. - FM */ +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTART(badseq); + } +#endif PUTC('&'); PUTC('#'); if (context->isHex) { @@ -2052,6 +2416,11 @@ top1: string->size--; for (i = 0; i < string->size; i++) /* recover */ PUTC(string->data[i]); +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTOP(badseq); + } +#endif string->size = 0; context->isHex = FALSE; context->state = S_text; @@ -2062,6 +2431,15 @@ top1: /* ** No conversion needed. - FM */ +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTART(entity); + PUTS( (context->isHex ? "&#x" : "&#") ); + PUTS(entity_string); + PUTC(';'); + PSRCSTOP(entity); + } else +#endif PUTC(FROMASCII((char)code)); } else { /* @@ -2087,6 +2465,10 @@ top1: ** Our conversion failed, so recover the "&#" ** and digit(s), and recycle the terminator. - FM */ +#ifdef USE_PSRC + if (psrc_view) + PSRCSTART(badseq); +#endif PUTC('&'); PUTC('#'); if (context->isHex) { @@ -2096,6 +2478,10 @@ top1: string->size--; for (i = 0; i < string->size; i++) /* recover */ PUTC(string->data[i]); +#ifdef USE_PSRC + if (psrc_view) + PSRCSTOP(badseq); +#endif string->size = 0; context->isHex = FALSE; context->state = S_text; @@ -2125,8 +2511,16 @@ top1: string->size--; HTChunkPutc(string, c); HTChunkTerminate(string); +#ifdef USE_PSRC + if (psrc_view) + PSRCSTART(badseq); +#endif PUTC('&'); PUTC('#'); +#ifdef USE_PSRC + if (psrc_view) + PSRCSTOP(badseq); +#endif if (context->isHex) { PUTC('x'); context->isHex = FALSE; @@ -2149,7 +2543,7 @@ top1: ** Tag */ case S_tag: /* new tag */ - if (TOASCII(unsign_c) < 127 && (string->size ? /* S/390 -- gil -- 1179 */ + if (TOASCII(unsign_c) < 127 && (string->size ? /* S/390 -- gil -- 1179 */ isalnum((unsigned char)c) : isalpha((unsigned char)c))) { /* ** Add valid ASCII character. - FM @@ -2167,7 +2561,7 @@ top1: HTChunkPutc(string, c); break; } else if (!string->size && - (TOASCII(unsign_c) <= 160 && /* S/390 -- gil -- 1196 */ + (TOASCII(unsign_c) <= 160 && /* S/390 -- gil -- 1196 */ (c != '/' && c != '?' && c != '_' && c != ':'))) { /* ** '<' must be followed by an ASCII letter to be a valid @@ -2178,7 +2572,15 @@ top1: ** So recover the '<' and following character as data. - FM & KW */ context->state = S_text; +#ifdef USE_PSRC + if (psrc_view) + PSRCSTART(badseq); +#endif PUTC('<'); +#ifdef USE_PSRC + if (psrc_view) + PSRCSTOP(badseq); +#endif goto top1; } else { /* End of tag name */ /* @@ -2201,10 +2603,18 @@ top1: ** so we display it and the URL (Lynxism 8-). - FM */ int i; +#ifdef USE_PSRC + if (psrc_view) + PSRCSTART(badseq); +#endif PUTC('<'); for (i = 0; i < 3; i++) /* recover */ PUTC(string->data[i]); PUTC(c); +#ifdef USE_PSRC + if (psrc_view) + PSRCSTOP(badseq); +#endif CTRACE(tfp, "SGML: Treating <%s%c as text\n", string->data, c); string->size = 0; @@ -2213,6 +2623,25 @@ top1: } else if (!t) { CTRACE(tfp, "SGML: *** Invalid element %s\n", string->data); + +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTART(abracket);PUTC('<');PSRCSTOP(abracket); + PSRCSTART(badtag); + if (tagname_transform != 1) { + if (tagname_transform == 0) + LYLowerCase(string->data); + else + LYUpperCase(string->data); + } + PUTS(string->data); + + if (c == '>' ) { + PSRCSTOP(badtag); + PSRCSTART(abracket);PUTC('>');PSRCSTOP(abracket); + } + } +#endif context->state = (c == '>') ? S_text : S_junk_tag; break; } else if (t == context->unknown_tag) { @@ -2222,20 +2651,59 @@ top1: ** Fall through and treat like valid ** tag for attribute parsing. - KW */ + } context->current_tag = t; /* ** Clear out attributes. */ +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTART(abracket);PUTC('<');PSRCSTOP(abracket); + if (t != context->unknown_tag) + PSRCSTART(tag); + else + PSRCSTART(badtag); + if (tagname_transform != 1) { + if (tagname_transform == 0) + LYLowerCase(string->data); + else + LYUpperCase(string->data); + } + PUTS(string->data); + } + if (!psrc_view) /*don't waste time */ +#endif { +#if !OPT1 int i; for (i = 0; i < context->current_tag->number_of_attributes; i++) context->present[i] = NO; +#else + memset( (void*)context->present, 0 , sizeof(BOOL)* + context->current_tag->number_of_attributes); +#endif } + string->size = 0; context->current_attribute_number = INVALID; - +#ifdef USE_PSRC + if (psrc_view) { + if (c == '>') { + if (t != context->unknown_tag) + PSRCSTOP(tag); + else + PSRCSTOP(badtag); + PSRCSTART(abracket); + PUTC('>'); + PSRCSTOP(abracket); + context->state = S_text; + } else { + context->state = S_tag_gap; + } + } else +#endif if (c == '>') { if (context->current_tag->name) start_element(context); @@ -2285,6 +2753,15 @@ top1: ** Try to handle identifier. - FM */ HTChunkTerminate(string); +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTART(sgmlspecial); + PUTC('<'); + PUTS(string->data); + PUTC('>'); + PSRCSTOP(sgmlspecial); + } else +#endif handle_identifier(context); string->size = 0; context->state = S_text; @@ -2345,6 +2822,15 @@ top1: */ if (c == '>') { HTChunkTerminate(string); +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTART(comm); + PUTC('<'); + PUTS(string->data); + PUTC('>'); + PSRCSTOP(comm); + } else +#endif handle_comment(context); string->size = 0; context->end_comment = FALSE; @@ -2378,6 +2864,15 @@ top1: ** Terminate and handle the comment. - FM */ HTChunkTerminate(string); +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTART(comm); + PUTC('<'); + PUTS(string->data); + PUTC('>'); + PSRCSTOP(comm); + } else +#endif handle_comment(context); string->size = 0; context->end_comment = FALSE; @@ -2405,6 +2900,15 @@ top1: } if (c == '>') { HTChunkTerminate(string); +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTART(sgmlspecial); + PUTC('<'); + PUTS(string->data); + PUTC('>'); + PSRCSTOP(sgmlspecial); + } else +#endif handle_doctype(context); string->size = 0; context->state = S_text; @@ -2428,6 +2932,15 @@ top1: } if (!context->second_bracket && c == '>') { HTChunkTerminate(string); +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTART(sgmlspecial); + PUTC('<'); + PUTS(string->data); + PUTC('>'); + PSRCSTOP(sgmlspecial); + } else +#endif handle_marked(context); string->size = 0; context->state = S_text; @@ -2453,6 +2966,15 @@ top1: } if (context->end_comment && c == '>') { HTChunkTerminate(string); +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTART(sgmlspecial); + PUTC('<'); + PUTS(string->data); + PUTC('>'); + PSRCSTOP(sgmlspecial); + } else +#endif handle_sgmlent(context); string->size = 0; context->end_comment = FALSE; @@ -2481,6 +3003,15 @@ top1: } if (context->end_comment && c == '>') { HTChunkTerminate(string); +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTART(sgmlspecial); + PUTC('<'); + PUTS(string->data); + PUTC('>'); + PSRCSTOP(sgmlspecial); + } else +#endif handle_sgmlele(context); string->size = 0; context->end_comment = FALSE; @@ -2509,6 +3040,15 @@ top1: } if (context->end_comment && c == '>') { HTChunkTerminate(string); +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTART(sgmlspecial); + PUTC('<'); + PUTS(string->data); + PUTC('>'); + PSRCSTOP(sgmlspecial); + } else +#endif handle_sgmlatt(context); string->size = 0; context->end_comment = FALSE; @@ -2524,8 +3064,22 @@ top1: if (WHITE(c)) break; /* Gap between attributes */ if (c == '>') { /* End of tag */ +#ifdef USE_PSRC + if (!psrc_view) +#endif if (context->current_tag->name) start_element(context); +#ifdef USE_PSRC + if (psrc_view) { + if (context->current_tag != context->unknown_tag) + PSRCSTOP(tag); + else + PSRCSTOP(badtag); + PSRCSTART(abracket); + PUTC('>'); + PSRCSTOP(abracket); + } +#endif context->state = S_text; break; } @@ -2538,6 +3092,9 @@ top1: if (WHITE(c) || (c == '>') || (c == '=')) { /* End of word */ HTChunkTerminate(string); handle_attribute_name(context, string->data); +#ifdef USE_PSRC + if (!psrc_view) { +#endif string->size = 0; if (c == '>') { /* End of tag */ if (context->current_tag->name) @@ -2545,6 +3102,41 @@ top1: context->state = S_text; break; } +#ifdef USE_PSRC + } else { + PUTC(' '); + if (context->current_attribute_number == INVALID) + PSRCSTART(badattr); + else + PSRCSTART(attrib); + if (attrname_transform != 1) { + if (attrname_transform == 0) + LYLowerCase(string->data); + else + LYUpperCase(string->data); + } + PUTS(string->data); + if (c == '=' || c == '>') { + if (c == '=' ) PUTC('='); + if (context->current_attribute_number == INVALID) + PSRCSTOP(badattr); + else + PSRCSTOP(attrib); + } + if (c == '>') { + if (context->current_tag != context->unknown_tag) + PSRCSTOP(tag); + else + PSRCSTOP(badtag); + PSRCSTART(abracket); + PUTC('>'); + PSRCSTOP(abracket); + context->state = S_text; + break; + } + string->size = 0; + } +#endif context->state = (c == '=' ? S_equals: S_attr_gap); } else { HTChunkPutc(string, c); @@ -2555,11 +3147,35 @@ top1: if (WHITE(c)) break; /* Gap after attribute */ if (c == '>') { /* End of tag */ +#ifdef USE_PSRC + if (psrc_view) { + if (context->current_attribute_number == INVALID) + PSRCSTOP(badattr); + else + PSRCSTOP(attrib); + if (context->current_tag != context->unknown_tag) + PSRCSTOP(tag); + else + PSRCSTOP(badtag); + PSRCSTART(abracket); + PUTC('>'); + PSRCSTOP(abracket); + } else +#endif if (context->current_tag->name) start_element(context); context->state = S_text; break; } else if (c == '=') { +#ifdef USE_PSRC + if (psrc_view) { + PUTC('='); + if (context->current_attribute_number == INVALID) + PSRCSTOP(badattr); + else + PSRCSTOP(attrib); + } +#endif context->state = S_equals; break; } @@ -2572,28 +3188,90 @@ top1: break; /* Before attribute value */ if (c == '>') { /* End of tag */ CTRACE(tfp, "SGML: found = but no value\n"); +#ifdef USE_PSRC + if (psrc_view) { + if (context->current_tag != context->unknown_tag) + PSRCSTOP(tag); + else + PSRCSTOP(badtag); + PSRCSTART(abracket); + PUTC('>'); + PSRCSTOP(abracket); + } else +#endif if (context->current_tag->name) start_element(context); context->state = S_text; break; } else if (c == '\'') { +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTART(attrval); + PUTC(c); + } +#endif context->state = S_squoted; break; } else if (c == '"') { +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTART(attrval); + PUTC(c); + } +#endif context->state = S_dquoted; break; } +#ifdef USE_PSRC + if (psrc_view) + PSRCSTART(attrval); +#endif context->state = S_value; - /* no break! fall through to S_value and proccess current `c` */ + /* no break! fall through to S_value and proccess current `c` */ case S_value: if (WHITE(c) || (c == '>')) { /* End of word */ HTChunkTerminate(string) ; +#ifdef USE_PSRC + if (psrc_view) { + /*PSRCSTART(attrval);*/ + if (cur_attr_is_name) { + HTStartAnchor(context->target, string->data, NULL); + (*context->actions->end_element)( + context->target, + HTML_A, + (char **)&context->include); + } else if (cur_attr_is_href) { + PSRCSTART(href); + HTStartAnchor(context->target,NULL,string->data); + } + PUTS(string->data); + if (cur_attr_is_href) { + (*context->actions->end_element)( + context->target, + HTML_A, + (char **)&context->include); + PSRCSTOP(href); + } + PSRCSTOP(attrval); + } else +#endif handle_attribute_value(context, string->data); string->size = 0; if (c == '>') { /* End of tag */ +#ifdef USE_PSRC + if (psrc_view) { + if (context->current_tag != context->unknown_tag) + PSRCSTOP(tag); + else + PSRCSTOP(badtag); + PSRCSTART(abracket); + PUTC('>'); + PSRCSTOP(abracket); + } else +#endif if (context->current_tag->name) start_element(context); context->state = S_text; @@ -2627,6 +3305,31 @@ top1: case S_squoted: /* Quoted attribute value */ if (c == '\'') { /* End of attribute value */ HTChunkTerminate(string) ; +#ifdef USE_PSRC + if (psrc_view) { + /*PSRCSTART(attrval);*/ + if (cur_attr_is_name) { + HTStartAnchor(context->target,string->data,NULL); + (*context->actions->end_element)( + context->target, + HTML_A, + (char **)&context->include); + } else if (cur_attr_is_href) { + PSRCSTART(href); + HTStartAnchor(context->target,NULL,string->data); + } + PUTS(string->data); + if (cur_attr_is_href) { + (*context->actions->end_element)( + context->target, + HTML_A, + (char **)&context->include); + PSRCSTOP(href); + } + PUTC('\''); + PSRCSTOP(attrval); + } else +#endif handle_attribute_value(context, string->data); string->size = 0; context->state = S_tag_gap; @@ -2666,6 +3369,32 @@ top1: (soft_dquotes && /* If emulating old Netscape bug, treat '>' */ c == '>')) { /* as a co-terminator of dquoted and tag */ HTChunkTerminate(string) ; +#ifdef USE_PSRC + if (psrc_view) { + /*PSRCSTART(attrval);*/ + if (cur_attr_is_name) { + HTStartAnchor(context->target,string->data,NULL); + (*context->actions->end_element)( + context->target, + HTML_A, + (char **)&context->include); + } else if (cur_attr_is_href) { + PSRCSTART(href); + HTStartAnchor(context->target,NULL,string->data); + } + PUTS(string->data); + if (cur_attr_is_href) { + (*context->actions->end_element)( + context->target, + HTML_A, + (char **)&context->include); + PSRCSTOP(href); + } + PUTC(c); + PSRCSTOP(attrval); + } else +#endif + handle_attribute_value(context, string->data); string->size = 0; context->state = S_tag_gap; @@ -2707,6 +3436,9 @@ top1: HTChunkPutc(string, c); } else { /* End of end tag name */ HTTag * t = 0; +#ifdef USE_PSRC + BOOL psrc_tagname_processed = FALSE; +#endif HTChunkTerminate(string); if (!*string->data) { /* Empty end tag */ @@ -2717,9 +3449,54 @@ top1: } if (!t || t == context->unknown_tag) { CTRACE(tfp, "Unknown end tag </%s>\n", string->data); +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTART(abracket); + PUTC('<'); + PUTC('/'); + PSRCSTOP(abracket); + PSRCSTART(badtag); + if (tagname_transform != 1) { + if (tagname_transform == 0) + LYLowerCase(string->data); + else + LYUpperCase(string->data); + } + PUTS(string->data); PSRCSTOP(badtag); + PSRCSTART(abracket); PUTC('>'); PSRCSTOP(abracket); + psrc_tagname_processed=TRUE; + } + } else if (psrc_view) { +#endif } else { BOOL tag_OK = (c == '>' || WHITE(c)); +#if OPT + HTMLElement e = context->current_tag - context->dtd->tags; + int branch = 2; /* it can be 0,1,2*/ +#endif context->current_tag = t; +#if OPT +#ifdef EXTENDED_HTMLDTD + if (tag_OK && Old_DTD) { +#else + if (tag_OK) { +#endif + switch (e) { + case HTML_DD: case HTML_DT: case HTML_LI: case HTML_LH : + case HTML_TD: case HTML_TH: case HTML_TR: case HTML_THEAD: + case HTML_TFOOT : case HTML_TBODY : case HTML_COLGROUP: + branch = 0; + break; + + case HTML_A: case HTML_B: case HTML_BLINK: case HTML_CITE: + case HTML_EM: case HTML_FONT: case HTML_FORM: case HTML_I: + case HTML_P: case HTML_STRONG: case HTML_TT: case HTML_U: + branch = 1; + break; + } + } +#endif + #ifdef EXTENDED_HTMLDTD /* ** Just handle ALL end tags normally :-) - kw @@ -2728,6 +3505,9 @@ top1: end_element( context, context->current_tag); } else #endif /* EXTENDED_HTMLDTD */ + + +#if !OPT if (tag_OK && (!strcasecomp(string->data, "DD") || !strcasecomp(string->data, "DT") || @@ -2740,11 +3520,14 @@ top1: !strcasecomp(string->data, "TFOOT") || !strcasecomp(string->data, "TBODY") || !strcasecomp(string->data, "COLGROUP"))) { +#else + if (tag_OK && branch == 0) { +#endif /* ** Don't treat these end tags as invalid, ** nor act on them. - FM */ - CTRACE(tfp, "SGML: `</%s%c' found! ***Ignoring it.\n", + CTRACE(tfp, "SGML: `</%s%c' found! ***Ignoring it.\n", string->data, c); string->size = 0; context->current_attribute_number = INVALID; @@ -2754,6 +3537,7 @@ top1: context->state = S_text; } break; +#if !OPT } else if (tag_OK && (!strcasecomp(string->data, "A") || !strcasecomp(string->data, "B") || @@ -2767,6 +3551,9 @@ top1: !strcasecomp(string->data, "STRONG") || !strcasecomp(string->data, "TT") || !strcasecomp(string->data, "U"))) { +#else + } else if (tag_OK && branch == 1) { +#endif /* ** Handle end tags for container elements declared ** as SGML_EMPTY to prevent "expected tag substitution" @@ -2841,6 +3628,30 @@ top1: } } +#ifdef USE_PSRC + if (psrc_view && !psrc_tagname_processed) { + PSRCSTART(abracket); + PUTC('<'); + PUTC('/'); + PSRCSTOP(abracket); + PSRCSTART(tag); + if (tagname_transform != 1) { + if (tagname_transform == 0) + LYLowerCase(string->data); + else + LYUpperCase(string->data); + } + PUTS(string->data); PSRCSTOP(tag); + if ( c != '>' ) + PSRCSTART(badtag); + else { + PSRCSTART(abracket); + PUTC('>'); + PSRCSTOP(abracket); + } + } +#endif + string->size = 0; context->current_attribute_number = INVALID; if (c != '>') { @@ -2997,8 +3808,30 @@ top1: case S_junk_tag: if (c == '>') { +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTOP(badtag); + PSRCSTART(abracket); + PUTC('>'); + PSRCSTOP(abracket); + seen_letter_in_junk_tag = FALSE; + } +#endif context->state = S_text; } +#ifdef USE_PSRC + else if (psrc_view) { + /*pack spaces until first non-space is seen*/ + if (!seen_letter_in_junk_tag) { + if (!WHITE(c)) { + seen_letter_in_junk_tag = TRUE; + PUTC(c); + }; + } else + PUTC(c); + }; +#endif + } /* switch on context->state */ /* @@ -3155,6 +3988,17 @@ PUBLIC HTStream* SGML_new ARGS3( context->csi = NULL; context->csi_index = 0; +#ifdef USE_PSRC + if (psrc_view) { + psrc_view = FALSE; + SGML_string(context, "<HTML><HEAD><TITLE>source</TITLE></HEAD>" + "<BODY><PRE>") ; + psrc_view = TRUE; + sgml_in_psrc_was_initialized = TRUE; + seen_letter_in_junk_tag = FALSE; + } +#endif + return context; } @@ -3496,7 +4340,7 @@ PUBLIC void TO_SJIS ARGS2( unsigned char *euc; if (!any || !sjis) - return; + return; euc = (unsigned char*)malloc(strlen((CONST char *)any)+1); if (euc == NULL) @@ -3514,7 +4358,7 @@ PUBLIC void TO_JIS ARGS2( unsigned char *euc; if (!any || !jis) - return; + return; euc = (unsigned char*)malloc(strlen((CONST char *)any)+1); if (euc == NULL) diff --git a/WWW/Library/Implementation/SGML.h b/WWW/Library/Implementation/SGML.h index 3e4575bd..261eb54a 100644 --- a/WWW/Library/Implementation/SGML.h +++ b/WWW/Library/Implementation/SGML.h @@ -1,8 +1,8 @@ -/* SGML parse and stream definition for libwww - SGML AND STRUCTURED STREAMS +/* SGML parse and stream definition for libwww + SGML AND STRUCTURED STREAMS - The SGML parser is a state machine. It is called for every character - of the input stream. The DTD data structure contains pointers + The SGML parser is a state machine. It is called for every character + of the input stream. The DTD data structure contains pointers to functions which are called to implement the actual effect of the text read. When these functions are called, the attribute structures pointed to by the DTD are valid, and the function is passed a pointer to the current tag structure, and an @@ -26,90 +26,96 @@ SGML content types */ typedef enum _SGMLContent { - SGML_EMPTY, /* No content. */ + SGML_EMPTY, /* No content. */ SGML_LITTERAL, /* Literal character data. Recognize exact close tag only. Old www server compatibility only! Not SGML */ - SGML_CDATA, /* Character data. Recognize </ only. */ + SGML_CDATA, /* Character data. Recognize </ only. */ SGML_RCDATA, /* Replaceable character data. Recognize </ and &ref; */ - SGML_MIXED, /* Elements and parsed character data. + SGML_MIXED, /* Elements and parsed character data. Recognize all markup. */ SGML_ELEMENT, /* Any data found will be returned as an error. */ - SGML_PCDATA /* Added by KW. */ + SGML_PCDATA /* Added by KW. */ } SGMLContent; typedef struct { - char * name; /* The (constant) name of the attribute */ - /* Could put type info in here */ + char * name; /* The (constant) name of the attribute */ +#ifdef USE_PSRC + char type; /* code of the type of the attribute. Code + values are in HTMLDTD.h */ +#endif } attr; typedef int TagClass; /* textflow */ -#define Tgc_FONTlike 0x00001 /* S,STRIKE,I,B,TT,U,BIG,SMALL,STYLE,BLINK;BR,TAB */ -#define Tgc_EMlike 0x00002 /* EM,STRONG,DFN,CODE,SAMP,KBD,VAR,CITE,Q,INS,DEL,SPAN,.. */ -#define Tgc_MATHlike 0x00004 /* SUB,SUP,MATH,COMMENT */ -#define Tgc_Alike 0x00008 /* A */ -#define Tgc_formula 0x00010 /* not used until math is supported better... */ +#define Tgc_FONTlike 0x00001 /* S,STRIKE,I,B,TT,U,BIG,SMALL,STYLE,BLINK;BR,TAB */ +#define Tgc_EMlike 0x00002 /* EM,STRONG,DFN,CODE,SAMP,KBD,VAR,CITE,Q,INS,DEL,SPAN,.. */ +#define Tgc_MATHlike 0x00004 /* SUB,SUP,MATH,COMMENT */ +#define Tgc_Alike 0x00008 /* A */ +#define Tgc_formula 0x00010 /* not used until math is supported better... */ /* used for special structures: forms, tables,... */ -#define Tgc_TRlike 0x00020 /* TR and similar */ -#define Tgc_SELECTlike 0x00040 /* SELECT,INPUT,TEXTAREA(,...) */ +#define Tgc_TRlike 0x00020 /* TR and similar */ +#define Tgc_SELECTlike 0x00040 /* SELECT,INPUT,TEXTAREA(,...) */ /* structure */ -#define Tgc_FORMlike 0x00080 /* FORM itself */ -#define Tgc_Plike 0x00100 /* P,H1..H6,... structures containing text or +#define Tgc_FORMlike 0x00080 /* FORM itself */ +#define Tgc_Plike 0x00100 /* P,H1..H6,... structures containing text or insertion but not other structures */ -#define Tgc_DIVlike 0x00200 /* ADDRESS,FIG,BDO,NOTE,FN,DIV,CENTER;FIG +#define Tgc_DIVlike 0x00200 /* ADDRESS,FIG,BDO,NOTE,FN,DIV,CENTER;FIG structures which can contain other structures */ -#define Tgc_LIlike 0x00400 /* LH,LI,DT,DD;TH,TD structure-like, only valid +#define Tgc_LIlike 0x00400 /* LH,LI,DT,DD;TH,TD structure-like, only valid within certain other structures */ -#define Tgc_ULlike 0x00800 /* UL,OL,DL,DIR,MENU;TABLE;XMP,LISTING +#define Tgc_ULlike 0x00800 /* UL,OL,DL,DIR,MENU;TABLE;XMP,LISTING special in some way, cannot contain (parsed) text directly */ /* insertions */ -#define Tgc_BRlike 0x01000 /* BR,IMG,TAB allowed in any text */ -#define Tgc_APPLETlike 0x02000 /* APPLET,OBJECT,EMBED,SCRIPT */ -#define Tgc_HRlike 0x04000 /* HR,MARQUEE can contain all kinds of things +#define Tgc_BRlike 0x01000 /* BR,IMG,TAB allowed in any text */ +#define Tgc_APPLETlike 0x02000 /* APPLET,OBJECT,EMBED,SCRIPT */ +#define Tgc_HRlike 0x04000 /* HR,MARQUEE can contain all kinds of things and/or are not allowed (?) in running text */ -#define Tgc_MAPlike 0x08000 /* MAP,AREA some specials that never contain +#define Tgc_MAPlike 0x08000 /* MAP,AREA some specials that never contain (directly or indirectly) other things than special insertions */ -#define Tgc_outer 0x10000 /* HTML,FRAMESET,FRAME,PLAINTEXT; */ -#define Tgc_BODYlike 0x20000 /* BODY,BODYTEXT,NOFRAMES,TEXTFLOW; */ -#define Tgc_HEADstuff 0x40000 /* HEAD,BASE,STYLE,TITLE; */ +#define Tgc_outer 0x10000 /* HTML,FRAMESET,FRAME,PLAINTEXT; */ +#define Tgc_BODYlike 0x20000 /* BODY,BODYTEXT,NOFRAMES,TEXTFLOW; */ +#define Tgc_HEADstuff 0x40000 /* HEAD,BASE,STYLE,TITLE; */ /* special relations */ #define Tgc_same 0x80000 /* Some more properties of tags (or rather, elements) and rules how to deal with them. - kw */ typedef int TagFlags; -#define Tgf_endO 0x00001 /* end tag can be Omitted */ -#define Tgf_startO 0x00002 /* start tag can be Omitted */ -#define Tgf_mafse 0x00004 /* Make Attribute-Free Start-tag End instead +#define Tgf_endO 0x00001 /* end tag can be Omitted */ +#define Tgf_startO 0x00002 /* start tag can be Omitted */ +#define Tgf_mafse 0x00004 /* Make Attribute-Free Start-tag End instead (if found invalid) */ -#define Tgf_strict 0x00008 /* Ignore contained invalid elements, +#define Tgf_strict 0x00008 /* Ignore contained invalid elements, don't pass them on */ -#define Tgf_nreie 0x00010 /* Not Really Empty If Empty, +#define Tgf_nreie 0x00010 /* Not Really Empty If Empty, used by color style code */ -/* A tag structure describes an SGML element. -** ----------------------------------------- +/* A tag structure describes an SGML element. +** ----------------------------------------- ** ** -** name is the string which comes after the tag opener "<". +** name is the string which comes after the tag opener "<". ** -** attributes points to a zero-terminated array -** of attribute names. +** attributes points to a zero-terminated array +** of attribute names. ** -** litteral determines how the SGML engine parses the characters -** within the element. If set, tag openers are ignored -** except for that which opens a matching closing tag. +** litteral determines how the SGML engine parses the characters +** within the element. If set, tag openers are ignored +** except for that which opens a matching closing tag. ** */ typedef struct _tag HTTag; struct _tag{ - char * name; /* The name of the tag */ - attr * attributes; /* The list of acceptable attributes */ - int number_of_attributes; /* Number of possible attributes */ - SGMLContent contents; /* End only on end tag @@ */ + char * name; /* The name of the tag */ +#ifdef USE_PSRC + int name_len; /* The length of the name */ +#endif + attr * attributes; /* The list of acceptable attributes */ + int number_of_attributes; /* Number of possible attributes */ + SGMLContent contents; /* End only on end tag @@ */ TagClass tagclass, contains, /* which classes of elements this one can contain directly */ icontains, /* which classes of elements this one can contain indirectly */ @@ -121,25 +127,25 @@ struct _tag{ }; -/* DTD Information -** --------------- +/* DTD Information +** --------------- ** ** Not the whole DTD, but all this parser uses of it. */ typedef struct { - HTTag * tags; /* Must be in strcmp order by name */ - int number_of_tags; - CONST char ** entity_names; /* Must be in strcmp order by name */ - size_t number_of_entities; + HTTag * tags; /* Must be in strcmp order by name */ + int number_of_tags; + CONST char ** entity_names; /* Must be in strcmp order by name */ + size_t number_of_entities; /* "entity_names" table probably unused, ** see comments in HTMLDTD.c near the top */ } SGML_dtd; -/* SGML context passed to parsers +/* SGML context passed to parsers */ -typedef struct _HTSGMLContext *HTSGMLContext; /* Hidden */ +typedef struct _HTSGMLContext *HTSGMLContext; /* Hidden */ /*__________________________________________________________________________ @@ -156,7 +162,7 @@ Structured Object definition can output its contents to another Structured Object. It's a kind of typed stream. The architecture is largely Dan Conolly's. Elements and entities are passed to the sob by number, implying a knowledge of the - DTD. Knowledge of the SGML syntax is not here, though. + DTD. Knowledge of the SGML syntax is not here, though. Superclass: HTStream @@ -168,44 +174,44 @@ typedef struct _HTStructured HTStructured; typedef struct _HTStructuredClass{ - char* name; /* Just for diagnostics */ + char* name; /* Just for diagnostics */ - void (*_free) PARAMS(( - HTStructured* me)); + void (*_free) PARAMS(( + HTStructured* me)); - void (*_abort) PARAMS(( - HTStructured* me, - HTError e)); + void (*_abort) PARAMS(( + HTStructured* me, + HTError e)); - void (*put_character) PARAMS(( - HTStructured* me, - char ch)); + void (*put_character) PARAMS(( + HTStructured* me, + char ch)); - void (*put_string) PARAMS(( - HTStructured* me, - CONST char * str)); + void (*put_string) PARAMS(( + HTStructured* me, + CONST char * str)); - void (*_write) PARAMS(( - HTStructured* me, - CONST char * str, - int len)); + void (*_write) PARAMS(( + HTStructured* me, + CONST char * str, + int len)); - void (*start_element) PARAMS(( - HTStructured* me, - int element_number, - CONST BOOL* attribute_present, - CONST char** attribute_value, + void (*start_element) PARAMS(( + HTStructured* me, + int element_number, + CONST BOOL* attribute_present, + CONST char** attribute_value, int charset, char ** include)); - void (*end_element) PARAMS(( - HTStructured* me, - int element_number, + void (*end_element) PARAMS(( + HTStructured* me, + int element_number, char ** include)); - int (*put_entity) PARAMS(( - HTStructured* me, - int entity_number)); + int (*put_entity) PARAMS(( + HTStructured* me, + int entity_number)); }HTStructuredClass; @@ -237,11 +243,11 @@ Create an SGML parser */ /* ** On entry, -** dtd must point to a DTD structure as defined above -** callbacks must point to user routines. -** callData is returned in callbacks transparently. +** dtd must point to a DTD structure as defined above +** callbacks must point to user routines. +** callData is returned in callbacks transparently. ** On exit, -** The default tag starter has been processed. +** The default tag starter has been processed. */ extern HTStream * SGML_new PARAMS(( CONST SGML_dtd * dtd, @@ -250,7 +256,7 @@ extern HTStream * SGML_new PARAMS(( extern CONST HTStreamClass SGMLParser; -#endif /* SGML_H */ +#endif /* SGML_H */ /* diff --git a/WWW/Library/djgpp/CommonMakefile b/WWW/Library/djgpp/CommonMakefile index e991f9af..f4bdad38 100644 --- a/WWW/Library/djgpp/CommonMakefile +++ b/WWW/Library/djgpp/CommonMakefile @@ -76,7 +76,7 @@ CERNLIBBIN = $(WWW)/bin COMMON = $(LOB)/HTParse.o $(LOB)/HTAccess.o $(LOB)/HTTP.o \ $(LOB)/HTFile.o $(LOB)/HTBTree.o $(LOB)/HTFTP.o $(LOB)/HTTCP.o \ $(LOB)/SGML.o $(LOB)/HTMLDTD.o $(LOB)/HTChunk.o \ - $(LOB)/HTPlain.o $(LOB)/HTWriter.o \ + $(LOB)/HTPlain.o \ $(LOB)/HTMLGen.o \ $(LOB)/HTAtom.o $(LOB)/HTAnchor.o $(LOB)/HTStyle.o \ $(LOB)/HTList.o $(LOB)/HTString.o $(LOB)/HTDOS.o \ @@ -92,7 +92,7 @@ CFILES = $(CMN)HTParse.c $(CMN)HTAccess.c $(CMN)HTTP.c $(CMN)HTFile.c \ $(CMN)HTBTree.c \ $(CMN)HTFTP.c $(CMN)HTTCP.c $(CMN)SGML.c \ $(CMN)HTMLDTD.c \ - $(CMN)HTPlain.c $(CMN)HTWriter.c \ + $(CMN)HTPlain.c \ $(CMN)HTDOS.c $(CMN)HTMLGen.c \ $(CMN)HTChunk.c $(CMN)HTAtom.c $(CMN)HTAnchor.c $(CMN)HTStyle.c \ $(CMN)HTList.c $(CMN)HTString.c $(CMN)HTRules.c \ @@ -107,7 +107,7 @@ CFILES = $(CMN)HTParse.c $(CMN)HTAccess.c $(CMN)HTTP.c $(CMN)HTFile.c \ HFILES = $(CMN)HTParse.h $(CMN)HTAccess.h $(CMN)HTTP.h $(CMN)HTFile.h \ $(CMN)HTBTree.h $(CMN)HTFTP.h $(CMN)HTTCP.h \ $(CMN)SGML.h $(CMN)HTML.h $(CMN)HTMLDTD.h $(CMN)HTChunk.h \ - $(CMN)HTPlain.h $(CMN)HTWriter.h \ + $(CMN)HTPlain.h \ $(CMN)HTFWriter.h $(CMN)HTMLGen.h $(CMN)HTDOS.h \ $(CMN)HTStream.h \ $(CMN)HTAtom.h $(CMN)HTAnchor.h $(CMN)HTStyle.h \ @@ -278,10 +278,6 @@ $(LOB)/HTWAIS.o : $(OE) $(CMN)HTWAIS.c $(CMN)HTUtils.h $(CMN)HTList.h $(LOB)/HTWSRC.o : $(OE) $(CMN)HTWSRC.c $(CMN)HTUtils.h $(CMN)HTList.h $(CC) -c $(CFLAGS2) $(CMN)HTWSRC.c -$(LOB)/HTWriter.o : $(OE) $(CMN)HTWriter.c $(CMN)HTWriter.h $(CMN)HTStream.h - $(CC) -c $(CFLAGS2) $(CMN)HTWriter.c - - # Access Authorization $(LOB)/HTAAUtil.o : $(OE) $(CMN)HTAAUtil.c $(CMN)HTAAUtil.h \ diff --git a/WWW/Library/vms/descrip.mms b/WWW/Library/vms/descrip.mms index 86f043e2..e0d065a5 100644 --- a/WWW/Library/vms/descrip.mms +++ b/WWW/Library/vms/descrip.mms @@ -167,7 +167,7 @@ CC = gcc ! HTParse.h, HTAccess.h, HTTP.h, HTFile.h, - ! HTBTree.h, HTTCP.h, SGML.h, - ! HTML.h, HTMLDTD.h, HTChunk.h, HTPlain.h, - -! HTWriter.h, HTFwriter.h, HTMLGen.h, - +! HTFwriter.h, HTMLGen.h, - ! HTAtom.h, HTAnchor.h, HTStyle.h, - ! HTList.h, HTString.h, HTAlert.h, - ! HTRules.h, HTFormat.h, HTInit.h, - @@ -178,7 +178,7 @@ CC = gcc ! HTVMSUtils.h, ufc-crypt.h, patchlevel.h MODULES = HTParse, HTAccess, HTTP, HTFile, HTBTree, HTFTP, HTTCP, HTString, - - SGML, HTMLDTD, HTChunk, HTPlain, HTWriter, HTMLGen, - + SGML, HTMLDTD, HTChunk, HTPlain, HTMLGen, - HTAtom, HTAnchor, HTStyle, HTList, HTRules, HTFormat, - HTMIME, HTNews, HTGopher, HTTelnet, HTFinger, - HTWSRC, HTAAUtil, HTAABrow, HTGroup, - @@ -219,7 +219,6 @@ clean : !HTBTree.obj : HTBTree.c HTBTree.h HTUtils.h !HTMLDTD.obj : HTMLDTD.c HTMLDTD.h SGML.h !HTPlain.obj : HTPlain.c HTPlain.h HTStream.h -!HTWriter.obj : HTWriter.c HTWriter.h HTStream.h !HTMLGen.obj : HTMLGen.c HTMLGen.h HTUtils.h HTMLDTD.h !HTRules.obj : HTRules.c HTRules.h HTUtils.h Version.make !HTMIME.obj : HTMIME.c HTMIME.h HTUtils.h HTList.h diff --git a/WWW/Library/vms/libmake.com b/WWW/Library/vms/libmake.com index cfa6d975..7329b0d4 100644 --- a/WWW/Library/vms/libmake.com +++ b/WWW/Library/vms/libmake.com @@ -154,7 +154,6 @@ $ cc [-.Implementation]SGML.c $ cc [-.Implementation]HTMLDTD.c $ cc [-.Implementation]HTChunk.c $ cc [-.Implementation]HTPlain.c -$ cc [-.Implementation]HTWriter.c $ cc [-.Implementation]HTMLGen.c $ cc [-.Implementation]HTAtom.c $ cc [-.Implementation]HTAnchor.c diff --git a/config.hin b/config.hin index 19ac1873..15770cef 100644 --- a/config.hin +++ b/config.hin @@ -18,6 +18,7 @@ #undef DECL_SYS_ERRLIST #undef DIRED_SUPPORT /* AC_ARG_WITH(dired) */ #undef DISABLE_FINGER /* CF_ARG_DISABLE(finger) */ +#undef DISABLE_FTP /* CF_ARG_DISABLE(ftp) */ #undef DISABLE_GOPHER /* CF_ARG_DISABLE(gopher) */ #undef DISABLE_NEWS /* CF_ARG_DISABLE(news) */ #undef DISP_PARTIAL /* CF_ARG_ENABLE(partial) */ @@ -138,6 +139,7 @@ #undef RLOGIN_PATH /* CF_PATH_PROG(rlogin) */ #undef RM_PATH /* CF_PATH_PROG(rm) */ #undef SOCKS /* CF_SOCKS, CF_SOCKS5 */ +#undef SOURCE_CACHE /* CF_ARG_ENABLE(source-cache) */ #undef STDC_HEADERS #undef SYSLOG_REQUESTED_URLS /* CF_ARG_ENABLE(syslog) */ #undef SYSTEM_MAIL /* CF_DEFINE_PROG */ @@ -155,10 +157,11 @@ #undef UNZIP_PATH /* CF_PATH_PROG(unzip) */ #undef USE_COLOR_STYLE /* CF_ARG_ENABLE(color-style) */ #undef USE_DEFAULT_COLORS /* CF_ARG_ENABLE(default-colors) */ -#undef USE_EXTERNALS /* CF_ARG_ENABLE(externs) */ #undef USE_EXECVP /* CF_ARG_DISABLE(full-paths) */ +#undef USE_EXTERNALS /* CF_ARG_ENABLE(externs) */ #undef USE_FCNTL /* CF_FIONBIO */ #undef USE_HASH /* see USE_COLOR_STYLE */ +#undef USE_PSRC /* see USE_COLOR_STYLE */ #undef USE_SIZECHANGEHACK /* FIXME: find a case where this works! */ #undef USE_SLANG /* AC_ARG_WITH(screen=slang) */ #undef USE_SOCKS4_PREFIX /* CF_SOCKS5 */ diff --git a/configure b/configure index 6086a9f6..ff41978a 100755 --- a/configure +++ b/configure @@ -216,6 +216,7 @@ EOF cat <<EOF --enable-libjs use experimental JavaScript support (Mozilla libjs) --enable-persistent-cookies use experimental persistent-cookie support + --enable-source-cache cache HTML source for parse mode changes Miscellaneous Options: --disable-extended-dtd disable extended HTML DTD logic --disable-partial use partial-display logic @@ -225,9 +226,9 @@ Miscellaneous Options: --enable-exec-links support cgi links w/o a http daemon --enable-exec-scripts support cgi links w/o a http daemon --enable-internal-links handle following links to same doc differently - --enable-nsl-fork fork NSL requests, allowing them to be aborted EOF cat <<EOF + --enable-nsl-fork fork NSL requests, allowing them to be aborted --enable-syslog log URL requests via syslog --enable-underlines underline links rather than using boldface --enable-gzip-help install gzip'ed help files @@ -239,9 +240,9 @@ cat <<EOF Directory Editor Options: --disable-dired enable optional directory-editor, DirEd --disable-dired-archive disable dearchiving commands - --disable-dired-override disable private keymaps EOF cat <<EOF + --disable-dired-override disable private keymaps --disable-dired-permit disable chmod/attrib commands --disable-dired-xpermit disable chmod/attrib commands --disable-dired-tar disable "tar" command @@ -620,7 +621,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:624: checking host system type" >&5 +echo "configure:625: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -645,7 +646,7 @@ echo "$ac_t""$host" 1>&6 # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:649: checking for $ac_word" >&5 +echo "configure:650: 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 @@ -675,7 +676,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:679: checking for $ac_word" >&5 +echo "configure:680: 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 @@ -726,7 +727,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:730: checking for $ac_word" >&5 +echo "configure:731: 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 @@ -758,7 +759,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:762: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:763: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -769,12 +770,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 773 "configure" +#line 774 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -800,12 +801,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:804: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:805: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:809: checking whether we are using GNU C" >&5 +echo "configure:810: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -814,7 +815,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:818: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -833,7 +834,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:837: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:838: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -865,7 +866,7 @@ else fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:869: checking how to run the C preprocessor" >&5 +echo "configure:870: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -880,13 +881,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext <<EOF -#line 884 "configure" +#line 885 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:891: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -897,13 +898,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF -#line 901 "configure" +#line 902 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:907: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:908: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -914,13 +915,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext <<EOF -#line 918 "configure" +#line 919 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:925: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -947,7 +948,7 @@ echo "$ac_t""$CPP" 1>&6 # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:951: checking for $ac_word" >&5 +echo "configure:952: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -975,7 +976,7 @@ else fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:979: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:980: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1003,7 +1004,7 @@ fi echo $ac_n "checking for style of include in makefiles""... $ac_c" 1>&6 -echo "configure:1007: checking for style of include in makefiles" >&5 +echo "configure:1008: checking for style of include in makefiles" >&5 make_include_left="" make_include_right="" @@ -1065,7 +1066,7 @@ echo "$ac_t""${make_include_left}file${make_include_right}" 1>&6 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1069: checking for a BSD compatible install" >&5 +echo "configure:1070: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1122,7 +1123,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:1126: checking for $ac_word" >&5 +echo "configure:1127: 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 @@ -1153,9 +1154,9 @@ done echo $ac_n "checking for AIX""... $ac_c" 1>&6 -echo "configure:1157: checking for AIX" >&5 +echo "configure:1158: checking for AIX" >&5 cat > conftest.$ac_ext <<EOF -#line 1159 "configure" +#line 1160 "configure" #include "confdefs.h" #ifdef _AIX yes @@ -1177,7 +1178,7 @@ rm -f conftest* echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -echo "configure:1181: checking for POSIXized ISC" >&5 +echo "configure:1182: 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 @@ -1203,7 +1204,7 @@ fi echo $ac_n "checking if you want to see long compiling messages""... $ac_c" 1>&6 -echo "configure:1207: checking if you want to see long compiling messages" >&5 +echo "configure:1208: 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 @@ -1251,7 +1252,7 @@ fi echo $ac_n "checking if you want to check memory-leaks""... $ac_c" 1>&6 -echo "configure:1255: checking if you want to check memory-leaks" >&5 +echo "configure:1256: 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 @@ -1275,7 +1276,7 @@ EOF echo $ac_n "checking if you want to enable debug-code""... $ac_c" 1>&6 -echo "configure:1279: checking if you want to enable debug-code" >&5 +echo "configure:1280: 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 @@ -1317,7 +1318,7 @@ else fi echo $ac_n "checking if you want to enable lynx trace code *recommended* ""... $ac_c" 1>&6 -echo "configure:1321: checking if you want to enable lynx trace code *recommended* " >&5 +echo "configure:1322: checking if you want to enable lynx trace code *recommended* " >&5 # Check whether --enable-trace or --disable-trace was given. if test "${enable_trace+set}" = set; then @@ -1343,7 +1344,7 @@ EOF if test -n "$GCC" then echo $ac_n "checking if you want to turn on gcc warnings""... $ac_c" 1>&6 -echo "configure:1347: checking if you want to turn on gcc warnings" >&5 +echo "configure:1348: 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 @@ -1383,9 +1384,9 @@ EOF if test -n "$GCC" then echo "checking for gcc __attribute__ directives" 1>&6 -echo "configure:1387: checking for gcc __attribute__ directives" >&5 +echo "configure:1388: checking for gcc __attribute__ directives" >&5 cat > conftest.$ac_ext <<EOF -#line 1389 "configure" +#line 1390 "configure" #include "confdefs.h" #include "conftest.h" #include "conftest.i" @@ -1423,7 +1424,7 @@ EOF EOF ;; esac - if { (eval echo configure:1427: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + if { (eval echo configure:1428: \"$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 @@ -1440,11 +1441,11 @@ fi if test -n "$GCC" then cat > conftest.$ac_ext <<EOF -#line 1444 "configure" +#line 1445 "configure" int main(int argc, char *argv[]) { return argv[argc-1] == 0; } EOF echo "checking for gcc warning options" 1>&6 -echo "configure:1448: checking for gcc warning options" >&5 +echo "configure:1449: checking for gcc warning options" >&5 cf_save_CFLAGS="$CFLAGS" EXTRA_CFLAGS="-W -Wall" cf_warn_CONST="" @@ -1462,7 +1463,7 @@ echo "configure:1448: checking for gcc warning options" >&5 Wstrict-prototypes $cf_warn_CONST do CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt" - if { (eval echo configure:1466: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + if { (eval echo configure:1467: \"$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" @@ -1480,12 +1481,12 @@ fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1484: checking for ANSI C header files" >&5 +echo "configure:1485: 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 1489 "configure" +#line 1490 "configure" #include "confdefs.h" #include <stdlib.h> #include <stdarg.h> @@ -1493,7 +1494,7 @@ else #include <float.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1497: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1498: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1510,7 +1511,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 1514 "configure" +#line 1515 "configure" #include "confdefs.h" #include <string.h> EOF @@ -1528,7 +1529,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 1532 "configure" +#line 1533 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -1549,7 +1550,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <<EOF -#line 1553 "configure" +#line 1554 "configure" #include "confdefs.h" #include <ctype.h> #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1560,7 +1561,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:1564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1584,12 +1585,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1588: checking for working const" >&5 +echo "configure:1589: 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 1593 "configure" +#line 1594 "configure" #include "confdefs.h" int main() { @@ -1638,7 +1639,7 @@ ccp = (char const *const *) p; ; return 0; } EOF -if { (eval echo configure:1642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -1659,21 +1660,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:1663: checking for inline" >&5 +echo "configure:1664: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <<EOF -#line 1670 "configure" +#line 1671 "configure" #include "confdefs.h" int main() { } $ac_kw foo() { ; return 0; } EOF -if { (eval echo configure:1677: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -1699,12 +1700,12 @@ EOF esac echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:1703: checking for off_t" >&5 +echo "configure:1704: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1708 "configure" +#line 1709 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -1732,12 +1733,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:1736: checking for size_t" >&5 +echo "configure:1737: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1741 "configure" +#line 1742 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -1767,19 +1768,19 @@ fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:1771: checking for working alloca.h" >&5 +echo "configure:1772: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1776 "configure" +#line 1777 "configure" #include "confdefs.h" #include <alloca.h> int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:1783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -1800,12 +1801,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:1804: checking for alloca" >&5 +echo "configure:1805: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1809 "configure" +#line 1810 "configure" #include "confdefs.h" #ifdef __GNUC__ @@ -1833,7 +1834,7 @@ int main() { char *p = (char *) alloca(1); ; return 0; } EOF -if { (eval echo configure:1837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -1865,12 +1866,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:1869: checking whether alloca needs Cray hooks" >&5 +echo "configure:1870: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1874 "configure" +#line 1875 "configure" #include "confdefs.h" #if defined(CRAY) && ! defined(CRAY2) webecray @@ -1895,12 +1896,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1899: checking for $ac_func" >&5 +echo "configure:1900: 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 1904 "configure" +#line 1905 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -1923,7 +1924,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:1927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1950,7 +1951,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:1954: checking stack direction for C alloca" >&5 +echo "configure:1955: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1958,7 +1959,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <<EOF -#line 1962 "configure" +#line 1963 "configure" #include "confdefs.h" find_stack_direction () { @@ -1977,7 +1978,7 @@ main () exit (find_stack_direction() < 0); } EOF -if { (eval echo configure:1981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -2002,17 +2003,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2006: checking for $ac_hdr" >&5 +echo "configure:2007: 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 2011 "configure" +#line 2012 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2017: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2041,12 +2042,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2045: checking for $ac_func" >&5 +echo "configure:2046: 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 2050 "configure" +#line 2051 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2069,7 +2070,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2094,7 +2095,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:2098: checking for working mmap" >&5 +echo "configure:2099: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2102,7 +2103,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <<EOF -#line 2106 "configure" +#line 2107 "configure" #include "confdefs.h" /* Thanks to Mike Haertel and Jim Avera for this test. @@ -2242,7 +2243,7 @@ main() } EOF -if { (eval echo configure:2246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -2270,17 +2271,17 @@ unistd.h values.h sys/param.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2274: checking for $ac_hdr" >&5 +echo "configure:2275: 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 2279 "configure" +#line 2280 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2310,12 +2311,12 @@ done __argz_count __argz_stringify __argz_next do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2314: checking for $ac_func" >&5 +echo "configure:2315: 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 2319 "configure" +#line 2320 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2338,7 +2339,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2367,12 +2368,12 @@ done for ac_func in stpcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2371: checking for $ac_func" >&5 +echo "configure:2372: 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 2376 "configure" +#line 2377 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2395,7 +2396,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2429,19 +2430,19 @@ EOF if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:2433: checking for LC_MESSAGES" >&5 +echo "configure:2434: checking for LC_MESSAGES" >&5 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2438 "configure" +#line 2439 "configure" #include "confdefs.h" #include <locale.h> int main() { return LC_MESSAGES ; return 0; } EOF -if { (eval echo configure:2445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_val_LC_MESSAGES=yes else @@ -2462,7 +2463,7 @@ EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:2466: checking whether NLS is requested" >&5 +echo "configure:2467: checking whether NLS is requested" >&5 # Check whether --enable-nls or --disable-nls was given. if test "${enable_nls+set}" = set; then @@ -2483,7 +2484,7 @@ fi EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:2487: checking whether included gettext is requested" >&5 +echo "configure:2488: checking whether included gettext is requested" >&5 # Check whether --with-included-gettext or --without-included-gettext was given. if test "${with_included_gettext+set}" = set; then @@ -2503,17 +2504,17 @@ fi ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:2507: checking for libintl.h" >&5 +echo "configure:2508: checking for libintl.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 2512 "configure" +#line 2513 "configure" #include "confdefs.h" #include <libintl.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2517: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2530,19 +2531,19 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 -echo "configure:2534: checking for gettext in libc" >&5 +echo "configure:2535: checking for gettext in libc" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2539 "configure" +#line 2540 "configure" #include "confdefs.h" #include <libintl.h> int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:2546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libc=yes else @@ -2558,7 +2559,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 if test "$gt_cv_func_gettext_libc" != "yes"; then echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 -echo "configure:2562: checking for bindtextdomain in -lintl" >&5 +echo "configure:2563: checking for bindtextdomain in -lintl" >&5 ac_lib_var=`echo intl'_'bindtextdomain | 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 +2567,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <<EOF -#line 2570 "configure" +#line 2571 "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 +2578,7 @@ int main() { bindtextdomain() ; return 0; } EOF -if { (eval echo configure:2581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2593,19 +2594,19 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 -echo "configure:2597: checking for gettext in libintl" >&5 +echo "configure:2598: checking for gettext in libintl" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2602 "configure" +#line 2603 "configure" #include "confdefs.h" int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:2609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libintl=yes else @@ -2633,7 +2634,7 @@ EOF # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2637: checking for $ac_word" >&5 +echo "configure:2638: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2667,12 +2668,12 @@ fi for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2671: checking for $ac_func" >&5 +echo "configure:2672: 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 2676 "configure" +#line 2677 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2695,7 +2696,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2722,7 +2723,7 @@ done # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2726: checking for $ac_word" >&5 +echo "configure:2727: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2758,7 +2759,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2762: checking for $ac_word" >&5 +echo "configure:2763: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2790,7 +2791,7 @@ else fi cat > conftest.$ac_ext <<EOF -#line 2794 "configure" +#line 2795 "configure" #include "confdefs.h" int main() { @@ -2798,7 +2799,7 @@ extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr ; return 0; } EOF -if { (eval echo configure:2802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share @@ -2821,7 +2822,7 @@ fi if test "$CATOBJEXT" = "NONE"; then echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6 -echo "configure:2825: checking whether catgets can be used" >&5 +echo "configure:2826: checking whether catgets can be used" >&5 # Check whether --with-catgets or --without-catgets was given. if test "${with_catgets+set}" = set; then @@ -2835,7 +2836,7 @@ fi if test "$nls_cv_use_catgets" = "yes"; then echo $ac_n "checking for main in -li""... $ac_c" 1>&6 -echo "configure:2839: checking for main in -li" >&5 +echo "configure:2840: checking for main in -li" >&5 ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2843,14 +2844,14 @@ else ac_save_LIBS="$LIBS" LIBS="-li $LIBS" cat > conftest.$ac_ext <<EOF -#line 2847 "configure" +#line 2848 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:2854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2878,12 +2879,12 @@ else fi echo $ac_n "checking for catgets""... $ac_c" 1>&6 -echo "configure:2882: checking for catgets" >&5 +echo "configure:2883: checking for catgets" >&5 if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2887 "configure" +#line 2888 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char catgets(); below. */ @@ -2906,7 +2907,7 @@ catgets(); ; return 0; } EOF -if { (eval echo configure:2910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_catgets=yes" else @@ -2928,7 +2929,7 @@ EOF # Extract the first word of "gencat", so it can be a program name with args. set dummy gencat; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2932: checking for $ac_word" >&5 +echo "configure:2933: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2964,7 +2965,7 @@ fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2968: checking for $ac_word" >&5 +echo "configure:2969: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3001,7 +3002,7 @@ fi # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3005: checking for $ac_word" >&5 +echo "configure:3006: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3036,7 +3037,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3040: checking for $ac_word" >&5 +echo "configure:3041: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3094,7 +3095,7 @@ fi # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3098: checking for $ac_word" >&5 +echo "configure:3099: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3128,7 +3129,7 @@ fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3132: checking for $ac_word" >&5 +echo "configure:3133: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3164,7 +3165,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3168: checking for $ac_word" >&5 +echo "configure:3169: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3254,7 +3255,7 @@ fi LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:3258: checking for catalogs to be installed" >&5 +echo "configure:3259: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in @@ -3283,17 +3284,17 @@ echo "configure:3258: checking for catalogs to be installed" >&5 if test "$CATOBJEXT" = ".cat"; then ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 -echo "configure:3287: checking for linux/version.h" >&5 +echo "configure:3288: checking for linux/version.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 3292 "configure" +#line 3293 "configure" #include "confdefs.h" #include <linux/version.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3297: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3298: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3404,7 +3405,7 @@ SUB_MAKEFILE= use_our_messages=no if test -d $srcdir/po ; then echo $ac_n "checking if we should use included message-library""... $ac_c" 1>&6 -echo "configure:3408: checking if we should use included message-library" >&5 +echo "configure:3409: checking if we should use included message-library" >&5 # Check whether --enable-included-msgs or --disable-included-msgs was given. if test "${enable_included_msgs+set}" = set; then @@ -3440,17 +3441,17 @@ elif test "$USE_NLS" = yes ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3444: checking for $ac_hdr" >&5 +echo "configure:3445: 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 3449 "configure" +#line 3450 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3514,7 +3515,7 @@ EOF fi echo $ac_n "checking if you want full utility pathnames""... $ac_c" 1>&6 -echo "configure:3518: checking if you want full utility pathnames" >&5 +echo "configure:3519: 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 @@ -3539,7 +3540,7 @@ EOF echo $ac_n "checking for system mailer""... $ac_c" 1>&6 -echo "configure:3543: checking for system mailer" >&5 +echo "configure:3544: 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 @@ -3566,7 +3567,7 @@ EOF echo $ac_n "checking system mail flags""... $ac_c" 1>&6 -echo "configure:3570: checking system mail flags" >&5 +echo "configure:3571: 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 @@ -3594,7 +3595,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:3598: checking for $ac_word" >&5 +echo "configure:3599: 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 @@ -3629,7 +3630,7 @@ fi else echo $ac_n "checking for chmod""... $ac_c" 1>&6 -echo "configure:3633: checking for chmod" >&5 +echo "configure:3634: checking for chmod" >&5 echo "$ac_t""$CHMOD" 1>&6 eval 'ac_cv_path_'CHMOD'="'chmod'"' fi @@ -3671,7 +3672,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:3675: checking for $ac_word" >&5 +echo "configure:3676: 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 @@ -3706,7 +3707,7 @@ fi else echo $ac_n "checking for compress""... $ac_c" 1>&6 -echo "configure:3710: checking for compress" >&5 +echo "configure:3711: checking for compress" >&5 echo "$ac_t""$COMPRESS" 1>&6 eval 'ac_cv_path_'COMPRESS'="'compress'"' fi @@ -3748,7 +3749,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:3752: checking for $ac_word" >&5 +echo "configure:3753: 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 @@ -3783,7 +3784,7 @@ fi else echo $ac_n "checking for cp""... $ac_c" 1>&6 -echo "configure:3787: checking for cp" >&5 +echo "configure:3788: checking for cp" >&5 echo "$ac_t""$COPY" 1>&6 eval 'ac_cv_path_'COPY'="'cp'"' fi @@ -3825,7 +3826,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:3829: checking for $ac_word" >&5 +echo "configure:3830: 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 @@ -3860,7 +3861,7 @@ fi else echo $ac_n "checking for gzip""... $ac_c" 1>&6 -echo "configure:3864: checking for gzip" >&5 +echo "configure:3865: checking for gzip" >&5 echo "$ac_t""$GZIP" 1>&6 eval 'ac_cv_path_'GZIP'="'gzip'"' fi @@ -3902,7 +3903,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:3906: checking for $ac_word" >&5 +echo "configure:3907: 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 @@ -3937,7 +3938,7 @@ fi else echo $ac_n "checking for mkdir""... $ac_c" 1>&6 -echo "configure:3941: checking for mkdir" >&5 +echo "configure:3942: checking for mkdir" >&5 echo "$ac_t""$MKDIR" 1>&6 eval 'ac_cv_path_'MKDIR'="'mkdir'"' fi @@ -3979,7 +3980,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:3983: checking for $ac_word" >&5 +echo "configure:3984: 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 @@ -4014,7 +4015,7 @@ fi else echo $ac_n "checking for mv""... $ac_c" 1>&6 -echo "configure:4018: checking for mv" >&5 +echo "configure:4019: checking for mv" >&5 echo "$ac_t""$MV" 1>&6 eval 'ac_cv_path_'MV'="'mv'"' fi @@ -4056,7 +4057,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:4060: checking for $ac_word" >&5 +echo "configure:4061: 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 @@ -4091,7 +4092,7 @@ fi else echo $ac_n "checking for rm""... $ac_c" 1>&6 -echo "configure:4095: checking for rm" >&5 +echo "configure:4096: checking for rm" >&5 echo "$ac_t""$RM" 1>&6 eval 'ac_cv_path_'RM'="'rm'"' fi @@ -4133,7 +4134,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:4137: checking for $ac_word" >&5 +echo "configure:4138: 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 @@ -4168,7 +4169,7 @@ fi else echo $ac_n "checking for tar""... $ac_c" 1>&6 -echo "configure:4172: checking for tar" >&5 +echo "configure:4173: checking for tar" >&5 echo "$ac_t""$TAR" 1>&6 eval 'ac_cv_path_'TAR'="'tar'"' fi @@ -4210,7 +4211,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:4214: checking for $ac_word" >&5 +echo "configure:4215: 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 @@ -4245,7 +4246,7 @@ fi else echo $ac_n "checking for touch""... $ac_c" 1>&6 -echo "configure:4249: checking for touch" >&5 +echo "configure:4250: checking for touch" >&5 echo "$ac_t""$TOUCH" 1>&6 eval 'ac_cv_path_'TOUCH'="'touch'"' fi @@ -4287,7 +4288,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:4291: checking for $ac_word" >&5 +echo "configure:4292: 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 @@ -4322,7 +4323,7 @@ fi else echo $ac_n "checking for gunzip""... $ac_c" 1>&6 -echo "configure:4326: checking for gunzip" >&5 +echo "configure:4327: checking for gunzip" >&5 echo "$ac_t""$UNCOMPRESS" 1>&6 eval 'ac_cv_path_'UNCOMPRESS'="'gunzip'"' fi @@ -4364,7 +4365,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:4368: checking for $ac_word" >&5 +echo "configure:4369: 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 @@ -4399,7 +4400,7 @@ fi else echo $ac_n "checking for unzip""... $ac_c" 1>&6 -echo "configure:4403: checking for unzip" >&5 +echo "configure:4404: checking for unzip" >&5 echo "$ac_t""$UNZIP" 1>&6 eval 'ac_cv_path_'UNZIP'="'unzip'"' fi @@ -4441,7 +4442,7 @@ if test "$with_full_paths" = yes ; then # Extract the first word of "bzip2", so it can be a program name with args. set dummy bzip2; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4445: checking for $ac_word" >&5 +echo "configure:4446: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_BZIP2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4476,7 +4477,7 @@ fi else echo $ac_n "checking for bzip2""... $ac_c" 1>&6 -echo "configure:4480: checking for bzip2" >&5 +echo "configure:4481: checking for bzip2" >&5 echo "$ac_t""$BZIP2" 1>&6 eval 'ac_cv_path_'BZIP2'="'bzip2'"' fi @@ -4518,7 +4519,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:4522: checking for $ac_word" >&5 +echo "configure:4523: 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 @@ -4553,7 +4554,7 @@ fi else echo $ac_n "checking for uudecode""... $ac_c" 1>&6 -echo "configure:4557: checking for uudecode" >&5 +echo "configure:4558: checking for uudecode" >&5 echo "$ac_t""$UUDECODE" 1>&6 eval 'ac_cv_path_'UUDECODE'="'uudecode'"' fi @@ -4595,7 +4596,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:4599: checking for $ac_word" >&5 +echo "configure:4600: 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 @@ -4630,7 +4631,7 @@ fi else echo $ac_n "checking for zcat""... $ac_c" 1>&6 -echo "configure:4634: checking for zcat" >&5 +echo "configure:4635: checking for zcat" >&5 echo "$ac_t""$ZCAT" 1>&6 eval 'ac_cv_path_'ZCAT'="'zcat'"' fi @@ -4672,7 +4673,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:4676: checking for $ac_word" >&5 +echo "configure:4677: 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 @@ -4707,7 +4708,7 @@ fi else echo $ac_n "checking for zip""... $ac_c" 1>&6 -echo "configure:4711: checking for zip" >&5 +echo "configure:4712: checking for zip" >&5 echo "$ac_t""$ZIP" 1>&6 eval 'ac_cv_path_'ZIP'="'zip'"' fi @@ -4749,7 +4750,7 @@ if test "$with_full_paths" = yes ; then # Extract the first word of "telnet", so it can be a program name with args. set dummy telnet; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4753: checking for $ac_word" >&5 +echo "configure:4754: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_TELNET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4784,7 +4785,7 @@ fi else echo $ac_n "checking for telnet""... $ac_c" 1>&6 -echo "configure:4788: checking for telnet" >&5 +echo "configure:4789: checking for telnet" >&5 echo "$ac_t""$TELNET" 1>&6 eval 'ac_cv_path_'TELNET'="'telnet'"' fi @@ -4826,7 +4827,7 @@ if test "$with_full_paths" = yes ; then # Extract the first word of "tn3270", so it can be a program name with args. set dummy tn3270; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4830: checking for $ac_word" >&5 +echo "configure:4831: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_TN3270'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4861,7 +4862,7 @@ fi else echo $ac_n "checking for tn3270""... $ac_c" 1>&6 -echo "configure:4865: checking for tn3270" >&5 +echo "configure:4866: checking for tn3270" >&5 echo "$ac_t""$TN3270" 1>&6 eval 'ac_cv_path_'TN3270'="'tn3270'"' fi @@ -4903,7 +4904,7 @@ if test "$with_full_paths" = yes ; then # Extract the first word of "rlogin", so it can be a program name with args. set dummy rlogin; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4907: checking for $ac_word" >&5 +echo "configure:4908: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_RLOGIN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4938,7 +4939,7 @@ fi else echo $ac_n "checking for rlogin""... $ac_c" 1>&6 -echo "configure:4942: checking for rlogin" >&5 +echo "configure:4943: checking for rlogin" >&5 echo "$ac_t""$RLOGIN" 1>&6 eval 'ac_cv_path_'RLOGIN'="'rlogin'"' fi @@ -4999,7 +5000,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:5003: checking for ${CC-cc} option to accept ANSI C" >&5 +echo "configure:5004: 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 @@ -5023,7 +5024,7 @@ for cf_arg in "-DCC_HAS_PROTOS" \ do CFLAGS="$cf_save_CFLAGS $cf_arg" cat > conftest.$ac_ext <<EOF -#line 5027 "configure" +#line 5028 "configure" #include "confdefs.h" #ifndef CC_HAS_PROTOS @@ -5039,7 +5040,7 @@ int main() { struct s2 {int (*f) (double a);}; ; return 0; } EOF -if { (eval echo configure:5043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5044: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_ansi_cc="$cf_arg"; break else @@ -5067,12 +5068,12 @@ fi fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:5071: checking for working const" >&5 +echo "configure:5072: 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 5076 "configure" +#line 5077 "configure" #include "confdefs.h" int main() { @@ -5121,7 +5122,7 @@ ccp = (char const *const *) p; ; return 0; } EOF -if { (eval echo configure:5125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5126: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -5163,7 +5164,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:5167: checking for strcmp in -lc_s" >&5 +echo "configure:5168: 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 @@ -5171,7 +5172,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc_s $LIBS" cat > conftest.$ac_ext <<EOF -#line 5175 "configure" +#line 5176 "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 @@ -5182,7 +5183,7 @@ int main() { strcmp() ; return 0; } EOF -if { (eval echo configure:5186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5218,6 +5219,7 @@ dgux*) ;; hpux*) CFLAGS="$CFLAGS -DSNAKE" + test -z "$GCC" && TRY_CFLAGS="$TRY_CFLAGS -Wp,-H600000" ;; isc*) # -DPOSIX_JC is necessary, else LYBookmark.c never finds out what a mode_t is. @@ -5271,7 +5273,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:5275: checking for $ac_word" >&5 +echo "configure:5277: 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 @@ -5316,17 +5318,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:5320: checking for $ac_hdr" >&5 +echo "configure:5322: 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 5325 "configure" +#line 5327 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5330: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5370,17 +5372,17 @@ ultrix*) do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5374: checking for $ac_hdr" >&5 +echo "configure:5376: 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 5379 "configure" +#line 5381 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5384: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5386: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5418,16 +5420,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:5422: checking if we should use compile options $TRY_CFLAGS" >&5 +echo "configure:5424: checking if we should use compile options $TRY_CFLAGS" >&5 cat > conftest.$ac_ext <<EOF -#line 5424 "configure" +#line 5426 "configure" #include "confdefs.h" #include <stdio.h> int main() { FILE *fp = stdin ; return 0; } EOF -if { (eval echo configure:5431: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_result=yes else @@ -5445,7 +5447,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:5449: checking if you want socks library" >&5 +echo "configure:5451: 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 @@ -5465,7 +5467,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:5469: checking if you want socks5 library" >&5 +echo "configure:5471: 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 @@ -5531,7 +5533,7 @@ cat >> confdefs.h <<\EOF EOF cat > conftest.$ac_ext <<EOF -#line 5535 "configure" +#line 5537 "configure" #include "confdefs.h" #include <stdio.h> @@ -5540,7 +5542,7 @@ int main() { accept((char *)0) ; return 0; } EOF -if { (eval echo configure:5544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then : else echo "configure: failed program was:" >&5 @@ -5570,9 +5572,9 @@ cat >> confdefs.h <<\EOF EOF echo $ac_n "checking if the socks library uses socks4 prefix""... $ac_c" 1>&6 -echo "configure:5574: checking if the socks library uses socks4 prefix" >&5 +echo "configure:5576: checking if the socks library uses socks4 prefix" >&5 cat > conftest.$ac_ext <<EOF -#line 5576 "configure" +#line 5578 "configure" #include "confdefs.h" #include <socks.h> @@ -5581,7 +5583,7 @@ int main() { Rinit((char *)0) ; return 0; } EOF -if { (eval echo configure:5585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cat >> confdefs.h <<\EOF #define USE_SOCKS4_PREFIX 1 @@ -5593,14 +5595,14 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 5597 "configure" +#line 5599 "configure" #include "confdefs.h" #include <socks.h> int main() { SOCKSinit((char *)0) ; return 0; } EOF -if { (eval echo configure:5604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_use_socks4=no else @@ -5669,7 +5671,7 @@ else cf_test_netlibs=no echo $ac_n "checking for network libraries""... $ac_c" 1>&6 -echo "configure:5673: checking for network libraries" >&5 +echo "configure:5675: checking for network libraries" >&5 if eval "test \"`echo '$''{'cf_cv_netlibs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5680,12 +5682,12 @@ cf_test_netlibs=yes for ac_func in gethostname do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5684: checking for $ac_func" >&5 +echo "configure:5686: 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 5689 "configure" +#line 5691 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5708,7 +5710,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:5712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5731,7 +5733,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gethostname in -lnsl""... $ac_c" 1>&6 -echo "configure:5735: checking for gethostname in -lnsl" >&5 +echo "configure:5737: 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 @@ -5739,7 +5741,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $cf_cv_netlibs $LIBS" cat > conftest.$ac_ext <<EOF -#line 5743 "configure" +#line 5745 "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 @@ -5750,7 +5752,7 @@ int main() { gethostname() ; return 0; } EOF -if { (eval echo configure:5754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5783,7 +5785,7 @@ else echo $ac_n "checking for gethostname in -lsocket""... $ac_c" 1>&6 -echo "configure:5787: checking for gethostname in -lsocket" >&5 +echo "configure:5789: 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 @@ -5791,7 +5793,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $cf_cv_netlibs $LIBS" cat > conftest.$ac_ext <<EOF -#line 5795 "configure" +#line 5797 "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 @@ -5802,7 +5804,7 @@ int main() { gethostname() ; return 0; } EOF -if { (eval echo configure:5806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5846,21 +5848,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:5850: checking for -linet" >&5 +echo "configure:5852: 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 5857 "configure" +#line 5859 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:5864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_lib_inet=yes else @@ -5883,12 +5885,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:5887: checking for $ac_func" >&5 +echo "configure:5889: 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 5892 "configure" +#line 5894 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5911,7 +5913,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:5915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5934,7 +5936,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:5938: checking for socket in -lsocket" >&5 +echo "configure:5940: 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 @@ -5942,7 +5944,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $cf_cv_netlibs $LIBS" cat > conftest.$ac_ext <<EOF -#line 5946 "configure" +#line 5948 "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 @@ -5953,7 +5955,7 @@ int main() { socket() ; return 0; } EOF -if { (eval echo configure:5957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5986,7 +5988,7 @@ else echo $ac_n "checking for socket in -lbsd""... $ac_c" 1>&6 -echo "configure:5990: checking for socket in -lbsd" >&5 +echo "configure:5992: 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 @@ -5994,7 +5996,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lbsd $cf_cv_netlibs $LIBS" cat > conftest.$ac_ext <<EOF -#line 5998 "configure" +#line 6000 "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 @@ -6005,7 +6007,7 @@ int main() { socket() ; return 0; } EOF -if { (eval echo configure:6009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6050,12 +6052,12 @@ fi for ac_func in gethostbyname do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6054: checking for $ac_func" >&5 +echo "configure:6056: 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 6059 "configure" +#line 6061 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -6078,7 +6080,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:6082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6101,7 +6103,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:6105: checking for gethostbyname in -lnsl" >&5 +echo "configure:6107: 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 @@ -6109,7 +6111,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $cf_cv_netlibs $LIBS" cat > conftest.$ac_ext <<EOF -#line 6113 "configure" +#line 6115 "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 @@ -6120,7 +6122,7 @@ int main() { gethostbyname() ; return 0; } EOF -if { (eval echo configure:6124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6161,12 +6163,12 @@ done for ac_func in strcasecmp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6165: checking for $ac_func" >&5 +echo "configure:6167: 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 6170 "configure" +#line 6172 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -6189,7 +6191,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:6193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6212,7 +6214,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6 -echo "configure:6216: checking for strcasecmp in -lresolv" >&5 +echo "configure:6218: 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 @@ -6220,7 +6222,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $cf_cv_netlibs $LIBS" cat > conftest.$ac_ext <<EOF -#line 6224 "configure" +#line 6226 "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 @@ -6231,7 +6233,7 @@ int main() { strcasecmp() ; return 0; } EOF -if { (eval echo configure:6235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6277,13 +6279,13 @@ test $cf_test_netlibs = no && echo "$cf_cv_netlibs" >&6 fi echo $ac_n "checking for inet_aton function""... $ac_c" 1>&6 -echo "configure:6281: checking for inet_aton function" >&5 +echo "configure:6283: checking for inet_aton function" >&5 if eval "test \"`echo '$''{'cf_cv_have_inet_aton'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6287 "configure" +#line 6289 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/socket.h> @@ -6294,7 +6296,7 @@ int main() { inet_aton(0, (struct in_addr *)0) ; return 0; } EOF -if { (eval echo configure:6298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_have_inet_aton=yes else @@ -6314,13 +6316,13 @@ EOF else echo $ac_n "checking for inet_addr function""... $ac_c" 1>&6 -echo "configure:6318: checking for inet_addr function" >&5 +echo "configure:6320: checking for inet_addr function" >&5 if eval "test \"`echo '$''{'cf_cv_have_inet_addr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6324 "configure" +#line 6326 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/socket.h> @@ -6331,7 +6333,7 @@ int main() { inet_addr(0) ; return 0; } EOF -if { (eval echo configure:6335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_have_inet_addr=yes else @@ -6346,7 +6348,7 @@ fi echo "$ac_t""$cf_cv_have_inet_addr" 1>&6 if test "$cf_cv_have_inet_addr" = no ; then echo $ac_n "checking for library with inet_addr""... $ac_c" 1>&6 -echo "configure:6350: checking for library with inet_addr" >&5 +echo "configure:6352: checking for library with inet_addr" >&5 if eval "test \"`echo '$''{'cf_cv_lib_inet_addr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6356,7 +6358,7 @@ else do LIBS="$cf_save_LIBS $cf_inetlib" cat > conftest.$ac_ext <<EOF -#line 6360 "configure" +#line 6362 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/socket.h> @@ -6367,7 +6369,7 @@ int main() { inet_addr(0) ; return 0; } EOF -if { (eval echo configure:6371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_lib_inet_addr=$cf_inetlib else @@ -6394,7 +6396,7 @@ fi echo $ac_n "checking for screen type""... $ac_c" 1>&6 -echo "configure:6398: checking for screen type" >&5 +echo "configure:6400: checking for screen type" >&5 if eval "test \"`echo '$''{'cf_cv_screen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6429,12 +6431,12 @@ case $cf_cv_screen in curses) echo $ac_n "checking for initscr""... $ac_c" 1>&6 -echo "configure:6433: checking for initscr" >&5 +echo "configure:6435: 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 6438 "configure" +#line 6440 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char initscr(); below. */ @@ -6457,7 +6459,7 @@ initscr(); ; return 0; } EOF -if { (eval echo configure:6461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_initscr=yes" else @@ -6478,7 +6480,7 @@ else case $host_os in #(vi freebsd*) #(vi echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6 -echo "configure:6482: checking for tgoto in -lmytinfo" >&5 +echo "configure:6484: 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 @@ -6486,7 +6488,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lmytinfo $LIBS" cat > conftest.$ac_ext <<EOF -#line 6490 "configure" +#line 6492 "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 @@ -6497,7 +6499,7 @@ int main() { tgoto() ; return 0; } EOF -if { (eval echo configure:6501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6520,7 +6522,7 @@ fi ;; hpux10.*) echo $ac_n "checking for initscr in -lcur_colr""... $ac_c" 1>&6 -echo "configure:6524: checking for initscr in -lcur_colr" >&5 +echo "configure:6526: 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 @@ -6528,7 +6530,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcur_colr $LIBS" cat > conftest.$ac_ext <<EOF -#line 6532 "configure" +#line 6534 "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 @@ -6539,7 +6541,7 @@ int main() { initscr() ; return 0; } EOF -if { (eval echo configure:6543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6563,7 +6565,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for initscr in -lHcurses""... $ac_c" 1>&6 -echo "configure:6567: checking for initscr in -lHcurses" >&5 +echo "configure:6569: 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 @@ -6571,7 +6573,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lHcurses $LIBS" cat > conftest.$ac_ext <<EOF -#line 6575 "configure" +#line 6577 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6582,7 +6584,7 @@ int main() { initscr() ; return 0; } EOF -if { (eval echo configure:6586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6631,12 +6633,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:6635: checking for tgoto" >&5 +echo "configure:6637: 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 6640 "configure" +#line 6642 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char tgoto(); below. */ @@ -6659,7 +6661,7 @@ tgoto(); ; return 0; } EOF -if { (eval echo configure:6663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_tgoto=yes" else @@ -6680,7 +6682,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:6684: checking for tgoto in -l$cf_term_lib" >&5 +echo "configure:6686: 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 @@ -6688,7 +6690,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$cf_term_lib $LIBS" cat > conftest.$ac_ext <<EOF -#line 6692 "configure" +#line 6694 "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 @@ -6699,7 +6701,7 @@ int main() { tgoto() ; return 0; } EOF -if { (eval echo configure:6703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6729,7 +6731,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:6733: checking for initscr in -l$cf_curs_lib" >&5 +echo "configure:6735: 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 @@ -6737,7 +6739,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$cf_curs_lib $LIBS" cat > conftest.$ac_ext <<EOF -#line 6741 "configure" +#line 6743 "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 @@ -6748,7 +6750,7 @@ int main() { initscr() ; return 0; } EOF -if { (eval echo configure:6752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6774,16 +6776,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:6778: checking if we can link with $cf_curs_lib library" >&5 +echo "configure:6780: checking if we can link with $cf_curs_lib library" >&5 cat > conftest.$ac_ext <<EOF -#line 6780 "configure" +#line 6782 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> int main() { initscr() ; return 0; } EOF -if { (eval echo configure:6787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_result=yes else @@ -6797,16 +6799,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:6801: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5 +echo "configure:6803: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5 cat > conftest.$ac_ext <<EOF -#line 6803 "configure" +#line 6805 "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:6810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_result=no else @@ -6816,14 +6818,14 @@ else LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS" cat > conftest.$ac_ext <<EOF -#line 6820 "configure" +#line 6822 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> int main() { initscr() ; return 0; } EOF -if { (eval echo configure:6827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_result=yes else @@ -6845,14 +6847,14 @@ fi echo $ac_n "checking for curses performance tradeoff""... $ac_c" 1>&6 -echo "configure:6849: checking for curses performance tradeoff" >&5 +echo "configure:6851: 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 6856 "configure" +#line 6858 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -6866,11 +6868,11 @@ int main() { ; return 0; } EOF -if { (eval echo configure:6870: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 6874 "configure" +#line 6876 "configure" #include "confdefs.h" #define CURS_PERFORMANCE @@ -6885,7 +6887,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:6889: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6891: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_curs_performance=yes else @@ -6910,13 +6912,13 @@ EOF ncurses) echo $ac_n "checking for ncurses header file""... $ac_c" 1>&6 -echo "configure:6914: checking for ncurses header file" >&5 +echo "configure:6916: 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 6920 "configure" +#line 6922 "configure" #include "confdefs.h" #include <curses.h> int main() { @@ -6933,7 +6935,7 @@ make an error ; return 0; } EOF -if { (eval echo configure:6937: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_ncurses_header=predefined else @@ -7019,7 +7021,7 @@ done ;; esac echo $ac_n "checking for ncurses version""... $ac_c" 1>&6 -echo "configure:7023: checking for ncurses version" >&5 +echo "configure:7025: 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 @@ -7044,7 +7046,7 @@ Autoconf "old" #endif EOF cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out" - { (eval echo configure:7048: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; } + { (eval echo configure:7050: \"$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" @@ -7053,7 +7055,7 @@ EOF else cat > conftest.$ac_ext <<EOF -#line 7057 "configure" +#line 7059 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -7076,7 +7078,7 @@ int main() exit(0); } EOF -if { (eval echo configure:7080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then cf_cv_ncurses_version=`cat $cf_tempfile` @@ -7101,7 +7103,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:7105: checking for Gpm_Open in -lgpm" >&5 +echo "configure:7107: 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 @@ -7109,7 +7111,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgpm $LIBS" cat > conftest.$ac_ext <<EOF -#line 7113 "configure" +#line 7115 "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 @@ -7120,7 +7122,7 @@ int main() { Gpm_Open() ; return 0; } EOF -if { (eval echo configure:7124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7136,7 +7138,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:7140: checking for initscr in -lgpm" >&5 +echo "configure:7142: 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 @@ -7144,7 +7146,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgpm $LIBS" cat > conftest.$ac_ext <<EOF -#line 7148 "configure" +#line 7150 "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 @@ -7155,7 +7157,7 @@ int main() { initscr() ; return 0; } EOF -if { (eval echo configure:7159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7186,7 +7188,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:7190: checking for tgoto in -lmytinfo" >&5 +echo "configure:7192: 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 @@ -7194,7 +7196,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lmytinfo $LIBS" cat > conftest.$ac_ext <<EOF -#line 7198 "configure" +#line 7200 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7205,7 +7207,7 @@ int main() { tgoto() ; return 0; } EOF -if { (eval echo configure:7209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7233,12 +7235,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:7237: checking for initscr" >&5 +echo "configure:7239: 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 7242 "configure" +#line 7244 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char initscr(); below. */ @@ -7261,7 +7263,7 @@ initscr(); ; return 0; } EOF -if { (eval echo configure:7265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_initscr=yes" else @@ -7281,17 +7283,17 @@ else cf_save_LIBS="$LIBS" echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6 -echo "configure:7285: checking for initscr in -lncurses" >&5 +echo "configure:7287: checking for initscr in -lncurses" >&5 LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <<EOF -#line 7288 "configure" +#line 7290 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> int main() { initscr() ; return 0; } EOF -if { (eval echo configure:7295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cf_cv_have_lib_ncurses=yes @@ -7318,17 +7320,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:7322: checking for -lncurses in $cf_libdir" >&5 +echo "configure:7324: checking for -lncurses in $cf_libdir" >&5 LIBS="-L$cf_libdir -lncurses $cf_save_LIBS" cat > conftest.$ac_ext <<EOF -#line 7325 "configure" +#line 7327 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> int main() { initscr() ; return 0; } EOF -if { (eval echo configure:7332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cf_cv_have_lib_ncurses=yes @@ -7360,7 +7362,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:7364: checking if we can link ncurses without $cf_ncurses_LIBS" >&5 +echo "configure:7366: 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'$//'` @@ -7369,14 +7371,14 @@ echo "configure:7364: checking if we can link ncurses without $cf_ncurses_LIBS" fi done cat > conftest.$ac_ext <<EOF -#line 7373 "configure" +#line 7375 "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:7380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -7393,20 +7395,20 @@ fi slang) echo $ac_n "checking for slang header file""... $ac_c" 1>&6 -echo "configure:7397: checking for slang header file" >&5 +echo "configure:7399: 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 7403 "configure" +#line 7405 "configure" #include "confdefs.h" #include <slang.h> int main() { printf("%s\n", SLANG_VERSION) ; return 0; } EOF -if { (eval echo configure:7410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7412: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_slang_header=predefined else @@ -7488,24 +7490,24 @@ else cf_cv_termlib=none cat > conftest.$ac_ext <<EOF -#line 7492 "configure" +#line 7494 "configure" #include "confdefs.h" int main() { char *x=(char*)tgoto("",0,0) ; return 0; } EOF -if { (eval echo configure:7499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 7502 "configure" +#line 7504 "configure" #include "confdefs.h" int main() { int x=tigetstr("") ; return 0; } EOF -if { (eval echo configure:7509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_termlib=terminfo else @@ -7527,7 +7529,7 @@ else # HP-UX 9.x terminfo has setupterm, but no tigetstr. if test "$cf_cv_termlib" = none; then echo $ac_n "checking for tigetstr in -ltermlib""... $ac_c" 1>&6 -echo "configure:7531: checking for tigetstr in -ltermlib" >&5 +echo "configure:7533: 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 @@ -7535,7 +7537,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermlib $LIBS" cat > conftest.$ac_ext <<EOF -#line 7539 "configure" +#line 7541 "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 @@ -7546,7 +7548,7 @@ int main() { tigetstr() ; return 0; } EOF -if { (eval echo configure:7550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7569,7 +7571,7 @@ fi fi if test "$cf_cv_termlib" = none; then echo $ac_n "checking for tgoto in -ltermlib""... $ac_c" 1>&6 -echo "configure:7573: checking for tgoto in -ltermlib" >&5 +echo "configure:7575: 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 @@ -7577,7 +7579,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermlib $LIBS" cat > conftest.$ac_ext <<EOF -#line 7581 "configure" +#line 7583 "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 @@ -7588,7 +7590,7 @@ int main() { tgoto() ; return 0; } EOF -if { (eval echo configure:7592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7612,7 +7614,7 @@ fi if test "$cf_cv_termlib" = none; then # allow curses library for broken AIX system. echo $ac_n "checking for initscr in -lcurses""... $ac_c" 1>&6 -echo "configure:7616: checking for initscr in -lcurses" >&5 +echo "configure:7618: 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 @@ -7620,7 +7622,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcurses $LIBS" cat > conftest.$ac_ext <<EOF -#line 7624 "configure" +#line 7626 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7631,7 +7633,7 @@ int main() { initscr() ; return 0; } EOF -if { (eval echo configure:7635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7652,7 +7654,7 @@ else fi echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6 -echo "configure:7656: checking for tgoto in -ltermcap" >&5 +echo "configure:7658: 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 @@ -7660,7 +7662,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext <<EOF -#line 7664 "configure" +#line 7666 "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 @@ -7671,7 +7673,7 @@ int main() { tgoto() ; return 0; } EOF -if { (eval echo configure:7675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7694,7 +7696,7 @@ fi fi if test "$cf_cv_termlib" = none; then echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6 -echo "configure:7698: checking for tgoto in -ltermcap" >&5 +echo "configure:7700: 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 @@ -7702,7 +7704,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext <<EOF -#line 7706 "configure" +#line 7708 "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 @@ -7713,7 +7715,7 @@ int main() { tgoto() ; return 0; } EOF -if { (eval echo configure:7717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7736,7 +7738,7 @@ fi fi if test "$cf_cv_termlib" = none; then echo $ac_n "checking for tgoto in -lncurses""... $ac_c" 1>&6 -echo "configure:7740: checking for tgoto in -lncurses" >&5 +echo "configure:7742: 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 @@ -7744,7 +7746,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <<EOF -#line 7748 "configure" +#line 7750 "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 @@ -7755,7 +7757,7 @@ int main() { tgoto() ; return 0; } EOF -if { (eval echo configure:7759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7787,12 +7789,12 @@ fi cf_slang_LIBS2="$LIBS" echo $ac_n "checking for acos""... $ac_c" 1>&6 -echo "configure:7791: checking for acos" >&5 +echo "configure:7793: 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 7796 "configure" +#line 7798 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char acos(); below. */ @@ -7815,7 +7817,7 @@ acos(); ; return 0; } EOF -if { (eval echo configure:7819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_acos=yes" else @@ -7834,7 +7836,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for acos in -lm""... $ac_c" 1>&6 -echo "configure:7838: checking for acos in -lm" >&5 +echo "configure:7840: 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 @@ -7842,7 +7844,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS $LIBS" cat > conftest.$ac_ext <<EOF -#line 7846 "configure" +#line 7848 "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 @@ -7853,7 +7855,7 @@ int main() { acos() ; return 0; } EOF -if { (eval echo configure:7857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7893,12 +7895,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:7897: checking for SLtt_get_screen_size" >&5 +echo "configure:7899: 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 7902 "configure" +#line 7904 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char SLtt_get_screen_size(); below. */ @@ -7921,7 +7923,7 @@ SLtt_get_screen_size(); ; return 0; } EOF -if { (eval echo configure:7925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_SLtt_get_screen_size=yes" else @@ -7941,17 +7943,17 @@ else cf_save_LIBS="$LIBS" echo $ac_n "checking for SLtt_get_screen_size in -lslang""... $ac_c" 1>&6 -echo "configure:7945: checking for SLtt_get_screen_size in -lslang" >&5 +echo "configure:7947: checking for SLtt_get_screen_size in -lslang" >&5 LIBS="-lslang $LIBS" cat > conftest.$ac_ext <<EOF -#line 7948 "configure" +#line 7950 "configure" #include "confdefs.h" #include <slang.h> int main() { SLtt_get_screen_size() ; return 0; } EOF -if { (eval echo configure:7955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cf_cv_have_lib_slang=yes @@ -7978,17 +7980,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:7982: checking for -lslang in $cf_libdir" >&5 +echo "configure:7984: checking for -lslang in $cf_libdir" >&5 LIBS="-L$cf_libdir -lslang $cf_save_LIBS" cat > conftest.$ac_ext <<EOF -#line 7985 "configure" +#line 7987 "configure" #include "confdefs.h" #include <slang.h> int main() { SLtt_get_screen_size() ; return 0; } EOF -if { (eval echo configure:7992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cf_cv_have_lib_slang=yes @@ -8019,7 +8021,7 @@ esac cf_slang_LIBS3="$LIBS" echo $ac_n "checking if we can link slang without termcap""... $ac_c" 1>&6 -echo "configure:8023: checking if we can link slang without termcap" >&5 +echo "configure:8025: 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 @@ -8027,14 +8029,14 @@ else fi LIBS=`echo ".$cf_slang_LIBS3" | sed -e "s@$cf_exclude@@" -e 's@^.@@'` cat > conftest.$ac_ext <<EOF -#line 8031 "configure" +#line 8033 "configure" #include "confdefs.h" #include <slang.h> int main() { SLtt_get_screen_size() ; return 0; } EOF -if { (eval echo configure:8038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_result=yes else @@ -8054,7 +8056,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:8058: checking for location of config-file" >&5 +echo "configure:8060: 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" @@ -8064,12 +8066,12 @@ echo "$ac_t""$LYNX_CFG_FILE" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:8068: checking for ANSI C header files" >&5 +echo "configure:8070: 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 8073 "configure" +#line 8075 "configure" #include "confdefs.h" #include <stdlib.h> #include <stdarg.h> @@ -8077,7 +8079,7 @@ else #include <float.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8083: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8094,7 +8096,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 8098 "configure" +#line 8100 "configure" #include "confdefs.h" #include <string.h> EOF @@ -8112,7 +8114,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 8116 "configure" +#line 8118 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -8133,7 +8135,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <<EOF -#line 8137 "configure" +#line 8139 "configure" #include "confdefs.h" #include <ctype.h> #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -8144,7 +8146,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:8148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -8168,12 +8170,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:8172: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:8174: 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 8177 "configure" +#line 8179 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/time.h> @@ -8182,7 +8184,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:8186: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -8207,12 +8209,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:8211: checking for $ac_hdr that defines DIR" >&5 +echo "configure:8213: 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 8216 "configure" +#line 8218 "configure" #include "confdefs.h" #include <sys/types.h> #include <$ac_hdr> @@ -8220,7 +8222,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:8224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -8245,7 +8247,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:8249: checking for opendir in -ldir" >&5 +echo "configure:8251: 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 @@ -8253,7 +8255,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <<EOF -#line 8257 "configure" +#line 8259 "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 @@ -8264,7 +8266,7 @@ int main() { opendir() ; return 0; } EOF -if { (eval echo configure:8268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8286,7 +8288,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:8290: checking for opendir in -lx" >&5 +echo "configure:8292: 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 @@ -8294,7 +8296,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <<EOF -#line 8298 "configure" +#line 8300 "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 @@ -8305,7 +8307,7 @@ int main() { opendir() ; return 0; } EOF -if { (eval echo configure:8309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8344,17 +8346,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:8348: checking for $ac_hdr" >&5 +echo "configure:8350: 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 8353 "configure" +#line 8355 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8360: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8382,13 +8384,13 @@ done echo $ac_n "checking termio.h and termios.h""... $ac_c" 1>&6 -echo "configure:8386: checking termio.h and termios.h" >&5 +echo "configure:8388: 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 8392 "configure" +#line 8394 "configure" #include "confdefs.h" #if HAVE_TERMIO_H @@ -8401,7 +8403,7 @@ int main() { putchar (0x0a) ; return 0; } EOF -if { (eval echo configure:8405: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_termio_and_termios=yes else @@ -8424,17 +8426,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:8428: checking for $ac_hdr" >&5 +echo "configure:8430: 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 8433 "configure" +#line 8435 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8440: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8471,17 +8473,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:8475: checking for $ac_hdr" >&5 +echo "configure:8477: 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 8480 "configure" +#line 8482 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8485: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8487: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8511,17 +8513,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:8515: checking for $ac_hdr" >&5 +echo "configure:8517: 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 8520 "configure" +#line 8522 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8525: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8527: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8562,13 +8564,13 @@ fi echo $ac_n "checking for union wait""... $ac_c" 1>&6 -echo "configure:8566: checking for union wait" >&5 +echo "configure:8568: 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 8572 "configure" +#line 8574 "configure" #include "confdefs.h" $cf_wait_headers int main() { @@ -8579,7 +8581,7 @@ int x; ; return 0; } EOF -if { (eval echo configure:8583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_type_unionwait=no echo compiles ok w/o union wait 1>&5 @@ -8590,7 +8592,7 @@ else rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 8594 "configure" +#line 8596 "configure" #include "confdefs.h" $cf_wait_headers int main() { @@ -8605,7 +8607,7 @@ union wait x; ; return 0; } EOF -if { (eval echo configure:8609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_type_unionwait=yes echo compiles ok with union wait and possibly macros too 1>&5 @@ -8632,20 +8634,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:8636: checking if union wait can be used as wait-arg" >&5 +echo "configure:8638: 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 8642 "configure" +#line 8644 "configure" #include "confdefs.h" $cf_wait_headers int main() { union wait x; wait(&x) ; return 0; } EOF -if { (eval echo configure:8649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_arg_union_wait=yes else @@ -8665,20 +8667,20 @@ EOF echo $ac_n "checking if union wait can be used as waitpid-arg""... $ac_c" 1>&6 -echo "configure:8669: checking if union wait can be used as waitpid-arg" >&5 +echo "configure:8671: 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 8675 "configure" +#line 8677 "configure" #include "confdefs.h" $cf_wait_headers int main() { union wait x; waitpid(0, &x, 0) ; return 0; } EOF -if { (eval echo configure:8682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_arg_union_waitpid=yes else @@ -8704,17 +8706,17 @@ for ac_hdr in stdarg.h varargs.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8708: checking for $ac_hdr" >&5 +echo "configure:8710: 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 8713 "configure" +#line 8715 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8741,13 +8743,13 @@ fi done echo $ac_n "checking for standard varargs""... $ac_c" 1>&6 -echo "configure:8745: checking for standard varargs" >&5 +echo "configure:8747: checking for standard varargs" >&5 if eval "test \"`echo '$''{'cf_cv_ansi_varargs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 8751 "configure" +#line 8753 "configure" #include "confdefs.h" #if HAVE_STDARG_H @@ -8762,7 +8764,7 @@ int main() { return 0;} int foo(char *fmt,...){va_list args;va_start(args,fmt);va_end(args) ; return 0; } EOF -if { (eval echo configure:8766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_ansi_varargs=yes else @@ -8782,12 +8784,12 @@ EOF echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:8786: checking for uid_t in sys/types.h" >&5 +echo "configure:8788: 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 8791 "configure" +#line 8793 "configure" #include "confdefs.h" #include <sys/types.h> EOF @@ -8816,7 +8818,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:8820: checking type of array argument to getgroups" >&5 +echo "configure:8822: 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 @@ -8824,7 +8826,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <<EOF -#line 8828 "configure" +#line 8830 "configure" #include "confdefs.h" /* Thanks to Mike Rendell for this test. */ @@ -8849,7 +8851,7 @@ main() } EOF -if { (eval echo configure:8853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -8863,7 +8865,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext <<EOF -#line 8867 "configure" +#line 8869 "configure" #include "confdefs.h" #include <unistd.h> EOF @@ -8887,12 +8889,12 @@ EOF echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:8891: checking for pid_t" >&5 +echo "configure:8893: 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 8896 "configure" +#line 8898 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -8920,12 +8922,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:8924: checking for uid_t in sys/types.h" >&5 +echo "configure:8926: 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 8929 "configure" +#line 8931 "configure" #include "confdefs.h" #include <sys/types.h> EOF @@ -8954,12 +8956,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:8958: checking for mode_t" >&5 +echo "configure:8960: 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 8963 "configure" +#line 8965 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -8990,17 +8992,17 @@ fi ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 -echo "configure:8994: checking for vfork.h" >&5 +echo "configure:8996: 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 8999 "configure" +#line 9001 "configure" #include "confdefs.h" #include <vfork.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9025,18 +9027,18 @@ else fi echo $ac_n "checking for working vfork""... $ac_c" 1>&6 -echo "configure:9029: checking for working vfork" >&5 +echo "configure:9031: 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:9035: checking for vfork" >&5 +echo "configure:9037: 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 9040 "configure" +#line 9042 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char vfork(); below. */ @@ -9059,7 +9061,7 @@ vfork(); ; return 0; } EOF -if { (eval echo configure:9063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vfork=yes" else @@ -9081,7 +9083,7 @@ fi ac_cv_func_vfork_works=$ac_cv_func_vfork else cat > conftest.$ac_ext <<EOF -#line 9085 "configure" +#line 9087 "configure" #include "confdefs.h" /* Thanks to Paul Eggert for this test. */ #include <stdio.h> @@ -9176,7 +9178,7 @@ main() { } } EOF -if { (eval echo configure:9180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_vfork_works=yes else @@ -9200,13 +9202,13 @@ fi echo $ac_n "checking if we should use fcntl or ioctl""... $ac_c" 1>&6 -echo "configure:9204: checking if we should use fcntl or ioctl" >&5 +echo "configure:9206: 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 9210 "configure" +#line 9212 "configure" #include "confdefs.h" #include <sys/types.h> @@ -9218,7 +9220,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:9222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_fionbio=ioctl else @@ -9227,7 +9229,7 @@ else rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 9231 "configure" +#line 9233 "configure" #include "confdefs.h" #include <sys/types.h> @@ -9244,7 +9246,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:9248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_fionbio=fcntl else @@ -9267,20 +9269,20 @@ EOF echo $ac_n "checking for broken/missing definition of remove""... $ac_c" 1>&6 -echo "configure:9271: checking for broken/missing definition of remove" >&5 +echo "configure:9273: 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 9277 "configure" +#line 9279 "configure" #include "confdefs.h" #include <stdio.h> int main() { remove("dummy") ; return 0; } EOF -if { (eval echo configure:9284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_baddef_remove=no else @@ -9288,7 +9290,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 9292 "configure" +#line 9294 "configure" #include "confdefs.h" #include <stdio.h> int __unlink(name) { return unlink(name); } @@ -9296,7 +9298,7 @@ int main() { remove("dummy") ; return 0; } EOF -if { (eval echo configure:9300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_baddef_remove=yes else @@ -9320,13 +9322,13 @@ EOF echo $ac_n "checking for lstat""... $ac_c" 1>&6 -echo "configure:9324: checking for lstat" >&5 +echo "configure:9326: 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 9330 "configure" +#line 9332 "configure" #include "confdefs.h" #include <sys/types.h> @@ -9335,7 +9337,7 @@ int main() { lstat(".", (struct stat *)0) ; return 0; } EOF -if { (eval echo configure:9339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_lstat=yes else @@ -9369,12 +9371,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9373: checking for $ac_func" >&5 +echo "configure:9375: 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 9378 "configure" +#line 9380 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -9397,7 +9399,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:9401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -9427,12 +9429,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9431: checking for $ac_func" >&5 +echo "configure:9433: 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 9436 "configure" +#line 9438 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -9455,7 +9457,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:9459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -9486,12 +9488,12 @@ for ac_func in strstr do echo $ac_n "checking for $ac_func declaration""... $ac_c" 1>&6 -echo "configure:9490: checking for $ac_func declaration" >&5 +echo "configure:9492: 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 9495 "configure" +#line 9497 "configure" #include "confdefs.h" #include <string.h> int main() { @@ -9500,11 +9502,11 @@ extern int ${ac_func}(); #endif ; return 0; } EOF -if { (eval echo configure:9504: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 9508 "configure" +#line 9510 "configure" #include "confdefs.h" #include <string.h> int main() { @@ -9513,7 +9515,7 @@ int (*p)() = ${ac_func}; #endif ; return 0; } EOF -if { (eval echo configure:9517: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_decl_$ac_func=yes" @@ -9555,12 +9557,12 @@ for ac_func in getgrgid getgrnam do echo $ac_n "checking for $ac_func declaration""... $ac_c" 1>&6 -echo "configure:9559: checking for $ac_func declaration" >&5 +echo "configure:9561: 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 9564 "configure" +#line 9566 "configure" #include "confdefs.h" #include <stdio.h> @@ -9571,11 +9573,11 @@ extern int ${ac_func}(); #endif ; return 0; } EOF -if { (eval echo configure:9575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 9579 "configure" +#line 9581 "configure" #include "confdefs.h" #include <stdio.h> @@ -9586,7 +9588,7 @@ int (*p)() = ${ac_func}; #endif ; return 0; } EOF -if { (eval echo configure:9590: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9592: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_decl_$ac_func=yes" @@ -9628,13 +9630,13 @@ done echo $ac_n "checking if TRUE/FALSE are defined""... $ac_c" 1>&6 -echo "configure:9632: checking if TRUE/FALSE are defined" >&5 +echo "configure:9634: 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 9638 "configure" +#line 9640 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -9643,7 +9645,7 @@ int main() { int x = TRUE, y = FALSE ; return 0; } EOF -if { (eval echo configure:9647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_bool_defs=yes else @@ -9670,13 +9672,13 @@ fi echo $ac_n "checking declaration of errno""... $ac_c" 1>&6 -echo "configure:9674: checking declaration of errno" >&5 +echo "configure:9676: 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 9680 "configure" +#line 9682 "configure" #include "confdefs.h" #if HAVE_STDLIB_H @@ -9689,7 +9691,7 @@ int main() { long x = (long) errno ; return 0; } EOF -if { (eval echo configure:9693: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval 'cf_cv_dcl_'errno'=yes' else @@ -9719,9 +9721,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:9723: checking existence of errno" >&5 +echo "configure:9725: checking existence of errno" >&5 cat > conftest.$ac_ext <<EOF -#line 9725 "configure" +#line 9727 "configure" #include "confdefs.h" #undef errno @@ -9731,7 +9733,7 @@ int main() { errno = 2 ; return 0; } EOF -if { (eval echo configure:9735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval 'cf_cv_have_'errno'=yes' else @@ -9761,20 +9763,20 @@ EOF echo $ac_n "checking for setlocale()""... $ac_c" 1>&6 -echo "configure:9765: checking for setlocale()" >&5 +echo "configure:9767: 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 9771 "configure" +#line 9773 "configure" #include "confdefs.h" #include <locale.h> int main() { setlocale(LC_ALL, "") ; return 0; } EOF -if { (eval echo configure:9778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_locale=yes else @@ -9795,13 +9797,13 @@ EOF echo $ac_n "checking if NGROUPS is defined""... $ac_c" 1>&6 -echo "configure:9799: checking if NGROUPS is defined" >&5 +echo "configure:9801: 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 9805 "configure" +#line 9807 "configure" #include "confdefs.h" #if HAVE_SYS_PARAM_H @@ -9815,7 +9817,7 @@ int main() { int x = NGROUPS ; return 0; } EOF -if { (eval echo configure:9819: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_ngroups=yes else @@ -9823,7 +9825,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 9827 "configure" +#line 9829 "configure" #include "confdefs.h" #if HAVE_SYS_PARAM_H @@ -9837,7 +9839,7 @@ int main() { int x = NGROUPS_MAX ; return 0; } EOF -if { (eval echo configure:9841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_ngroups=NGROUPS_MAX else @@ -9871,13 +9873,13 @@ for cf_name in sys_nerr sys_errlist do echo $ac_n "checking declaration of $cf_name""... $ac_c" 1>&6 -echo "configure:9875: checking declaration of $cf_name" >&5 +echo "configure:9877: 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 9881 "configure" +#line 9883 "configure" #include "confdefs.h" #if HAVE_STDLIB_H @@ -9890,7 +9892,7 @@ int main() { long x = (long) $cf_name ; return 0; } EOF -if { (eval echo configure:9894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval 'cf_cv_dcl_'$cf_name'=yes' else @@ -9920,9 +9922,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:9924: checking existence of $cf_name" >&5 +echo "configure:9926: checking existence of $cf_name" >&5 cat > conftest.$ac_ext <<EOF -#line 9926 "configure" +#line 9928 "configure" #include "confdefs.h" #undef $cf_name @@ -9932,7 +9934,7 @@ int main() { $cf_name = 2 ; return 0; } EOF -if { (eval echo configure:9936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval 'cf_cv_have_'$cf_name'=yes' else @@ -9963,13 +9965,13 @@ done echo $ac_n "checking if struct utmp is declared""... $ac_c" 1>&6 -echo "configure:9967: checking if struct utmp is declared" >&5 +echo "configure:9969: 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 9973 "configure" +#line 9975 "configure" #include "confdefs.h" #include <sys/types.h> @@ -9978,7 +9980,7 @@ int main() { struct utmp x; char *y = &x.ut_host[0] ; return 0; } EOF -if { (eval echo configure:9982: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9984: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_have_utmp=yes else @@ -9986,14 +9988,14 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 9990 "configure" +#line 9992 "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:9997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9999: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_have_utmp=utmpx else @@ -10022,13 +10024,13 @@ EOF echo $ac_n "checking if character set is EBCDIC""... $ac_c" 1>&6 -echo "configure:10026: checking if character set is EBCDIC" >&5 +echo "configure:10028: checking if character set is EBCDIC" >&5 if eval "test \"`echo '$''{'cf_cv_ebcdic'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 10032 "configure" +#line 10034 "configure" #include "confdefs.h" int main() { @@ -10041,7 +10043,7 @@ make an error "Character set is not EBCDIC" #endif ; return 0; } EOF -if { (eval echo configure:10045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10047: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # TryCompile action if true cf_cv_ebcdic=yes @@ -10075,7 +10077,7 @@ esac if test $cf_cv_screen != slang ; then echo $ac_n "checking if curses supports alternate-character set""... $ac_c" 1>&6 -echo "configure:10079: checking if curses supports alternate-character set" >&5 +echo "configure:10081: 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 @@ -10083,7 +10085,7 @@ else for mapname in acs_map _acs_map do cat > conftest.$ac_ext <<EOF -#line 10087 "configure" +#line 10089 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -10092,7 +10094,7 @@ int main() { chtype x = $mapname['l']; $mapname['m'] = 0 ; return 0; } EOF -if { (eval echo configure:10096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_alt_char_set=$mapname break @@ -10115,13 +10117,13 @@ EOF echo $ac_n "checking if curses supports fancy attributes""... $ac_c" 1>&6 -echo "configure:10119: checking if curses supports fancy attributes" >&5 +echo "configure:10121: 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 10125 "configure" +#line 10127 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -10134,7 +10136,7 @@ attrset(A_UNDERLINE|A_BOLD|A_REVERSE); ; return 0; } EOF -if { (eval echo configure:10138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_fancy_curses=yes else @@ -10154,7 +10156,7 @@ EOF echo $ac_n "checking for ncurses version""... $ac_c" 1>&6 -echo "configure:10158: checking for ncurses version" >&5 +echo "configure:10160: 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 @@ -10179,7 +10181,7 @@ Autoconf "old" #endif EOF cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out" - { (eval echo configure:10183: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; } + { (eval echo configure:10185: \"$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" @@ -10188,7 +10190,7 @@ EOF else cat > conftest.$ac_ext <<EOF -#line 10192 "configure" +#line 10194 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -10211,7 +10213,7 @@ int main() exit(0); } EOF -if { (eval echo configure:10215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then cf_cv_ncurses_version=`cat $cf_tempfile` @@ -10231,13 +10233,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:10235: checking for obsolete/broken version of ncurses" >&5 +echo "configure:10237: 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 10241 "configure" +#line 10243 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -10251,7 +10253,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:10255: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_ncurses_broken=no else @@ -10276,13 +10278,13 @@ fi echo $ac_n "checking if curses supports color attributes""... $ac_c" 1>&6 -echo "configure:10280: checking if curses supports color attributes" >&5 +echo "configure:10282: 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 10286 "configure" +#line 10288 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -10297,7 +10299,7 @@ chtype x = COLOR_BLUE; ; return 0; } EOF -if { (eval echo configure:10301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_color_curses=yes else @@ -10324,7 +10326,7 @@ fi echo $ac_n "checking declaration of size-change""... $ac_c" 1>&6 -echo "configure:10328: checking declaration of size-change" >&5 +echo "configure:10330: 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 @@ -10338,7 +10340,7 @@ do CFLAGS="$cf_save_CFLAGS" test -n "$cf_opts" && CFLAGS="$CFLAGS -D$cf_opts" cat > conftest.$ac_ext <<EOF -#line 10342 "configure" +#line 10344 "configure" #include "confdefs.h" #include <sys/types.h> #if HAVE_TERMIOS_H @@ -10377,7 +10379,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:10381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_sizechange=yes else @@ -10409,20 +10411,20 @@ EOF echo $ac_n "checking if ttytype is declared in curses library""... $ac_c" 1>&6 -echo "configure:10413: checking if ttytype is declared in curses library" >&5 +echo "configure:10415: 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 10419 "configure" +#line 10421 "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:10426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_have_ttytype=yes else @@ -10450,12 +10452,12 @@ EOF do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10454: checking for $ac_func" >&5 +echo "configure:10456: 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 10459 "configure" +#line 10461 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -10478,7 +10480,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:10482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -10508,7 +10510,7 @@ fi echo $ac_n "checking if configuration info should be browsable""... $ac_c" 1>&6 -echo "configure:10512: checking if configuration info should be browsable" >&5 +echo "configure:10514: checking if configuration info should be browsable" >&5 # Check whether --enable-config-info or --disable-config-info was given. if test "${enable_config_info+set}" = set; then @@ -10532,7 +10534,7 @@ EOF echo $ac_n "checking if new-style forms-based options screen should be used""... $ac_c" 1>&6 -echo "configure:10536: checking if new-style forms-based options screen should be used" >&5 +echo "configure:10538: checking if new-style forms-based options screen should be used" >&5 # Check whether --enable-forms-options or --disable-forms-options was given. if test "${enable_forms_options+set}" = set; then @@ -10556,7 +10558,7 @@ EOF echo $ac_n "checking if old-style options menu should be used""... $ac_c" 1>&6 -echo "configure:10560: checking if old-style options menu should be used" >&5 +echo "configure:10562: checking if old-style options menu should be used" >&5 # Check whether --enable-menu-options or --disable-menu-options was given. if test "${enable_menu_options+set}" = set; then @@ -10580,7 +10582,7 @@ EOF echo $ac_n "checking if experimental address-list page should be used""... $ac_c" 1>&6 -echo "configure:10584: checking if experimental address-list page should be used" >&5 +echo "configure:10586: checking if experimental address-list page should be used" >&5 # Check whether --enable-addrlist-page or --disable-addrlist-page was given. if test "${enable_addrlist_page+set}" = set; then @@ -10604,7 +10606,7 @@ EOF echo $ac_n "checking if experimental alternative line-edit bindings should be used""... $ac_c" 1>&6 -echo "configure:10608: checking if experimental alternative line-edit bindings should be used" >&5 +echo "configure:10610: checking if experimental alternative line-edit bindings should be used" >&5 # Check whether --enable-alt-bindings or --disable-alt-bindings was given. if test "${enable_alt_bindings+set}" = set; then @@ -10628,7 +10630,7 @@ EOF echo $ac_n "checking if color-style code should be used""... $ac_c" 1>&6 -echo "configure:10632: checking if color-style code should be used" >&5 +echo "configure:10634: 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 @@ -10658,6 +10660,10 @@ if test $use_color_style != no ; then EOF cat >> confdefs.h <<\EOF +#define USE_PSRC 1 +EOF + + cat >> confdefs.h <<\EOF #define LINKEDSTYLES 1 EOF @@ -10676,7 +10682,7 @@ EOF echo "$ac_t""yes" 1>&6 echo $ac_n "checking for location of style-sheet file""... $ac_c" 1>&6 -echo "configure:10680: checking for location of style-sheet file" >&5 +echo "configure:10686: 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" @@ -10694,7 +10700,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:10698: checking if you want to use default-colors" >&5 +echo "configure:10704: 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 @@ -10719,7 +10725,7 @@ EOF fi echo $ac_n "checking if experimental keyboard-layout logic should be used""... $ac_c" 1>&6 -echo "configure:10723: checking if experimental keyboard-layout logic should be used" >&5 +echo "configure:10729: checking if experimental keyboard-layout logic should be used" >&5 # Check whether --enable-kbd-layout or --disable-kbd-layout was given. if test "${enable_kbd_layout+set}" = set; then @@ -10743,7 +10749,7 @@ EOF echo $ac_n "checking if experimental JavaScript support should be used""... $ac_c" 1>&6 -echo "configure:10747: checking if experimental JavaScript support should be used" >&5 +echo "configure:10753: checking if experimental JavaScript support should be used" >&5 # Check whether --enable-libjs or --disable-libjs was given. if test "${enable_libjs+set}" = set; then @@ -10767,7 +10773,7 @@ EOF echo $ac_n "checking if experimental persistent-cookie logic should be used""... $ac_c" 1>&6 -echo "configure:10771: checking if experimental persistent-cookie logic should be used" >&5 +echo "configure:10777: 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 @@ -10790,11 +10796,35 @@ test $use_filed_cookies != no && cat >> confdefs.h <<\EOF EOF +echo $ac_n "checking if source caching should be used""... $ac_c" 1>&6 +echo "configure:10801: checking if source caching should be used" >&5 + +# Check whether --enable-source-cache or --disable-source-cache was given. +if test "${enable_source_cache+set}" = set; then + enableval="$enable_source_cache" + test "$enableval" != yes && enableval=no + if test "$enableval" != "no" ; then + use_source_cache=$enableval + else + use_source_cache=no + fi +else + enableval=no + use_source_cache=no + +fi + +echo "$ac_t""$use_source_cache" 1>&6 +test $use_source_cache != no && cat >> confdefs.h <<\EOF +#define SOURCE_CACHE 1 +EOF + + echo $ac_n "checking if you want to use extended HTML DTD logic""... $ac_c" 1>&6 -echo "configure:10798: checking if you want to use extended HTML DTD logic" >&5 +echo "configure:10828: 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 @@ -10818,7 +10848,7 @@ EOF echo $ac_n "checking if partial-display should be used""... $ac_c" 1>&6 -echo "configure:10822: checking if partial-display should be used" >&5 +echo "configure:10852: checking if partial-display should be used" >&5 # Check whether --enable-partial or --disable-partial was given. if test "${enable_partial+set}" = set; then @@ -10842,7 +10872,7 @@ EOF echo $ac_n "checking if you want to use external commands""... $ac_c" 1>&6 -echo "configure:10846: checking if you want to use external commands" >&5 +echo "configure:10876: 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 @@ -10866,7 +10896,7 @@ EOF echo $ac_n "checking if you want to use setfont support""... $ac_c" 1>&6 -echo "configure:10870: checking if you want to use setfont support" >&5 +echo "configure:10900: 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 @@ -10890,7 +10920,7 @@ EOF echo $ac_n "checking if you want cgi-link support""... $ac_c" 1>&6 -echo "configure:10894: checking if you want cgi-link support" >&5 +echo "configure:10924: 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 @@ -10909,7 +10939,7 @@ fi echo "$ac_t""$enableval" 1>&6 echo $ac_n "checking if you want exec-links support""... $ac_c" 1>&6 -echo "configure:10913: checking if you want exec-links support" >&5 +echo "configure:10943: 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 @@ -10928,7 +10958,7 @@ fi echo "$ac_t""$enableval" 1>&6 echo $ac_n "checking if you want exec-scripts support""... $ac_c" 1>&6 -echo "configure:10932: checking if you want exec-scripts support" >&5 +echo "configure:10962: 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 @@ -10947,7 +10977,7 @@ fi echo "$ac_t""$enableval" 1>&6 echo $ac_n "checking if you want internal-links feature""... $ac_c" 1>&6 -echo "configure:10951: checking if you want internal-links feature" >&5 +echo "configure:10981: 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 @@ -10971,7 +11001,7 @@ EOF echo $ac_n "checking if you want to fork NSL requests""... $ac_c" 1>&6 -echo "configure:10975: checking if you want to fork NSL requests" >&5 +echo "configure:11005: 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 @@ -10995,7 +11025,7 @@ EOF echo $ac_n "checking if you want to log URL requests via syslog""... $ac_c" 1>&6 -echo "configure:10999: checking if you want to log URL requests via syslog" >&5 +echo "configure:11029: 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 @@ -11019,7 +11049,7 @@ EOF echo $ac_n "checking if you want to underline links""... $ac_c" 1>&6 -echo "configure:11023: checking if you want to underline links" >&5 +echo "configure:11053: checking if you want to underline links" >&5 # Check whether --enable-underlines or --disable-underlines was given. if test "${enable_underlines+set}" = set; then @@ -11043,7 +11073,7 @@ EOF echo $ac_n "checking if help files should be gzip'ed""... $ac_c" 1>&6 -echo "configure:11047: checking if help files should be gzip'ed" >&5 +echo "configure:11077: 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 @@ -11072,7 +11102,7 @@ fi echo $ac_n "checking if you want to use zlib for decompression of some gzip files""... $ac_c" 1>&6 -echo "configure:11076: checking if you want to use zlib for decompression of some gzip files" >&5 +echo "configure:11106: 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 @@ -11089,12 +11119,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:11093: checking for gzopen" >&5 +echo "configure:11123: 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 11098 "configure" +#line 11128 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char gzopen(); below. */ @@ -11117,7 +11147,7 @@ gzopen(); ; return 0; } EOF -if { (eval echo configure:11121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gzopen=yes" else @@ -11137,17 +11167,17 @@ else cf_save_LIBS="$LIBS" echo $ac_n "checking for gzopen in -lz""... $ac_c" 1>&6 -echo "configure:11141: checking for gzopen in -lz" >&5 +echo "configure:11171: checking for gzopen in -lz" >&5 LIBS="-lz $LIBS" cat > conftest.$ac_ext <<EOF -#line 11144 "configure" +#line 11174 "configure" #include "confdefs.h" #include <zlib.h> int main() { gzopen("name","mode") ; return 0; } EOF -if { (eval echo configure:11151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cf_cv_have_lib_z=yes @@ -11174,17 +11204,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:11178: checking for -lz in $cf_libdir" >&5 +echo "configure:11208: checking for -lz in $cf_libdir" >&5 LIBS="-L$cf_libdir -lz $cf_save_LIBS" cat > conftest.$ac_ext <<EOF -#line 11181 "configure" +#line 11211 "configure" #include "confdefs.h" #include <zlib.h> int main() { gzopen("name","mode") ; return 0; } EOF -if { (eval echo configure:11188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cf_cv_have_lib_z=yes @@ -11220,7 +11250,7 @@ EOF fi echo $ac_n "checking if you want to exclude FINGER code""... $ac_c" 1>&6 -echo "configure:11224: checking if you want to exclude FINGER code" >&5 +echo "configure:11254: checking if you want to exclude FINGER code" >&5 # Check whether --enable-finger or --disable-finger was given. if test "${enable_finger+set}" = set; then @@ -11244,7 +11274,7 @@ EOF echo $ac_n "checking if you want to exclude GOPHER code""... $ac_c" 1>&6 -echo "configure:11248: checking if you want to exclude GOPHER code" >&5 +echo "configure:11278: checking if you want to exclude GOPHER code" >&5 # Check whether --enable-gopher or --disable-gopher was given. if test "${enable_gopher+set}" = set; then @@ -11268,7 +11298,7 @@ EOF echo $ac_n "checking if you want to exclude NEWS code""... $ac_c" 1>&6 -echo "configure:11272: checking if you want to exclude NEWS code" >&5 +echo "configure:11302: checking if you want to exclude NEWS code" >&5 # Check whether --enable-news or --disable-news was given. if test "${enable_news+set}" = set; then @@ -11292,7 +11322,7 @@ EOF echo $ac_n "checking if you want to exclude FTP code""... $ac_c" 1>&6 -echo "configure:11296: checking if you want to exclude FTP code" >&5 +echo "configure:11326: checking if you want to exclude FTP code" >&5 # Check whether --enable-ftp or --disable-ftp was given. if test "${enable_ftp+set}" = set; then @@ -11321,7 +11351,7 @@ EOF # All DirEd functions that were enabled on compilation can be disabled # or modified at run time via DIRED_MENU symbols in lynx.cfg. echo $ac_n "checking if directory-editor code should be used""... $ac_c" 1>&6 -echo "configure:11325: checking if directory-editor code should be used" >&5 +echo "configure:11355: 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 @@ -11347,7 +11377,7 @@ EOF echo $ac_n "checking if you wish to allow extracting from archives via DirEd""... $ac_c" 1>&6 -echo "configure:11351: checking if you wish to allow extracting from archives via DirEd" >&5 +echo "configure:11381: 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 @@ -11366,7 +11396,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:11370: checking if you wish to allow users to redefine DirEd keys" >&5 +echo "configure:11400: 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 @@ -11392,7 +11422,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:11396: checking if you wish to allow permissions commands via DirEd" >&5 +echo "configure:11426: 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 @@ -11418,7 +11448,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:11422: checking if you wish to allow executable-permission commands via DirEd" >&5 +echo "configure:11452: 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 @@ -11437,7 +11467,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:11441: checking if you wish to allow "tar" commands from DirEd" >&5 +echo "configure:11471: 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 @@ -11463,7 +11493,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:11467: checking if you wish to allow "uudecode" commands from DirEd" >&5 +echo "configure:11497: 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 @@ -11489,7 +11519,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:11493: checking if you wish to allow "zip" and "unzip" commands from DirEd" >&5 +echo "configure:11523: 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 @@ -11515,7 +11545,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:11519: checking if you wish to allow "gzip" and "gunzip" commands from DirEd" >&5 +echo "configure:11549: 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 @@ -11542,7 +11572,7 @@ fi fi echo $ac_n "checking if you want long-directory listings""... $ac_c" 1>&6 -echo "configure:11546: checking if you want long-directory listings" >&5 +echo "configure:11576: 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 @@ -11568,7 +11598,7 @@ fi echo "$ac_t""$enableval" 1>&6 echo $ac_n "checking if parent-directory references are permitted""... $ac_c" 1>&6 -echo "configure:11572: checking if parent-directory references are permitted" >&5 +echo "configure:11602: 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 @@ -11588,7 +11618,7 @@ echo "$ac_t""$enableval" 1>&6 echo $ac_n "checking if we can include termio.h with curses""... $ac_c" 1>&6 -echo "configure:11592: checking if we can include termio.h with curses" >&5 +echo "configure:11622: checking if we can include termio.h with curses" >&5 if eval "test \"`echo '$''{'cf_cv_termio_and_curses'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11597,7 +11627,7 @@ else CFLAGS="$CFLAGS -DHAVE_CONFIG_H -I. -I${srcdir-.} -I${srcdir-.}/src -I${srcdir-.}/WWW/Library/Implementation" touch lynx_cfg.h cat > conftest.$ac_ext <<EOF -#line 11601 "configure" +#line 11631 "configure" #include "confdefs.h" #include <LYCurses.h> @@ -11606,7 +11636,7 @@ int main() { putchar(0x0a) ; return 0; } EOF -if { (eval echo configure:11610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_termio_and_curses=yes else diff --git a/configure.in b/configure.in index df98b507..0a01f9a2 100644 --- a/configure.in +++ b/configure.in @@ -263,6 +263,7 @@ dgux*) ;; hpux*) CFLAGS="$CFLAGS -DSNAKE" + test -z "$GCC" && TRY_CFLAGS="$TRY_CFLAGS -Wp,-H600000" ;; isc*) # -DPOSIX_JC is necessary, else LYBookmark.c never finds out what a mode_t is. @@ -581,6 +582,7 @@ if test $use_color_style != no ; then AC_ERROR(Configuration does not support color-styles) fi AC_DEFINE(USE_HASH) + AC_DEFINE(USE_PSRC) AC_DEFINE(LINKEDSTYLES) fi @@ -640,6 +642,14 @@ CF_ARG_ENABLE(persistent-cookies, AC_MSG_RESULT($use_filed_cookies) test $use_filed_cookies != no && AC_DEFINE(EXP_PERSISTENT_COOKIES) +AC_MSG_CHECKING(if source caching should be used) +CF_ARG_ENABLE(source-cache, +[ --enable-source-cache cache HTML source for parse mode changes], + [use_source_cache=$enableval], + [use_source_cache=no]) +AC_MSG_RESULT($use_source_cache) +test $use_source_cache != no && AC_DEFINE(SOURCE_CACHE) + dnl -------------------------------------------------------------------------- dnl Miscellaneous options that don't need to test system features dnl -------------------------------------------------------------------------- diff --git a/lynx.cfg b/lynx.cfg index 0c41e837..3161094c 100644 --- a/lynx.cfg +++ b/lynx.cfg @@ -33,15 +33,22 @@ # ^^^^^^^^^^^^^^^^^^^^^^^ or whatever is appropriate on your system #and now your own tweaks. -# -# STARTFILE is the default URL if none is specified on the command line -# or via a WWW_HOME environment variable. -# Note: these files can be remote (http://www.w3.org/default.html) -# or local (file://localhost/PATH_TO/FILENAME -# replace PATH_TO with the complete path to FILENAME -# use Unix SHELL syntax and include the device on VMS systems) -# -STARTFILE:http://lynx.browser.org/ +# STARTFILE is the default starting URL if none is specified +# on the command line or via a WWW_HOME environment variable; +# Lynx will refuse to start without a starting URL of some kind. +# STARTFILE can be remote, e.g. http://www.w3.org/default.html , +# or local, e.g. file://localhost/PATH_TO/FILENAME , +# where PATH_TO is replaced with the complete path to FILENAME +# using Unix shell syntax and including the device on VMS. +# The default offered for ordinary users is their current directory: +STARTFILE:. +# +# *** NBB *** System administrators with ANONYMOUS USERS !!! +# set STARTFILE to a REMOTE FILE by uncommenting the next line: +#STARTFILE:http://lynx.browser.org/ +# and commenting out the default offered above; +# you may, of course, choose to replace `lynx.browser.org' +# with another remote/local file which you know to be safe. # HELPFILE must be defined as a URL and must have a # complete path if local: @@ -513,6 +520,20 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html #DEFAULT_CACHE_SIZE:10 #DEFAULT_VIRTUAL_MEMORY_SIZE:512000 +# SOURCE_CACHE sets the source caching behavior for Lynx: +# FILE causes Lynx to keep a temporary file for each cached document +# containing the HTML source of the document, which it uses to regenerate +# the document when certain settings are changed (for instance, +# historical vs. minimal vs. valid comment parsing) instead of reloading +# the source from the network. +# MEMORY is like FILE, except the document source is kept in memory. You +# may wish to adjust DEFAULT_CACHE_SIZE and DEFAULT_VIRTUAL_MEMORY_SIZE +# accordingly. +# NONE is the default; the document source is not cached, and is reloaded +# from the network when needed. +# +#SOURCE_CACHE:NONE + # If ALWAYS_RESUBMIT_POSTS is set TRUE, Lynx always will resubmit forms # with method POST, dumping any cache from a previous submission of the # form, including when the document returned by that form is sought with @@ -1645,7 +1666,7 @@ MINIMAL_COMMENTS:TRUE # If TOGGLE_HELP is mapped, in novice mode the second help menu line # can be toggled among NOVICE_LINE_TWO_A, _B, and _C, as defined in -# userdefs.h. Otherwise, it will be NOVICE_LINE_TWO. +# LYMessages_en.h Otherwise, it will be NOVICE_LINE_TWO. # #KEYMAP:O:TOGGLE_HELP # Show other commands in the novice help menu @@ -1926,3 +1947,103 @@ MINIMAL_COMMENTS:TRUE # RULE:Pass finger://*@localhost/ # allow this, # RULE:Fail finger:* # but not others # RULE:Map http://old.server/* http://new.server/* + + +# Pretty source view settings. These settings are in effect when -prettysrc +# was specified. +# The following lexical elements (lexems) are recognised: +# comment, tag, attribute, attribute value, generalized angle brackets ( +# '<' '>' '</' ), entity, hyperlink destination , entire file,bad sequence, +# bad tag, bad attribute, sgml special. +# The following group of option tells which styles will surround each +# lexem. The syntax of option in this group is: +#HTMLSRC_<LEXEMNAME>:<TAGSPEC>:<TAGSPEC> +# The first <TAGSPEC> specifies what tags will precede lexems of that class +# in the internal html markup. The second - what will be placed (internally) +# after it. +# TAGSPEC has the following syntax: +# <TAGSPEC>:= [ (<TAGOPEN> | <TAGCLOSE>) <SPACE>+ ]* +# <TAGOPEN>:= tagname[.classname] +# <TAGCLOSE>:= !tagname +# +# The following table gives correspondence between lexem and lexem name +# Lexem LEXEMNAME FURTHER EXPLANATION +# ------------------------------------ +# comment COMM +# tag TAG everything in gen. brackets +# attribute ATTRIB +# attribute value ATTRVAL +# generalized brackets ABRACKET < > </ +# entity ENTITY +# hyperlink destination HREF +# entire file ENTIRE +# bad sequence BADSEQ bad entity or invalid construct at text +# level. +# bad tag BADTAG Unrecognized contruct in generalized +# brackets. +# bad attribute BADATTR The name of the attribute unknown to lynx +# of the tag known to lynx. (ie +# attributes of unknown tags will have +# markup of ATTRIB) +# sgml special SGMLSPECIAL doctype, sgmlelt, sgmlele, +# sgmlattlist, marked section, identifier +# +# Notes: +# 1) The markup for HTML_ENTIRE will be emitted only once - it will surround +# entire file source. +# 2) The tagnames specified by TAGPEC should be valid html tag names. +# 3) If the tag/class comblination given by TAGOPEN is not assigned a color +# style in lss file (for lynx compiled with lss support), that tag/class +# combination will be anyway emitted during internal html markup. Such +# combinations will be also reported to the trace log. +# 4) Lexem 'tag' means everything contained in generalized angle brackets +# 5) Angle brackets of html specials won't be surrounded by markup for ABRACKET +# +# Examples: +# HTMLSRC_COMM:B I:!I !B +# - html comments will be surrounded by <b><i> and </i></b> in the +# internal html markup +# HTMLSRC_ATTRVAL: span.attrval : !span +# - values of the attributes will be surrounded by the +# <SPAN class=attrval> </SPAN> +# HTMLSRC_HREF:: +# - no special html markup will surround hyperlink destinations ( +# this means that only default color style for hrefs will be applied +# to them) +# +# For lynx compiled with lss support, the following settings are the default: +#HTMLSRC_COMM:span.htmlsrc_comment:!span +#HTMLSRC_TAG:span.htmlsrc_tag:!span +#HTMLSRC_ATTRIB:span.htmlsrc_attrib:!span +#HTMLSRC_ATTRVAL:span.htmlsrc_attrval:!span +#HTMLSRC_ABRACKET:span.htmlsrc_abracket:!span +#HTMLSRC_ENTITY:span.htmlsrc_entity:!span +#HTMLSRC_HREF:span.htmlsrc_href:!span +#HTMLSRC_ENTIRE:span.htmlsrc_entire:!span +#HTMLSRC_BADSEQ:span.htmlsrc_badseq:!span +#HTMLSRC_BADTAG:span.htmlsrc_badtag:!span +#HTMLSRC_BADATTR:span.htmlsrc_badattr:!span +#HTMLSRC_SGMLSPECIAL:span.htmlsrc_sgmlspecial:!span +# the styles corresponding to them are present in sample .lss file. +# For lynx compiled without lss support, the following settings are the default: +#HTMLSRC_COMM:b:!b +#HTMLSRC_TAG:b:!b +#HTMLSRC_ATTRIB:: +#HTMLSRC_ATTRVAL:!b:b +#HTMLSRC_ABRACKET:b:!b +#HTMLSRC_ENTITY:b:!b +#HTMLSRC_HREF:: +#HTMLSRC_ENTIRE:: +#HTMLSRC_BADSEQ:b:!b +#HTMLSRC_BADTAG:: +#HTMLSRC_BADATTR:!b:b +#HTMLSRC_SGMLSPECIAL:b:!b +# +# Other source-view related options: +# +# Options HTMLSRC_TAGNAME_XFORM and HTMLSRC_ATTRNAME_XFORM control the way the +# names of tags and names of attributes are transformed correspondingly. +# Possible values: 0 - lowercase, 1 - leave as is, 2 - uppercase. +#HTMLSRC_TAGNAME_XFORM:2 +#HTMLSRC_ATTRNAME_XFORM:2 + diff --git a/lynx_help/Lynx_users_guide.html b/lynx_help/Lynx_users_guide.html index ab895c39..a0b8d504 100644 --- a/lynx_help/Lynx_users_guide.html +++ b/lynx_help/Lynx_users_guide.html @@ -1327,6 +1327,8 @@ options from a list, and fields for entering text. entry field. NOTE, however, that <em>Return</em> also will <a href="#submit">submit</a> the form if the text entry field is the only non-hidden field in the form. + +<dt>TEXTAREA Fields <dd>TEXTAREA fields are handled as if they were a series of text entry (INPUT) fields for which successive lines imply a newline at the end of the preceding line. You enter text on each line to construct the overall @@ -1336,7 +1338,44 @@ options from a list, and fields for entering text. or next line of the overall message, as for INPUT fields, and the <em>TAB</em> key will move you down beyond the bottom of the TEXTAREA field, or to the first line on the next page if the overall field - extends beyond the currently displayed page. + extends beyond the currently displayed page.<P> + +<dt>Editing TEXTAREA Fields +<dd>TEXTAREA fields can be edited using an external editor + by entering <em>^ve</em> when in the TEXTAREA.<p> + + You can also use two other special TEXTAREA functions + by adding KEYMAP bindings to your <em>lynx.cfg</em> file, e.g.<p> + + KEYMAP:$:GROWTEXTAREA<br> + KEYMAP:#:INSERTFILE<p> + + With these binding -- you can choose other keys -- ,<br> + (in a TEXTAREA only) <em>^v$</em> adds 5 lines to the TEXTAREA + and <em>^v#</em> brings up the name of an existing file + to be inserted into the TEXTAREA (above the cursorline). + An automatic variation is normally compiled in, + so that hitting <em>Enter</em> with the cursor on the last line + adds a new line to the TEXTAREA, with the cursor on it.<p> + + Some flavors of UNIX, shells & terminal settings require + that you enter <em>^v^ve</em> in order to start the editor, + as they also use <em>^v</em> as default command-line quote key + (called `lnext' in stty man pages and `stty -a' output); + to avoid this, you can put `stty lnext undef' in .cshrc + or invoke Lynx with a wrapper script, e.g.<p> + + <code> + #!/bin/sh<br> + stty lnext undef<br> + $HOME/bin/lynx "$@"<br> + stty lnext ^V<br> + exit</code><p> + + NB when NOT in a TEXTAREA, <em>^v</em> is the default command + to switch between SortaSGML and TagSoup HTML parsing + (i.e., SWITCH_DTD ). + </dl> In general, you can move around the form using the standard Lynx navigation diff --git a/lynx_help/lynx-dev.html b/lynx_help/lynx-dev.html index c9076cfb..1a97ad1f 100644 --- a/lynx_help/lynx-dev.html +++ b/lynx_help/lynx-dev.html @@ -7,116 +7,128 @@ <body> <banner> -[ <a href="http://www.flora.org/lynx-dev/html/">Lynx-Dev Archives</a> | +[ <a href="http://www.flora.org/lynx-dev">Lynx-Dev Archive</a> | <a href="about_lynx.html">About Lynx</a> ] </banner> -<h1><em>Lynx-Dev Discussion List</em></h1> +<h1><em>The Lynx Development Process</em></h1> -Lynx-dev is a majordomo mailing list used by developers and -interested users as a forum to discuss the further development of -the Lynx World Wide Web browser. Topic issues include fixing -known bugs, porting Lynx to various systems, and increasing the -usability of Lynx. - -<h2><em>Open access</em></h2> -<P> -Anyone may read what has been said on Lynx-dev by visiting the -<a href="http://www.flora.org/lynx-dev/html/"> archives</a>. - -<P> - -Anyone may ask a question or offer a comment on Lynx-dev by -sending mail to lynx-dev@sig.net, the posting address for this -list. Because of the public archive, requests for a personal -reply may not be honored, and you should check the archive to -find all follow-up responses. Messages from non-subscribers are -not immediately distributed to the list to avoid distributing -spam. Usually, if your message is on topic, it will be retrieved -from the pile of spam headed for the wastebasket within a day or -so and distributed to the list. So, for best results subscribe -as described below. - -<h2><em>Subscribing to Lynx-Dev</em></h2> - -If you are interested in <em>joining</em> this mailing list, send -email to <a -href="mailto:majordomo@sig.net"> majordomo@sig.net</a> with -only the following request in the body of your message: -<em>SUBSCRIBE LYNX-DEV address</em><br> where inclusion of your -email address is optional if it can be obtained, correctly, from -the mail headers of your subscription request. You will be asked -to answer one follow-up question to confirm that you want the -subscription, and Majordomo will enroll you as a subscriber. -<P> -Majordomo will thereafter -send all messages which you address to the posting address to all -subscribers of the list, and you will receive all messages set to -that address by other subscribers. - - -<p><em>NOTE:</em> Subject headers are ignored by the majordomo. - -<h2><em>Unsubscribing from Lynx-Dev</em></h2> - -To <em>unsubscribe</em>, send an email message to -<a href="mailto:majordomo@sig.net"> majordomo@sig.net</a> -with only the following request -in the body: <em>UNSUBSCRIBE LYNX-DEV address</em><br> -where inclusion of your email address is optional if it can be obtained, -correctly, from the mail headers of your request. +Lynx is maintained and improved by an international co-operative +of volunteers. Newcomers are welcome to join the group: +you needn't be a super programmer, but you should be prepared +to listen and learn, as well as contributing patches if you can. +Since everyone is a volunteer, you will usually be expected +to try to implement any suggestions you make. -<h2><em>Subscribing to Lynx-Dev-Contrib</em></h2> -<p> -If you subscribe an email address to lynx-dev-contrib, mail from -that address posted to lynx-dev will be recognized as from a -subscriber and automatically distributed to the list. -To make such a subscription, send -email to <a -href="mailto:majordomo@sig.net"> majordomo@sig.net</a> with -only the following request in the body of your message: -<em>SUBSCRIBE LYNX-DEV-CONTRIB address</em>. +<h1><em>Lynx-Dev Discussion List</em></h1> + +The developers communicate through a majordomo mailing list +-- see below for details -- , which is open to interested users +as well as programmers. Topics include fixing bugs, increasing +Lynx's tools and powers, meeting the ever-changing demands +of the Internet and porting Lynx to new systems. <p> -If you prefer to read the lynx-dev discussion using Lynx and -the archive, and not receive all the posts as email, subscribe -to lynx-dev-contrib and not to lynx-dev. If you have multiple -accounts from which you would like to post to lynx-dev, subscribe -one of them to lynx-dev (where you will receive the list mail) and -the others to lynx-dev-contrib. +Anyone may read what has been said on the list by visiting +<a href="http://www.flora.org/lynx-dev"> the Archive</a>. -<h2><em>Majordomo Commands</em></h2> +<h1><em>Development Versions of Lynx</em></h1> -To receive a brief description of majordomo <em>commands</em>, -place the following request in a message to <a -href="mailto:majordomo@sig.net"> majordomo@sig.net</a>: -<em>HELP</em> +Besides <em>releases</em>, which are stable versions of Lynx +which come out once or twice a year and can be obtained +from <a href="http://www.slcc.edu/lynx/release">the release site</a>, +there are <em>development</em> versions, +which are experimental -- though usually stable enough to use -- +and appear every few weeks, depending on current activity. +You can find the latest <em>development</em> version of Lynx +by visiting +<a href="http://sol.slcc.edu/lynx/current">the development site</a>. -<p> -Read the HELP that you receive by return mail to learn the -details of the <em>which</em> command you can use to check on -your subscriptions, etc. Further information is available from the -<a href="http://www.greatcircle.com/majordomo/"> majordomo website</a>. +<h1><em>Subscribing to Lynx-Dev</em></h1> + +If you are interested in joining the Lynx mailing list, +send e-mail to <a href="mailto:majordomo@sig.net"> majordomo@sig.net</a> +with only the following request in the body of your message:<p> + + subscribe lynx-dev (address)<p> + +where your e-address is optional if it can be obtained correctly +from the mail headers of your subscription request. You will need +to answer one follow-up question to confirm you want to subscribe. +Majordomo will then enroll you and send all messages +which you address to <em>lynx-dev@sig.net</em> to all subscribers; +you will also receive all messages sent by other subscribers.<p> -<h2><em>Contacting Lynx-Dev</em></h2> +NOTE: Subject headers are ignored when (un)subscribing. -If you have questions, problems, or comments about using Lynx or -installing it on your system, send email to -<a href="mailto:lynx-dev@sig.net"> lynx-dev@sig.net</a>. +<h1><em>Unsubscribing from Lynx-Dev</em></h1> -<p>If you have problems with majordomo not responding to your requests, -send email to the <em>list owner</em>: +To <em>unsubscribe</em>, send an e-mail to +<a href="mailto:majordomo@sig.net"> majordomo@sig.net</a> +with only the following request in the body of your message:<p> + + unsubscribe lynx-dev (address)<p> + +where your e-address is optional if it can be obtained correctly +from the mail headers of your subscription request. + +<h1><em>Casual Inquiries</em></h1> + +Anyone may ask a question or offer a comment by sending e-mail +to <a href="mailto:lynx-dev@sig.net"> the list</a>. +Since all subscribers are volunteers, +you depend on their goodwill and will be more likely +to get a response if you give the e-mail a meaningful `Subject' +and include details of your version of Lynx, hardware and software. +You can check the Archive to find any responses.<p> +Messages from non-subscribers are not immediately distributed +to avoid spam. Usually, if your message appears genuine, +it will be retrieved from the pile headed for the wastebasket +within a day or so and distributed to the list. +For best results, subscribe as described above. + +<h1><em>Subscribing to Lynx-Dev-Contrib</em></h1> + +If you simply want to contribute e-mail to the list +without receiving the sometimes heavy discussion as well, +you can subscribe to <em>lynx-dev-contrib</em> instead. +E-mail from the address you subscribe will be recognized +as from a subscriber and automatically distributed to the list, +but no e-mail will be sent from the list to you. If you have +multiple accounts from which you want to post to the list, +subscribe one of them to lynx-dev to receive the list mail +and the others to lynx-dev-contrib.<p> + +To subscribe to lynx-dev-contrib, send e-mail to +<a href="mailto:majordomo@sig.net"> majordomo@sig.net</a> +with only the following request in the body of your message:<p> + + subscribe lynx-dev-contrib (address) + +<h1><em>Majordomo Commands</em></h1> + +To receive a brief description of majordomo <em>commands</em>, +send e-mail to +<a href="mailto:majordomo@sig.net"> majordomo@sig.net</a> +with only the following request in the body of your message:<p> + + help<p> + +You will receive by return e-mail a list of commands. +Further information is available from the +<a href="http://www.greatcircle.com/majordomo/"> majordomo website</a>. +<p> +If you have problems with majordomo not responding to requests, +send e-mail to the <em>list owner</em>: <a href="mailto:majordomo-owner@sig.net"> majordomo-owner@sig.net</a>. -Please, -<em>DO NOT</em> send them to <em>lynx-dev@sig.net</em> as they -will be distributed to everyone on the list and will clutter -up their mailboxes. +PLEASE DO NOT send them to <em>lynx-dev@sig.net</em>, +where they would be distributed to everyone on the list, +causing irritation by cluttering their mailboxes. -<h2><em>Lynx-Dev Archives</em></h2> +<h1><em>The Lynx-Dev Archive</em></h1> -Archives of messages posted to lynx-dev are now in html format so that -you can view them using Lynx. +Messages posted to lynx-dev are archived in html format +so that you can view them using Lynx: go to the +<a href="http://www.flora.org/lynx-dev/html">HTML Archive</a>. -<p>Go to the <a href="http://www.flora.org/lynx-dev/html/" ->Lynx-Dev Archives</a>. </body> </html> diff --git a/po/lynx.pot b/po/lynx.pot index 8ea163d6..8e8b953b 100644 --- a/po/lynx.pot +++ b/po/lynx.pot @@ -1,6 +1,6 @@ msgid "" msgstr "" -"Date: 1999-03-29 21:02:22-0500\n" +"Date: 1999-04-12 21:26:29-0400\n" "From: Thomas Dickey,,, <tom@dickey-ppp>\n" "Content-Type: text/plain; charset=\n" "Xgettext-Options: --default-domain=lynx --directory=.. --add-comments --keyword=_ --keyword=N_ --files-from=./POTFILES.in\n" @@ -2556,67 +2556,67 @@ msgstr "" msgid "Username for '%s' at %s '%s%s':" msgstr "" -#: WWW/Library/Implementation/HTAABrow.c:912 +#: WWW/Library/Implementation/HTAABrow.c:914 msgid "This client doesn't know how to compose proxy authorization information for scheme" msgstr "" -#: WWW/Library/Implementation/HTAABrow.c:987 +#: WWW/Library/Implementation/HTAABrow.c:989 msgid "This client doesn't know how to compose authorization information for scheme" msgstr "" -#: WWW/Library/Implementation/HTAABrow.c:1093 +#: WWW/Library/Implementation/HTAABrow.c:1097 msgid "Invalid header '%s%s%s%s%s'" msgstr "" -#: WWW/Library/Implementation/HTAABrow.c:1197 +#: WWW/Library/Implementation/HTAABrow.c:1201 msgid "Proxy authorization required -- retrying" msgstr "" -#: WWW/Library/Implementation/HTAABrow.c:1256 +#: WWW/Library/Implementation/HTAABrow.c:1260 msgid "Access without authorization denied -- retrying" msgstr "" -#: WWW/Library/Implementation/HTAccess.c:631 +#: WWW/Library/Implementation/HTAccess.c:633 msgid "Access forbidden by rule" msgstr "" -#: WWW/Library/Implementation/HTAccess.c:728 +#: WWW/Library/Implementation/HTAccess.c:730 msgid "Document with POST content not found in cache. Resubmit?" msgstr "" -#: WWW/Library/Implementation/HTAccess.c:968 +#: WWW/Library/Implementation/HTAccess.c:970 msgid "Loading incomplete." msgstr "" -#: WWW/Library/Implementation/HTAccess.c:998 +#: WWW/Library/Implementation/HTAccess.c:1000 msgid "**** HTAccess: socket or file number returned by obsolete load routine!\n" msgstr "" -#: WWW/Library/Implementation/HTAccess.c:1000 +#: WWW/Library/Implementation/HTAccess.c:1002 msgid "**** HTAccess: Internal software error. Please mail lynx_dev@sig.net!\n" msgstr "" -#: WWW/Library/Implementation/HTAccess.c:1001 +#: WWW/Library/Implementation/HTAccess.c:1003 msgid "**** HTAccess: Status returned was: %d\n" msgstr "" -#: WWW/Library/Implementation/HTAccess.c:1014 +#: WWW/Library/Implementation/HTAccess.c:1016 msgid "Unable to access document." msgstr "" -#: WWW/Library/Implementation/HTFTP.c:705 +#: WWW/Library/Implementation/HTFTP.c:707 msgid "Enter password for user %s@%s:" msgstr "" -#: WWW/Library/Implementation/HTFTP.c:733 +#: WWW/Library/Implementation/HTFTP.c:735 msgid "Unable to connect to FTP host." msgstr "" -#: WWW/Library/Implementation/HTFTP.c:992 +#: WWW/Library/Implementation/HTFTP.c:994 msgid "close master socket" msgstr "" -#: WWW/Library/Implementation/HTFTP.c:1032 +#: WWW/Library/Implementation/HTFTP.c:1034 msgid "socket for master socket" msgstr "" @@ -2625,19 +2625,19 @@ msgstr "" #. ** knowing if it is symbolic? I think so since #. ** it might be a directory. #. -#: WWW/Library/Implementation/HTFTP.c:1961 +#: WWW/Library/Implementation/HTFTP.c:1963 msgid "Symbolic Link" msgstr "" -#: WWW/Library/Implementation/HTFTP.c:2314 +#: WWW/Library/Implementation/HTFTP.c:2316 msgid "Receiving FTP directory." msgstr "" -#: WWW/Library/Implementation/HTFTP.c:2662 +#: WWW/Library/Implementation/HTFTP.c:2664 msgid "connect for data" msgstr "" -#: WWW/Library/Implementation/HTFTP.c:3238 +#: WWW/Library/Implementation/HTFTP.c:3240 msgid "Receiving FTP file." msgstr "" @@ -2661,37 +2661,37 @@ msgstr "" msgid "No response from finger server." msgstr "" -#: WWW/Library/Implementation/HTNews.c:360 +#: WWW/Library/Implementation/HTNews.c:364 msgid "Username for news host '%s':" msgstr "" -#: WWW/Library/Implementation/HTNews.c:413 +#: WWW/Library/Implementation/HTNews.c:417 msgid "Change username?" msgstr "" -#: WWW/Library/Implementation/HTNews.c:417 +#: WWW/Library/Implementation/HTNews.c:421 msgid "Username:" msgstr "" -#: WWW/Library/Implementation/HTNews.c:444 +#: WWW/Library/Implementation/HTNews.c:448 msgid "Password for news host '%s':" msgstr "" -#: WWW/Library/Implementation/HTNews.c:527 +#: WWW/Library/Implementation/HTNews.c:531 msgid "Change password?" msgstr "" -#: WWW/Library/Implementation/HTNews.c:1630 +#: WWW/Library/Implementation/HTNews.c:1634 msgid "No matches for: %s" msgstr "" -#: WWW/Library/Implementation/HTNews.c:1681 +#: WWW/Library/Implementation/HTNews.c:1685 msgid "" "\n" "No articles in this group.\n" msgstr "" -#: WWW/Library/Implementation/HTNews.c:1694 +#: WWW/Library/Implementation/HTNews.c:1698 msgid "" "\n" "No articles in this range.\n" @@ -2700,107 +2700,107 @@ msgstr "" #. #. ** Set window title. #. -#: WWW/Library/Implementation/HTNews.c:1707 +#: WWW/Library/Implementation/HTNews.c:1711 msgid "%s, Articles %d-%d" msgstr "" -#: WWW/Library/Implementation/HTNews.c:1728 +#: WWW/Library/Implementation/HTNews.c:1732 msgid "Earlier articles" msgstr "" -#: WWW/Library/Implementation/HTNews.c:1741 +#: WWW/Library/Implementation/HTNews.c:1745 msgid "" "\n" "There are about %d articles currently available in %s, IDs as follows:\n" "\n" msgstr "" -#: WWW/Library/Implementation/HTNews.c:1800 +#: WWW/Library/Implementation/HTNews.c:1804 msgid "All available articles in " msgstr "" -#: WWW/Library/Implementation/HTNews.c:2011 +#: WWW/Library/Implementation/HTNews.c:2015 msgid "Later articles" msgstr "" -#: WWW/Library/Implementation/HTNews.c:2035 +#: WWW/Library/Implementation/HTNews.c:2039 msgid "Post to " msgstr "" -#: WWW/Library/Implementation/HTNews.c:2212 +#: WWW/Library/Implementation/HTNews.c:2216 msgid "This client does not contain support for SNEWS URLs." msgstr "" -#: WWW/Library/Implementation/HTNews.c:2393 +#: WWW/Library/Implementation/HTNews.c:2397 msgid "No target for raw text!" msgstr "" -#: WWW/Library/Implementation/HTNews.c:2423 +#: WWW/Library/Implementation/HTNews.c:2427 msgid "Connecting to NewsHost ..." msgstr "" -#: WWW/Library/Implementation/HTNews.c:2457 +#: WWW/Library/Implementation/HTNews.c:2461 msgid "Could not access %s." msgstr "" -#: WWW/Library/Implementation/HTNews.c:2504 +#: WWW/Library/Implementation/HTNews.c:2508 msgid "Can't read news info. News host %.20s responded: %.200s" msgstr "" -#: WWW/Library/Implementation/HTNews.c:2700 +#: WWW/Library/Implementation/HTNews.c:2704 msgid "Reading list of available newsgroups." msgstr "" -#: WWW/Library/Implementation/HTNews.c:2722 +#: WWW/Library/Implementation/HTNews.c:2726 msgid "Reading list of articles in newsgroup." msgstr "" #. #. ** Get an article from a news group. - FM #. -#: WWW/Library/Implementation/HTNews.c:2728 +#: WWW/Library/Implementation/HTNews.c:2732 msgid "Reading news article." msgstr "" -#: WWW/Library/Implementation/HTTCP.c:1193 +#: WWW/Library/Implementation/HTTCP.c:1196 msgid "Address length looks invalid" msgstr "" -#: WWW/Library/Implementation/HTTCP.c:1344 +#: WWW/Library/Implementation/HTTCP.c:1349 msgid "Looking up %s." msgstr "" -#: WWW/Library/Implementation/HTTCP.c:1354 +#: WWW/Library/Implementation/HTTCP.c:1359 msgid "Invalid hostname %s" msgstr "" -#: WWW/Library/Implementation/HTTCP.c:1357 +#: WWW/Library/Implementation/HTTCP.c:1362 msgid "Unable to locate remote host %s." msgstr "" -#: WWW/Library/Implementation/HTTCP.c:1367 +#: WWW/Library/Implementation/HTTCP.c:1372 msgid "Making %s connection to %s." msgstr "" -#: WWW/Library/Implementation/HTTCP.c:1377 +#: WWW/Library/Implementation/HTTCP.c:1382 msgid "socket failed." msgstr "" #. USE_FCNTL -#: WWW/Library/Implementation/HTTCP.c:1396 +#: WWW/Library/Implementation/HTTCP.c:1401 msgid "Could not make connection non-blocking." msgstr "" -#: WWW/Library/Implementation/HTTCP.c:1450 +#: WWW/Library/Implementation/HTTCP.c:1455 msgid "Connection failed for 180,000 tries." msgstr "" #. USE_FCNTL -#: WWW/Library/Implementation/HTTCP.c:1584 +#: WWW/Library/Implementation/HTTCP.c:1589 msgid "Could not restore socket to blocking." msgstr "" -#: WWW/Library/Implementation/HTTCP.c:1638 +#: WWW/Library/Implementation/HTTCP.c:1643 msgid "Socket read failed for 180,000 tries." msgstr "" @@ -3056,139 +3056,139 @@ msgstr "" msgid "Host" msgstr "" -#: src/GridText.c:356 +#: src/GridText.c:384 msgid "Memory exhausted, display interrupted!" msgstr "" -#: src/GridText.c:361 +#: src/GridText.c:389 msgid "Memory exhausted, will interrupt transfer!" msgstr "" -#: src/GridText.c:2443 +#: src/GridText.c:2522 msgid " *** MEMORY EXHAUSTED ***" msgstr "" -#: src/GridText.c:3929 src/GridText.c:3936 src/LYList.c:249 +#: src/GridText.c:4004 src/GridText.c:4011 src/LYList.c:249 msgid "unknown field or link" msgstr "" -#: src/GridText.c:3945 +#: src/GridText.c:4020 msgid "text entry field" msgstr "" -#: src/GridText.c:3948 +#: src/GridText.c:4023 msgid "password entry field" msgstr "" -#: src/GridText.c:3951 +#: src/GridText.c:4026 msgid "checkbox" msgstr "" -#: src/GridText.c:3954 +#: src/GridText.c:4029 msgid "radio button" msgstr "" -#: src/GridText.c:3957 +#: src/GridText.c:4032 msgid "submit button" msgstr "" -#: src/GridText.c:3960 +#: src/GridText.c:4035 msgid "reset button" msgstr "" -#: src/GridText.c:3963 +#: src/GridText.c:4038 msgid "popup menu" msgstr "" -#: src/GridText.c:3966 +#: src/GridText.c:4041 msgid "hidden form field" msgstr "" -#: src/GridText.c:3969 +#: src/GridText.c:4044 msgid "text entry area" msgstr "" -#: src/GridText.c:3972 +#: src/GridText.c:4047 msgid "range entry field" msgstr "" -#: src/GridText.c:3975 +#: src/GridText.c:4050 msgid "file entry field" msgstr "" -#: src/GridText.c:3978 +#: src/GridText.c:4053 msgid "text-submit field" msgstr "" -#: src/GridText.c:3981 +#: src/GridText.c:4056 msgid "image-submit button" msgstr "" -#: src/GridText.c:3984 +#: src/GridText.c:4059 msgid "keygen field" msgstr "" -#: src/GridText.c:3987 +#: src/GridText.c:4062 msgid "unknown form field" msgstr "" -#: src/GridText.c:8611 +#: src/GridText.c:8727 msgid "Submitting %s" msgstr "" -#: src/HTAlert.c:155 src/LYShowInfo.c:342 +#: src/HTAlert.c:154 src/LYShowInfo.c:293 msgid "bytes" msgstr "" -#: src/HTAlert.c:159 +#: src/HTAlert.c:158 msgid "KB" msgstr "" -#: src/HTAlert.c:166 +#: src/HTAlert.c:165 msgid "Read %ld of %ld %s of data" msgstr "" -#: src/HTAlert.c:168 +#: src/HTAlert.c:167 msgid "Read %ld %s of data" msgstr "" -#: src/HTAlert.c:171 +#: src/HTAlert.c:170 msgid ", %ld %s/sec." msgstr "" -#: src/HTAlert.c:176 +#: src/HTAlert.c:175 msgid " (Press 'z' to abort)" msgstr "" -#: src/HTAlert.c:202 +#: src/HTAlert.c:201 msgid "yes" msgstr "" -#: src/HTAlert.c:203 +#: src/HTAlert.c:202 msgid "no" msgstr "" -#: src/HTML.c:5485 +#: src/HTML.c:5790 msgid "Description:" msgstr "" -#: src/HTML.c:5490 +#: src/HTML.c:5795 msgid "(none)" msgstr "" -#: src/HTML.c:5494 +#: src/HTML.c:5799 msgid "Filepath:" msgstr "" -#: src/HTML.c:5499 +#: src/HTML.c:5804 msgid "(unknown)" msgstr "" -#: src/HTML.c:6775 +#: src/HTML.c:7089 msgid "Document has only hidden links. Use the 'l'ist command." msgstr "" -#: src/LYBookmark.c:155 +#: src/LYBookmark.c:154 msgid "" " This file is an HTML representation of the X Mosaic hotlist file.\n" " Outdated or invalid links may be removed by using the\n" @@ -3196,7 +3196,7 @@ msgid "" " been remapped by you or your system administrator." msgstr "" -#: src/LYBookmark.c:339 +#: src/LYBookmark.c:338 msgid "" " You can delete links using the remove bookmark command. It is usually\n" " the 'R' key but may have been remapped by you or your system\n" @@ -3219,75 +3219,76 @@ msgstr "" #. * Neither the path as given nor any components examined by #. * backing up were stat()able. - kw #. -#: src/LYCgi.c:236 +#: src/LYCgi.c:238 msgid "Unable to access cgi script" msgstr "" -#: src/LYCgi.c:648 src/LYCgi.c:651 +#: src/LYCgi.c:650 src/LYCgi.c:653 msgid "Good Advice" msgstr "" -#: src/LYCgi.c:654 +#: src/LYCgi.c:656 msgid "An excellent http server for VMS is available via" msgstr "" -#: src/LYCgi.c:661 +#: src/LYCgi.c:663 msgid "this link" msgstr "" -#: src/LYCgi.c:665 +#: src/LYCgi.c:667 msgid "It provides state of the art CGI script support.\n" msgstr "" -#: src/LYClean.c:107 +#: src/LYClean.c:108 msgid "Exiting via interrupt:" msgstr "" -#. not used any more - kw -#: src/LYCookie.c:2144 +#: src/LYCookie.c:2149 msgid "(From Cookie Jar)" msgstr "" -#: src/LYCookie.c:2560 +#: src/LYCookie.c:2565 msgid "(from a previous session)" msgstr "" -#: src/LYCookie.c:2620 +#. +#. * Show the Maximum Gobble Date. - FM +#. +#: src/LYCookie.c:2625 msgid "Maximum Gobble Date:" msgstr "" -#. start curses -#: src/LYCurses.c:755 +#: src/LYCurses.c:777 msgid "Terminal initialisation failed - unknown terminal type?" msgstr "" -#: src/LYCurses.c:993 +#: src/LYCurses.c:1015 msgid "Terminal =" msgstr "" -#: src/LYCurses.c:998 +#: src/LYCurses.c:1020 msgid "You must use a vt100, 200, etc. terminal with this program." msgstr "" -#: src/LYCurses.c:1076 +#: src/LYCurses.c:1098 msgid "Your Terminal type is unknown!" msgstr "" -#: src/LYCurses.c:1077 +#: src/LYCurses.c:1099 msgid "Enter a terminal type:" msgstr "" -#: src/LYCurses.c:1088 +#: src/LYCurses.c:1110 msgid "TERMINAL TYPE IS SET TO" msgstr "" -#: src/LYCurses.c:1331 +#: src/LYCurses.c:1353 msgid "" "\n" "A Fatal error has occurred in %s Ver. %s\n" msgstr "" -#: src/LYCurses.c:1333 +#: src/LYCurses.c:1355 msgid "" "\n" "Please notify your system administrator to confirm a bug, and if\n" @@ -3297,59 +3298,59 @@ msgid "" "TRACEBACK if it can be captured, and any other relevant information.\n" msgstr "" -#: src/LYDownload.c:506 +#: src/LYDownload.c:504 msgid "Downloaded link:" msgstr "" -#: src/LYDownload.c:511 +#: src/LYDownload.c:509 msgid "Suggested file name:" msgstr "" -#: src/LYDownload.c:516 +#: src/LYDownload.c:514 msgid "Standard download options:" msgstr "" -#: src/LYDownload.c:517 +#: src/LYDownload.c:515 msgid "Download options:" msgstr "" -#: src/LYDownload.c:531 +#: src/LYDownload.c:529 msgid "Save to disk" msgstr "" -#: src/LYDownload.c:533 +#: src/LYDownload.c:531 msgid "Save to disk disabled." msgstr "" -#: src/LYDownload.c:537 src/LYPrint.c:1302 +#: src/LYDownload.c:535 src/LYPrint.c:1303 msgid "Local additions:" msgstr "" -#: src/LYDownload.c:546 src/LYUpload.c:227 +#: src/LYDownload.c:544 src/LYUpload.c:227 msgid "No Name Given" msgstr "" -#: src/LYHistory.c:393 +#: src/LYHistory.c:398 msgid "You selected:" msgstr "" -#: src/LYHistory.c:417 src/LYHistory.c:579 +#: src/LYHistory.c:422 src/LYHistory.c:584 msgid "(no address)" msgstr "" -#: src/LYHistory.c:421 +#: src/LYHistory.c:426 msgid " (internal)" msgstr "" -#: src/LYHistory.c:423 +#: src/LYHistory.c:428 msgid " (was internal)" msgstr "" -#: src/LYHistory.c:506 +#: src/LYHistory.c:511 msgid " (From History)" msgstr "" -#: src/LYHistory.c:543 +#: src/LYHistory.c:548 msgid "You visited (POSTs, bookmark, menu and list files excluded):" msgstr "" @@ -3357,7 +3358,7 @@ msgstr "" msgid "Invalid pointer detected." msgstr "" -#: src/LYLeaks.c:80 src/LYLeaks.c:116 +#: src/LYLeaks.c:80 src/LYLeaks.c:117 msgid "Pointer:" msgstr "" @@ -3369,11 +3370,11 @@ msgstr "" msgid "LineCount:" msgstr "" -#: src/LYLeaks.c:114 +#: src/LYLeaks.c:115 msgid "Memory leak detected." msgstr "" -#: src/LYLeaks.c:119 +#: src/LYLeaks.c:120 msgid "Contains:" msgstr "" @@ -3574,7 +3575,7 @@ msgstr "" msgid "Specify permissions below:" msgstr "" -#: src/LYLocal.c:1088 src/LYShowInfo.c:224 +#: src/LYLocal.c:1088 src/LYShowInfo.c:175 msgid "Owner:" msgstr "" @@ -3713,122 +3714,132 @@ msgstr "" msgid "Personal Name: " msgstr "" -#: src/LYMain.c:673 +#: src/LYMain.c:675 msgid "No Winsock found, sorry." msgstr "" -#: src/LYMain.c:827 +#: src/LYMain.c:830 msgid "You MUST define a valid TMP or TEMP area!\n" msgstr "" -#: src/LYMain.c:1219 +#. +#. * If the configuration file is not available, +#. * inform the user and exit. +#. +#: src/LYMain.c:1224 msgid "" "\n" "Configuration file %s is not available.\n" "\n" msgstr "" -#: src/LYMain.c:1235 +#: src/LYMain.c:1240 msgid "" "\n" "Lynx character sets not declared.\n" "\n" msgstr "" -#. -#. * If the lynx-style file is not available, -#. * inform the user and exit. -#. -#: src/LYMain.c:1294 +#: src/LYMain.c:1299 msgid "" "\n" "Lynx file %s is not available.\n" "\n" msgstr "" -#: src/LYMain.c:1308 +#. +#. * Make sure we have the edit map declared. - FM +#. +#: src/LYMain.c:1313 msgid "" "\n" "Lynx edit map not declared.\n" "\n" msgstr "" -#: src/LYMain.c:2506 +#: src/LYMain.c:2520 msgid "" "\n" "%s Version %s (%.*s)\n" msgstr "" -#: src/LYMain.c:2513 +#: src/LYMain.c:2527 msgid "Copyrights held by the University of Kansas, CERN, and other contributors.\n" msgstr "" -#: src/LYMain.c:2515 +#: src/LYMain.c:2529 msgid "Distributed under the GNU General Public License.\n" msgstr "" -#: src/LYMain.c:2517 +#: src/LYMain.c:2531 msgid "" "See http://lynx.browser.org/ and the online help for more information.\n" "\n" msgstr "" -#: src/LYMain.c:3042 +#: src/LYMain.c:3060 msgid "USAGE: %s [options] [file]\n" msgstr "" -#: src/LYMain.c:3043 +#: src/LYMain.c:3061 msgid "Options are:\n" msgstr "" -#: src/LYMain.c:3247 +#: src/LYMain.c:3269 msgid "%s: Invalid Option: %s\n" msgstr "" -#: src/LYMainLoop.c:323 src/LYMainLoop.c:3858 +#: src/LYMainLoop.c:327 src/LYMainLoop.c:3996 msgid "Entry into main screen" msgstr "" -#: src/LYMainLoop.c:677 src/LYMainLoop.c:684 +#: src/LYMainLoop.c:683 src/LYMainLoop.c:690 msgid "" "\n" "lynx: Can't access startfile %s\n" msgstr "" -#: src/LYMainLoop.c:769 +#: src/LYMainLoop.c:775 msgid "" "\n" "lynx: Start file could not be found or is not text/html or text/plain\n" msgstr "" -#: src/LYMainLoop.c:770 +#: src/LYMainLoop.c:776 msgid " Exiting...\n" msgstr "" -#: src/LYMainLoop.c:1562 src/LYMainLoop.c:1566 +#: src/LYMainLoop.c:1266 +msgid "Reparsing document under current settings..." +msgstr "" + +#: src/LYMainLoop.c:1604 src/LYMainLoop.c:1608 msgid "Fatal error - could not open output file %s\n" msgstr "" -#: src/LYMainLoop.c:3085 +#: src/LYMainLoop.c:3219 msgid "Enctype multipart/form-data not yet supported! Cannot submit." msgstr "" -#: src/LYMainLoop.c:3789 +#. +#. * Make a name for this new URL. +#. +#: src/LYMainLoop.c:3927 msgid "A URL specified by the user" msgstr "" #. #. * Make a name for this help file. #. -#: src/LYMainLoop.c:3815 +#: src/LYMainLoop.c:3953 msgid "Help Screen" msgstr "" -#: src/LYMainLoop.c:3839 +#: src/LYMainLoop.c:3977 msgid "System Index" msgstr "" -#: src/LYMainLoop.c:5466 +#: src/LYMainLoop.c:5623 msgid "charset for this document specified explicitely, sorry..." msgstr "" @@ -4035,68 +4046,67 @@ msgstr "" msgid "User-Agent header" msgstr "" -#. Close the tmpfile. -#: src/LYPrint.c:768 +#: src/LYPrint.c:769 msgid "Sending" msgstr "" -#: src/LYPrint.c:1260 +#: src/LYPrint.c:1261 msgid "Document:" msgstr "" -#: src/LYPrint.c:1261 +#: src/LYPrint.c:1262 msgid "Number of lines:" msgstr "" -#: src/LYPrint.c:1262 +#: src/LYPrint.c:1263 msgid "Number of pages:" msgstr "" -#: src/LYPrint.c:1263 +#: src/LYPrint.c:1264 msgid "pages" msgstr "" -#: src/LYPrint.c:1263 +#: src/LYPrint.c:1264 msgid "page" msgstr "" -#: src/LYPrint.c:1264 +#: src/LYPrint.c:1265 msgid "(approximately)" msgstr "" -#: src/LYPrint.c:1269 +#: src/LYPrint.c:1270 msgid "Some print functions have been disabled!" msgstr "" -#: src/LYPrint.c:1273 +#: src/LYPrint.c:1274 msgid "Standard print options:" msgstr "" -#: src/LYPrint.c:1274 +#: src/LYPrint.c:1275 msgid "Print options:" msgstr "" -#: src/LYPrint.c:1280 +#: src/LYPrint.c:1281 msgid "Save to a local file" msgstr "" -#: src/LYPrint.c:1282 +#: src/LYPrint.c:1283 msgid "Save to disk disabled" msgstr "" -#: src/LYPrint.c:1288 +#: src/LYPrint.c:1289 msgid "Mail the file" msgstr "" -#: src/LYPrint.c:1294 +#: src/LYPrint.c:1295 msgid "Print to the screen" msgstr "" -#: src/LYPrint.c:1298 +#: src/LYPrint.c:1299 msgid "Print out on a printer attached to your vt100 terminal" msgstr "" -#: src/LYReadCFG.c:380 +#: src/LYReadCFG.c:386 msgid "" "Syntax Error parsing COLOR in configuration file:\n" "The line must be of the form:\n" @@ -4106,246 +4116,250 @@ msgid "" "The special strings 'nocolor' or 'default', or\n" msgstr "" -#: src/LYReadCFG.c:393 +#: src/LYReadCFG.c:399 msgid "Offending line:" msgstr "" -#: src/LYReadCFG.c:647 +#: src/LYReadCFG.c:652 msgid "key remapping of " msgstr "" -#: src/LYReadCFG.c:649 +#: src/LYReadCFG.c:654 msgid " failed" msgstr "" -#: src/LYReadCFG.c:751 +#: src/LYReadCFG.c:756 msgid "Lynx: cannot start, CERN rules file %s is not available\n" msgstr "" -#: src/LYReadCFG.c:753 +#: src/LYReadCFG.c:758 msgid "(no name)" msgstr "" -#: src/LYReadCFG.c:1087 +#: src/LYReadCFG.c:1238 msgid "More than %d nested lynx.cfg includes -- perhaps there is a loop?!?\n" msgstr "" -#: src/LYReadCFG.c:1089 +#: src/LYReadCFG.c:1240 msgid "Last attempted include was '%s',\n" msgstr "" -#: src/LYReadCFG.c:1090 +#: src/LYReadCFG.c:1241 msgid "included from '%s'.\n" msgstr "" -#: src/LYReadCFG.c:1384 src/LYReadCFG.c:1396 +#. no absolute path... for lynx.cfg on DOS/Win32 +#: src/LYReadCFG.c:1602 src/LYReadCFG.c:1615 msgid "This is read from your lynx.cfg file," msgstr "" -#: src/LYReadCFG.c:1385 src/LYReadCFG.c:1397 +#: src/LYReadCFG.c:1603 src/LYReadCFG.c:1616 msgid "please \"read\" distribution's" msgstr "" -#: src/LYReadCFG.c:1390 src/LYReadCFG.c:1400 +#: src/LYReadCFG.c:1609 src/LYReadCFG.c:1619 msgid "for more comments." msgstr "" -#: src/LYReadCFG.c:1405 +#: src/LYReadCFG.c:1625 +msgid "RELOAD THE CHANGES" +msgstr "" + +#: src/LYReadCFG.c:1634 msgid "Your primary configuration" msgstr "" -#: src/LYReadCFG.c:1411 +#. !NO_CONFIG_INFO +#: src/LYReadCFG.c:1643 msgid "This is read from your lynx.cfg file:" msgstr "" -#: src/LYShowInfo.c:154 +#: src/LYShowInfo.c:105 msgid "Directory that you are currently viewing" msgstr "" -#: src/LYShowInfo.c:160 +#: src/LYShowInfo.c:111 msgid "Name:" msgstr "" -#: src/LYShowInfo.c:161 +#: src/LYShowInfo.c:112 msgid "URL:" msgstr "" -#: src/LYShowInfo.c:174 +#: src/LYShowInfo.c:125 msgid "Directory that you have currently selected" msgstr "" -#: src/LYShowInfo.c:177 +#: src/LYShowInfo.c:128 msgid "File that you have currently selected" msgstr "" -#: src/LYShowInfo.c:181 +#: src/LYShowInfo.c:132 msgid "Symbolic link that you have currently selected" msgstr "" -#: src/LYShowInfo.c:185 +#: src/LYShowInfo.c:136 msgid "Item that you have currently selected" msgstr "" -#: src/LYShowInfo.c:187 +#: src/LYShowInfo.c:138 msgid "Full name:" msgstr "" -#: src/LYShowInfo.c:196 +#: src/LYShowInfo.c:147 msgid "Unable to follow link" msgstr "" -#: src/LYShowInfo.c:198 +#: src/LYShowInfo.c:149 msgid "Points to file:" msgstr "" -#: src/LYShowInfo.c:203 +#: src/LYShowInfo.c:154 msgid "Name of owner" msgstr "" -#: src/LYShowInfo.c:206 +#: src/LYShowInfo.c:157 msgid "Group name:" msgstr "" -#: src/LYShowInfo.c:209 +#: src/LYShowInfo.c:160 msgid "File size:" msgstr "" -#. -#. * Include date and time information. -#. -#: src/LYShowInfo.c:215 +#: src/LYShowInfo.c:166 msgid "Creation date:" msgstr "" -#: src/LYShowInfo.c:218 +#: src/LYShowInfo.c:169 msgid "Last modified:" msgstr "" -#: src/LYShowInfo.c:221 +#: src/LYShowInfo.c:172 msgid "Last accessed:" msgstr "" -#: src/LYShowInfo.c:223 +#: src/LYShowInfo.c:174 msgid "Access Permissions" msgstr "" -#: src/LYShowInfo.c:288 +#. DIRED_SUPPORT +#: src/LYShowInfo.c:239 msgid "File that you are currently viewing" msgstr "" -#: src/LYShowInfo.c:293 src/LYShowInfo.c:399 +#: src/LYShowInfo.c:244 src/LYShowInfo.c:350 msgid "Linkname:" msgstr "" -#: src/LYShowInfo.c:303 src/LYShowInfo.c:315 +#: src/LYShowInfo.c:254 src/LYShowInfo.c:266 msgid "Charset:" msgstr "" -#: src/LYShowInfo.c:321 +#: src/LYShowInfo.c:272 msgid "Server:" msgstr "" -#: src/LYShowInfo.c:324 +#: src/LYShowInfo.c:275 msgid "Date:" msgstr "" -#: src/LYShowInfo.c:327 +#: src/LYShowInfo.c:278 msgid "Last Mod:" msgstr "" -#: src/LYShowInfo.c:333 +#: src/LYShowInfo.c:284 msgid " Expires:" msgstr "" -#: src/LYShowInfo.c:337 +#: src/LYShowInfo.c:288 msgid "Cache-Control:" msgstr "" -#: src/LYShowInfo.c:341 +#: src/LYShowInfo.c:292 msgid "Content-Length:" msgstr "" -#: src/LYShowInfo.c:346 +#: src/LYShowInfo.c:297 msgid "Language:" msgstr "" -#: src/LYShowInfo.c:353 +#: src/LYShowInfo.c:304 msgid "Post Data:" msgstr "" -#: src/LYShowInfo.c:355 +#: src/LYShowInfo.c:306 msgid "Post Content Type:" msgstr "" -#: src/LYShowInfo.c:364 +#: src/LYShowInfo.c:315 msgid "Owner(s):" msgstr "" -#: src/LYShowInfo.c:367 +#: src/LYShowInfo.c:318 msgid "size:" msgstr "" -#: src/LYShowInfo.c:367 +#: src/LYShowInfo.c:318 msgid "lines" msgstr "" -#: src/LYShowInfo.c:370 +#: src/LYShowInfo.c:321 msgid "mode:" msgstr "" -#: src/LYShowInfo.c:372 +#: src/LYShowInfo.c:323 msgid "forms mode" msgstr "" -#: src/LYShowInfo.c:374 +#: src/LYShowInfo.c:325 msgid "source" msgstr "" -#: src/LYShowInfo.c:374 +#: src/LYShowInfo.c:325 msgid "normal" msgstr "" -#: src/LYShowInfo.c:375 +#: src/LYShowInfo.c:326 msgid ", safe" msgstr "" -#: src/LYShowInfo.c:376 +#: src/LYShowInfo.c:327 msgid ", internal link" msgstr "" -#: src/LYShowInfo.c:382 +#: src/LYShowInfo.c:333 msgid ", no-cache" msgstr "" -#: src/LYShowInfo.c:384 +#: src/LYShowInfo.c:335 msgid ", ISMAP script" msgstr "" -#: src/LYShowInfo.c:386 +#: src/LYShowInfo.c:337 msgid ", bookmark file" msgstr "" -#: src/LYShowInfo.c:395 +#: src/LYShowInfo.c:346 msgid "Link that you currently have selected" msgstr "" -#: src/LYShowInfo.c:408 +#: src/LYShowInfo.c:359 msgid "Method:" msgstr "" -#: src/LYShowInfo.c:413 +#: src/LYShowInfo.c:364 msgid "Enctype:" msgstr "" -#: src/LYShowInfo.c:425 +#: src/LYShowInfo.c:376 msgid "(Form field)" msgstr "" -#: src/LYShowInfo.c:440 +#: src/LYShowInfo.c:391 msgid "No Links on the current page" msgstr "" -#: src/LYStyle.c:156 +#: src/LYStyle.c:171 msgid "" "Syntax Error parsing style in lss file:\n" "[%s]\n" @@ -4355,7 +4369,7 @@ msgid "" "\n" msgstr "" -#: src/LYTraversal.c:103 +#: src/LYTraversal.c:102 msgid "here is a list of the history stack so that you may rebuild" msgstr "" diff --git a/samples/blue-background.lss b/samples/blue-background.lss index b48da787..f5d93b0b 100644 --- a/samples/blue-background.lss +++ b/samples/blue-background.lss @@ -69,3 +69,16 @@ li:normal:default:blue base:normal:default:blue iframe:normal:default:blue cite:normal:yellow:blue + +span.htmlsrc_comment:normal:green:blue +span.htmlsrc_tag:normal:brightgreen:blue +span.htmlsrc_attrib:normal:brightcyan:blue +span.htmlsrc_attrval:normal:white:blue +span.htmlsrc_abracket:normal:brightgreen:blue +span.htmlsrc_entity:normal:white:blue +##span.htmlsrc_href: +##span.htmlsrc_entire: +span.htmlsrc_badseq:normal:red:blue +span.htmlsrc_badtag:normal:red:blue +span.htmlsrc_badattr:normal:red:blue +span.htmlsrc_sgmlspecial:normal:yellow:blue diff --git a/samples/lynx.lss b/samples/lynx.lss index 6ca6afa6..09c244b4 100644 --- a/samples/lynx.lss +++ b/samples/lynx.lss @@ -73,3 +73,20 @@ link.red.prev:bold:yellow:red link.blue.prev:bold:yellow:blue link.blue.next:bold:blue link.green.toc:bold:white:green +# +# Define styles that will be used when syntax highlighting is requested +# (commandline option -prettysrc). +span.htmlsrc_comment:normal:white +span.htmlsrc_tag:normal:white +#If you don't like that the tag name and attribute name are displayed +#in different colors, comment the following line. +span.htmlsrc_attrib:normal:cyan +span.htmlsrc_attrval:normal:magenta +span.htmlsrc_abracket:normal:white +span.htmlsrc_entity:normal:white +##span.htmlsrc_href: +##span.htmlsrc_entire: +span.htmlsrc_badseq:normal:red +span.htmlsrc_badtag:normal:red +span.htmlsrc_badattr:normal:red +span.htmlsrc_sgmlspecial:normal:yellow diff --git a/samples/mild-colors.lss b/samples/mild-colors.lss index 3f90813a..163242ea 100644 --- a/samples/mild-colors.lss +++ b/samples/mild-colors.lss @@ -7,34 +7,47 @@ # highlighted links. #it's best to put these in a .lss file and use #"lynx -lss=file.lss whatever" for now. -# -# normal type styles, use bold if mono, otherwise brightblue on -#<defaultbackground> -#by Vlad Harchev <hvv@hippo.ru> -em:bold:cyan -strong:bold:cyan -b:bold:cyan -i:bold:cyan -alink:reverse:brightgreen:black -a:bold:green -img:dim:cyan:black -status:reverse:cyan:black -fig:normal:gray -caption:reverse:cyan -hr:normal:gray -blockquote:normal:cyan:black -#ul:normal:gray -address:normal:cyan -title:normal:cyan:default -tt:normal:white:black -h1:bold:cyan:black -label:normal:cyan -value:normal:green -high:bold:cyan -q:normal:gray -small:dim:gray -big:bold:cyan -sup:bold:gray -sub:dim:gray -lh:bold:cyan -code:normal:cyan +em:bold:cyan +strong:bold:cyan +dt:bold:cyan +var:bold:cyan +samp:bold:cyan +b:bold:cyan +i:bold:cyan +alink:reverse:brightgreen:black +a:bold:green +img:dim:cyan:black +status:reverse:cyan:black +fig:normal:gray +caption:reverse:cyan +hr:normal:gray +blockquote:normal:cyan:black +address:normal:cyan +title:normal:cyan:default +tt:normal:white:black +h1:bold:cyan:black +label:normal:cyan +value:normal:cyan +high:bold:cyan +q:normal:cyan +small:dim:cyan +big:bold:cyan +sup:bold:cyan +sub:dim:cyan +lh:bold:cyan +code:normal:cyan + +span.htmlsrc_comment:normal:white +span.htmlsrc_tag:normal:cyan +##the following makes no difference (except increasing the speed) since tag +##is already in cyan. +#span.htmlsrc_attrib:normal:cyan +#span.htmlsrc_attrval:normal:magenta +span.htmlsrc_abracket:normal:cyan +span.htmlsrc_entity:normal:white +##span.htmlsrc_href: +##span.htmlsrc_entire: +span.htmlsrc_badseq:normal:red +span.htmlsrc_badtag:normal:red +span.htmlsrc_badattr:normal:red +span.htmlsrc_sgmlspecial:normal:yellow diff --git a/src/DefaultStyle.c b/src/DefaultStyle.c index 7a498700..9532c973 100644 --- a/src/DefaultStyle.c +++ b/src/DefaultStyle.c @@ -392,7 +392,9 @@ PUBLIC HTStyleSheet * DefaultStyle NOARGS result = HTStyleSheetNew (); *result = sheet; result->styles = 0; +#ifdef LY_FIND_LEAKS atexit(FreeDefaultStyle); +#endif for (p = sheet.styles; p != 0; p = p->next) { q = HTStyleNew (); *q = *p; diff --git a/src/GridText.c b/src/GridText.c index b61ca5e1..d637cdb8 100644 --- a/src/GridText.c +++ b/src/GridText.c @@ -15,6 +15,7 @@ #include <UCAux.h> #include <assert.h> + #ifndef VMS #ifdef SYSLOG_REQUESTED_URLS #include <syslog.h> @@ -29,7 +30,6 @@ #include <LYGlobalDefs.h> #include <LYGetFile.h> #include <LYClean.h> -#include <LYSignal.h> #include <LYMail.h> #include <LYList.h> #include <LYCharSets.h> @@ -37,6 +37,7 @@ #include <UCMap.h> #include <LYEdit.h> #include <LYPrint.h> +#include <LYPrettySrc.h> #ifdef EXP_CHARTRANS_AUTOSWITCH #include <UCAuto.h> #endif /* EXP_CHARTRANS_AUTOSWITCH */ @@ -46,6 +47,10 @@ #undef DEBUG_APPCH +#ifdef SOURCE_CACHE +#include <HTFile.h> +#endif + #ifdef USE_COLOR_STYLE #include <AttrList.h> #include <LYHash.h> @@ -114,6 +119,12 @@ PUBLIC char * unchecked_radio = "( )"; PUBLIC BOOLEAN underline_on = OFF; PUBLIC BOOLEAN bold_on = OFF; +#ifdef SOURCE_CACHE +PUBLIC char * source_cache_filename = NULL; +PUBLIC HTChunk * source_cache_chunk = NULL; +PUBLIC int LYCacheSource = SOURCE_CACHE_NONE; +#endif + #if defined(USE_COLOR_STYLE) #define MAX_STYLES_ON_LINE 64 @@ -173,6 +184,23 @@ typedef struct _HTTabID { */ struct _HText { HTParentAnchor * node_anchor; +#ifdef SOURCE_CACHE +#undef lines /* FIXME */ + char * source_cache_file; + HTChunk * source_cache_chunk; + /* + * Parse settings when this HText was generated. + */ + BOOLEAN clickable_images; + BOOLEAN pseudo_inline_alts; + BOOLEAN raw_mode; + BOOLEAN historical_comments; + BOOLEAN minimal_comments; + BOOLEAN soft_dquotes; + BOOLEAN old_dtd; + int lines; /* Screen size */ + int cols; +#endif HTLine * last_line; int Lines; /* Number of them */ int chars; /* Number of them */ @@ -432,7 +460,9 @@ PUBLIC HText * HText_new ARGS1( if (!loaded_texts) { loaded_texts = HTList_new(); +#ifdef LY_FIND_LEAKS atexit(free_all_texts); +#endif } /* @@ -483,6 +513,34 @@ PUBLIC HText * HText_new ARGS1( self->stale = YES; self->toolbar = NO; self->tabs = NULL; +#ifdef SOURCE_CACHE + /* + * Yes, this is a Gross And Disgusting Hack(TM), I know... + */ + self->source_cache_file = NULL; + if (LYCacheSource == SOURCE_CACHE_FILE && source_cache_filename) { + StrAllocCopy(self->source_cache_file, source_cache_filename); + FREE(source_cache_filename); + } + self->source_cache_chunk = NULL; + if (LYCacheSource == SOURCE_CACHE_MEMORY && source_cache_chunk) { + self->source_cache_chunk = source_cache_chunk; + source_cache_chunk = NULL; + } + + /* + * Remember the parse settings. + */ + self->clickable_images = clickable_images; + self->pseudo_inline_alts = pseudo_inline_alts; + self->raw_mode = LYUseDefaultRawMode; + self->historical_comments = historical_comments; + self->minimal_comments = minimal_comments; + self->soft_dquotes = soft_dquotes; + self->old_dtd = Old_DTD; + self->lines = LYlines; + self->cols = LYcols; +#endif /* * If we are going to render the List Page, always merge in hidden * links to get the numbering consistent if form fields are numbered @@ -503,10 +561,14 @@ PUBLIC HText * HText_new ARGS1( self->LastChar = '\0'; self->IgnoreExcess = FALSE; +#ifndef PSRC_TEST if (HTOutputFormat == WWW_SOURCE) self->source = YES; else self->source = NO; +#else + self->source=( LYpsrc ? psrc_view : HTOutputFormat == WWW_SOURCE); +#endif HTAnchor_setDocument(anchor, (HyperDoc *)self); HTFormNumber = 0; /* no forms started yet */ HTMainText = self; @@ -729,6 +791,23 @@ PUBLIC void HText_free ARGS1( HTMainAnchor = NULL; } +#ifdef SOURCE_CACHE + /* + * Clean up the source cache, if any. + */ + if (self->source_cache_file) { + CTRACE(tfp, "Removing source cache file %s\n", + self->source_cache_file); + LYRemoveTemp(self->source_cache_file); + FREE(self->source_cache_file); + } + if (self->source_cache_chunk) { + CTRACE(tfp, "Removing memory source cache %p\n", + (void *)self->source_cache_chunk); + HTChunkFree(self->source_cache_chunk); + } +#endif + FREE(self); } @@ -2943,24 +3022,20 @@ check_IgnoreExcess: */ PUBLIC void _internal_HTC ARGS3(HText *,text, int,style, int,dir) { - HTLine* line; - static int last_style = -1; - static int last_dir = -1; + HTLine* line; - /* can't change style if we have no text to change style with */ - if (!text) return; + /* can't change style if we have no text to change style with */ + if (text != 0) { - line = text->last_line; + line = text->last_line; - if ((style != last_style || dir != last_dir) && line->numstyles < MAX_STYLES_ON_LINE) - { - line->styles[line->numstyles].horizpos = line->size; - line->styles[line->numstyles].style = style; - line->styles[line->numstyles].direction = dir; - line->numstyles++; - } - last_style = style; - last_dir = dir; + if (line->numstyles < MAX_STYLES_ON_LINE) { + line->styles[line->numstyles].horizpos = line->size; + line->styles[line->numstyles].style = style; + line->styles[line->numstyles].direction = dir; + line->numstyles++; + } + } } #endif @@ -5291,7 +5366,9 @@ PUBLIC void HTAddSearchQuery ARGS1( if (!search_queries) { search_queries = HTList_new(); +#ifdef LY_FIND_LEAKS atexit(HTSearchQueries_free); +#endif HTList_addObject(search_queries, new); return; } @@ -5738,40 +5815,39 @@ PRIVATE void adjust_search_result ARGS3( } } -PUBLIC void www_user_search ARGS3( +/* + John Bley, April 1, 1999 (No joke) + www_user_search_internals was spawned from www_user_search to + remove a cut-n-paste coding hack: basically, this entire function + was duplicated at the two points that www_user_search now calls it. + And, because www_user_search has a return value defined as modification + of the screen and some global values, and since it used an awkward for(;;) + construct, this method has to distinguish between when it's "really" + returning and when it's just falling through via a break; in the + infinite-for-loop. So, basically, we have a large amount of arguments + since this loop used to be directly in www_user_search, and we return + 1 to say we're "really" returning and 0 to indicate we fell through. + Also, due to exactly one difference between the first pass of this + code and the second pass, we have the "firstpass" argument, which is + true iff it's the first pass. + + I hate cut-n-paste coding. + */ +PRIVATE int www_user_search_internals ARGS8( + int, firstpass, int, start_line, document *, doc, - char *, target) + char *, target, + TextAnchor *, a, + HTLine *, line, + int *, count, + int *, tentative_result) { - register HTLine * line; - register int count; - int tentative_result = -1; - TextAnchor *a; - OptionType *option; + OptionType * option; char *stars = NULL, *cp; - if (!HTMainText) { - return; - } - - /* - * Advance to the start line. - */ - line = HTMainText->last_line->next; - for (count = 1; count <= start_line; line = line->next, count++) { - if (line == HTMainText->last_line) { - line = HTMainText->last_line->next; /* set to first line */ - count = 1; - break; - } - } - a = HTMainText->first_anchor; - while (a && a->line_num < count - 1) { - a = a->next; - } - for (;;) { - while ((a != NULL) && a->line_num == (count - 1)) { + while ((a != NULL) && a->line_num == (*count - 1)) { if (a->show_anchor && (a->link_type != INPUT_ANCHOR || a->input_field->type != F_HIDDEN_TYPE)) { @@ -5779,15 +5855,15 @@ PUBLIC void www_user_search ARGS3( LYno_attr_char_strstr(a->hightext, target)) || ((a->hightext != NULL && case_sensitive == FALSE) && LYno_attr_char_case_strstr(a->hightext, target))) { - adjust_search_result(doc, count, start_line); - return; + adjust_search_result(doc, *count, start_line); + return 1; } if (((a->hightext2 != NULL && case_sensitive == TRUE) && LYno_attr_char_strstr(a->hightext2, target)) || ((a->hightext2 != NULL && case_sensitive == FALSE) && LYno_attr_char_case_strstr(a->hightext2, target))) { - adjust_search_result(doc, count, start_line); - return; + adjust_search_result(doc, *count, start_line); + return 1; } /* @@ -5807,8 +5883,8 @@ PUBLIC void www_user_search ARGS3( ((case_sensitive == FALSE) && LYno_attr_char_case_strstr(a->input_field->value, target))) { - adjust_search_result(doc, count, start_line); - return; + adjust_search_result(doc, *count, start_line); + return 1; } StrAllocCopy(stars, a->input_field->value); for (cp = stars; *cp != '\0'; cp++) @@ -5818,8 +5894,8 @@ PUBLIC void www_user_search ARGS3( ((case_sensitive == FALSE) && LYno_attr_char_case_strstr(stars, target))) { FREE(stars); - adjust_search_result(doc, count, start_line); - return; + adjust_search_result(doc, *count, start_line); + return 1; } FREE(stars); } else if (a->input_field->type == F_OPTION_LIST_TYPE) { @@ -5837,8 +5913,8 @@ PUBLIC void www_user_search ARGS3( case_sensitive == FALSE) && LYno_attr_char_case_strstr(option->name, target))) { - adjust_search_result(doc, count, start_line); - return; + adjust_search_result(doc, *count, start_line); + return 1; } option = option->next; } @@ -5855,8 +5931,8 @@ PUBLIC void www_user_search ARGS3( LYno_attr_char_strstr(cp, target)) || ((case_sensitive == FALSE) && LYno_attr_char_case_strstr(cp, target))) { - adjust_search_result(doc, count, start_line); - return; + adjust_search_result(doc, *count, start_line); + return 1; } } else if (a->input_field->type == F_CHECKBOX_TYPE) { /* @@ -5872,8 +5948,8 @@ PUBLIC void www_user_search ARGS3( LYno_attr_char_strstr(cp, target)) || ((case_sensitive == FALSE) && LYno_attr_char_case_strstr(cp, target))) { - adjust_search_result(doc, count, start_line); - return; + adjust_search_result(doc, *count, start_line); + return 1; } } else { /* @@ -5888,191 +5964,89 @@ PUBLIC void www_user_search ARGS3( ((case_sensitive == FALSE) && LYno_attr_char_case_strstr(a->input_field->value, target))) { - adjust_search_result(doc, count, start_line); - return; + adjust_search_result(doc, *count, start_line); + return 1; } } } } a = a->next; } - if (a != NULL && a->line_num <= (count - 1)) { + if (a != NULL && a->line_num <= (*count - 1)) { a = a->next; } if (case_sensitive && LYno_attr_char_strstr(line->data, target)) { - tentative_result = count; + *tentative_result = *count; break; } else if (!case_sensitive && LYno_attr_char_case_strstr(line->data, target)) { - tentative_result = count; + *tentative_result = *count; break; - } else if (line == HTMainText->last_line) { /* next line */ + /* Note: this is where the two passes differ */ + } else if (firstpass && line == HTMainText->last_line) { + /* next line */ break; + } else if (!firstpass && *count > start_line) { + HTUserMsg2(STRING_NOT_FOUND, target); + return 1; /* end */ } else { /* end */ line = line->next; - count++; + (*count)++; } } - if (tentative_result > 0) { - adjust_search_result(doc, tentative_result, start_line); + /* No, man, we just fell through. You want to call us again. */ + return 0; +} + +PUBLIC void www_user_search ARGS3( + int, start_line, + document *, doc, + char *, target) +{ + HTLine * line; + int count; + int tentative_result = -1; + TextAnchor *a; + + if (!HTMainText) { return; } /* - * Search from the beginning. + * Advance to the start line. */ + line = HTMainText->last_line->next; + for (count = 1; count <= start_line; line = line->next, count++) { + if (line == HTMainText->last_line) { + line = HTMainText->last_line->next; /* set to first line */ + count = 1; + break; + } + } + a = HTMainText->first_anchor; + while (a && a->line_num < count - 1) { + a = a->next; + } + if (www_user_search_internals(1, start_line, doc, target, + a, line, &count, &tentative_result) == 1) { + return; /* Return the www_user_search_internals result */ + } + + if (tentative_result > 0) { + adjust_search_result(doc, tentative_result, start_line); + return; + } + /* That didn't work, search from the beginning instead */ line = HTMainText->last_line->next; /* set to first line */ count = 1; a = HTMainText->first_anchor; while (a && a->line_num < count - 1) { a = a->next; } - - for (;;) { - while ((a != NULL) && a->line_num == (count - 1)) { - if (a->show_anchor && - (a->link_type != INPUT_ANCHOR || - a->input_field->type != F_HIDDEN_TYPE)) { - if (((a->hightext != NULL && case_sensitive == TRUE) && - LYno_attr_char_strstr(a->hightext, target)) || - ((a->hightext != NULL && case_sensitive == FALSE) && - LYno_attr_char_case_strstr(a->hightext, target))) { - adjust_search_result(doc, count, start_line); - return; - } - if (((a->hightext2 != NULL && case_sensitive == TRUE) && - LYno_attr_char_strstr(a->hightext2, target)) || - ((a->hightext2 != NULL && case_sensitive == FALSE) && - LYno_attr_char_case_strstr(a->hightext2, target))) { - adjust_search_result(doc, count, start_line); - return; - } - - /* - * Search the relevant form fields, taking the - * case_sensitive setting into account. - FM - */ - if ((a->input_field != NULL && a->input_field->value != NULL) && - a->input_field->type != F_HIDDEN_TYPE) { - if (a->input_field->type == F_PASSWORD_TYPE) { - /* - * Check the actual, hidden password, and then - * the displayed string. - FM - */ - if (((case_sensitive == TRUE) && - LYno_attr_char_strstr(a->input_field->value, - target)) || - ((case_sensitive == FALSE) && - LYno_attr_char_case_strstr(a->input_field->value, - target))) { - adjust_search_result(doc, count, start_line); - return; - } - StrAllocCopy(stars, a->input_field->value); - for (cp = stars; *cp != '\0'; cp++) - *cp = '*'; - if (((case_sensitive == TRUE) && - LYno_attr_char_strstr(stars, target)) || - ((case_sensitive == FALSE) && - LYno_attr_char_case_strstr(stars, target))) { - FREE(stars); - adjust_search_result(doc, count, start_line); - return; - } - FREE(stars); - } else if (a->input_field->type == F_OPTION_LIST_TYPE) { - /* - * Search the option strings that are displayed - * when the popup is invoked. - FM - */ - option = a->input_field->select_list; - while (option != NULL) { - if (((option->name != NULL && - case_sensitive == TRUE) && - LYno_attr_char_strstr(option->name, - target)) || - ((option->name != NULL && - case_sensitive == FALSE) && - LYno_attr_char_case_strstr(option->name, - target))) { - adjust_search_result(doc, count, start_line); - return; - } - option = option->next; - } - } else if (a->input_field->type == F_RADIO_TYPE) { - /* - * Search for checked or unchecked parens. - FM - */ - if (a->input_field->num_value) { - cp = checked_radio; - } else { - cp = unchecked_radio; - } - if (((case_sensitive == TRUE) && - LYno_attr_char_strstr(cp, target)) || - ((case_sensitive == FALSE) && - LYno_attr_char_case_strstr(cp, target))) { - adjust_search_result(doc, count, start_line); - return; - } - } else if (a->input_field->type == F_CHECKBOX_TYPE) { - /* - * Search for checked or unchecked - * square brackets. - FM - */ - if (a->input_field->num_value) { - cp = checked_box; - } else { - cp = unchecked_box; - } - if (((case_sensitive == TRUE) && - LYno_attr_char_strstr(cp, target)) || - ((case_sensitive == FALSE) && - LYno_attr_char_case_strstr(cp, target))) { - adjust_search_result(doc, count, start_line); - return; - } - } else { - /* - * Check the values intended for display. - * May have been found already via the - * hightext search, but make sure here - * that the entire value is searched. - FM - */ - if (((case_sensitive == TRUE) && - LYno_attr_char_strstr(a->input_field->value, - target)) || - ((case_sensitive == FALSE) && - LYno_attr_char_case_strstr(a->input_field->value, - target))) { - adjust_search_result(doc, count, start_line); - return; - } - } - } - } - a = a->next; - } - if (a != NULL && a->line_num <= (count - 1)) { - a = a->next; - } - - if (case_sensitive && LYno_attr_char_strstr(line->data, target)) { - tentative_result = count; - break; - } else if (!case_sensitive && - LYno_attr_char_case_strstr(line->data, target)) { - tentative_result = count; - break; - } else if (count > start_line) { /* next line */ - HTUserMsg2(STRING_NOT_FOUND, target); - return; /* end */ - } else { - line = line->next; - count++; - } + if (www_user_search_internals(0, start_line, doc, target, + a, line, &count, &tentative_result) == 1) { + return; /* Return the www_user_search_internals result */ } if (tentative_result > 0) { adjust_search_result(doc, tentative_result, start_line); @@ -6190,6 +6164,148 @@ PUBLIC void HTuncache_current_document NOARGS } } +#ifdef SOURCE_CACHE +PUBLIC BOOLEAN HTreparse_document NOARGS +{ + BOOLEAN ok = FALSE; + + if (!HTMainText || LYCacheSource == SOURCE_CACHE_NONE || + (LYCacheSource == SOURCE_CACHE_FILE && + !HTMainText->source_cache_file) || + (LYCacheSource == SOURCE_CACHE_MEMORY && + !HTMainText->source_cache_chunk)) + return FALSE; + + if (LYCacheSource == SOURCE_CACHE_FILE && HTMainText->source_cache_file) { + FILE * fp; + HTFormat format; + int ret; + + CTRACE(tfp, "Reparsing source cache file %s\n", + HTMainText->source_cache_file); + + /* + * This is more or less copied out of HTLoadFile(), except we don't + * get a content encoding. This may be overkill... + */ + if (HTMainText->node_anchor->content_type) { + format = HTAtom_for(HTMainText->node_anchor->content_type); + } else { + format = HTFileFormat(HTMainText->source_cache_file, NULL, NULL); + format = HTCharsetFormat(format, HTMainText->node_anchor, + UCLYhndl_HTFile_for_unspec); + } + CTRACE(tfp, " Content type is \"%s\"\n", format->name); + + /* + * Pass the source cache filename on to the next HText. Mark it + * NULL here so that it won't get deleted by HText_free(). + */ + source_cache_filename = HTMainText->source_cache_file; + HTMainText->source_cache_file = NULL; + + fp = fopen(source_cache_filename, "r"); + if (!fp) { + CTRACE(tfp, " Cannot read file %s\n", source_cache_filename); + FREE(source_cache_filename); + return FALSE; + } + ret = HTParseFile(format, HTOutputFormat, HTMainText->node_anchor, + fp, NULL); + fclose(fp); + ok = (ret == HT_LOADED); + if (!ok) + FREE(source_cache_filename); + } + + if (LYCacheSource == SOURCE_CACHE_MEMORY && + HTMainText->source_cache_chunk) { + HTFormat format = WWW_HTML; + int ret; + + CTRACE(tfp, "Reparsing from source memory cache %p\n", + (void *)HTMainText->source_cache_chunk); + + /* + * Pass the source cache HTChunk on to the next HText. Clear it + * here so that it won't get deleted by HText_free(). + */ + source_cache_chunk = HTMainText->source_cache_chunk; + HTMainText->source_cache_chunk = NULL; + + ret = HTParseMem(format, HTOutputFormat, HTMainText->node_anchor, + source_cache_chunk, NULL); + ok = (ret == HT_LOADED); + if (!ok) { + HTChunkFree(source_cache_chunk); + source_cache_chunk = NULL; + } + } + + CTRACE(tfp, "Reparse %s\n", (ok ? "succeeded" : "failed")); + return ok; +} + +PRIVATE void trace_setting_change ARGS3( + CONST char *, name, + BOOLEAN, prev_setting, + BOOLEAN, new_setting) +{ + if (prev_setting != new_setting) + CTRACE(tfp, "HTdocument_settings_changed: %s setting has changed (was %s, now %s)\n", + name, prev_setting ? "ON" : "OFF", new_setting ? "ON" : "OFF"); +} + +PUBLIC BOOLEAN HTdocument_settings_changed NOARGS +{ + /* + * Annoying Hack(TM): If we don't have a source cache, we can't + * reparse anyway, so pretend the settings haven't changed. + */ + if (!HTMainText || LYCacheSource == SOURCE_CACHE_NONE || + (LYCacheSource == SOURCE_CACHE_FILE && + !HTMainText->source_cache_file) || + (LYCacheSource == SOURCE_CACHE_MEMORY && + !HTMainText->source_cache_chunk)) + return FALSE; + + if (TRACE) { + /* + * If we're tracing, note everying that has changed. + */ + trace_setting_change("CLICKABLE_IMAGES", + HTMainText->clickable_images, clickable_images); + trace_setting_change("PSEUDO_INLINE_ALTS", + HTMainText->pseudo_inline_alts, + pseudo_inline_alts); + trace_setting_change("RAW_MODE", HTMainText->raw_mode, + LYUseDefaultRawMode); + trace_setting_change("HISTORICAL_COMMENTS", + HTMainText->historical_comments, + historical_comments); + trace_setting_change("MINIMAL_COMMENTS", + HTMainText->minimal_comments, minimal_comments); + trace_setting_change("SOFT_DQUOTES", + HTMainText->soft_dquotes, soft_dquotes); + trace_setting_change("OLD_DTD", HTMainText->old_dtd, Old_DTD); + if (HTMainText->lines != LYlines || HTMainText->cols != LYcols) + CTRACE(tfp, + "HTdocument_settings_changed: Screen size has changed (was %dx%d, now %dx%d)\n", + HTMainText->cols, HTMainText->lines, LYcols, LYlines); + } + + return (HTMainText->clickable_images != clickable_images || + HTMainText->pseudo_inline_alts != pseudo_inline_alts || + HTMainText->raw_mode != LYUseDefaultRawMode || + HTMainText->historical_comments != historical_comments || + HTMainText->minimal_comments != minimal_comments || + HTMainText->soft_dquotes != soft_dquotes || + HTMainText->old_dtd != Old_DTD || + HTMainText->lines != LYlines || + HTMainText->cols != LYcols); +} +#endif + PUBLIC int HTisDocumentSource NOARGS { return (HTMainText != 0) ? HTMainText->source : FALSE; @@ -9273,7 +9389,7 @@ PRIVATE int increment_tagged_htline ARGS6( } else { valid = FALSE; break; - } + } } /* @@ -9298,7 +9414,7 @@ PRIVATE int increment_tagged_htline ARGS6( val = atoi (p); if ((val == *old_val) || (*old_val == 0)) { /* 0 matches all */ if (*old_val != 0) - (*old_val)++; + (*old_val)++; val += incr; sprintf (s, "%d", val); new_n = strlen (s); @@ -9328,7 +9444,7 @@ PRIVATE int increment_tagged_htline ARGS6( */ if (new_n -= n) { nxt_anchor = st_anchor; - while ((nxt_anchor) && + while ((nxt_anchor) && (nxt_anchor->line_num == a->line_num)) { nxt_anchor->line_pos += new_n; nxt_anchor = nxt_anchor->next; @@ -9441,7 +9557,7 @@ PRIVATE void insert_new_textarea_anchor ARGS2( HTLine *l = 0; int curr_tag = 0; /* 0 ==> match any [tag] number */ - int lx = 0; /* 0 ==> no line crossing [tag]; it's a new line */ + int lx = 0; /* 0 ==> no line crossing [tag]; it's a new line */ int i; @@ -9745,8 +9861,6 @@ PUBLIC int HText_ExtEditForm ARGS1( int len; - ed_offset[0] = 0; /* pre-ANSI compilers don't initialize aggregates - TD */ - CTRACE(tfp, "GridText: entered HText_ExtEditForm()\n"); ed_temp = (char *) malloc (LY_MAXPATH); @@ -9810,6 +9924,7 @@ PUBLIC int HText_ExtEditForm ARGS1( * corresponding to the TEXTAREA line the cursor is on (if such * positioning is supported by the editor [as lynx knows it]). */ + ed_offset[0] = 0; /* pre-ANSI compilers don't initialize aggregates - TD */ if (((entry_line - start_line) > 0) && editor_can_position()) #ifdef VMS sprintf (ed_offset, "-%d", ((entry_line - start_line) + 1)); @@ -10560,3 +10675,11 @@ PUBLIC void redraw_lines_of_link ARGS1( #endif return; } + +#ifdef USE_PSRC +PUBLIC void HTMark_asSource NOARGS +{ + if (HTMainText) + HTMainText->source = TRUE; +} +#endif diff --git a/src/GridText.h b/src/GridText.h index c328202e..3e83a740 100644 --- a/src/GridText.h +++ b/src/GridText.h @@ -166,6 +166,10 @@ extern BOOL HText_getFirstTargetInLine PARAMS(( char * target)); extern int HTisDocumentSource NOPARAMS; extern void HTuncache_current_document NOPARAMS; +#ifdef SOURCE_CACHE +extern BOOLEAN HTreparse_document NOPARAMS; +extern BOOLEAN HTdocument_settings_changed NOPARAMS; +#endif extern int HText_getTopOfScreen NOPARAMS; extern int HText_getLines PARAMS((HText * text)); extern int HText_getNumOfLines NOPARAMS; @@ -272,6 +276,9 @@ extern int HText_InsertFile PARAMS(( struct link * form_link)); extern void redraw_lines_of_link PARAMS((int cur)); + +#ifdef USE_PSRC extern void HTMark_asSource NOPARAMS; +#endif #endif /* LYGRIDTEXT_H */ diff --git a/src/HTAlert.c b/src/HTAlert.c index c386bb5e..34b828ba 100644 --- a/src/HTAlert.c +++ b/src/HTAlert.c @@ -16,7 +16,6 @@ #include <LYStrings.h> #include <LYUtils.h> #include <LYClean.h> -#include <LYSignal.h> #include <GridText.h> #include <LYCookie.h> @@ -231,7 +230,7 @@ PUBLIC BOOL HTConfirmDefault ARGS2(CONST char *, Msg, int, Dft) result = YES; } else if (TOUPPER(c) == TOUPPER(*msg_no)) { return(NO); - } else if (Dft != DFT_CONFIRM && (c == '\r' || c == '\n')) { + } else if (Dft != DFT_CONFIRM) { return(Dft); } } diff --git a/src/HTInit.c b/src/HTInit.c index c4319235..f6ab32fa 100644 --- a/src/HTInit.c +++ b/src/HTInit.c @@ -24,7 +24,6 @@ #include <LYStrings.h> #include <LYUtils.h> #include <LYGlobalDefs.h> -#include <LYSignal.h> #include <LYexit.h> #include <LYLeaks.h> diff --git a/src/HTML.c b/src/HTML.c index 7572ad86..40cb1f2d 100644 --- a/src/HTML.c +++ b/src/HTML.c @@ -39,7 +39,6 @@ #include <HTForms.h> #include <HTNestedList.h> #include <GridText.h> -#include <LYSignal.h> #include <LYStrings.h> #include <LYUtils.h> #include <LYMap.h> @@ -51,11 +50,29 @@ #endif /* VMS */ #ifdef USE_COLOR_STYLE +#include <SGML.h> #include <AttrList.h> #include <LYHash.h> #include <LYStyle.h> +#include <LYPrettySrc.h> #undef SELECTED_STYLES #define pHText_changeStyle(X,Y,Z) {} + +#define OPT_SCN 1 +#define OMIT_SCN_KEEPING 0 /* whether to omit keeping of Style_className + when lss support is on. 1 to increase performance. The value must + correspond to one in LYCurses.c. Should be 0 if OPT_SCN=0 */ + +#if OMIT_SCN_KEEPING +# define HCODE_TO_STACK_OFF(x) /*(CSHASHSIZE+1)*/ 88888 /*special value.*/ +#else +# define HCODE_TO_STACK_OFF(x) x /*pass computed value*/ +#endif + +#endif /* USE_COLOR_STYLE */ + +#ifdef SOURCE_CACHE +#include <HTAccess.h> #endif #include <LYexit.h> @@ -73,7 +90,14 @@ extern int LYcols; struct _HTStream { CONST HTStreamClass * isa; +#ifdef SOURCE_CACHE + FILE * fp; + HTChunk * chunk; + CONST HTStreamClass * actions; + HTStream * target; +#else /* .... */ +#endif }; PRIVATE HTStyleSheet * styleSheet = NULL; /* Application-wide */ @@ -98,6 +122,14 @@ PRIVATE void HTML_end_element PARAMS((HTStructured *me, int element_number, char **include)); +PRIVATE void HTML_start_element PARAMS(( + HTStructured * me, + int element_number, + CONST BOOL* present, + CONST char ** value, + int tag_charset, + char ** include)); + /* * If we have verbose_img set, display labels for images. */ @@ -567,7 +599,7 @@ PUBLIC void HTML_write ARGS3(HTStructured *, me, CONST char*, s, int, l) * In document retrieved from [...]/mypath/mydoc.htm w/ base [...]/otherpath/ * a. HREF="[...]/mypath/mydoc.htm" -> [...]/mypath/mydoc.htm * b. HREF="[...]/mypath/mydoc.htm#frag" -> [...]/mypath/mydoc.htm#frag - * c. HREF="mydoc.htm" -> [...]/otherpath/mydoc.htm + * c. HREF="mydoc.htm" -> [...]/otherpath/mydoc.htm * d. HREF="mydoc.htm#frag" -> [...]/otherpath/mydoc.htm#frag * e. HREF="" -> [...]/mypath/mydoc.htm (marked internal) * f. HREF="#frag" -> [...]/mypath/mydoc.htm#frag (marked internal) @@ -605,16 +637,69 @@ PUBLIC void HTML_write ARGS3(HTStructured *, me, CONST char*, s, int, l) #endif /* DONT_TRACK_INTERNAL_LINKS */ #ifdef USE_COLOR_STYLE -static char *Style_className = NULL; +# if !OPT_SCN +static char* Style_className = NULL; static char myHash[128]; +# else +PRIVATE char Style_className[4096];/* i hope it's enough :) HV */ +PRIVATE char* Style_className_end=Style_className;/*this points to the + end of string in Style_className (it points to '\0') */ +# endif static int hcode; #endif + +#ifdef USE_PSRC + +PRIVATE void HTMLSRC_apply_markup ARGS4( + HTStructured *, context, + HTlexem, lexem, + BOOL, start, + int, tag_charset) +{ + HT_tagspec* ts = *( ( start ? lexem_start : lexem_end ) + lexem); + + while (ts) { +#ifdef USE_COLOR_STYLE + if (ts->start) { + current_tag_style = ts->style; + force_current_tag_style = TRUE; + forced_classname = ts->class_name; + force_classname = TRUE; + } +#endif + CTRACE(tfp,ts->start ? "SRCSTART %d\n" : "SRCSTOP %d\n",(int)lexem); + if (ts->start) + HTML_start_element( + context, + ts->element, + ts->present, + (CONST char **)ts->value, + tag_charset, + NULL); + else + HTML_end_element( + context, + ts->element, + NULL); + ts = ts->next; + } +} +# define START TRUE +# define STOP FALSE +# define PSRCSTART(x) HTMLSRC_apply_markup(me,HTL_##x,START,tag_charset) +# define PSRCSTOP(x) HTMLSRC_apply_markup(me,HTL_##x,STOP,tag_charset) + +# define PUTC(x) HTML_put_character(me,x) +# define PUTS(x) HTML_put_string(me,x) + +#endif /* USE_PSRC*/ + /* Start Element ** ------------- */ PRIVATE void HTML_start_element ARGS6( - HTStructured *, me, + HTStructured *, me, int, element_number, CONST BOOL*, present, CONST char **, value, @@ -635,11 +720,110 @@ PRIVATE void HTML_start_element ARGS6( 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? */ - HTChildAnchor *ID_A = NULL; /* HTML_foo_ID anchor */ + HTChildAnchor *ID_A = NULL; /* HTML_foo_ID anchor */ int url_type = 0, i = 0; char *cp = NULL; int ElementNumber = element_number; BOOL intern_flag = FALSE; +#ifdef USE_COLOR_STYLE + char* class_name; +# if OPT_SCN +# if !OMIT_SCN_KEEPING + char* Style_className_end_was = Style_className_end+1; +# endif + /* assume ';' will be appended*/ +# endif +#endif + +#ifdef USE_PSRC + if (psrc_view && !sgml_in_psrc_was_initialized) { + if (!psrc_nested_call) { + HTTag * tag = &HTML_dtd.tags[element_number]; + char buf[200]; + CONST char* p; + if (psrc_first_tag) { + psrc_first_tag=FALSE; + /* perform the special actions on the begining of the document. + It's assumed that all lynx modules start generating html + from tag (ie not a text) so we are able to trap this moment + and initialize. + */ + psrc_nested_call=TRUE; + HTML_start_element(me,HTML_BODY, NULL,NULL,tag_charset,NULL); + HTML_start_element(me,HTML_PRE, NULL,NULL,tag_charset,NULL); + PSRCSTART(entire); + psrc_nested_call=FALSE; + } + + psrc_nested_call=TRUE; + /*write markup for tags and exit*/ + PSRCSTART(abracket); PUTC('<'); PSRCSTOP(abracket); + PSRCSTART(tag); + if (tagname_transform!=0) + PUTS(tag->name); + else { + strcpy(buf,tag->name); + LYLowerCase(buf); + PUTS(buf); + } + if (present) { + for (i = 0; i < tag->number_of_attributes; i++) + if (present[i]) { + PUTC(' '); + PSRCSTART(attrib); + if (attrname_transform!=0) + PUTS(tag->attributes[i].name); + else { + strcpy(buf,tag->attributes[i].name); + LYLowerCase(buf); + PUTS(buf); + } + if (value[i]) { + char q='"'; + /*0 in dquotes, 1 - in quotes, 2 mixed*/ + char kind= ( !strchr(value[i], '"') ? + 0 : + !strchr(value[i], '\'') ? + q='\'',1 : + 2); + PUTC('='); + PSRCSTOP(attrib); + PSRCSTART(attrval); + PUTC(q); + /*is it special ? */ + if (tag->attributes[i].type == HTMLA_ANAME) { + HTStartAnchor(me,value[i],NULL); + HTML_end_element(me,HTML_A,NULL); + } else if (tag->attributes[i].type == HTMLA_HREF) { + PSRCSTART(href); + HTStartAnchor(me,NULL,value[i]); + } + if (kind!=2) + PUTS(value[i]); + else + for (p = value[i]; *p; p++) + if (*p != '"') + PUTC(*p); + else + PUTS("""); + /*is it special ? */ + if (tag->attributes[i].type == HTMLA_HREF) { + HTML_end_element(me,HTML_A,NULL); + PSRCSTOP(href); + } + PUTC(q); + PSRCSTOP(attrval); + } /* if value */ + } /* if present[i] */ + }/* if present*/ + PSRCSTOP(tag); + PSRCSTART(abracket); PUTC('>'); PSRCSTOP(abracket); + psrc_nested_call=FALSE; + return; + } /*if (!psrc_nested_call) */ + /*fall through*/ + } +#endif /* USE_PSRC */ if (LYMapsOnly) { if (!(ElementNumber == HTML_MAP || ElementNumber == HTML_AREA || @@ -664,19 +848,63 @@ PRIVATE void HTML_start_element ARGS6( /* this should be done differently */ #if defined(USE_COLOR_STYLE) + +#if !OPT_SCN HTSprintf (&Style_className, ";%s", HTML_dtd.tags[element_number].name); - strcpy (myHash, HTML_dtd.tags[element_number].name); - if (class_string[0]) - { - HTSprintf (&Style_className, ".%s", class_string); - strcat (myHash, "."); - strcat (myHash, class_string); +#else +# if !OMIT_SCN_KEEPING + *Style_className_end=';'; + /*strcpy(Style_className_end+1,HTML_dtd.tags[element_number].name);*/ + memcpy(Style_className_end+1, + HTML_dtd.tags[element_number].name, + HTML_dtd.tags[element_number].name_len+1); + Style_className_end += HTML_dtd.tags[element_number].name_len+1; +# endif +#endif + class_name = (force_classname ? forced_classname : class_string); + force_classname = FALSE; + + if (force_current_tag_style == FALSE) { + current_tag_style = class_name[0] + ? -1 + : cached_tag_styles[element_number]; + } else { + force_current_tag_style = FALSE; } - class_string[0] = '\0'; - strtolower(myHash); - hcode = hash_code(myHash); - strtolower(Style_className); + + if (current_tag_style == -1) { +#if !OPT_SCN + strcpy (myHash, HTML_dtd.tags[element_number].name); +#else + hcode=hash_code_lowercase_on_fly(HTML_dtd.tags[element_number].name); +#endif + if (class_name[0]) + { +#if !OPT_SCN + HTSprintf (&Style_className, ".%s", class_name); + strcat (myHash, "."); + strcat (myHash, class_name); +#else + +# if !OMIT_SCN_KEEPING + int l=strlen(class_name); + *Style_className_end = '.'; + memcpy(Style_className_end+1, class_name, l+1 ); + Style_className_end += l+1; +# endif + + hcode = hash_code_aggregate_char('.', hcode); + hcode = hash_code_aggregate_lower_on_fly(class_name, hcode); +#endif + } +#if !OPT_SCN + strtolower(myHash); + hcode = hash_code(myHash); +#endif + class_string[0] = '\0'; + +#if !OPT_SCN if (TRACE) { fprintf(tfp, "CSSTRIM:%s -> %d", myHash, hcode); @@ -699,12 +927,46 @@ PRIVATE void HTML_start_element ARGS6( else fprintf(tfp, " ca=%d\n", hashStyles[hcode].color); } +#endif - if (displayStyles[element_number + STARTAT].color > -2) /* actually set */ - { - CTRACE(tfp, "CSSTRIM: start_element: top <%s>\n", HTML_dtd.tags[element_number].name); - HText_characterStyle(me->text, hcode, 1); + /* seems that this condition is always true - HV */ + if (displayStyles[element_number + STARTAT].color > -2) /* actually set */ + { + CTRACE(tfp, "CSSTRIM: start_element: top <%s>\n", HTML_dtd.tags[element_number].name); + HText_characterStyle(me->text, hcode, 1); + } + } else { /* (current_tag_style!=-1) */ + if (class_name[0]) { +#if !OPT_SCN + HTSprintf (&Style_className, ".%s", class_name); + strcat (myHash, "."); + strcat (myHash, class_name); +#else +# if !OMIT_SCN_KEEPING + int l = strlen(class_name); + *Style_className_end='.'; + memcpy(Style_className_end+1,class_name, l+1 ); + Style_className_end+=l+1; +# endif +#endif + class_string[0] = '\0'; + } + hcode = current_tag_style; + HText_characterStyle(me->text, hcode , 1); + current_tag_style = -1; } + +#if !OPT_SCN + strtolower(Style_className); +#else +# if !OMIT_SCN_KEEPING + strtolower(Style_className_end_was);/*only the part that wasn't + lowercased yet*/ +# endif +#endif + + + #endif /* USE_COLOR_STYLE */ /* @@ -917,11 +1179,17 @@ PRIVATE void HTML_start_element ARGS6( /* * Handle REL links. - FM */ + if (present && present[HTML_LINK_REL] && value[HTML_LINK_REL]) { /* * Ignore style sheets, for now. - FM */ +/* lss and css has different syntax - lynx shouldn't try to + parse them now (it tries to parse them as lss, so it exits with + error message the 1st non-empty line) - HVV +*/ +#ifndef USE_COLOR_STYLE if (!strcasecomp(value[HTML_LINK_REL], "StyleSheet") || !strcasecomp(value[HTML_LINK_REL], "Style")) { CTRACE(tfp, "HTML: StyleSheet link found.\n"); @@ -959,6 +1227,7 @@ PRIVATE void HTML_start_element ARGS6( FREE(href); break; } +#endif /* ! USE_COLOR_STYLE */ /* * Ignore anything not registered in the the 28-Mar-95 @@ -2881,7 +3150,7 @@ PRIVATE void HTML_start_element ARGS6( if ((ID_A = HTAnchor_findChildAndLink( me->node_anchor, /* Parent */ id_string, /* Tag */ - NULL, /* Addresss */ + NULL, /* Addresss */ (HTLinkType*)0)) != NULL) { /* Type */ HText_beginAnchor(me->text, me->inUnderline, ID_A); HText_endAnchor(me->text, 0); @@ -2930,7 +3199,7 @@ PRIVATE void HTML_start_element ARGS6( if ((ID_A = HTAnchor_findChildAndLink( me->node_anchor, /* Parent */ id_string, /* Tag */ - NULL, /* Addresss */ + NULL, /* Addresss */ (HTLinkType*)0)) != NULL) { /* Type */ HText_beginAnchor(me->text, me->inUnderline, ID_A); HText_endAnchor(me->text, 0); @@ -2943,7 +3212,7 @@ PRIVATE void HTML_start_element ARGS6( if ((ID_A = HTAnchor_findChildAndLink( me->node_anchor, /* Parent */ id_string, /* Tag */ - NULL, /* Addresss */ + NULL, /* Addresss */ (HTLinkType*)0)) != NULL) { /* Type */ HText_beginAnchor(me->text, me->inUnderline, ID_A); HText_endAnchor(me->text, 0); @@ -2989,7 +3258,7 @@ PRIVATE void HTML_start_element ARGS6( if ((ID_A = HTAnchor_findChildAndLink( me->node_anchor, /* Parent */ id_string, /* Tag */ - NULL, /* Addresss */ + NULL, /* Addresss */ (HTLinkType*)0)) != NULL) { /* Type */ HText_beginAnchor(me->text, me->inUnderline, ID_A); HText_endAnchor(me->text, 0); @@ -3094,7 +3363,7 @@ PRIVATE void HTML_start_element ARGS6( if ((ID_A = HTAnchor_findChildAndLink( me->node_anchor, /* Parent */ id_string, /* Tag */ - NULL, /* Addresss */ + NULL, /* Addresss */ (HTLinkType*)0)) != NULL) { /* Type */ HText_beginAnchor(me->text, me->inUnderline, ID_A); HText_endAnchor(me->text, 0); @@ -5251,7 +5520,7 @@ PRIVATE void HTML_start_element ARGS6( } CTRACE(tfp,"HTML:begin_element[%d]: adding style to stack - %s\n", - (int) STACKLEVEL(me), + (int) STACKLEVEL(me), me->new_style->name); (me->sp)--; me->sp[0].style = me->new_style; /* Stack new style */ @@ -5269,10 +5538,20 @@ PRIVATE void HTML_start_element ARGS6( #if !defined(USE_HASH) HText_characterStyle(me->text, element_number+STARTAT, STACK_OFF); #else - HText_characterStyle(me->text, hcode, STACK_OFF); + HText_characterStyle(me->text, HCODE_TO_STACK_OFF(hcode), STACK_OFF); #endif /* USE_HASH */ + +#if !OPT_SCN TrimColorClass(HTML_dtd.tags[element_number].name, Style_className, &hcode); +#else +# if !OMIT_SCN_KEEPING + FastTrimColorClass(HTML_dtd.tags[element_number].name, + HTML_dtd.tags[element_number].name_len, + Style_className, + &Style_className_end, &hcode); +# endif +#endif } #endif /* USE_COLOR_STYLE */ } @@ -5292,7 +5571,7 @@ PRIVATE void HTML_start_element ARGS6( ** incoming code errors, not this module. */ PRIVATE void HTML_end_element ARGS3( - HTStructured *, me, + HTStructured *, me, int, element_number, char **, include) { @@ -5300,6 +5579,32 @@ PRIVATE void HTML_end_element ARGS3( char *temp = NULL, *cp = NULL; BOOL BreakFlag = FALSE; +#ifdef USE_PSRC + if (psrc_view && !sgml_in_psrc_was_initialized) { + if (!psrc_nested_call) { + HTTag * tag = &HTML_dtd.tags[element_number]; + char buf[200]; + int tag_charset=0; + + psrc_nested_call=TRUE; + PSRCSTART(abracket); PUTS("</"); PSRCSTOP(abracket); + PSRCSTART(tag); + if (tagname_transform!=0) + PUTS(tag->name); + else { + strcpy(buf,tag->name); + LYLowerCase(buf); + PUTS(buf); + } + PSRCSTOP(tag); + PSRCSTART(abracket); PUTC('>'); PSRCSTOP(abracket); + psrc_nested_call=FALSE; + return; + } + /*fall through*/ + } +#endif + #ifdef CAREFUL /* parser assumed to produce good nesting */ if (element_number != me->sp[0].tag_number && HTML_dtd.tags[element_number].contents != SGML_EMPTY) { @@ -5394,7 +5699,7 @@ PRIVATE void HTML_end_element ARGS3( } else if (me->sp < (me->stack + MAX_NESTING - 1)) { (me->sp)++; CTRACE(tfp, "HTML:end_element[%d]: Popped style off stack - %s\n", - (int) STACKLEVEL(me), + (int) STACKLEVEL(me), me->sp->style->name); } else { CTRACE(tfp, @@ -6617,8 +6922,17 @@ End_Object: } /* switch */ #ifdef USE_COLOR_STYLE +#if !OPT_SCN TrimColorClass(HTML_dtd.tags[element_number].name, Style_className, &hcode); +#else +# if !OMIT_SCN_KEEPING + FastTrimColorClass(HTML_dtd.tags[element_number].name, + HTML_dtd.tags[element_number].name_len, + Style_className, + &Style_className_end, &hcode); +# endif +#endif if (!REALLY_EMPTY(element_number)) { @@ -6626,7 +6940,7 @@ End_Object: #if !defined(USE_HASH) HText_characterStyle(me->text, element_number+STARTAT, STACK_OFF); #else - HText_characterStyle(me->text, hcode, STACK_OFF); + HText_characterStyle(me->text, HCODE_TO_STACK_OFF(hcode), STACK_OFF); #endif /* USE_HASH */ } #endif /* USE_COLOR_STYLE */ @@ -6841,7 +7155,9 @@ PRIVATE void HTML_free ARGS1(HTStructured *, me) styles[HTML_PRE]->alignment = HT_LEFT; } #ifdef USE_COLOR_STYLE +# if !OPT_SCN FREE(Style_className); +# endif #endif FREE(me->base_href); FREE(me->map_address); @@ -6930,7 +7246,9 @@ PRIVATE void HTML_abort ARGS2(HTStructured *, me, HTError, e) styles[HTML_PRE]->alignment = HT_LEFT; } #ifdef USE_COLOR_STYLE +# if !OPT_SCN FREE(Style_className); +# endif #endif FREE(me->base_href); FREE(me->map_address); @@ -6995,19 +7313,19 @@ PRIVATE void get_styles NOARGS styles[HTML_DLC] = HTStyleNamed(styleSheet, "GlossaryCompact"); /* nested list styles */ - styles[HTML_DLC1] = HTStyleNamed(styleSheet, "GlossaryCompact1"); - styles[HTML_DLC2] = HTStyleNamed(styleSheet, "GlossaryCompact2"); - styles[HTML_DLC3] = HTStyleNamed(styleSheet, "GlossaryCompact3"); - styles[HTML_DLC4] = HTStyleNamed(styleSheet, "GlossaryCompact4"); - styles[HTML_DLC5] = HTStyleNamed(styleSheet, "GlossaryCompact5"); - styles[HTML_DLC6] = HTStyleNamed(styleSheet, "GlossaryCompact6"); + styles[HTML_DLC1] = HTStyleNamed(styleSheet, "GlossaryCompact1"); + styles[HTML_DLC2] = HTStyleNamed(styleSheet, "GlossaryCompact2"); + styles[HTML_DLC3] = HTStyleNamed(styleSheet, "GlossaryCompact3"); + styles[HTML_DLC4] = HTStyleNamed(styleSheet, "GlossaryCompact4"); + styles[HTML_DLC5] = HTStyleNamed(styleSheet, "GlossaryCompact5"); + styles[HTML_DLC6] = HTStyleNamed(styleSheet, "GlossaryCompact6"); styles[HTML_ADDRESS] = HTStyleNamed(styleSheet, "Address"); styles[HTML_BANNER] = HTStyleNamed(styleSheet, "Banner"); styles[HTML_BLOCKQUOTE] = HTStyleNamed(styleSheet, "Blockquote"); styles[HTML_BQ] = HTStyleNamed(styleSheet, "Bq"); styles[HTML_FN] = HTStyleNamed(styleSheet, "Footnote"); - styles[HTML_NOTE] = HTStyleNamed(styleSheet, "Note"); + styles[HTML_NOTE] = HTStyleNamed(styleSheet, "Note"); styles[HTML_PLAINTEXT] = styles[HTML_XMP] = HTStyleNamed(styleSheet, "Example"); styles[HTML_PRE] = HTStyleNamed(styleSheet, "Preformatted"); @@ -7200,7 +7518,11 @@ PUBLIC HTStructured* HTML_new ARGS3( me->comment_end = NULL; #ifdef USE_COLOR_STYLE +# if !OPT_SCN FREE(Style_className); +# else + Style_className_end = Style_className; +# endif class_string[0] = '\0'; #endif @@ -7295,11 +7617,157 @@ PUBLIC HTStructured* HTML_new ARGS3( me->target = stream; if (stream) - me->targetClass = *stream->isa; /* Copy pointers */ + me->targetClass = *stream->isa; /* Copy pointers */ return (HTStructured*) me; } +#ifdef SOURCE_CACHE +/* + * Pass-thru cache HTStream + */ + +PRIVATE void CacheThru_free ARGS1( + HTStream *, me) +{ + if (me->fp) + LYCloseTempFP(me->fp); + (*me->actions->_free)(me->target); + FREE(me); +} + +PRIVATE void CacheThru_abort ARGS2( + HTStream *, me, + HTError, e) +{ + if (me->fp) + LYCloseTempFP(me->fp); + (*me->actions->_abort)(me->target, e); + FREE(me); +} + +PRIVATE void CacheThru_put_character ARGS2( + HTStream *, me, + char, c_in) +{ + if (me->fp) + fputc(c_in, me->fp); + else + HTChunkPutc(me->chunk, c_in); + (*me->actions->put_character)(me->target, c_in); +} + +PRIVATE void CacheThru_put_string ARGS2( + HTStream *, me, + CONST char *, str) +{ + if (me->fp) + fputs(str, me->fp); + else + HTChunkPuts(me->chunk, str); + (*me->actions->put_string)(me->target, str); +} + +PRIVATE void CacheThru_write ARGS3( + HTStream *, me, + CONST char *, str, + int, l) +{ + if (me->fp) + fwrite(str, 1, l, me->fp); + else + HTChunkPutb(me->chunk, str, l); + (*me->actions->put_block)(me->target, str, l); +} + +PRIVATE CONST HTStreamClass PassThruCache = +{ + "PassThruCache", + CacheThru_free, + CacheThru_abort, + CacheThru_put_character, + CacheThru_put_string, + CacheThru_write +}; + +PRIVATE HTStream* CacheThru_new ARGS2( + HTParentAnchor *, anchor, + HTStream *, target) +{ + char filename[LY_MAXPATH]; + HTStream *stream = NULL; + HTProtocol *p = (HTProtocol *)anchor->protocol; + + /* + * Neatly and transparently vanish if source caching is disabled. + */ + if (LYCacheSource == SOURCE_CACHE_NONE) + return target; + + if (strcmp(p->name, "http") != 0) { + CTRACE(tfp, "Protocol is \"%s\"; not caching\n", p->name); + return target; + } + + stream = (HTStream *) malloc(sizeof(*stream)); + if (!stream) + outofmem(__FILE__, "CacheThru_new"); + + stream->isa = &PassThruCache; + stream->fp = NULL; + stream->chunk = NULL; + stream->target = target; + stream->actions = target->isa; + + if (LYCacheSource == SOURCE_CACHE_FILE) { + if (source_cache_filename) { + CTRACE(tfp, "Reusing source cache file %s\n", + source_cache_filename); + FREE(stream); + return target; + } + + /* + * We open the temp file in binary mode to make sure that + * end-of-line stuff and high-bit Latin-1 (or other) characters + * don't get munged; this way, the file should (knock on wood) + * contain exactly what came in from the network. + */ + if (!(stream->fp = LYOpenTemp(filename, HTML_SUFFIX, "wb"))) { + CTRACE(tfp, "Cannot get source cache file for URL %s\n", + HTAnchor_address((HTAnchor *)anchor)); + FREE(stream); + return target; + } + + /* + * Yes, this is a Gross And Disgusting Hack(TM), I know... + */ + StrAllocCopy(source_cache_filename, filename); + + CTRACE(tfp, "Caching source for URL %s in file %s\n", + HTAnchor_address((HTAnchor *)anchor), filename); + } + + if (LYCacheSource == SOURCE_CACHE_MEMORY) { + if (source_cache_chunk) { + CTRACE(tfp, "Reusing source memory cache %p\n", + (void *)source_cache_chunk); + FREE(stream); + return target; + } + + /* I think this is right... */ + source_cache_chunk = stream->chunk = HTChunkCreate(128); + CTRACE(tfp, "Caching source for URL %s in memory cache %p\n", + HTAnchor_address((HTAnchor *)anchor), (void *)stream->chunk); + + } + + return stream; +} +#endif + /* HTConverter for HTML to plain text ** ---------------------------------- ** @@ -7313,7 +7781,13 @@ PUBLIC HTStream* HTMLToPlain ARGS3( HTParentAnchor *, anchor, HTStream *, sink) { +#ifdef SOURCE_CACHE + return CacheThru_new(anchor, + SGML_new(&HTML_dtd, anchor, + HTML_new(anchor, pres->rep_out, sink))); +#else return SGML_new(&HTML_dtd, anchor, HTML_new(anchor, pres->rep_out, sink)); +#endif } /* HTConverter for HTML source to plain text @@ -7356,7 +7830,7 @@ PUBLIC HTStream* HTMLParsedPresent ARGS3( intermediate = HTStreamStack(WWW_PLAINTEXT, WWW_PRESENT, NULL, anchor); } else { - /* this too should amount to calling HTPlainPresent: */ + /* this too should amount to calling HTPlainPresent: */ intermediate = HTStreamStack(WWW_PLAINTEXT, pres->rep_out, NULL, anchor); } @@ -7372,7 +7846,13 @@ PUBLIC HTStream* HTMLParsedPresent ARGS3( } if (!intermediate) return NULL; +#ifdef SOURCE_CACHE + return CacheThru_new(anchor, + SGML_new(&HTML_dtd, anchor, + HTMLGenerator(intermediate))); +#else return SGML_new(&HTML_dtd, anchor, HTMLGenerator(intermediate)); +#endif } /* HTConverter for HTML to C code @@ -7397,7 +7877,12 @@ PUBLIC HTStream* HTMLToC ARGS3( html->comment_start = "/* "; html->comment_end = " */\n"; /* Must start in col 1 for cpp */ /* HTML_put_string(html,html->comment_start); */ +#ifdef SOURCE_CACHE + return CacheThru_new(anchor, + SGML_new(&HTML_dtd, anchor, html)); +#else return SGML_new(&HTML_dtd, anchor, html); +#endif } /* Presenter for HTML @@ -7414,7 +7899,13 @@ PUBLIC HTStream* HTMLPresent ARGS3( HTParentAnchor *, anchor, HTStream *, sink GCC_UNUSED) { +#ifdef SOURCE_CACHE + return CacheThru_new(anchor, + SGML_new(&HTML_dtd, anchor, + HTML_new(anchor, WWW_PRESENT, NULL))); +#else return SGML_new(&HTML_dtd, anchor, HTML_new(anchor, WWW_PRESENT, NULL)); +#endif } #endif /* !GUI */ diff --git a/src/LYBookmark.c b/src/LYBookmark.c index fcad0b4d..752de49d 100644 --- a/src/LYBookmark.c +++ b/src/LYBookmark.c @@ -5,7 +5,6 @@ #include <LYBookmark.h> #include <LYGlobalDefs.h> #include <LYClean.h> -#include <LYSignal.h> #include <LYKeymap.h> #include <LYCharUtils.h> /* need for META charset */ #include <UCAux.h> diff --git a/src/LYCgi.c b/src/LYCgi.c index 2704f6d9..099a514e 100644 --- a/src/LYCgi.c +++ b/src/LYCgi.c @@ -91,7 +91,9 @@ PRIVATE void remember_alloced ARGS1( { if (!alloced) { alloced = HTList_new(); +#ifdef LY_FIND_LEAKS atexit(free_alloced_lynxcgi); +#endif } HTList_addObject(alloced, ptr); } diff --git a/src/LYCharSets.c b/src/LYCharSets.c index 87392050..7f43fbe6 100644 --- a/src/LYCharSets.c +++ b/src/LYCharSets.c @@ -12,7 +12,6 @@ #include <LYCurses.h> #include <LYStrings.h> -#include <LYexit.h> #include <LYLeaks.h> extern BOOL HTPassEightBitRaw; diff --git a/src/LYClean.c b/src/LYClean.c index 16231871..1b6b5e32 100644 --- a/src/LYClean.c +++ b/src/LYClean.c @@ -9,6 +9,7 @@ #include <LYTraversal.h> #include <LYCookie.h> #include <UCAuto.h> +#include <HTAlert.h> #include <LYexit.h> #include <LYLeaks.h> diff --git a/src/LYCookie.c b/src/LYCookie.c index 3eedd8c2..6c56aa85 100644 --- a/src/LYCookie.c +++ b/src/LYCookie.c @@ -211,7 +211,7 @@ PRIVATE BOOLEAN host_matches ARGS2( * The following line will handle both numeric IP addresses and * FQDNs. Do numeric addresses require special handling? */ - if (*B != '.' && !strcmp(A, B)) + if (*B != '.' && !strcasecomp(A, B)) return YES; /* @@ -221,7 +221,7 @@ PRIVATE BOOLEAN host_matches ARGS2( if (*B == '.' && B[1] != '\0' && B[1] != '.' && *A != '.') { int diff = (strlen(A) - strlen(B)); if (diff > 0) { - if (!strcmp((A + diff), B)) + if (!strcasecomp((A + diff), B)) return YES; } } @@ -280,7 +280,9 @@ PRIVATE void store_cookie ARGS3( * Ensure that the domain list exists. */ if (domain_list == NULL) { +#ifdef LY_FIND_LEAKS atexit(LYCookieJar_free); +#endif domain_list = HTList_new(); total_cookies = 0; } @@ -343,9 +345,9 @@ PRIVATE void store_cookie ARGS3( } /* * The next 4 conditions do NOT apply if the domain is still - * the default of request-host. + * the default of request-host. (domains - case insensitive). */ - if (strcmp(co->domain, hostname) != 0) { + if (strcasecomp(co->domain, hostname) != 0) { /* * The hostname does not contain a dot. */ @@ -1074,9 +1076,10 @@ PRIVATE void LYProcessSetCookies ARGS6( * not an exact match to the hostname, nor * is a numeric IP address, add a lead dot. * Otherwise, use the value as is. - FM + * (domains - case insensitive). */ if (value[0] != '.' && value[0] != '\0' && - value[1] != '\0' && strcmp(value, hostname)) { + value[1] != '\0' && strcasecomp(value, hostname)) { char *ptr = strchr(value, '.'); if (ptr != NULL && ptr[1] != '\0') { ptr = value; @@ -1575,9 +1578,10 @@ PRIVATE void LYProcessSetCookies ARGS6( * not an exact match to the hostname, nor * is a numeric IP address, add a lead dot. * Otherwise, use the value as is. - FM + * (domains - case insensitive). */ if (value[0] != '.' && value[0] != '\0' && - value[1] != '\0' && strcmp(value, hostname)) { + value[1] != '\0' && strcasecomp(value, hostname)) { char *ptr = strchr(value, '.'); if (ptr != NULL && ptr[1] != '\0') { ptr = value; @@ -2121,6 +2125,7 @@ PUBLIC void LYStoreCookies ARGS1 ( CTRACE(tfp, "LYStoreCookies: save cookies to %s on exit\n", cookie_file); cookie_handle = LYNewTxtFile (cookie_file); + if (cookie_handle == NULL) return; for (dl = domain_list; dl != NULL; dl = dl->next) { de = dl->object; if (de == NULL) @@ -2662,7 +2667,7 @@ PUBLIC void cookie_domain_flag_set ARGS2( int isexisting = FALSE; if (str == NULL) - outofmem(__FILE__, "cookie_set_invcheck"); + outofmem(__FILE__, "cookie_set_invcheck"); /* * Is this the first domain we're handling? If so, initialize @@ -2670,7 +2675,9 @@ PUBLIC void cookie_domain_flag_set ARGS2( */ if (domain_list == NULL) { +#ifdef LY_FIND_LEAKS atexit(LYCookieJar_free); +#endif domain_list = HTList_new(); total_cookies = 0; } diff --git a/src/LYCurses.c b/src/LYCurses.c index b850c895..8433cec5 100644 --- a/src/LYCurses.c +++ b/src/LYCurses.c @@ -52,6 +52,11 @@ BOOLEAN LYCursesON = FALSE; PRIVATE int Current_Attr; #endif +#define OMIT_SCN_KEEPING 0 /* whether to omit keeping of Style_className + in HTML.c when lss support is on. 1 to increase performance. The value + must correspond to the value of macro OMIT_SCN_KEEPING defined in HTML.c*/ + + #ifdef USE_SLANG PUBLIC unsigned int Lynx_Color_Flags = 0; PUBLIC BOOLEAN FullRefresh = FALSE; @@ -63,6 +68,8 @@ PUBLIC int curscr = 0; PUBLIC int PHYSICAL_SLtt_Screen_Cols = 10; #endif /* SLANG_MBCS_HACK */ + + PUBLIC void LY_SLrefresh NOARGS { if (FullRefresh) { @@ -311,14 +318,29 @@ PUBLIC void curses_w_style ARGS3( int, style, int, dir) { +#if OMIT_SCN_KEEPING +# define SPECIAL_STYLE /*(CSHASHSIZE+1) */ 88888 + /* if TRACEs are not compiled in, this macro is redundant - we neend't valid + 'ds' to stack off. */ +#endif + int YP,XP; - bucket* ds=&hashStyles[style]; +#if !OMIT_SCN_KEEPING + bucket* ds= (style == NOSTYLE ? &nostyle_bucket : &hashStyles[style]); +#else + bucket* ds= (style == NOSTYLE ? &nostyle_bucket : + (style== SPECIAL_STYLE ? &special_bucket :&hashStyles[style]) ); +#endif + if (!ds->name) { CTRACE(tfp, "CSS.CS:Style %d not configured\n",style); +#if !OMIT_SCN_KEEPING return; +#endif } + CTRACE(tfp, "CSS.CS:<%s%s> (%d)\n",(dir?"":"/"),ds->name,ds->code); getyx (win, YP, XP); @@ -352,16 +374,20 @@ PUBLIC void curses_w_style ARGS3( } last_styles[last_colorattr_ptr++] = getattrs(stdscr); /* don't cache style changes for active links */ +#if OMIT_SCN_KEEPING + /* since we don't compute the hcode + to stack off in HTML.c, we don't know whether this style is + configured. So, we shouldn't simply return on stacking on on + unconfigured styles, we should push curr attrs on stack. -HV + */ + if (!ds->name) return; +#endif if (style != s_alink) { CTRACE(tfp, "CACHED: <%s> @(%d,%d)\n", ds->name, YP, XP); if (win==stdscr) cached_styles[YP][XP]=style; - LYAttrset(win, ds->color, ds->mono); - } - else - { - LYAttrset(win, ds->color, ds->mono); } + LYAttrset(win, ds->color, ds->mono); return; case ABS_ON: /* change without remembering the previous style */ @@ -370,12 +396,8 @@ PUBLIC void curses_w_style ARGS3( { CTRACE(tfp, "CACHED: <%s> @(%d,%d)\n", ds->name, YP, XP); if (win==stdscr) cached_styles[YP][XP]=style; - LYAttrset(win, ds->color, ds->mono); - } - else - { - LYAttrset(win, ds->color, ds->mono); } + LYAttrset(win, ds->color, ds->mono); return; } } diff --git a/src/LYDownload.c b/src/LYDownload.c index c446e563..15f292d0 100644 --- a/src/LYDownload.c +++ b/src/LYDownload.c @@ -5,12 +5,10 @@ #include <LYCurses.h> #include <LYUtils.h> #include <LYGlobalDefs.h> -#include <LYSignal.h> #include <LYStrings.h> #include <LYGetFile.h> #include <LYDownload.h> -#include <LYexit.h> #include <LYLeaks.h> /* diff --git a/src/LYEdit.c b/src/LYEdit.c index 7f225041..d7445630 100644 --- a/src/LYEdit.c +++ b/src/LYEdit.c @@ -2,9 +2,7 @@ #include <HTParse.h> #include <HTAlert.h> #include <LYCurses.h> -#include <LYSignal.h> #include <LYUtils.h> -#include <LYClean.h> #include <LYGlobalDefs.h> #include <LYEdit.h> #include <LYStrings.h> diff --git a/src/LYForms.c b/src/LYForms.c index 60150823..399f61df 100644 --- a/src/LYForms.c +++ b/src/LYForms.c @@ -12,7 +12,6 @@ #include <LYGlobalDefs.h> #include <LYKeymap.h> #include <LYClean.h> -#include <LYSignal.h> #include <LYLeaks.h> diff --git a/src/LYGetFile.c b/src/LYGetFile.c index 010c4a92..678bf56b 100644 --- a/src/LYGetFile.c +++ b/src/LYGetFile.c @@ -250,33 +250,13 @@ Try_Redirected_URL: #endif } else if (url_type == LYNXCFG_URL_TYPE) { - /* show lynx.cfg settings */ - StrAllocCopy(doc->address, lynx_cfg_infopage()); - WWWDoc.address = doc->address; - WWWDoc.post_data = doc->post_data; - WWWDoc.post_content_type = doc->post_content_type; - WWWDoc.bookmark = doc->bookmark; - WWWDoc.isHEAD = doc->isHEAD; - WWWDoc.safe = doc->safe; + /* show/change/reload lynx.cfg settings */ + return(lynx_cfg_infopage(doc)); - if (!HTLoadAbsolute(&WWWDoc)) - return(NOT_FOUND); - return(NORMAL); - -#ifdef HAVE_CFG_DEFS_H +#if defined(HAVE_CONFIG_H) && !defined(NO_CONFIG_INFO) } else if (url_type == LYNXCOMPILE_OPTS_URL_TYPE) { /* show compile-time settings */ - StrAllocCopy(doc->address, (char *)lynx_compile_opts()); - WWWDoc.address = doc->address; - WWWDoc.post_data = doc->post_data; - WWWDoc.post_content_type = doc->post_content_type; - WWWDoc.bookmark = doc->bookmark; - WWWDoc.isHEAD = doc->isHEAD; - WWWDoc.safe = doc->safe; - - if (!HTLoadAbsolute(&WWWDoc)) - return(NOT_FOUND); - return(NORMAL); + return(lynx_compile_opts(doc)); #endif #ifndef DISABLE_NEWS @@ -1177,7 +1157,9 @@ PUBLIC void add_trusted ARGS2( if (!src) return; if (first) { +#ifdef LY_FIND_LEAKS atexit(LYTrusted_free); +#endif first = FALSE; } diff --git a/src/LYGlobalDefs.h b/src/LYGlobalDefs.h index 1d467e53..a7ae11e3 100644 --- a/src/LYGlobalDefs.h +++ b/src/LYGlobalDefs.h @@ -27,6 +27,10 @@ #define VISITED_LINKS_HELP "keystrokes/visited_help.html" #endif /* LYHELP_H */ +#ifdef SOURCE_CACHE +#include <HTChunk.h> +#endif + #ifdef SOCKS extern BOOLEAN socks_flag; #endif /* SOCKS */ @@ -245,6 +249,14 @@ extern BOOLEAN nolist; extern BOOLEAN historical_comments; extern BOOLEAN minimal_comments; extern BOOLEAN soft_dquotes; +#ifdef SOURCE_CACHE +extern char * source_cache_filename; +extern HTChunk * source_cache_chunk; +extern int LYCacheSource; +#define SOURCE_CACHE_NONE 0 +#define SOURCE_CACHE_FILE 1 +#define SOURCE_CACHE_MEMORY 2 +#endif extern BOOLEAN LYCancelDownload; extern BOOLEAN LYRestricted; extern BOOLEAN LYValidate; diff --git a/src/LYHash.c b/src/LYHash.c index 3410603a..42f9fdac 100644 --- a/src/LYHash.c +++ b/src/LYHash.c @@ -3,21 +3,23 @@ */ #include <LYHash.h> +#ifdef USE_COLOR_STYLE + #ifdef NOT_USED PUBLIC int hash_table[CSHASHSIZE]; /* 32K should be big enough */ PUBLIC int hash_code_rp ARGS1(char*,string) { - char* hash_ptr = string; - int hash_tmp = 0xC00A | ((*hash_ptr) << 4); - - while (*hash_ptr++) - { - hash_tmp ^= (((*hash_ptr)<<4) ^ ((*hash_ptr)<<12)); - hash_tmp >>= 1; - } - return (hash_tmp % CSHASHSIZE); + char* hash_ptr = string; + int hash_tmp = 0xC00A | ((*hash_ptr) << 4); + + while (*hash_ptr++) + { + hash_tmp ^= (((*hash_ptr)<<4) ^ ((*hash_ptr)<<12)); + hash_tmp >>= 1; + } + return (hash_tmp % CSHASHSIZE); } #endif @@ -42,3 +44,32 @@ PUBLIC int hash_code ARGS1 (char*, string) return hash; } + +PUBLIC int hash_code_lowercase_on_fly ARGS1 (char*, string) +{ + int hash; + unsigned char *p; + + for (p = (unsigned char *)string, hash = 0; *p; p++) + hash = (int) (hash * 3 + (unsigned char)tolower(*(char*)p) ) % HASH_SIZE; + + return hash; +} + +PUBLIC int hash_code_aggregate_char ARGS2 (char, c,int,hash) +{ + return (int)(hash*3 + (unsigned char)c) % HASH_SIZE; +} + +PUBLIC int hash_code_aggregate_lower_on_fly ARGS2 (char*, string,int,hash_was) +{ + int hash; + unsigned char *p; + + for (p = (unsigned char *)string, hash = hash_was ; *p; p++) + hash = (int) (hash * 3 + (unsigned char)tolower(*(char*)p) ) % HASH_SIZE; + + return hash; +} + +#endif /* USE_COLOR_STYLE */ diff --git a/src/LYHash.h b/src/LYHash.h index c532a93a..0d562cff 100644 --- a/src/LYHash.h +++ b/src/LYHash.h @@ -26,6 +26,16 @@ typedef struct _hashbucket bucket; extern bucket hashStyles[CSHASHSIZE]; extern int hash_code PARAMS((char* string)); +extern bucket special_bucket;/*it's used when OMIT_SCN_KEEPING is 1 in HTML.c + and LYCurses.c. */ +extern bucket nostyle_bucket;/*initialized properly - to be used in CTRACE when + NOSTYLE is passed as 'style' to curses_w_style */ + +extern int hash_code_lowercase_on_fly PARAMS((char* string)); +extern int hash_code_aggregate_char PARAMS((char c,int hash)); +extern int hash_code_aggregate_lower_on_fly PARAMS((char* c,int hash_was)); + + #ifdef NOT_USED extern int hash_table[CSHASHSIZE]; /* 32K should be big enough */ #endif diff --git a/src/LYHistory.c b/src/LYHistory.c index b0a2b827..813eedb6 100644 --- a/src/LYHistory.c +++ b/src/LYHistory.c @@ -67,6 +67,7 @@ PUBLIC void LYAddVisitedLink ARGS1( * or list files. - FM */ if (doc->post_data || doc->isHEAD || doc->bookmark || + (!strncmp(doc->address, "file://localhost/", 17) && ( !strcmp((doc->title ? doc->title : ""), HISTORY_PAGE_TITLE) || !strcmp((doc->title ? doc->title : ""), PRINT_OPTIONS_TITLE) || !strcmp((doc->title ? doc->title : ""), DOWNLOAD_OPTIONS_TITLE) || @@ -82,9 +83,11 @@ PUBLIC void LYAddVisitedLink ARGS1( !strcmp((doc->title ? doc->title : ""), ADDRLIST_PAGE_TITLE) || #endif !strcmp((doc->title ? doc->title : ""), SHOWINFO_TITLE) || + !strcmp((doc->title ? doc->title : ""), CONFIG_DEF_TITLE) || + !strcmp((doc->title ? doc->title : ""), LYNXCFG_TITLE) || !strcmp((doc->title ? doc->title : ""), COOKIE_JAR_TITLE) || !strcmp((doc->title ? doc->title : ""), VISITED_LINKS_TITLE) || - !strcmp((doc->title ? doc->title : ""), LYNX_TRACELOG_TITLE)) { + !strcmp((doc->title ? doc->title : ""), LYNX_TRACELOG_TITLE)))) { return; } @@ -95,7 +98,9 @@ PUBLIC void LYAddVisitedLink ARGS1( if (!Visited_Links) { Visited_Links = HTList_new(); +#ifdef LY_FIND_LEAKS atexit(Visited_Links_free); +#endif HTList_addObject(Visited_Links, new); return; } diff --git a/src/LYJump.c b/src/LYJump.c index 534e9c21..5b185d0c 100644 --- a/src/LYJump.c +++ b/src/LYJump.c @@ -5,7 +5,6 @@ #include <LYGlobalDefs.h> #include <LYJump.h> #include <LYKeymap.h> -#include <LYSignal.h> #include <GridText.h> #include <LYLeaks.h> diff --git a/src/LYLeaks.c b/src/LYLeaks.c index 58c4b114..504954a3 100644 --- a/src/LYLeaks.c +++ b/src/LYLeaks.c @@ -103,6 +103,7 @@ PUBLIC void LYLeaks NOARGS } } else { size_t i_counter; + char *value = (char *)(ALp_head->vp_Alloced); /* * Increment the count of total memory lost and @@ -121,9 +122,8 @@ PUBLIC void LYLeaks NOARGS i_counter < ALp_head->st_Bytes && i_counter < MAX_CONTENT_LENGTH; i_counter++) { - if (isprint(((char *)(ALp_head->vp_Alloced))[i_counter])) { - fprintf(Fp_leakagesink, "%c", - ((char *)(ALp_head->vp_Alloced))[i_counter]); + if (isprint(value[i_counter])) { + fprintf(Fp_leakagesink, "%c", value[i_counter]); } else { fprintf(Fp_leakagesink, "|"); } @@ -178,7 +178,7 @@ PUBLIC void LYLeaks NOARGS ** the information in a list. ** Arguments: st_bytes The size of the allocation requested ** in bytes. -** cp_File The file from which the request for +** cp_File The file from which the request for ** allocation came from. ** ssi_Line The line number in cp_File where the ** allocation request came from. @@ -191,7 +191,7 @@ PUBLIC void LYLeaks NOARGS ** 05-26-94 created Lynx 2-3-1 Garrett Arch Blythe */ PUBLIC void *LYLeakMalloc ARGS3( - size_t, st_bytes, + size_t, st_bytes, CONST char *, cp_File, CONST short, ssi_Line) { @@ -238,7 +238,7 @@ PUBLIC void *LYLeakMalloc ARGS3( ** save relevant information in a list. ** Arguments: st_number The number of items to allocate. ** st_bytes The size of each item. -** cp_File The file which wants to allocation. +** cp_File The file which wants to allocation. ** ssi_Line The line number in cp_File requesting ** the allocation. ** Return Value: void * The allocated memory, or NULL on failure as @@ -250,8 +250,8 @@ PUBLIC void *LYLeakMalloc ARGS3( ** 05-26-94 created Lynx 2-3-1 Garrett Arch Blythe */ PUBLIC void *LYLeakCalloc ARGS4( - size_t, st_number, - size_t, st_bytes, + size_t, st_number, + size_t, st_bytes, CONST char *, cp_File, CONST short, ssi_Line) { @@ -303,7 +303,7 @@ PUBLIC void *LYLeakCalloc ARGS4( ** realloc works just like ** malloc. ** st_newBytes The new size of the chunk of memory. -** cp_File The file containing the realloc. +** cp_File The file containing the realloc. ** ssi_Line The line containing the realloc in cp_File. ** Return Value: void * The new pointer value (could be the same) or ** NULL if unable to resize (old block @@ -317,8 +317,8 @@ PUBLIC void *LYLeakCalloc ARGS4( ** 05-26-94 created Lynx 2-3-1 Garrett Arch Blythe */ PUBLIC void *LYLeakRealloc ARGS4( - void *, vp_Alloced, - size_t, st_newBytes, + void *, vp_Alloced, + size_t, st_newBytes, CONST char *, cp_File, CONST short, ssi_Line) { @@ -392,7 +392,7 @@ PUBLIC void *LYLeakRealloc ARGS4( ** Purpose: Capture all requests to free information and also ** remove items from the allocation list. ** Arguments: vp_Alloced The memory to free. -** cp_File The file calling free. +** cp_File The file calling free. ** ssi_Line The line of cp_File calling free. ** Return Value: void ** Remarks/Portability/Dependencies/Restrictions: @@ -404,7 +404,7 @@ PUBLIC void *LYLeakRealloc ARGS4( ** 05-26-94 created Lynx 2-3-1 Garrett Arch Blythe */ PUBLIC void LYLeakFree ARGS3( - void *, vp_Alloced, + void *, vp_Alloced, CONST char *, cp_File, CONST short, ssi_Line) { @@ -556,7 +556,7 @@ PRIVATE void AddToList ARGS1( ** 05-26-94 created Lynx 2-3-1 Garrett Arch Blythe */ PRIVATE AllocationList *FindInList ARGS1( - void *, vp_find) + void *, vp_find) { AllocationList *ALp_find = ALp_RunTimeAllocations; diff --git a/src/LYMain.c b/src/LYMain.c index 9e03d659..43511c64 100644 --- a/src/LYMain.c +++ b/src/LYMain.c @@ -26,9 +26,11 @@ #include <LYMainLoop.h> #include <LYBookmark.h> #include <LYCookie.h> +#include <LYPrettySrc.h> #ifdef __DJGPP__ #include <dos.h> +#include <dpmi.h> #endif /* __DJGPP__ */ #ifdef __EMX__ @@ -360,7 +362,7 @@ PUBLIC char *LYCookieSLooseCheckDomains = NULL; /* check loosely */ PUBLIC char *LYCookieSQueryCheckDomains = NULL; /* check w/a query */ #ifdef EXP_PERSISTENT_COOKIES BOOLEAN persistent_cookies = TRUE; -PUBLIC char *LYCookieFile = NULL; /* default cookie file */ +PUBLIC char *LYCookieFile = NULL; /* default cookie file */ #endif /* EXP_PERSISTENT_COOKIES */ PUBLIC char *XLoadImageCommand = NULL; /* Default image viewer for X */ PUBLIC BOOLEAN LYNoISMAPifUSEMAP = FALSE; /* Omit ISMAP link if MAP present? */ @@ -414,6 +416,7 @@ PRIVATE HTList *LYStdinArgs = NULL; PRIVATE BOOLEAN no_options_further=FALSE; /* set to TRUE after '--' argument */ #endif + PRIVATE void parse_arg PARAMS((char **arg, int *i)); PRIVATE void print_help_and_exit PARAMS((int exit_status)); @@ -435,11 +438,10 @@ PRIVATE int LY_set_ctrl_break(int setting) PRIVATE int LY_get_ctrl_break(void) { - typedef union REGS Regs; - extern Regs regs; + __dpmi_regs regs; regs.h.ah = 0x33; regs.h.al = 0x00; - int86(0x21, ®s, ®s); + __dpmi_int (0x21, ®s); return ((int) regs.h.dl); } @@ -626,7 +628,7 @@ static void FixCharacters(void) /* these are used for matching commandline options. */ PRIVATE int argcmp ARGS2( char*, str, - char*, what) + char*, what) { if (str[0] == '-' && str[1] == '-' ) ++str; return strcmp(str,what); @@ -634,7 +636,7 @@ PRIVATE int argcmp ARGS2( PRIVATE int argncmp ARGS2( char*, str, - char*, what) + char*, what) { if (str[0] == '-' && str[1] == '-' ) ++str; return strncmp(str, what, strlen(what)); @@ -726,11 +728,12 @@ PUBLIC int main ARGS2( * Will display memory leaks if LY_FIND_LEAKS is defined. */ atexit(LYLeaks); -#endif /* LY_FIND_LEAKS */ /* * Register the function which will free our allocated globals. */ atexit(free_lynx_globals); +#endif /* LY_FIND_LEAKS */ + #ifdef LOCALE /* @@ -1104,7 +1107,9 @@ PUBLIC int main ARGS2( if (LYStdinArgs == NULL) { LYStdinArgs = HTList_new(); +#ifdef LY_FIND_LEAKS atexit(LYStdinArgs_free); +#endif } StrAllocCopy(argument, buf); HTList_appendObject(LYStdinArgs, argument); @@ -1329,6 +1334,11 @@ PUBLIC int main ARGS2( CTRACE(tfp, "LYNX_SIG_FILE '%s' is bad. Ignoring.\n", LYNX_SIG_FILE); } +#ifdef USE_PSRC + /*this is required for checking the tagspecs when parsing cfg file by + LYReadCFG.c:parse_html_src_spec -HV */ + HTSwitchDTD(TRUE); +#endif /* * Process the configuration file. */ @@ -1357,15 +1367,15 @@ PUBLIC int main ARGS2( LYEnsureAbsoluteURL((char **)&LynxHome, "LynxHome"); /* - * Process any command line arguments not already handled. - FM + * Process any command line arguments not already handled. - FM */ for (i = 1; i < argc; i++) { parse_arg(&argv[i], &i); } /* - * Process any stdin-derived arguments for a lone "-" which we've - * loaded into LYStdinArgs. - FM + * Process any stdin-derived arguments for a lone "-" which we've + * loaded into LYStdinArgs. - FM */ if (LYStdinArgs != NULL) { char *my_args[2]; @@ -1379,9 +1389,12 @@ PUBLIC int main ARGS2( } /* - * Set the rest of variables when the configuration have read. + * Initialize other things based on the configuration read. */ +#ifdef USE_PSRC + if ( (!Old_DTD) != TRUE ) /* skip if they are already initialized -HV */ +#endif HTSwitchDTD(!Old_DTD); /* @@ -1414,6 +1427,14 @@ PUBLIC int main ARGS2( #endif /* + * Set up our help and about file base paths. - FM + */ + StrAllocCopy(helpfilepath, helpfile); + if ((cp = LYPathLeaf(helpfilepath)) != helpfilepath) + *cp = '\0'; + LYAddHtmlSep(&helpfilepath); + + /* * Check for a save space path in the environment. * If one was set in the configuration file, that * one will be overridden. - FM @@ -1556,6 +1577,14 @@ PUBLIC int main ARGS2( no_multibook = TRUE; } +#ifdef SOURCE_CACHE + /* + * Disable source caching if not interactive. + */ + if (dump_output_immediately) + LYCacheSource = SOURCE_CACHE_NONE; +#endif + #ifdef VMS set_vms_keys(); #endif /* VMS */ @@ -1637,6 +1666,11 @@ PUBLIC int main ARGS2( * Done here so that URL guessing in LYEnsureAbsoluteURL() can be * interruptible (terminal is in raw mode, select() works). -BL */ +#ifdef USE_PSRC + if (!dump_output_immediately) + HTMLSRC_init_caches(); /* do it before terminal is initialized*/ +#endif + if (!dump_output_immediately) { setup(terminal); } @@ -1700,14 +1734,6 @@ PUBLIC int main ARGS2( } /* - * Set up our help and about file base paths. - FM - */ - StrAllocCopy(helpfilepath, helpfile); - if ((cp = LYPathLeaf(helpfilepath)) != helpfilepath) - *cp = '\0'; - LYAddHtmlSep(&helpfilepath); - - /* * Make sure our bookmark default strings * are all allocated and synchronized. - FM */ @@ -1766,6 +1792,10 @@ PUBLIC int main ARGS2( if (x_display != NULL && *x_display != '\0') { LYisConfiguredForX = TRUE; } +#ifdef USE_COLOR_STYLE + cache_tag_styles(); +#endif + ena_csi((LYlowest_eightbit[current_char_set] > 155)); LYOpenCloset(); status = mainloop(); @@ -1802,6 +1832,58 @@ PUBLIC void LYRegisterLynxProtocols NOARGS HTRegisterProtocol(&LYLynxCookies); } +/* + * Some staff to reload lynx.cfg without restarting new lynx session, + * also load options menu items and command-line options + * to made things consistent. Not implemented yet. + * Warning: experimental, more main() reorganization required. + * + * Called by user of interactive session by LYNXCFG://reload/ link. + */ +PUBLIC void reload_read_cfg NOARGS +{ + if (!LYRestricted) { + + /* save .lynxrc file in case we change something from Options Menu */ + if (!save_rc()) return; + + /* + * Process the configuration file. + */ + read_cfg(lynx_cfg_file, "main program", 1, (FILE *)0); + + /* + * Process the RC file. + */ + read_rc(); + + + /* We are not interested in startfile here */ + /* but other things may be lost: */ + + /* + * Process any command line arguments not already handled. - FM + */ + /* Not implemented yet here */ + + /* + * Process any stdin-derived arguments for a lone "-" which we've + * loaded into LYStdinArgs. - FM + */ + /* Not implemented yet here */ + + /* + * Initialize other things based on the configuration read. + */ + /* Not implemented yet here, + * a major problem: file paths + * like lynx_temp_space, LYCookieFile etc. + */ + + } +} + + /* There are different ways of setting arguments on the command line, and * there are different types of arguments. These include: * @@ -1813,7 +1895,7 @@ PUBLIC void LYRegisterLynxProtocols NOARGS */ struct parse_args_type; -typedef int (*ParseFunc) PARAMS((struct parse_args_type *, char **, char *)); +typedef int (*ParseFunc) PARAMS((char *)); typedef union { BOOLEAN * set_value; @@ -1822,8 +1904,6 @@ typedef union { ParseFunc fun_value; } ParseUnion; -#undef PARSE_DEBUG - /* * Storing the four types of data in separate fields costs about 1K of data. * However, this provides usable type-checking. The initial version of the @@ -1906,9 +1986,7 @@ static int parse_authentication ARGS2( } /* -anonymous */ -static int anonymous_fun ARGS3( - Parse_Args_Type *, p GCC_UNUSED, - char **, argv GCC_UNUSED, +static int anonymous_fun ARGS1( char *, next_arg GCC_UNUSED) { /* @@ -1923,9 +2001,7 @@ static int anonymous_fun ARGS3( } /* -assume_charset */ -static int assume_charset_fun ARGS3( - Parse_Args_Type *, p GCC_UNUSED, - char **, argv GCC_UNUSED, +static int assume_charset_fun ARGS1( char *, next_arg) { UCLYhndl_for_unspec = safeUCGetLYhndl_byMIME(next_arg); @@ -1939,9 +2015,7 @@ static int assume_charset_fun ARGS3( } /* -assume_local_charset */ -static int assume_local_charset_fun ARGS3( - Parse_Args_Type *, p GCC_UNUSED, - char **, argv GCC_UNUSED, +static int assume_local_charset_fun ARGS1( char *, next_arg) { UCLYhndl_HTFile_for_unspec = safeUCGetLYhndl_byMIME(next_arg); @@ -1949,9 +2023,7 @@ static int assume_local_charset_fun ARGS3( } /* -assume_unrec_charset */ -static int assume_unrec_charset_fun ARGS3( - Parse_Args_Type *, p GCC_UNUSED, - char **, argv GCC_UNUSED, +static int assume_unrec_charset_fun ARGS1( char *, next_arg) { UCLYhndl_for_unrec = safeUCGetLYhndl_byMIME(next_arg); @@ -1959,9 +2031,7 @@ static int assume_unrec_charset_fun ARGS3( } /* -auth */ -static int auth_fun ARGS3( - Parse_Args_Type*, p GCC_UNUSED, - char **, argv GCC_UNUSED, +static int auth_fun ARGS1( char *, next_arg) { parse_authentication(next_arg, authentication_info); @@ -1969,9 +2039,7 @@ static int auth_fun ARGS3( } /* -base */ -static int base_fun ARGS3( - Parse_Args_Type*, p GCC_UNUSED, - char **, argv GCC_UNUSED, +static int base_fun ARGS1( char *, next_arg GCC_UNUSED) { /* @@ -1991,9 +2059,7 @@ static int base_fun ARGS3( #ifdef USE_SLANG /* -blink */ -static int blink_fun ARGS3( - Parse_Args_Type*, p GCC_UNUSED, - char **, argv GCC_UNUSED, +static int blink_fun ARGS1( char *, next_arg GCC_UNUSED) { Lynx_Color_Flags |= SL_LYNX_USE_BLINK; @@ -2002,9 +2068,7 @@ static int blink_fun ARGS3( #endif /* -cache */ -static int cache_fun ARGS3( - Parse_Args_Type*, p GCC_UNUSED, - char **, argv GCC_UNUSED, +static int cache_fun ARGS1( char *, next_arg) { if (next_arg != 0) @@ -2018,9 +2082,7 @@ static int cache_fun ARGS3( } /* -child */ -static int child_fun ARGS3( - Parse_Args_Type*, p GCC_UNUSED, - char **, argv GCC_UNUSED, +static int child_fun ARGS1( char *, next_arg GCC_UNUSED) { child_lynx = TRUE; @@ -2030,9 +2092,7 @@ static int child_fun ARGS3( #ifdef USE_SLANG /* -color */ -static int color_fun ARGS3( - Parse_Args_Type*, p GCC_UNUSED, - char **, argv GCC_UNUSED, +static int color_fun ARGS1( char *, next_arg GCC_UNUSED) { Lynx_Color_Flags |= SL_LYNX_USE_COLOR; @@ -2045,9 +2105,7 @@ static int color_fun ARGS3( #endif /* -crawl */ -static int crawl_fun ARGS3( - Parse_Args_Type*, p GCC_UNUSED, - char **, argv GCC_UNUSED, +static int crawl_fun ARGS1( char *, next_arg GCC_UNUSED) { crawl = TRUE; @@ -2056,9 +2114,7 @@ static int crawl_fun ARGS3( } /* -display */ -static int display_fun ARGS3( - Parse_Args_Type *, p GCC_UNUSED, - char **, argv GCC_UNUSED, +static int display_fun ARGS1( char *, next_arg) { if (next_arg != 0) { @@ -2071,9 +2127,7 @@ static int display_fun ARGS3( } /* -dump */ -static int dump_output_fun ARGS3( - Parse_Args_Type *, p GCC_UNUSED, - char **, argv GCC_UNUSED, +static int dump_output_fun ARGS1( char *, next_arg GCC_UNUSED) { dump_output_immediately = TRUE; @@ -2082,9 +2136,7 @@ static int dump_output_fun ARGS3( } /* -editor */ -static int editor_fun ARGS3( - Parse_Args_Type *, p GCC_UNUSED, - char **, argv GCC_UNUSED, +static int editor_fun ARGS1( char *, next_arg) { if (next_arg != 0) @@ -2094,9 +2146,7 @@ static int editor_fun ARGS3( } /* -error_file */ -static int error_file_fun ARGS3( - Parse_Args_Type *, p GCC_UNUSED, - char **, argv GCC_UNUSED, +static int error_file_fun ARGS1( char *, next_arg) { /* @@ -2110,9 +2160,7 @@ static int error_file_fun ARGS3( #if defined(EXEC_LINKS) || defined(EXEC_SCRIPTS) /* -exec */ -static int exec_fun ARGS3( - Parse_Args_Type*, p GCC_UNUSED, - char **, argv GCC_UNUSED, +static int exec_fun ARGS1( char *, next_arg GCC_UNUSED) { #ifndef NEVER_ALLOW_REMOTE_EXEC @@ -2125,9 +2173,7 @@ static int exec_fun ARGS3( #endif /* -get_data */ -static int get_data_fun ARGS3( - Parse_Args_Type *, p GCC_UNUSED, - char **, argv GCC_UNUSED, +static int get_data_fun ARGS1( char *, next_arg GCC_UNUSED) { /* @@ -2170,9 +2216,7 @@ static int get_data_fun ARGS3( } /* -help */ -static int help_fun ARGS3( - Parse_Args_Type*, p GCC_UNUSED, - char **, argv GCC_UNUSED, +static int help_fun ARGS1( char *, next_arg GCC_UNUSED) { print_help_and_exit (0); @@ -2180,9 +2224,7 @@ static int help_fun ARGS3( } /* -hiddenlinks */ -static int hiddenlinks_fun ARGS3( - Parse_Args_Type *, p GCC_UNUSED, - char **, argv GCC_UNUSED, +static int hiddenlinks_fun ARGS1( char *, next_arg) { if (next_arg != 0) { @@ -2202,9 +2244,7 @@ static int hiddenlinks_fun ARGS3( } /* -homepage */ -static int homepage_fun ARGS3( - Parse_Args_Type *, p GCC_UNUSED, - char **, argv GCC_UNUSED, +static int homepage_fun ARGS1( char *, next_arg) { if (next_arg != 0) { @@ -2215,9 +2255,7 @@ static int homepage_fun ARGS3( } /* -mime_header */ -static int mime_header_fun ARGS3( - Parse_Args_Type *, p GCC_UNUSED, - char **, argv GCC_UNUSED, +static int mime_header_fun ARGS1( char *, next_arg GCC_UNUSED) { /* @@ -2233,9 +2271,7 @@ static int mime_header_fun ARGS3( #ifndef DISABLE_NEWS /* -newschunksize */ -static int newschunksize_fun ARGS3( - Parse_Args_Type *, p GCC_UNUSED, - char **, argv GCC_UNUSED, +static int newschunksize_fun ARGS1( char *, next_arg) { if (next_arg != 0) { @@ -2251,9 +2287,7 @@ static int newschunksize_fun ARGS3( } /* -newsmaxchunk */ -static int newsmaxchunk_fun ARGS3( - Parse_Args_Type *, p GCC_UNUSED, - char **, argv GCC_UNUSED, +static int newsmaxchunk_fun ARGS1( char *, next_arg) { if (next_arg) { @@ -2270,9 +2304,7 @@ static int newsmaxchunk_fun ARGS3( #endif /* not DISABLE_NEWS */ /* -nobrowse */ -static int nobrowse_fun ARGS3( - Parse_Args_Type *, p GCC_UNUSED, - char **, argv GCC_UNUSED, +static int nobrowse_fun ARGS1( char *, next_arg GCC_UNUSED) { HTDirAccess = HT_DIR_FORBID; @@ -2280,9 +2312,7 @@ static int nobrowse_fun ARGS3( } /* -nocolor */ -static int nocolor_fun ARGS3( - Parse_Args_Type *, p GCC_UNUSED, - char **, argv GCC_UNUSED, +static int nocolor_fun ARGS1( char *, next_arg GCC_UNUSED) { LYShowColor = SHOW_COLOR_NEVER; @@ -2294,9 +2324,7 @@ static int nocolor_fun ARGS3( } /* -nopause */ -static int nopause_fun ARGS3( - Parse_Args_Type *, p GCC_UNUSED, - char **, argv GCC_UNUSED, +static int nopause_fun ARGS1( char *, next_arg GCC_UNUSED) { InfoSecs = 0; @@ -2306,9 +2334,7 @@ static int nopause_fun ARGS3( } /* -pauth */ -static int pauth_fun ARGS3( - Parse_Args_Type*, p GCC_UNUSED, - char **, argv GCC_UNUSED, +static int pauth_fun ARGS1( char *, next_arg) { parse_authentication(next_arg, proxyauth_info); @@ -2316,9 +2342,7 @@ static int pauth_fun ARGS3( } /* -post_data */ -static int post_data_fun ARGS3( - Parse_Args_Type *, p GCC_UNUSED, - char **, argv GCC_UNUSED, +static int post_data_fun ARGS1( char *, next_arg GCC_UNUSED) { /* @@ -2359,9 +2383,7 @@ static int post_data_fun ARGS3( } /* -restrictions */ -static int restrictions_fun ARGS3( - Parse_Args_Type *, p GCC_UNUSED, - char **, argv GCC_UNUSED, +static int restrictions_fun ARGS1( char *, next_arg) { static CONST char *Usage[] = { @@ -2456,9 +2478,7 @@ static int restrictions_fun ARGS3( } /* -selective */ -static int selective_fun ARGS3( - Parse_Args_Type *, p GCC_UNUSED, - char **, argv GCC_UNUSED, +static int selective_fun ARGS1( char *, next_arg GCC_UNUSED) { HTDirAccess = HT_DIR_SELECTIVE; @@ -2466,9 +2486,7 @@ static int selective_fun ARGS3( } /* -source */ -static int source_fun ARGS3( - Parse_Args_Type *, p GCC_UNUSED, - char **, argv GCC_UNUSED, +static int source_fun ARGS1( char *, next_arg GCC_UNUSED) { dump_output_immediately = TRUE; @@ -2479,9 +2497,7 @@ static int source_fun ARGS3( } /* -traversal */ -static int traversal_fun ARGS3( - Parse_Args_Type *, p GCC_UNUSED, - char **, argv GCC_UNUSED, +static int traversal_fun ARGS1( char *, next_arg GCC_UNUSED) { traversal = TRUE; @@ -2495,9 +2511,7 @@ static int traversal_fun ARGS3( } /* -version */ -static int version_fun ARGS3( - Parse_Args_Type *, p GCC_UNUSED, - char **, argv GCC_UNUSED, +static int version_fun ARGS1( char *, next_arg GCC_UNUSED) { SetOutputMode( O_TEXT ); @@ -2525,9 +2539,7 @@ static int version_fun ARGS3( } /* -width */ -static int width_fun ARGS3( - Parse_Args_Type*, p GCC_UNUSED, - char **, argv GCC_UNUSED, +static int width_fun ARGS1( char *, next_arg) { if (next_arg != 0) { @@ -2850,8 +2862,14 @@ with partial-display logic" PARSE_SET( "preparsed", SET_ARG, &LYPreparsedSource, "show parsed text/html with -source and in source view\n\ - to visualize how lynx behave with invalid HTML" + to visualize how lynx behaves with invalid HTML" ), +#ifdef USE_PSRC + PARSE_SET( + "prettysrc", SET_ARG, &LYpsrc, + "do syntax highlighting and hyperlink handling in source view" + ), +#endif PARSE_SET( "print", UNSET_ARG, &no_print, "enable print functions (DEFAULT)" @@ -2919,7 +2937,7 @@ treated '>' as a co-terminator for double-quotes and tags" ), #endif #endif - PARSE_FUN( + PARSE_SET( "tagsoup", SET_ARG, &Old_DTD, "use TagSoup rather than SortaSGML parser" ), @@ -2988,11 +3006,11 @@ static void print_help_strings ARGS3( int pad; int c; int first; - int field_width = 21; + int field_width = 20; - pad = field_width - (5 + (int) strlen (name)); + pad = field_width - (4 + (int) strlen (name)); - fprintf (stdout, " -%s", name); + fprintf (stdout, " -%s", name); if (*help != '=') { pad--; @@ -3047,7 +3065,11 @@ in double-quotes (\"-\") on VMS)", NULL); for (p = Arg_Table; p->name != 0; p++) { char temp[LINESIZE], *value = temp; +#ifdef PARSE_DEBUG + Parse_Args_Type * q = p; +#else ParseUnion *q = (ParseUnion *)(&(p->value)); +#endif switch (p->type & ARG_TYPE_MASK) { case TOGGLE_ARG: case SET_ARG: @@ -3215,7 +3237,7 @@ PRIVATE void parse_arg ARGS2( case FUNCTION_ARG: fun = q->fun_value; if (0 != fun) { - if (-1 == (*fun) (p, argv, next_arg)) { + if (-1 == (*fun) (next_arg)) { } } break; diff --git a/src/LYMainLoop.c b/src/LYMainLoop.c index 8b0b824b..55de2ba5 100644 --- a/src/LYMainLoop.c +++ b/src/LYMainLoop.c @@ -36,6 +36,7 @@ #include <LYCharUtils.h> #include <LYCookie.h> #include <LYMainLoop.h> +#include <LYPrettySrc.h> #ifdef USE_EXTERNALS #include <LYExtern.h> @@ -53,6 +54,7 @@ #include <LYexit.h> #include <LYLeaks.h> + PRIVATE BOOL confirm_post_resub PARAMS(( CONST char* address, CONST char* title, @@ -316,7 +318,9 @@ int mainloop NOARGS language : "")); StrAllocCopy(CurrentNegoCharset, (pref_charset ? pref_charset : "")); +#ifdef LY_FIND_LEAKS atexit(free_mainloop_variables); +#endif initialize: StrAllocCopy(newdoc.address, startfile); StrAllocCopy(startrealm, startfile); @@ -562,7 +566,9 @@ try_again: display_partial = FALSE; } #endif /* DISP_PARTIAL */ - +#ifdef USE_PSRC + psrc_first_tag = TRUE; +#endif #ifndef DONT_TRACK_INTERNAL_LINKS if (try_internal) { if (newdoc.address && @@ -1022,7 +1028,13 @@ try_again: * to Newline, so we get a redraw. */ curdoc.line = -1; - +#ifdef USE_PSRC + if (psrc_view) + HTMark_asSource(); /* this flag is not set, since when + displaying source, psrc_view is temporary unset when + writing the HTML header - and HTMainText is created + at that time.*/ +#endif break; } /* end switch */ @@ -1052,7 +1064,12 @@ try_again: * the visited links list. - FM */ if (ownerS_address != NULL) { +#ifndef USE_PSRC if (HTOutputFormat == WWW_SOURCE && !HText_getOwner()) +#else + if ( (LYpsrc ? psrc_view : HTOutputFormat == WWW_SOURCE) + && !HText_getOwner() ) +#endif HText_setMainTextOwner(ownerS_address); FREE(ownerS_address); } @@ -1073,6 +1090,9 @@ try_again: * the source, we get rendered HTML from now on. */ HTOutputFormat = WWW_PRESENT; +#ifdef USE_PSRC + psrc_view = FALSE; +#endif /* * Reset all of the other relevant flags. - FM @@ -1237,6 +1257,26 @@ try_again: } } +#ifdef SOURCE_CACHE + /* + * If the parse settings have changed since this HText was + * generated, we need to reparse and redraw it. + */ + if (HTdocument_settings_changed()) { + HTUserMsg(gettext("Reparsing document under current settings...")); + if (HTreparse_document()) + refresh_screen = TRUE; + else { + /* + * Urk. I have no idea how to recover from a failure here. + * At a guess, I'll try reloading. + */ + cmd = LYK_RELOAD; + goto new_cmd; + } + } +#endif + /* * If the curdoc.line is different than Newline then there must * have been a change since last update. Run HText_pageDisplay() @@ -1524,6 +1564,8 @@ try_again: } else { _statusline(HELP); } + /* turn off cursor since now it's probably on statusline -HV */ + move((LYlines - 1), (LYcols - 1)); } else { show_help = FALSE; } @@ -2041,6 +2083,8 @@ new_cmd: /* break; } + +#ifndef USE_PSRC if (HTisDocumentSource()) { HTOutputFormat = WWW_PRESENT; } else { @@ -2049,8 +2093,28 @@ new_cmd: /* LYUCPushAssumed(HTMainAnchor); HTOutputFormat = WWW_SOURCE; } - LYforce_no_cache = TRUE; +#else + if (HTisDocumentSource()) { + HTOutputFormat = WWW_PRESENT; + psrc_view = FALSE; + } else { + if (HText_getOwner()) + StrAllocCopy(ownerS_address, HText_getOwner()); + LYUCPushAssumed(HTMainAnchor); + if (LYpsrc) + psrc_view = TRUE; + else + HTOutputFormat = WWW_SOURCE; + } +#endif +#ifdef SOURCE_CACHE + if (HTreparse_document()) { + refresh_screen = TRUE; + break; + } +#endif FREE(curdoc.address); /* so it doesn't get pushed */ + LYforce_no_cache = TRUE; break; case LYK_RELOAD: /* control-R to reload and refresh */ @@ -2068,9 +2132,18 @@ new_cmd: /* /* * Check to see if should reload source, or load html */ + if (HTisDocumentSource()) { +#ifndef USE_PSRC HTOutputFormat = WWW_SOURCE; +#else + if (LYpsrc) + psrc_view = TRUE; + else + HTOutputFormat = WWW_SOURCE; +#endif } + HEAD_request = HTLoadedDocumentIsHEAD(); HTuncache_current_document(); #ifdef NO_ASSUME_SAME_DOC @@ -2125,11 +2198,13 @@ new_cmd: /* 0, 0) == FALSE) { HTInfoMsg(WILL_NOT_RELOAD_DOC); } else { +#ifndef SOURCE_CACHE HTuncache_current_document(); StrAllocCopy(newdoc.address, curdoc.address); FREE(curdoc.address); newdoc.line = curdoc.line; newdoc.link = curdoc.link; +#endif } if (historical_comments) historical_comments = FALSE; @@ -2142,6 +2217,17 @@ new_cmd: /* HTAlert(historical_comments ? HISTORICAL_ON_VALID_OFF : HISTORICAL_OFF_VALID_ON); } +#ifdef SOURCE_CACHE + if (HTreparse_document()) { + refresh_screen = TRUE; + break; + } + HTuncache_current_document(); + StrAllocCopy(newdoc.address, curdoc.address); + FREE(curdoc.address); + newdoc.line = curdoc.line; + newdoc.link = curdoc.link; +#endif break; case LYK_MINIMAL: /* toggle 'minimal' comments parsing */ @@ -2157,11 +2243,13 @@ new_cmd: /* 0, 0) == FALSE) { HTInfoMsg(WILL_NOT_RELOAD_DOC); } else { +#ifndef SOURCE_CACHE HTuncache_current_document(); StrAllocCopy(newdoc.address, curdoc.address); FREE(curdoc.address); newdoc.line = curdoc.line; newdoc.link = curdoc.link; +#endif } } if (minimal_comments) @@ -2175,6 +2263,17 @@ new_cmd: /* HTAlert(minimal_comments ? MINIMAL_ON_BUT_HISTORICAL : MINIMAL_OFF_HISTORICAL_ON); } +#ifdef SOURCE_CACHE + if (HTreparse_document()) { + refresh_screen = TRUE; + break; + } + HTuncache_current_document(); + StrAllocCopy(newdoc.address, curdoc.address); + FREE(curdoc.address); + newdoc.line = curdoc.line; + newdoc.link = curdoc.link; +#endif break; case LYK_SOFT_DQUOTES: @@ -2189,11 +2288,13 @@ new_cmd: /* 1, 1) == FALSE) { HTInfoMsg(WILL_NOT_RELOAD_DOC); } else { +#ifndef SOURCE_CACHE HTuncache_current_document(); StrAllocCopy(newdoc.address, curdoc.address); FREE(curdoc.address); newdoc.line = curdoc.line; newdoc.link = curdoc.link; +#endif } if (soft_dquotes) soft_dquotes = FALSE; @@ -2201,6 +2302,17 @@ new_cmd: /* soft_dquotes = TRUE; HTUserMsg(soft_dquotes ? SOFT_DOUBLE_QUOTE_ON : SOFT_DOUBLE_QUOTE_OFF); +#ifdef SOURCE_CACHE + if (HTreparse_document()) { + refresh_screen = TRUE; + break; + } + HTuncache_current_document(); + StrAllocCopy(newdoc.address, curdoc.address); + FREE(curdoc.address); + newdoc.line = curdoc.line; + newdoc.link = curdoc.link; +#endif break; case LYK_SWITCH_DTD: @@ -2220,12 +2332,25 @@ new_cmd: /* * to the other DTD parsing may show source differences, * so stay in source view - kw */ + + /* NOTE: this conditional can be considered incorrect - + current behaviour - when viewing source and + LYPreparsedSource==TRUE, pressing ^V will toggle parser mode + AND switch back from the source view to presentation view.-HV + */ if (HTisDocumentSource() && LYPreparsedSource) { - HTOutputFormat = WWW_SOURCE; +#ifdef USE_PSRC + if (LYpsrc) + psrc_view = TRUE; + else +#endif + HTOutputFormat = WWW_SOURCE; } +#ifndef SOURCE_CACHE HTuncache_current_document(); StrAllocCopy(newdoc.address, curdoc.address); FREE(curdoc.address); +#endif } #ifdef NO_ASSUME_SAME_DOC newdoc.line = 1; @@ -2237,6 +2362,15 @@ new_cmd: /* Old_DTD = !Old_DTD; HTSwitchDTD(!Old_DTD); HTUserMsg(Old_DTD ? USING_DTD_0 : USING_DTD_1); +#ifdef SOURCE_CACHE + if (HTreparse_document()) { + refresh_screen = TRUE; + break; + } + HTuncache_current_document(); + StrAllocCopy(newdoc.address, curdoc.address); + FREE(curdoc.address); +#endif break; #ifdef NOT_DONE_YET @@ -3333,6 +3467,10 @@ new_cmd: /* } newdoc.link = 0; force_load = TRUE; /* force MainLoop to reload */ +#ifdef USE_PSRC + psrc_view = FALSE; /* we get here if link is not internal */ +#endif + #ifdef DIRED_SUPPORT if (lynx_edit_mode) { HTuncache_current_document(); @@ -3946,7 +4084,14 @@ if (!LYUseFormsOptions) { HTAlert(RELOADING_FORM); } if (HTisDocumentSource()) { +#ifndef PSRC_VIEW HTOutputFormat = WWW_SOURCE; +#else + if (LYpsrc) + psrc_view = TRUE; + else + HTOutputFormat = WWW_SOURCE; +#endif } HEAD_request = HTLoadedDocumentIsHEAD(); HTuncache_current_document(); @@ -5447,6 +5592,12 @@ check_add_bookmark_to_self: HTUserMsg(clickable_images ? CLICKABLE_IMAGES_ON : CLICKABLE_IMAGES_OFF); +#ifdef SOURCE_CACHE + if (HTreparse_document()) { + refresh_screen = TRUE; + break; + } +#endif cmd = LYK_RELOAD; goto new_cmd; @@ -5458,6 +5609,12 @@ check_add_bookmark_to_self: HTUserMsg(pseudo_inline_alts ? PSEUDO_INLINE_ALTS_ON : PSEUDO_INLINE_ALTS_OFF); +#ifdef SOURCE_CACHE + if (HTreparse_document()) { + refresh_screen = TRUE; + break; + } +#endif cmd = LYK_RELOAD; goto new_cmd; @@ -5470,6 +5627,12 @@ check_add_bookmark_to_self: HTUserMsg(LYRawMode ? RAWMODE_OFF : RAWMODE_ON); HTMLSetCharacterHandling(current_char_set); LYRawMode_flag = LYRawMode; +#ifdef SOURCE_CACHE + if (HTreparse_document()) { + refresh_screen = TRUE; + break; + } +#endif cmd = LYK_RELOAD; goto new_cmd; } @@ -6002,7 +6165,9 @@ PUBLIC void HTAddGotoURL ARGS1( if (!Goto_URLs) { Goto_URLs = HTList_new(); +#ifdef LY_FIND_LEAKS atexit(HTGotoURLs_free); +#endif HTList_addObject(Goto_URLs, new); return; } diff --git a/src/LYMap.c b/src/LYMap.c index 56d3f51d..27033d1c 100644 --- a/src/LYMap.c +++ b/src/LYMap.c @@ -163,7 +163,9 @@ PUBLIC BOOL LYAddImageMap ARGS3( { if (!LynxMaps) { LynxMaps = HTList_new(); +#ifdef LY_FIND_LEAKS atexit(LYLynxMaps_free); +#endif } theList = LynxMaps; } diff --git a/src/LYPrettySrc.c b/src/LYPrettySrc.c new file mode 100644 index 00000000..e9c4b76e --- /dev/null +++ b/src/LYPrettySrc.c @@ -0,0 +1,301 @@ +/* HTML source syntax highlighting + by Vlad Harchev <hvv@hippo.ru> + March 1999 +*/ +#include <HTUtils.h> +#include <LYHash.h> +#include <LYPrettySrc.h> + +#ifdef USE_PSRC + +PUBLIC BOOL psrc_view = FALSE;/* this is read by SGML_put_character - TRUE + when viewing pretty source */ +PUBLIC BOOL LYpsrc = FALSE; /* this tells what will be shown on '\': + if TRUE, then pretty source, normal source view otherwise. Toggled by + -pretty_source commandline option. */ +PUBLIC BOOL sgml_in_psrc_was_initialized; +PUBLIC BOOL psrc_nested_call; +PUBLIC BOOL psrc_first_tag; + + /* tagspecs from lynx.cfg are read here. After .lss file is read (is with lss + support), the style cache and markup are created before entering the + mainloop. */ +PUBLIC char* HTL_tagspecs[HTL_num_lexems] = { + /* these values are defaults. They are also listed in comments of distibution's + lynx.cfg.*/ +#ifdef USE_COLOR_STYLE + "span.htmlsrc_comment:!span", + "span.htmlsrc_tag:!span", + "span.htmlsrc_attrib:!span", + "span.htmlsrc_attrval:!span", + "span.htmlsrc_abracket:!span", + "span.htmlsrc_entity:!span", + "span.htmlsrc_href:!span", + "span.htmlsrc_entire:!span", + "span.htmlsrc_badseq:!span", + "span.htmlsrc_badtag:!span", + "span.htmlsrc_badattr:!span", + "span.htmlsrc_sgmlspecial:!span" +#else + "b:!b", + "b:!b", + ":", + "!b:b", + "b:!b", + "b:!b", + ":", + ":", + "b:!b", + ":", + "!b:b", + "b:!b" +#endif +}; + + + /* these are pointers since tagspec can be empty (the pointer will be NULL + in that case) */ +PUBLIC HT_tagspec* lexem_start[HTL_num_lexems]; +PUBLIC HT_tagspec* lexem_end[HTL_num_lexems]; + +PUBLIC int tagname_transform = 2; +PUBLIC int attrname_transform = 2; + + +PRIVATE int html_src_tag_index ARGS1( + char*, tagname) +{ + HTTag* tag = SGMLFindTag(&HTML_dtd, tagname); + return (tag && tag != &HTTag_unrecognized ) ? tag - HTML_dtd.tags : -1; +} + +typedef enum _html_src_check_state +{ + HTSRC_CK_normal, + HTSRC_CK_seen_excl, + HTSRC_CK_after_tagname, + HTSRC_CK_seen_dot +} html_src_check_state; + +PRIVATE void append_close_tag ARGS3( + char*, tagname, + HT_tagspec**, head, + HT_tagspec**, tail) +{ + int idx, nattr; + HTTag* tag; + HT_tagspec* subj; + + idx = html_src_tag_index(tagname); + tag = HTML_dtd.tags+idx; + nattr = tag->number_of_attributes; + + if (idx == -1) { + fprintf(stderr, + "internal error: previous check didn't find bad HTML tag %s", tagname); + exit_immediately(-1); + } + + subj = (HT_tagspec*) calloc( sizeof(*subj), 1); + subj->element = idx; + subj->present = (BOOL*)calloc( nattr*sizeof (BOOL), 1); + subj->value = (char**)calloc( nattr*sizeof (char*), 1); + subj->start = FALSE; + + if (!*head) { + *head = subj; *tail = subj; + } else { + (*tail)->next = subj; *tail = subj; + } +} + +/* this will allocate node, initialize all members, and node + append to the list, possibly modifying head and modifying tail */ +PRIVATE void append_open_tag ARGS4( + char*, tagname, + char*, classname GCC_UNUSED, + HT_tagspec**, head, + HT_tagspec**, tail) +{ + HT_tagspec* subj; + HTTag* tag; +#ifdef USE_COLOR_STYLE + int hcode; +#endif + + append_close_tag(tagname, head, tail); /* initialize common members*/ + subj = *tail; + subj->start = TRUE; + + tag = HTML_dtd.tags+subj->element; + +#ifdef USE_COLOR_STYLE + hcode = hash_code_lowercase_on_fly(tagname); + if (classname && *classname) { + +# if 0 + /* + * we don't provide a classname as attribute of that tag, since for plain + * formatting tags they are not used directly for anything except style - + * and we provide style value directly. + */ + int class_attr_idx = 0; + int n = tag->number_of_attributes; + attr* attrs = tag->attributes; + /*.... */ /* this is not implemented though it's easy */ +# endif + + hcode = hash_code_aggregate_char('.', hcode); + hcode = hash_code_aggregate_lower_on_fly(classname, hcode); + StrAllocCopy(subj->class_name, classname); + } else { + subj->class_name = ""; + } + subj->style = hcode; +#endif +} + + +/* returns 1 if incorrect */ +PUBLIC int html_src_parse_tagspec ARGS4( + char*, ts, + HTlexem, lexem, + BOOL, checkonly, + BOOL, isstart) +{ + char *p = ts; + char *tagstart = 0; + char *tagend = 0; + char *classstart; + char *classend; + char stop = FALSE, after_excl = FALSE; + html_src_check_state state = HTSRC_CK_normal; + HT_tagspec* head = NULL, *tail = NULL; + HT_tagspec** slot = ( isstart ? lexem_start : lexem_end ) +lexem; + + while (!stop) { + switch (state) { + case HTSRC_CK_normal: + case HTSRC_CK_seen_excl: + switch (*p) { + case '\0': stop = TRUE; break; + case ' ': case '\t': break; + case '!': + if (state == HTSRC_CK_seen_excl) + return 1; /*second '!'*/ + state = HTSRC_CK_seen_excl; + after_excl = TRUE; + break; + default: + if (isalpha(*p) || *p == '_') { + tagstart = p; + while (*p && ( isalpha(*p) || *p == '_') ) + ++p; + tagend = p; + state = HTSRC_CK_after_tagname; + } else + return 1; + continue; + } + break; + case HTSRC_CK_after_tagname: + switch (*p) { + case '\0': stop = TRUE; + case ' ': + case '\t': + { + char save = *tagend; + *tagend = '\0'; + classstart = 0; + if (checkonly) { + int idx = html_src_tag_index(tagstart); + *tagend = save; + if (idx == -1) + return 1; + } else { + if (after_excl) + append_close_tag(tagstart, &head, &tail); + else + append_open_tag(tagstart, NULL, &head, &tail); + } + state = HTSRC_CK_normal; + after_excl = FALSE; + } + break; + case '.': + if (after_excl) + return 1; + state = HTSRC_CK_seen_dot; + break; + default: + return 1; + } + break; + case HTSRC_CK_seen_dot: { + switch (*p) { + case ' ': + case '\t': + break; + case '\0': + return 1; + default: { + char save, save1; + if ( isalpha(*p) || *p == '_' ) { + classstart = p; + while (*p && ( isalpha(*p) || *p == '_') ) ++p; + classend = p; + save = *classend; + *classend = '\0'; + save1 = *tagend; + *tagend = '\0'; + if (checkonly) { + int idx = html_src_tag_index(tagstart); + *tagend = save1; *classend = save; + if (idx == -1) + return 1; + } else { + append_open_tag(tagstart, classstart, &head, &tail); + } + state = HTSRC_CK_normal;after_excl = FALSE; + continue; + } else + return 1; + } + }/*of switch(*p)*/ + break; + } /* of case HTSRC_CK_seen_dot: */ + }/* of switch */ + ++p; + } + + if (!checkonly) + *slot = head; + return 0; +} + +/*it shouldn't fail anyway - since everything is checked before it's called. */ +PUBLIC void HTMLSRC_init_caches NOARGS +{ + int i; + char* p; + char buf[1000]; + + for (i = 0; i < HTL_num_lexems; ++i) { + if (HTL_tagspecs[i]) + strcpy(buf, HTL_tagspecs[i]); + else + buf[0] = '\0'; + if ((p = strchr(buf, ':')) != 0) + *p = '\0'; + if (html_src_parse_tagspec(buf, i, FALSE, TRUE) ) { + fprintf(stderr, "internal error while caching 1st tagspec of %d lexem", i); + exit_immediately(-1); + } + if (html_src_parse_tagspec( p ? p+1 : NULL , i, FALSE, FALSE) ) { + fprintf(stderr, "internal error while caching 2nd tagspec of %d lexem", i); + exit_immediately(-1); + } + } +} + +#endif /* ifdef USE_PSRC */ diff --git a/src/LYPrettySrc.h b/src/LYPrettySrc.h new file mode 100644 index 00000000..88780bd6 --- /dev/null +++ b/src/LYPrettySrc.h @@ -0,0 +1,70 @@ +#ifndef LYPrettySrc_H +#define LYPrettySrc_H + +#ifdef USE_PSRC + +#include <HTMLDTD.h> + +extern BOOL psrc_view; +extern BOOL LYpsrc; +extern BOOL sgml_in_psrc_was_initialized; + /*this is used for tracking down whether the SGML engine was initialized + ==TRUE if yes. It's value is meaningful if psrc_view = TRUE */ + +extern BOOL psrc_nested_call;/* this is used when distinguishing whether + the current call is nested or not in HTML.c HTML_{start,end}_element. + It ==FALSE if psrc_view==FALSE || sgml_in_psrc_was_initialized==TRUE */ + +extern BOOL psrc_first_tag; /* this is also used in HTML.c to trigger the + 1st tag to preform special. */ + +/* here is a list of lexem codes. */ +typedef enum _HTlexem { + HTL_comm=0, + HTL_tag, + HTL_attrib, + HTL_attrval, + HTL_abracket, + HTL_entity, + HTL_href, + HTL_entire, + HTL_badseq, + HTL_badtag, + HTL_badattr, + HTL_sgmlspecial, + HTL_num_lexems +} HTlexem; + +typedef struct _HT_tagspec +{ + struct _HT_tagspec* next;/* 0 at the last */ +#ifdef USE_COLOR_STYLE + int style;/* precalculated value of the style */ + char* class_name; +#endif + /* these will be passed to HTML_start_element*/ + HTMLElement element; + BOOL* present; + char** value; + + BOOL start; /* if true, then this starts element, otherwise - ends */ +} HT_tagspec; + +extern char* HTL_tagspecs[HTL_num_lexems]; +extern HT_tagspec* lexem_start[HTL_num_lexems]; +extern HT_tagspec* lexem_end[HTL_num_lexems]; + +extern int html_src_parse_tagspec PARAMS((char* ts, HTlexem lexem, + BOOL checkonly,BOOL isstart)); +extern void HTMLSRC_init_caches NOPARAMS; + +/* these 2 vars tell what kind of transform should be appiled to tag names + and attribute names. 0 - lowercase, 1 - as is, 2 uppercase. */ +extern int tagname_transform; +extern int attrname_transform; + + +#endif /* ifdef USE_PSRC */ + + +#endif /* LYPrettySrc_H */ diff --git a/src/LYPrint.c b/src/LYPrint.c index 5c73a70f..4e4ef9ae 100644 --- a/src/LYPrint.c +++ b/src/LYPrint.c @@ -84,10 +84,11 @@ PRIVATE void set_environ ARGS3( char *envbuffer = 0; #ifdef VMS #define SET_ENVIRON(name, value, no_value) set_environ(name, value, no_value) + char temp[80]; StrAllocCopy(envbuffer, value); if (!(envbuffer && *envbuffer)) StrAllocCopy(envbuffer, no_value); - Define_VMSLogical(names[name], envbuffer); + Define_VMSLogical(strcpy(temp, names[name]), envbuffer); FREE(envbuffer); #else #define SET_ENVIRON(name, value, no_value) set_environ(name, value, "") diff --git a/src/LYReadCFG.c b/src/LYReadCFG.c index 6e6960e1..8a18fb1d 100644 --- a/src/LYReadCFG.c +++ b/src/LYReadCFG.c @@ -22,6 +22,8 @@ #include <LYCookie.h> #include <LYReadCFG.h> #include <HTAlert.h> +#include <LYHistory.h> +#include <LYPrettySrc.h> #ifdef DIRED_SUPPORT #include <LYLocal.h> @@ -142,7 +144,9 @@ PRIVATE void add_item_to_list ARGS2( if (cur_item == NULL) outofmem(__FILE__, "read_cfg"); *list_ptr = cur_item; +#ifdef LY_FIND_LEAKS atexit(free_item_list); +#endif } else { /* * Find the last item. @@ -240,7 +244,9 @@ PRIVATE void add_printer_to_list ARGS2( if (cur_item == NULL) outofmem(__FILE__, "read_cfg"); *list_ptr = cur_item; +#ifdef LY_FIND_LEAKS atexit(free_printer_item_list); +#endif } else { /* * Find the last item. @@ -450,7 +456,6 @@ typedef union { long def_value; } ConfigUnion; -#undef PARSE_DEBUG #ifdef PARSE_DEBUG #define ParseData \ lynx_html_item_type** add_value; \ @@ -460,18 +465,18 @@ typedef union { ParseFunc fun_value; \ long def_value #define PARSE_ADD(n,t,v) {n,t, &v, 0, 0, 0, 0, 0} -#define PARSE_SET(n,t,v) {n,t, 0, &v, 0, 0, 0, 0} -#define PARSE_INT(n,t,v) {n,t, 0, 0, &v, 0, 0, 0} -#define PARSE_STR(n,t,v) {n,t, 0, 0, 0, &v, 0, 0} +#define PARSE_SET(n,t,v) {n,t, 0, v, 0, 0, 0, 0} +#define PARSE_INT(n,t,v) {n,t, 0, 0, v, 0, 0, 0} +#define PARSE_STR(n,t,v) {n,t, 0, 0, 0, v, 0, 0} #define PARSE_ENV(n,t,v) {n,t, 0, 0, 0, v, 0, 0} #define PARSE_FUN(n,t,v) {n,t, 0, 0, 0, 0, v, 0} #define PARSE_DEF(n,t,v) {n,t, 0, 0, 0, 0, 0, v} #else #define ParseData long value #define PARSE_ADD(n,t,v) {n,t, (long)&(v)} -#define PARSE_SET(n,t,v) {n,t, (long)&(v)} -#define PARSE_INT(n,t,v) {n,t, (long)&(v)} -#define PARSE_STR(n,t,v) {n,t, (long)&(v)} +#define PARSE_SET(n,t,v) {n,t, (long) (v)} +#define PARSE_INT(n,t,v) {n,t, (long) (v)} +#define PARSE_STR(n,t,v) {n,t, (long) (v)} #define PARSE_ENV(n,t,v) {n,t, (long) (v)} #define PARSE_FUN(n,t,v) {n,t, (long) (v)} #define PARSE_DEF(n,t,v) {n,t, (long) (v)} @@ -763,6 +768,21 @@ static int printer_fun ARGS1( return 0; } +#ifdef SOURCE_CACHE +static int source_cache_fun ARGS1( + char *, value) +{ + if (!strncasecomp(value, "FILE", 4)) + LYCacheSource = SOURCE_CACHE_FILE; + else if (!strncasecomp(value, "MEM", 3)) + LYCacheSource = SOURCE_CACHE_MEMORY; + else if (!strncasecomp(value, "NONE", 4)) + LYCacheSource = SOURCE_CACHE_NONE; + + return 0; +} +#endif + static int suffix_fun ARGS1( char *, value) { @@ -841,114 +861,245 @@ static int viewer_fun ARGS1( return 0; } + +#ifdef USE_PSRC + +static void html_src_bad_syntax ARGS2( + char*, value, + char*, option_name) +{ + char buf[100]; + + strcpy(buf,"HTMLSRC_"); + strcat(buf,option_name); + LYUpperCase(buf); + fprintf(stderr,"Bad syntax in TAGSPEC %s:%s\n",buf,value); + exit_immediately(-1); +} + + +static int parse_html_src_spec ARGS3( + HTlexem, lexem_code, + char*, value, + char*, option_name) +{ + /* Now checking the value for being correct. Since HTML_dtd is not + * initialized completely (member tags points to non-initiailized data), we + * use tags_old. If the syntax is incorrect, then lynx will exit with error + * message. + */ + char* ts2; + if ( !value || !*value) return 0; /* silently ignoring*/ + +#define BS() html_src_bad_syntax(value,option_name) + + ts2 = strchr(value,':'); + if (!ts2) + BS(); + *ts2 = '\0'; + + if ( html_src_parse_tagspec(value, lexem_code, TRUE, TRUE) + || html_src_parse_tagspec(ts2, lexem_code, TRUE, TRUE) ) + { + *ts2 = ':'; + BS(); + } + + *ts2 = ':'; + HTL_tagspecs[lexem_code] = NULL; + StrAllocCopy(HTL_tagspecs[lexem_code],value); +#undef BS + return 0; +} + +#define defHTSRC_parse_fun(x) static int html_src_set_##x ARGS1( char*,str) \ + { parse_html_src_spec(HTL_##x,str,#x); return 0; } + +defHTSRC_parse_fun(comm) +defHTSRC_parse_fun(tag) +defHTSRC_parse_fun(attrib) +defHTSRC_parse_fun(attrval) +defHTSRC_parse_fun(abracket) +defHTSRC_parse_fun(entity) +defHTSRC_parse_fun(href) +defHTSRC_parse_fun(entire) +defHTSRC_parse_fun(badseq) +defHTSRC_parse_fun(badtag) +defHTSRC_parse_fun(badattr) +defHTSRC_parse_fun(sgmlspecial) + +#undef defHTSRC_parse_fun + +static int read_htmlsrc_attrname_xform ARGS1( char*,str) +{ + int val; + if ( 1 == sscanf(str, "%d", &val) ) { + if (val<0 || val >2) { + CTRACE(tfp,"bad value for htmlsrc_attrname_xform (ignored - must be one of 0,1,2): %d\n", val); + } else + attrname_transform = val; + } else { + CTRACE(tfp,"bad value for htmlsrc_attrname_xform (ignored): %s\n", + str); + } + return 0; +} + +static int read_htmlsrc_tagname_xform ARGS1( char*,str) +{ + int val; + if ( 1 == sscanf(str,"%d",&val) ) { + if (val<0 || val >2) { + CTRACE(tfp,"bad value for htmlsrc_tagname_xform (ignored - must be one of 0,1,2): %d\n", val); + } else + tagname_transform = val; + } else { + CTRACE(tfp,"bad value for htmlsrc_tagname_xform (ignored): %s\n", + str); + } + return 0; +} + + +#define defHTSRC_option(x) \ + PARSE_FUN( "htmlsrc_" #x ,CONF_FUN, html_src_set_##x), + +#endif + + /* This table should be sorted alphabetically */ static Config_Type Config_Table [] = { - PARSE_SET("accept_all_cookies", CONF_BOOL, LYAcceptAllCookies), - PARSE_INT("alertsecs", CONF_INT, AlertSecs), - PARSE_SET("always_resubmit_posts", CONF_BOOL, LYresubmit_posts), + PARSE_SET("accept_all_cookies", CONF_BOOL, &LYAcceptAllCookies), + PARSE_INT("alertsecs", CONF_INT, &AlertSecs), + PARSE_SET("always_resubmit_posts", CONF_BOOL, &LYresubmit_posts), #ifdef EXEC_LINKS PARSE_DEF("always_trusted_exec", CONF_ADD_TRUSTED, ALWAYS_EXEC_PATH), #endif PARSE_FUN("assume_charset", CONF_FUN, assume_charset_fun), PARSE_FUN("assume_local_charset", CONF_FUN, assume_local_charset_fun), PARSE_FUN("assume_unrec_charset", CONF_FUN, assume_unrec_charset_fun), - PARSE_SET("block_multi_bookmarks", CONF_BOOL, LYMBMBlocked), - PARSE_SET("bold_h1", CONF_BOOL, bold_H1), - PARSE_SET("bold_headers", CONF_BOOL, bold_headers), - PARSE_SET("bold_name_anchors", CONF_BOOL, bold_name_anchors), - PARSE_SET("case_sensitive_always_on", CONF_BOOL, case_sensitive), + PARSE_SET("block_multi_bookmarks", CONF_BOOL, &LYMBMBlocked), + PARSE_SET("bold_h1", CONF_BOOL, &bold_H1), + PARSE_SET("bold_headers", CONF_BOOL, &bold_headers), + PARSE_SET("bold_name_anchors", CONF_BOOL, &bold_name_anchors), + PARSE_SET("case_sensitive_always_on", CONF_BOOL, &case_sensitive), PARSE_FUN("character_set", CONF_FUN, character_set_fun), - PARSE_SET("checkmail", CONF_BOOL, check_mail), - PARSE_SET("collapse_br_tags", CONF_BOOL, LYCollapseBRs), + PARSE_SET("checkmail", CONF_BOOL, &check_mail), + PARSE_SET("collapse_br_tags", CONF_BOOL, &LYCollapseBRs), #ifdef USE_COLOR_TABLE PARSE_FUN("color", CONF_FUN, color_fun), #endif - PARSE_STR("cookie_accept_domains", CONF_STR, LYCookieSAcceptDomains), + PARSE_STR("cookie_accept_domains", CONF_STR, &LYCookieSAcceptDomains), #ifdef EXP_PERSISTENT_COOKIES - PARSE_STR("cookie_file", CONF_STR, LYCookieFile), + PARSE_STR("cookie_file", CONF_STR, &LYCookieFile), #endif /* EXP_PERSISTENT_COOKIES */ - PARSE_STR("cookie_loose_invalid_domains", CONF_STR, LYCookieSLooseCheckDomains), - PARSE_STR("cookie_query_invalid_domains", CONF_STR, LYCookieSQueryCheckDomains), - PARSE_STR("cookie_reject_domains", CONF_STR, LYCookieSRejectDomains), - PARSE_STR("cookie_strict_invalid_domains", CONF_STR, LYCookieSStrictCheckDomains), + PARSE_STR("cookie_loose_invalid_domains", CONF_STR, &LYCookieSLooseCheckDomains), + PARSE_STR("cookie_query_invalid_domains", CONF_STR, &LYCookieSQueryCheckDomains), + PARSE_STR("cookie_reject_domains", CONF_STR, &LYCookieSRejectDomains), + PARSE_STR("cookie_strict_invalid_domains", CONF_STR, &LYCookieSStrictCheckDomains), PARSE_ENV("cso_proxy", CONF_ENV, 0 ), #ifdef VMS - PARSE_STR("CSWING_PATH", CONF_STR, LYCSwingPath), + PARSE_STR("CSWING_PATH", CONF_STR, &LYCSwingPath), #endif PARSE_FUN("default_bookmark_file", CONF_FUN, default_bookmark_file_fun), PARSE_FUN("default_cache_size", CONF_FUN, default_cache_size_fun), PARSE_FUN("default_editor", CONF_FUN, default_editor_fun), - PARSE_STR("default_index_file", CONF_STR, indexfile), + PARSE_STR("default_index_file", CONF_STR, &indexfile), PARSE_FUN("default_keypad_mode_is_numbers_as_arrows", CONF_FUN, numbers_as_arrows_fun), PARSE_FUN("default_user_mode", CONF_FUN, default_user_mode_fun), #if defined(VMS) && defined(VAXC) && !defined(__DECC) - PARSE_INT("default_virtual_memory_size", CONF_INT, HTVirtualMemorySize), + PARSE_INT("default_virtual_memory_size", CONF_INT, &HTVirtualMemorySize), #endif #ifdef DIRED_SUPPORT PARSE_FUN("dired_menu", CONF_FUN, dired_menu_fun), #endif PARSE_ADD("downloader", CONF_ADD_ITEM, downloaders), - PARSE_SET("emacs_keys_always_on", CONF_BOOL, emacs_keys), - PARSE_SET("enable_scrollback", CONF_BOOL, enable_scrollback), + PARSE_SET("emacs_keys_always_on", CONF_BOOL, &emacs_keys), + PARSE_SET("enable_scrollback", CONF_BOOL, &enable_scrollback), #ifdef USE_EXTERNALS PARSE_ADD("external", CONF_ADD_ITEM, externals), #endif PARSE_ENV("finger_proxy", CONF_ENV, 0 ), - PARSE_SET("force_8bit_toupper", CONF_BOOL, UCForce8bitTOUPPER), - PARSE_SET("force_ssl_cookies_secure", CONF_BOOL, LYForceSSLCookiesSecure), + PARSE_SET("force_8bit_toupper", CONF_BOOL, &UCForce8bitTOUPPER), + PARSE_SET("force_ssl_cookies_secure", CONF_BOOL, &LYForceSSLCookiesSecure), #if !defined(NO_OPTION_FORMS) && !defined(NO_OPTION_MENU) - PARSE_SET("forms_options", CONF_BOOL, LYUseFormsOptions), + PARSE_SET("forms_options", CONF_BOOL, &LYUseFormsOptions), #endif PARSE_ENV("ftp_proxy", CONF_ENV, 0 ), - PARSE_STR("global_extension_map", CONF_STR, global_extension_map), - PARSE_STR("global_mailcap", CONF_STR, global_type_map), + PARSE_STR("global_extension_map", CONF_STR, &global_extension_map), + PARSE_STR("global_mailcap", CONF_STR, &global_type_map), PARSE_ENV("gopher_proxy", CONF_ENV, 0 ), - PARSE_SET("gotobuffer", CONF_BOOL, goto_buffer), - PARSE_STR("helpfile", CONF_STR, helpfile), - PARSE_SET("historical_comments", CONF_BOOL, historical_comments), + PARSE_SET("gotobuffer", CONF_BOOL, &goto_buffer), + PARSE_STR("helpfile", CONF_STR, &helpfile), + PARSE_SET("historical_comments", CONF_BOOL, &historical_comments), + +#ifdef USE_PSRC + + defHTSRC_option(abracket) + defHTSRC_option(attrib) + + PARSE_FUN("htmlsrc_attrname_xform", CONF_FUN, read_htmlsrc_attrname_xform), + + defHTSRC_option(attrval) + defHTSRC_option(badattr) + defHTSRC_option(badseq) + defHTSRC_option(badtag) + defHTSRC_option(comm) + defHTSRC_option(entire) + defHTSRC_option(entity) + defHTSRC_option(href) + defHTSRC_option(sgmlspecial) + defHTSRC_option(tag) + + PARSE_FUN("htmlsrc_tagname_xform", CONF_FUN, read_htmlsrc_tagname_xform), + + +# undef defHTSRC_option +#endif + PARSE_ENV("http_proxy", CONF_ENV, 0 ), PARSE_ENV("https_proxy", CONF_ENV, 0 ), PARSE_FUN("include", CONF_INCLUDE, 0), - PARSE_INT("infosecs", CONF_INT, InfoSecs), - PARSE_STR("jump_prompt", CONF_STR, jumpprompt), - PARSE_SET("jumpbuffer", CONF_BOOL, jump_buffer), + PARSE_INT("infosecs", CONF_INT, &InfoSecs), + PARSE_STR("jump_prompt", CONF_STR, &jumpprompt), + PARSE_SET("jumpbuffer", CONF_BOOL, &jump_buffer), PARSE_FUN("jumpfile", CONF_FUN, jumpfile_fun), #ifdef EXP_KEYBOARD_LAYOUT PARSE_FUN("keyboard_layout", CONF_FUN, keyboard_layout_fun), #endif PARSE_FUN("keymap", CONF_FUN, keymap_fun), #ifndef DISABLE_NEWS - PARSE_SET("list_news_numbers", CONF_BOOL, LYListNewsNumbers), - PARSE_SET("list_news_dates", CONF_BOOL, LYListNewsDates), + PARSE_SET("list_news_numbers", CONF_BOOL, &LYListNewsNumbers), + PARSE_SET("list_news_dates", CONF_BOOL, &LYListNewsDates), #endif #ifndef VMS - PARSE_STR("list_format", CONF_STR, list_format), + PARSE_STR("list_format", CONF_STR, &list_format), #endif PARSE_FUN("localhost_alias", CONF_FUN, localhost_alias_fun), - PARSE_STR("local_domain", CONF_STR, LYLocalDomain), + PARSE_STR("local_domain", CONF_STR, &LYLocalDomain), #if defined(EXEC_LINKS) || defined(EXEC_SCRIPTS) - PARSE_SET("local_execution_links_always_on", CONF_BOOL, local_exec), - PARSE_SET("local_execution_links_on_but_not_remote", CONF_BOOL, local_exec_on_local_files), + PARSE_SET("local_execution_links_always_on", CONF_BOOL, &local_exec), + PARSE_SET("local_execution_links_on_but_not_remote", CONF_BOOL, &local_exec_on_local_files), #endif #ifdef LYNXCGI_LINKS PARSE_FUN("lynxcgi_environment", CONF_FUN, lynxcgi_environment_fun), #ifndef VMS - PARSE_STR("lynxcgi_document_root", CONF_STR, LYCgiDocumentRoot), + PARSE_STR("lynxcgi_document_root", CONF_STR, &LYCgiDocumentRoot), #endif #endif - PARSE_STR("lynx_host_name", CONF_STR, LYHostName), + PARSE_STR("lynx_host_name", CONF_STR, &LYHostName), PARSE_FUN("lynx_sig_file", CONF_FUN, lynx_sig_file_fun), - PARSE_SET("mail_system_error_logging", CONF_BOOL, error_logging), + PARSE_SET("mail_system_error_logging", CONF_BOOL, &error_logging), #ifdef VMS - PARSE_STR("mail_adrs", CONF_STR, mail_adrs), + PARSE_STR("mail_adrs", CONF_STR, &mail_adrs), #endif - PARSE_SET("make_links_for_all_images", CONF_BOOL, clickable_images), - PARSE_SET("make_pseudo_alts_for_inlines", CONF_BOOL, pseudo_inline_alts), - PARSE_INT("messagesecs", CONF_INT, MessageSecs), - PARSE_SET("minimal_comments", CONF_BOOL, minimal_comments), - PARSE_INT("multi_bookmark_support", CONF_BOOL, LYMultiBookmarks), - PARSE_SET("ncr_in_bookmarks", CONF_BOOL, UCSaveBookmarksInUnicode), + PARSE_SET("make_links_for_all_images", CONF_BOOL, &clickable_images), + PARSE_SET("make_pseudo_alts_for_inlines", CONF_BOOL, &pseudo_inline_alts), + PARSE_INT("messagesecs", CONF_INT, &MessageSecs), + PARSE_SET("minimal_comments", CONF_BOOL, &minimal_comments), + PARSE_SET("multi_bookmark_support", CONF_BOOL, &LYMultiBookmarks), + PARSE_SET("ncr_in_bookmarks", CONF_BOOL, &UCSaveBookmarksInUnicode), #ifndef DISABLE_NEWS PARSE_FUN("news_chunk_size", CONF_FUN, news_chunk_size_fun), PARSE_FUN("news_max_chunk", CONF_FUN, news_max_chunk_fun), @@ -959,83 +1110,84 @@ static Config_Type Config_Table [] = PARSE_ENV("nntp_proxy", CONF_ENV, 0), PARSE_ENV("nntpserver", CONF_ENV2, 0), /* actually NNTPSERVER */ #endif - PARSE_SET("no_dot_files", CONF_BOOL, no_dotfiles), - PARSE_SET("no_file_referer", CONF_BOOL, no_filereferer), + PARSE_SET("no_dot_files", CONF_BOOL, &no_dotfiles), + PARSE_SET("no_file_referer", CONF_BOOL, &no_filereferer), #ifndef VMS - PARSE_SET("no_forced_core_dump", CONF_BOOL, LYNoCore), + PARSE_SET("no_forced_core_dump", CONF_BOOL, &LYNoCore), #endif - PARSE_SET("no_from_header", CONF_BOOL, LYNoFromHeader), - PARSE_SET("no_ismap_if_usemap", CONF_BOOL, LYNoISMAPifUSEMAP), + PARSE_SET("no_from_header", CONF_BOOL, &LYNoFromHeader), + PARSE_SET("no_ismap_if_usemap", CONF_BOOL, &LYNoISMAPifUSEMAP), PARSE_ENV("no_proxy", CONF_ENV, 0 ), - PARSE_SET("no_referer_header", CONF_BOOL, LYNoRefererHeader), + PARSE_SET("no_referer_header", CONF_BOOL, &LYNoRefererHeader), PARSE_FUN("outgoing_mail_charset", CONF_FUN, outgoing_mail_charset_fun), #ifdef DISP_PARTIAL - PARSE_SET("partial", CONF_BOOL, display_partial), - PARSE_INT("partial_thres", CONF_INT, partial_threshold), + PARSE_SET("partial", CONF_BOOL, &display_partial), + PARSE_INT("partial_thres", CONF_INT, &partial_threshold), #endif #ifdef EXP_PERSISTENT_COOKIES - PARSE_SET("persistent_cookies", CONF_BOOL, persistent_cookies), + PARSE_SET("persistent_cookies", CONF_BOOL, &persistent_cookies), #endif /* EXP_PERSISTENT_COOKIES */ - PARSE_STR("personal_mailcap", CONF_STR, personal_type_map), - PARSE_STR("personal_extension_map", CONF_STR, personal_extension_map), - PARSE_STR("preferred_charset", CONF_STR, pref_charset), - PARSE_STR("preferred_language", CONF_STR, language), - PARSE_SET("prepend_base_to_source", CONF_BOOL, LYPrependBaseToSource), - PARSE_SET("prepend_charset_to_source", CONF_BOOL, LYPrependCharsetToSource), + PARSE_STR("personal_mailcap", CONF_STR, &personal_type_map), + PARSE_STR("personal_extension_map", CONF_STR, &personal_extension_map), + PARSE_STR("preferred_charset", CONF_STR, &pref_charset), + PARSE_STR("preferred_language", CONF_STR, &language), + PARSE_SET("prepend_base_to_source", CONF_BOOL, &LYPrependBaseToSource), + PARSE_SET("prepend_charset_to_source", CONF_BOOL, &LYPrependCharsetToSource), PARSE_FUN("printer", CONF_FUN, printer_fun), - PARSE_SET("quit_default_yes", CONF_BOOL, LYQuitDefaultYes), + PARSE_SET("quit_default_yes", CONF_BOOL, &LYQuitDefaultYes), #ifndef NO_RULES PARSE_FUN("rule", CONF_FUN, HTSetConfiguration), PARSE_FUN("rulesfile", CONF_FUN, cern_rulesfile_fun), #endif /* NO_RULES */ - PARSE_STR("save_space", CONF_STR, lynx_save_space), - PARSE_SET("scan_for_buried_news_refs", CONF_BOOL, scan_for_buried_news_references), - PARSE_SET("seek_frag_area_in_cur", CONF_BOOL, LYSeekFragAREAinCur), - PARSE_SET("seek_frag_map_in_cur", CONF_BOOL, LYSeekFragMAPinCur), - PARSE_SET("set_cookies", CONF_BOOL, LYSetCookies), - PARSE_SET("show_cursor", CONF_BOOL, LYShowCursor), - PARSE_SET("show_kb_rate", CONF_BOOL, LYshow_kb_rate), + PARSE_STR("save_space", CONF_STR, &lynx_save_space), + PARSE_SET("scan_for_buried_news_refs", CONF_BOOL, &scan_for_buried_news_references), + PARSE_SET("seek_frag_area_in_cur", CONF_BOOL, &LYSeekFragAREAinCur), + PARSE_SET("seek_frag_map_in_cur", CONF_BOOL, &LYSeekFragMAPinCur), + PARSE_SET("set_cookies", CONF_BOOL, &LYSetCookies), + PARSE_SET("show_cursor", CONF_BOOL, &LYShowCursor), + PARSE_SET("show_kb_rate", CONF_BOOL, &LYshow_kb_rate), PARSE_ENV("snews_proxy", CONF_ENV, 0 ), PARSE_ENV("snewspost_proxy", CONF_ENV, 0 ), PARSE_ENV("snewsreply_proxy", CONF_ENV, 0 ), - PARSE_SET("soft_dquotes", CONF_BOOL, soft_dquotes), - PARSE_STR("startfile", CONF_STR, startfile), - PARSE_SET("strip_dotdot_urls", CONF_BOOL, LYStripDotDotURLs), - PARSE_SET("substitute_underscores", CONF_BOOL, use_underscore), + PARSE_SET("soft_dquotes", CONF_BOOL, &soft_dquotes), +#ifdef SOURCE_CACHE + PARSE_SET("source_cache", CONF_FUN, source_cache_fun), +#endif + PARSE_STR("startfile", CONF_STR, &startfile), + PARSE_SET("strip_dotdot_urls", CONF_BOOL, &LYStripDotDotURLs), + PARSE_SET("substitute_underscores", CONF_BOOL, &use_underscore), PARSE_FUN("suffix", CONF_FUN, suffix_fun), PARSE_FUN("system_editor", CONF_FUN, system_editor_fun), - PARSE_STR("system_mail", CONF_STR, system_mail), - PARSE_STR("system_mail_flags", CONF_STR, system_mail_flags), - PARSE_SET("tagsoup", CONF_BOOL, Old_DTD), + PARSE_STR("system_mail", CONF_STR, &system_mail), + PARSE_STR("system_mail_flags", CONF_STR, &system_mail_flags), + PARSE_SET("tagsoup", CONF_BOOL, &Old_DTD), #ifdef EXEC_LINKS PARSE_DEF("trusted_exec", CONF_ADD_TRUSTED, EXEC_PATH), #endif #ifdef LYNXCGI_LINKS PARSE_DEF("trusted_lynxcgi", CONF_ADD_TRUSTED, CGI_PATH), #endif - PARSE_STR("url_domain_prefixes", CONF_STR, URLDomainPrefixes), - PARSE_STR("url_domain_suffixes", CONF_STR, URLDomainSuffixes), + PARSE_STR("url_domain_prefixes", CONF_STR, &URLDomainPrefixes), + PARSE_STR("url_domain_suffixes", CONF_STR, &URLDomainSuffixes), #ifdef DIRED_SUPPORT PARSE_ADD("uploader", CONF_ADD_ITEM, uploaders), #endif #ifdef VMS - PARSE_SET("use_fixed_records", CONF_BOOL, UseFixedRecords), + PARSE_SET("use_fixed_records", CONF_BOOL, &UseFixedRecords), #endif #if defined(NCURSES_MOUSE_VERSION) || defined(USE_SLANG_MOUSE) - PARSE_SET("use_mouse", CONF_BOOL, LYUseMouse), + PARSE_SET("use_mouse", CONF_BOOL, &LYUseMouse), #endif - PARSE_SET("use_select_popups", CONF_BOOL, LYSelectPopups), - PARSE_SET("verbose_images", CONF_BOOL, verbose_img), - PARSE_SET("vi_keys_always_on", CONF_BOOL, vi_keys), + PARSE_SET("use_select_popups", CONF_BOOL, &LYSelectPopups), + PARSE_SET("verbose_images", CONF_BOOL, &verbose_img), + PARSE_SET("vi_keys_always_on", CONF_BOOL, &vi_keys), PARSE_FUN("viewer", CONF_FUN, viewer_fun), PARSE_ENV("wais_proxy", CONF_ENV, 0 ), - PARSE_STR("xloadimage_command", CONF_STR, XLoadImageCommand), + PARSE_STR("xloadimage_command", CONF_STR, &XLoadImageCommand), {0} }; -PRIVATE char *local_url = NULL; - /* * Free memory allocated in 'read_cfg()' */ @@ -1060,7 +1212,6 @@ PUBLIC void free_lynx_cfg NOARGS break; } } - FREE(local_url); } /* @@ -1136,8 +1287,8 @@ PUBLIC void read_cfg ARGS4( /* Significant lines are of the form KEYWORD:WHATEVER */ if ((value = strchr (name, ':')) == 0) { - /* fprintf (stderr, "Bad line-- no :\n"); */ - continue; + /* fprintf (stderr, "Bad line-- no :\n"); */ + continue; } /* skip past colon, but replace ':' with 0 to make name meaningful */ @@ -1238,19 +1389,28 @@ PUBLIC void read_cfg ARGS4( case CONF_INCLUDE: /* include another file */ #ifndef NO_CONFIG_INFO - if (fp0 != 0) { + if (fp0 != 0 && !LYRestricted) { char *url = 0; + char *cp1 = NULL; LYLocalFileToURL(&url, value); - fprintf(fp0, "%s:<a href=\"%s\">%s</a>\n\n", name, url, value); - fprintf(fp0, " #<begin %s>\n", value); + StrAllocCopy(cp1, value); + if (strchr(value, '&') || strchr(value, '<')) { + LYEntify(&cp1, TRUE); + } + + fprintf(fp0, "%s:<a href=\"%s\">%s</a>\n\n", name, url, cp1); + fprintf(fp0, " #<begin %s>\n", cp1); + + read_cfg (value, cfg_filename, nesting_level + 1, fp0); + + fprintf(fp0, " #<end of %s>\n\n", cp1); FREE(url); - } -#endif + FREE(cp1); + } else +#endif /* !NO_CONFIG_INFO */ + read_cfg (value, cfg_filename, nesting_level + 1, fp0); -#ifndef NO_CONFIG_INFO - if (fp0 != 0) - fprintf(fp0, " #<end of %s>\n\n", value); -#endif + break; case CONF_ADD_ITEM: @@ -1356,18 +1516,75 @@ PUBLIC void read_cfg ARGS4( } /* - * lynx.cfg infopage, returns local url. + * Show rendered lynx.cfg data without comments, LYNXCFG:/ internal page. + * Called from getfile() cyrcle: + * we create and load the page just in place and return to mainloop(). */ -PUBLIC char *lynx_cfg_infopage NOARGS +PUBLIC int lynx_cfg_infopage ARGS1( + document *, newdoc) { - char tempfile[LY_MAXPATH]; + static char tempfile[LY_MAXPATH]; + static char *local_url; /* static! */ + DocAddress WWWDoc; /* need on exit */ char *temp = 0; + char *cp1 = NULL; FILE *fp0; + +#ifndef NO_CONFIG_INFO + /*------------------------------------------------- + * kludge a link from LYNXCFG:/, the URL was: + * " <a href=\"LYNXCFG://reload\">RELOAD THE CHANGES</a>\n" + *--------------------------------------------------*/ + + if ((strstr(newdoc->address, "LYNXCFG://reload")) && !LYRestricted) { + /* + * Some staff to reload read_cfg(), + * but also load options menu items and command-line options + * to made things consistent. Not implemented yet. Dummy. + */ + reload_read_cfg(); + + /* + * now pop-up and return to updated LYNXCFG:/ page, + * remind postoptions() but much simpler: + */ + + /* the page was pushed, so pop-up. */ + LYpop(newdoc); + WWWDoc.address = newdoc->address; + WWWDoc.post_data = newdoc->post_data; + WWWDoc.post_content_type = newdoc->post_content_type; + WWWDoc.bookmark = newdoc->bookmark; + WWWDoc.isHEAD = newdoc->isHEAD; + WWWDoc.safe = newdoc->safe; + LYforce_no_cache = FALSE; /* ! */ + LYoverride_no_cache = TRUE; /* ! */ + + /* + * Working out of getfile() cycle we reset *no_cache manually here so + * HTLoadAbsolute() will return "Document already in memory": it was + * forced reloading obsolete file again without this (overhead). + * + * Probably *no_cache was set in a wrong position because of + * the internal page... + */ + if (!HTLoadAbsolute(&WWWDoc)) + return(NOT_FOUND); + + + /* now set up the flag and fall down to create a new LYNXCFG:/ page */ + local_url = 0; /* see below */ + } +#endif /* !NO_CONFIG_INFO */ + + if (local_url == 0) { + + LYRemoveTemp(tempfile); if ((fp0 = LYOpenTemp(tempfile, HTML_SUFFIX, "w")) == NULL) { HTAlert(CANNOT_OPEN_TEMP); - return(0); + return(NOT_FOUND); } LYLocalFileToURL(&local_url, tempfile); @@ -1376,40 +1593,54 @@ PUBLIC char *lynx_cfg_infopage NOARGS BeginInternalPage (fp0, LYNXCFG_TITLE, NULL); fprintf(fp0, "<pre>\n"); + #ifndef NO_CONFIG_INFO + if (!LYRestricted) { #if defined(HAVE_CONFIG_H) || defined(VMS) - if (strcmp(lynx_cfg_file, LYNX_CFG_FILE)) { - StrAllocCopy(temp, LYNX_CFG_FILE); - fprintf(fp0, "<em>%s\n%s", - gettext("This is read from your lynx.cfg file,"), - gettext("please \"read\" distribution's")); - fprintf(fp0, " <a href=\"%s\">lynx.cfg</a> ", - temp); - FREE(temp); - fprintf(fp0, "%s</em>\n\n", - gettext("for more comments.")); - } else + if (strcmp(lynx_cfg_file, LYNX_CFG_FILE)) { + fprintf(fp0, "<em>%s\n%s", + gettext("This is read from your lynx.cfg file,"), + gettext("please \"read\" distribution's")); + LYLocalFileToURL(&temp, LYNX_CFG_FILE); + fprintf(fp0, " <a href=\"%s\">lynx.cfg</a> ", + temp); + FREE(temp); + fprintf(fp0, "%s</em>\n\n", + gettext("for more comments.")); + } else #endif /* HAVE_CONFIG_H */ - { - /* no absolute path... for lynx.cfg on DOS/Win32 */ - fprintf(fp0, "<em>%s\n%s", - gettext("This is read from your lynx.cfg file,"), - gettext("please \"read\" distribution's")); - fprintf(fp0, " </em>lynx.cfg<em> "); - fprintf(fp0, "%s</em>\n\n", - gettext("for more comments.")); - } + { + /* no absolute path... for lynx.cfg on DOS/Win32 */ + fprintf(fp0, "<em>%s\n%s", + gettext("This is read from your lynx.cfg file,"), + gettext("please \"read\" distribution's")); + fprintf(fp0, " </em>lynx.cfg<em> "); + fprintf(fp0, "%s</em>\n", + gettext("for more comments.")); + } - LYLocalFileToURL(&temp, lynx_cfg_file); - fprintf(fp0, " #<em>%s <a href=\"%s\">%s</a></em>\n", - gettext("Your primary configuration"), - temp, - lynx_cfg_file); - FREE(temp); + /** a new experimental link ... **/ + if (user_mode == ADVANCED_MODE) + fprintf(fp0, " <a href=\"LYNXCFG://reload\">%s</a>\n", + gettext("RELOAD THE CHANGES")); + + + LYLocalFileToURL(&temp, lynx_cfg_file); + StrAllocCopy(cp1, lynx_cfg_file); + if (strchr(lynx_cfg_file, '&') || strchr(lynx_cfg_file, '<')) { + LYEntify(&cp1, TRUE); + } + fprintf(fp0, "\n #<em>%s <a href=\"%s\">%s</a></em>\n", + gettext("Your primary configuration"), + temp, + cp1); + FREE(temp); + FREE(cp1); + + } else +#endif /* !NO_CONFIG_INFO */ -#else fprintf(fp0, "<em>%s</em>\n\n", gettext("This is read from your lynx.cfg file:")); -#endif /* NO_CONFIG_INFO */ /* * Process the configuration file. @@ -1421,5 +1652,78 @@ PUBLIC char *lynx_cfg_infopage NOARGS LYCloseTempFP(fp0); } - return(local_url); + /* return to getfile() cyrcle */ + StrAllocCopy(newdoc->address, local_url); + WWWDoc.address = newdoc->address; + WWWDoc.post_data = newdoc->post_data; + WWWDoc.post_content_type = newdoc->post_content_type; + WWWDoc.bookmark = newdoc->bookmark; + WWWDoc.isHEAD = newdoc->isHEAD; + WWWDoc.safe = newdoc->safe; + + if (!HTLoadAbsolute(&WWWDoc)) + return(NOT_FOUND); + return(NORMAL); +} + + +#if defined(HAVE_CONFIG_H) && !defined(NO_CONFIG_INFO) +/* + * Compile-time definitions info, LYNXCOMPILEOPTS:/ internal page, + * from getfile() cyrcle. + */ +PUBLIC int lynx_compile_opts ARGS1( + document *, newdoc) +{ + char tempfile[LY_MAXPATH]; +#define PutDefs(table, N) fprintf(fp0, "%-35s %s\n", table[N].name, table[N].value) +#include <cfg_defs.h> + unsigned n; + static char *info_url; /* static! */ + DocAddress WWWDoc; /* need on exit */ + FILE *fp0; + + /* create the page only once - compile-time data will not change... */ + + if (info_url == 0) { + if ((fp0 = LYOpenTemp (tempfile, HTML_SUFFIX, "w")) == 0) { + HTAlert(CANNOT_OPEN_TEMP); + return(NOT_FOUND); + } + LYLocalFileToURL(&info_url, tempfile); + + BeginInternalPage (fp0, CONFIG_DEF_TITLE, NULL); + fprintf(fp0, "<pre>\n"); + + fprintf(fp0, "%s %s<a href=\"LYNXCFG:\"> lynx.cfg</a> %s\n\n", + SEE_ALSO, + YOUR_SEGMENT, + RUNTIME_OPT_SEGMENT); + + fprintf(fp0, "\n%s<br>\n<em>config.cache</em>\n", AUTOCONF_CONFIG_CACHE); + for (n = 0; n < TABLESIZE(config_cache); n++) { + PutDefs(config_cache, n); + } + fprintf(fp0, "\n%s<br>\n<em>lynx_cfg.h</em>\n", AUTOCONF_LYNXCFG_H); + for (n = 0; n < TABLESIZE(config_defines); n++) { + PutDefs(config_defines, n); + } + fprintf(fp0, "</pre>\n"); + EndInternalPage(fp0); + LYCloseTempFP(fp0); + } + + /* exit to getfile() cyrcle */ + StrAllocCopy(newdoc->address, info_url); + WWWDoc.address = newdoc->address; + WWWDoc.post_data = newdoc->post_data; + WWWDoc.post_content_type = newdoc->post_content_type; + WWWDoc.bookmark = newdoc->bookmark; + WWWDoc.isHEAD = newdoc->isHEAD; + WWWDoc.safe = newdoc->safe; + + if (!HTLoadAbsolute(&WWWDoc)) + return(NOT_FOUND); + return(NORMAL); } +#endif /* !NO_CONFIG_INFO */ diff --git a/src/LYReadCFG.h b/src/LYReadCFG.h index 2526ab17..6f674f3d 100644 --- a/src/LYReadCFG.h +++ b/src/LYReadCFG.h @@ -47,7 +47,8 @@ extern void read_cfg PARAMS((char *cfg_filename, char *parent_filename, int nest extern void free_lynx_cfg NOPARAMS; extern BOOLEAN have_read_cfg; -extern char *lynx_cfg_infopage NOPARAMS; -extern char *lynx_compile_opts NOPARAMS; +extern int lynx_cfg_infopage PARAMS((document *newdoc)); +extern int lynx_compile_opts PARAMS((document *newdoc)); +extern void reload_read_cfg NOPARAMS; /* not implemented yet, in LYMain.c */ #endif /* LYREADCFG_H */ diff --git a/src/LYSearch.c b/src/LYSearch.c index dfd359c3..a9cace09 100644 --- a/src/LYSearch.c +++ b/src/LYSearch.c @@ -5,7 +5,6 @@ #include <LYSearch.h> #include <LYGlobalDefs.h> #include <GridText.h> -#include <LYSignal.h> #include <LYLeaks.h> diff --git a/src/LYShowInfo.c b/src/LYShowInfo.c index 6f068304..ea97a9e6 100644 --- a/src/LYShowInfo.c +++ b/src/LYShowInfo.c @@ -24,55 +24,6 @@ #define ADVANCED_INFO 1 /* to get more info in advanced mode */ -#if defined(HAVE_CONFIG_H) && !defined(NO_CONFIG_INFO) -#define HAVE_CFG_DEFS_H - -#define PutDefs(table, N) fprintf(fp0, "%-35s %s\n", table[N].name, table[N].value) - -/* - * Compile-time definitions info, returns local url - */ -PUBLIC char *lynx_compile_opts NOARGS -{ - char tempfile[LY_MAXPATH]; -#include <cfg_defs.h> - unsigned n; - static char *info_url; - FILE *fp0; - - if (info_url == 0) { - if ((fp0 = LYOpenTemp (tempfile, HTML_SUFFIX, "w")) == 0) { - HTAlert(CANNOT_OPEN_TEMP); - return(0); - } - LYLocalFileToURL(&info_url, tempfile); - - BeginInternalPage (fp0, CONFIG_DEF_TITLE, NULL); - fprintf(fp0, "<pre>\n"); - - fprintf(fp0, "%s %s<a href=\"LYNXCFG:\"> lynx.cfg</a> %s\n\n", - SEE_ALSO, - YOUR_SEGMENT, - RUNTIME_OPT_SEGMENT); - - fprintf(fp0, "\n%s<br>\n<em>config.cache</em>\n", AUTOCONF_CONFIG_CACHE); - for (n = 0; n < TABLESIZE(config_cache); n++) { - PutDefs(config_cache, n); - } - fprintf(fp0, "\n%s<br>\n<em>lynx_cfg.h</em>\n", AUTOCONF_LYNXCFG_H); - for (n = 0; n < TABLESIZE(config_defines); n++) { - PutDefs(config_defines, n); - } - fprintf(fp0, "</pre>\n"); - EndInternalPage(fp0); - LYCloseTempFP(fp0); - } - return info_url; -} -#else -#undef HAVE_CFG_DEFS_H -#endif /* !NO_CONFIG_INFO */ - /* * Showinfo prints a page of info about the current file and the link * that the cursor is on. @@ -135,7 +86,7 @@ PUBLIC int showinfo ARGS4( (LYNX_RELEASE ? REL_VERSION : DEV_VERSION) ); if (!LYRestricted) { -#ifdef HAVE_CFG_DEFS_H +#if defined(HAVE_CONFIG_H) && !defined(NO_CONFIG_INFO) fprintf(fp0, " - <a href=\"LYNXCOMPILEOPTS:\">%s</a>\n", COMPILE_OPT_SEGMENT); #else diff --git a/src/LYStrings.c b/src/LYStrings.c index 4179e5f1..01556b95 100644 --- a/src/LYStrings.c +++ b/src/LYStrings.c @@ -5,7 +5,6 @@ #include <LYGlobalDefs.h> #include <GridText.h> #include <LYKeymap.h> -#include <LYSignal.h> #include <LYClean.h> #include <LYMail.h> #include <LYNews.h> diff --git a/src/LYStyle.c b/src/LYStyle.c index 7de53c65..d74c14d3 100644 --- a/src/LYStyle.c +++ b/src/LYStyle.c @@ -1,6 +1,6 @@ /* character level styles for Lynx * (c) 1996 Rob Partington -- donated to the Lyncei (if they want it :-) - * @Id: LYStyle.c 1.23 Tue, 30 Mar 1999 10:10:37 -0700 dickey @ + * @Id: LYStyle.c 1.24 Tue, 13 Apr 1999 03:39:16 -0600 dickey @ */ #include <HTUtils.h> #include <HTML.h> @@ -22,6 +22,7 @@ #include <LYexit.h> #include <LYLeaks.h> +#include <LYStrings.h> #ifdef USE_COLOR_STYLE @@ -30,6 +31,20 @@ PUBLIC int last_styles[128]; PUBLIC int last_colorattr_ptr=0; PUBLIC bucket hashStyles[CSHASHSIZE]; +PUBLIC bucket special_bucket = +{ + "<special>" /* in order something to be in trace. */ +}; +PUBLIC bucket nostyle_bucket = +{ + "<NOSTYLE>" /* in order something to be in trace. */ +}; + +PUBLIC int cached_tag_styles[HTML_ELEMENTS]; +PUBLIC int current_tag_style; +PUBLIC BOOL force_current_tag_style=FALSE; +PUBLIC char* forced_classname; +PUBLIC BOOL force_classname; /* definitions for the mono attributes we can use */ static int ncursesMono[7] = { @@ -309,7 +324,9 @@ PUBLIC void style_initialiseHashTable NOARGS } if (firsttime) { firsttime = 0; +#ifdef LY_FIND_LEAKS atexit(free_colorstylestuff); +#endif } s_high = hash_code("high"); s_alink = hash_code("alink"); @@ -457,4 +474,44 @@ PUBLIC void TrimColorClass ARGS3( (styleclassname ? styleclassname : "<null>"), tmp); } +/* This function is desgined as faster analog to TrimColorClass. + It assumes that tag_name is presentin stylename! -HV +*/ +PUBLIC void FastTrimColorClass ARGS5 ( + CONST char*, tag_name, + int, name_len, + char*, stylename, + char**, pstylename_end,/*will be modified*/ + int*, phcode) /*will be modified*/ +{ + char* tag_start = *pstylename_end; + + while (tag_start >= stylename) + { + for (; tag_start >= stylename && *tag_start!=';' ; --tag_start) + ; + if ( !strncasecmp(tag_start+1, tag_name, name_len) ) break; + --tag_start; + } + *tag_start = '\0'; + *pstylename_end = tag_start; + *phcode = hash_code(tag_start+1); +} + + /* This is called each time lss styles are read. It will fill + each elt of 'cached_tag_styles' -HV + */ +PUBLIC void cache_tag_styles NOARGS +{ + char buf[200]; + int i; + + for (i = 0; i < HTML_ELEMENTS; ++i) + { + strcpy(buf, HTML_dtd.tags[i].name); + LYLowerCase(buf); + cached_tag_styles[i] =hash_code(buf); + } +} + #endif /* USE_COLOR_STYLE */ diff --git a/src/LYStyle.h b/src/LYStyle.h index 414c3d7b..6df504cf 100644 --- a/src/LYStyle.h +++ b/src/LYStyle.h @@ -4,6 +4,7 @@ #ifdef USE_COLOR_STYLE #include <AttrList.h> +#include <HTMLDTD.h> /* list of elements */ extern CONST SGML_dtd HTML_dtd; @@ -33,6 +34,39 @@ extern void TrimColorClass PARAMS(( char * styleclassname, int * phcode)); + + /* this is an array of styles for tags that don't specify 'class' - the + values from that array will be suggested by SGML.c by setting the + following variable. Value of -1 means that style value should be calculated + honestly. -HV */ +extern int cached_tag_styles[HTML_ELEMENTS]; + + /* the style for current tag is suggested in current_tag_style. If + force_current_tag_style =TRUE, then no attempts to calculate the color style + for current tag should be made - the value of 'current_tag_style' must + be used. + */ +extern int current_tag_style; +extern BOOL force_current_tag_style; + +extern BOOL force_classname; +extern char* forced_classname; /* if force_current_tag_style =TRUE, then here + will be the classname (this is done to avoid copying the class name to the + buffer class_name. */ + + /* This is called each time lss styles are read. It will fill + each elt of 'cached_tag_styles' -HV */ +extern void cache_tag_styles NOPARAMS; + /* this is global var - it can be used for reading the end of string found + during last invokation of TrimColorClass. + */ +extern void FastTrimColorClass PARAMS (( + CONST char* tag_name, + int name_len, + char* stylename, + char** pstylename_end, + int* hcode)); + #endif /* USE_COLOR_STYLE */ #endif /* LYSTYLE_H */ diff --git a/src/LYTraversal.c b/src/LYTraversal.c index e83770b0..ed7a1b58 100644 --- a/src/LYTraversal.c +++ b/src/LYTraversal.c @@ -1,7 +1,6 @@ #include <HTUtils.h> #include <LYGlobalDefs.h> #include <LYUtils.h> -#include <LYSignal.h> #include <LYClean.h> #include <LYCurses.h> #include <LYTraversal.h> diff --git a/src/LYUtils.c b/src/LYUtils.c index 319a4192..301cb1bc 100644 --- a/src/LYUtils.c +++ b/src/LYUtils.c @@ -2318,6 +2318,7 @@ PUBLIC int HTCheckForInterrupt NOARGS HText_pageDisplay(Newline_partial, ""); } #endif /* DISP_PARTIAL */ + break; } /* end switch */ /** Other or no keystrokes **/ return((int)FALSE); @@ -2438,7 +2439,9 @@ PUBLIC void LYAddLocalhostAlias ARGS1( if (!localhost_aliases) { localhost_aliases = HTList_new(); +#ifdef LY_FIND_LEAKS atexit(LYLocalhostAliases_free); +#endif } if ((LocalAlias = (char *)calloc(1, (strlen(alias) + 1))) == NULL) @@ -3064,7 +3067,9 @@ PUBLIC void HTAddSugFilename ARGS1( if (!sug_filenames) { sug_filenames = HTList_new(); +#ifdef LY_FIND_LEAKS atexit(HTSugFilenames_free); +#endif HTList_addObject(sug_filenames, new); return; } @@ -4891,7 +4896,9 @@ PUBLIC CONST char * Home_Dir NOARGS StrAllocCopy(HomeDir, cp); } homedir = (CONST char *)HomeDir; +#ifdef LY_FIND_LEAKS atexit(LYHomeDir_free); +#endif } return homedir; } diff --git a/src/LYexit.c b/src/LYexit.c index 67549ae4..92cfe6b0 100644 --- a/src/LYexit.c +++ b/src/LYexit.c @@ -19,7 +19,6 @@ */ PUBLIC BOOL LYOutOfMemory = FALSE; -#ifdef LY_FIND_LEAKS /* * Stack of functions to call upon exit. @@ -78,9 +77,6 @@ PRIVATE void LYCompleteExit NOPARAMS callstack[topOfStack](); } } -#else -#define LYCompleteExit() /*nothing*/ -#endif /* LY_FIND_LEAKS */ /* * Purpose: Terminates program. diff --git a/src/UCAuto.c b/src/UCAuto.c index 35775a2a..12e9f1de 100644 --- a/src/UCAuto.c +++ b/src/UCAuto.c @@ -22,6 +22,7 @@ #include <UCAuto.h> #include <LYGlobalDefs.h> #include <LYClean.h> +#include <LYLeaks.h> #ifdef EXP_CHARTRANS_AUTOSWITCH diff --git a/src/UCdomap.c b/src/UCdomap.c index e777dcca..f3d6c87c 100644 --- a/src/UCdomap.c +++ b/src/UCdomap.c @@ -2024,7 +2024,9 @@ PUBLIC void UCInit NOARGS { UCreset_allocated_LYCharSets(); +#ifdef LY_FIND_LEAKS atexit(UCcleanup_mem); +#endif UCconsole_map_init(); /* diff --git a/src/descrip.mms b/src/descrip.mms index 667f67bb..f4ce9e1a 100644 --- a/src/descrip.mms +++ b/src/descrip.mms @@ -160,9 +160,16 @@ CFLAGS = $(TCPFLAGS) $(CFLAGS)/Include=([], [-], [.chrtrans], [-.WWW.Library.Imp lynx : lynx.exe @ Continue -lynx.exe : $(OBJS) $(WWWLIB) +HDRS = [.chrtrans]iso01_uni.h + +lynx.exe : $(HDRS) $(OBJS) $(WWWLIB) $(LINK) /Executable = Lynx.exe $(OBJS), $(WWWLIB)/lib, $(TOPT)/opt, $(COPT)/opt +$(HDRS) : + set default [.chrtrans] + @build-chrtrans + set default [-] + clean : - Set Protection = (Owner:RWED) *.*;-1 - Purge /NoLog /NoConfirm diff --git a/src/makefile.dos b/src/makefile.dos index a7b30b41..1e05433f 100644 --- a/src/makefile.dos +++ b/src/makefile.dos @@ -7,7 +7,7 @@ LYForms.o LYPrint.o LYrcFile.o LYDownload.o LYNews.o LYKeymap.o \ HTML.o HTFWriter.o HTInit.o DefaultStyle.o LYLocal.o LYUpload.o \ LYLeaks.o LYexit.o LYJump.o LYList.o LYCgi.o LYTraversal.o \ LYEditmap.o LYCharSets.o LYCharUtils.o LYMap.o LYCookie.o LYExtern.o \ -LYStyle.o LYHash.o +LYStyle.o LYHash.o LYPrettySrc.o CFLAGS= $(MCFLAGS) -I. -I.. $(SLANGINC) diff --git a/src/makefile.dsl b/src/makefile.dsl index 64c14f1d..acdbfcd4 100644 --- a/src/makefile.dsl +++ b/src/makefile.dsl @@ -7,7 +7,7 @@ LYForms.o LYPrint.o LYrcFile.o LYDownload.o LYNews.o LYKeymap.o \ HTML.o HTFWriter.o HTInit.o DefaultStyle.o LYLocal.o LYUpload.o \ LYLeaks.o LYexit.o LYJump.o LYList.o LYCgi.o LYTraversal.o \ LYEditmap.o LYCharSets.o LYCharUtils.o LYMap.o LYCookie.o LYExtern.o \ -LYStyle.o LYHash.o +LYStyle.o LYHash.o LYPrettySrc.o CFLAGS= $(MCFLAGS) $(INTLFLAGS) -I. -I.. $(SLANGINC) diff --git a/src/makefile.in b/src/makefile.in index 978d6d0d..4712a331 100644 --- a/src/makefile.in +++ b/src/makefile.in @@ -65,7 +65,7 @@ LYForms.o LYPrint.o LYrcFile.o LYDownload.o LYNews.o LYKeymap.o \ HTML.o HTFWriter.o HTInit.o DefaultStyle.o LYLocal.o LYUpload.o \ LYLeaks.o LYexit.o LYJump.o LYList.o LYCgi.o LYTraversal.o \ LYEditmap.o LYCharSets.o LYCharUtils.o LYMap.o LYCookie.o LYExtern.o \ -LYStyle.o LYHash.o $(CHARTRANS_OBJS) @LIBOBJS@ +LYStyle.o LYHash.o LYPrettySrc.o $(CHARTRANS_OBJS) @LIBOBJS@ C_SRC = $(OBJS:.o=.c) diff --git a/src/makefile.wsl b/src/makefile.wsl index 1b238170..893746cc 100644 --- a/src/makefile.wsl +++ b/src/makefile.wsl @@ -7,7 +7,7 @@ LYForms.o LYPrint.o LYrcFile.o LYDownload.o LYNews.o LYKeymap.o \ HTML.o HTFWriter.o HTInit.o DefaultStyle.o LYLocal.o LYUpload.o \ LYLeaks.o LYexit.o LYJump.o LYList.o LYCgi.o LYTraversal.o \ LYEditmap.o LYCharSets.o LYCharUtils.o LYMap.o LYCookie.o LYExtern.o \ -LYStyle.o LYHash.o +LYStyle.o LYHash.o LYPrettySrc.o CFLAGS= $(MCFLAGS) -I. -I.. $(SLANGINC) diff --git a/userdefs.h b/userdefs.h index 815e0e54..c49edb29 100644 --- a/userdefs.h +++ b/userdefs.h @@ -352,6 +352,8 @@ * %d date of last modification * %a anchor pointing to file or directory * %A as above but don't show symbolic links + * %t type of file (description derived from MIME type) + * %T MIME type as known by Lynx (from mime.types or default) * %k size of file in Kilobytes * %K as above but omit size for directories * %s size of file in bytes @@ -366,7 +368,11 @@ * * For the Unix "ls -l" format: " %p %4l %-8.8o %-8.8g %7s %-12.12d %a" */ +#ifdef DOSPATH +#define LIST_FORMAT " %4K %-12.12d %a" +#else #define LIST_FORMAT " %p %4l %-8.8o %-8.8g %7s %-12.12d %a" +#endif /* * If NO_FORCED_CORE_DUMP is set to TRUE, Lynx will not force @@ -410,7 +416,7 @@ * note: STARTFILE must be a URL. See the Lynx online help for more * information on URLs */ -#define STARTFILE "http://lynx.browser.org/" +#define STARTFILE "." /***************************** * HELPFILE must be defined as a URL and must have a @@ -1205,12 +1211,12 @@ * the version definition with the Project Version on checkout. Just * ignore it. - kw */ /* $Format: "#define LYNX_VERSION \"$ProjectVersion$\""$ */ -#define LYNX_VERSION "2.8.2dev.21" +#define LYNX_VERSION "2.8.2dev.22" #define LYNX_WWW_HOME "http://lynx.browser.org/" #define LYNX_WWW_DIST "http://www.slcc.edu/lynx/current/" #define LYNX_RELEASE FALSE /* $Format: "#define LYNX_DATE \"$ProjectDate$\""$ */ -#define LYNX_DATE "Tue, 30 Mar 1999 10:10:37 -0700" +#define LYNX_DATE "Tue, 13 Apr 1999 03:39:16 -0600" #define LYNX_DATE_OFF 5 /* truncate the automatically-generated date */ #define LYNX_DATE_LEN 11 /* truncate the automatically-generated date */ #define LYNX_RELEASE_DATE "1998" |