diff options
57 files changed, 2862 insertions, 1206 deletions
diff --git a/CHANGES.configure b/CHANGES.configure index 8d7c190c..db2e7ab2 100644 --- a/CHANGES.configure +++ b/CHANGES.configure @@ -1,3 +1,12 @@ +97-11-07 +-------- +* add logic to make install-directories as needed. - TD +* remove --disable-char-trans option (ifdef's still remain). - TD +* correct type used in first compile-test for union wait. - TD +* correct order of deletions in "make distclean" rule. - TD +* new versions of macros used to check for ncurses version. - TD +* don't suppress -I/usr/local/include when checking -I/usr/local/include/*, + to accommodate older versions of gcc. - TD 97-10-21 -------- * revised tests for wait/waitpid/union-wait. - TD diff --git a/CHANGES.new b/CHANGES.new index 317761d0..9d235049 100644 --- a/CHANGES.new +++ b/CHANGES.new @@ -1,15 +1,216 @@ Changes in the development code based on Lynx v2.7. =================================================== -[ This file might finally become the CHANGES file for a new Lynx release. -More detailed change information may be in separate files, which could -later disappear. Currently included are changes from Foteos Macrides' -bugfixes, changes in chartrans code (see also CHANGES.chartrans), changes -for compilation on Win32 and DOS platforms (see also README.win-386), -changes for auto-configure and simple curses color (see also -README.configure), and miscellaneous other changes. Note that the 2.7 -> -2.7.1 changes (which are listed at the beginning of the current CHANGES -file) are duplicated here. - KW] +[ This file will become the CHANGES file for a new Lynx release. +(More detailed change information may be in separate files, which could +later disappear. For some early changes for compilation on Win32 and DOS +platforms see also README.win-386, for some changes for auto-configure and +simple curses color see also README.configure). Note that the 2.7 -> 2.7.1 +changes are included here. - KW] +97-11-07 +* add logic to make install-directories as needed. - TD +* remove --disable-char-trans option (ifdef's still remain). - TD +* correct type used in first compile-test for union wait. - TD +* correct order of deletions in "make distclean" rule. - TD +* new versions of macros used to check for ncurses version. - TD +* don't suppress -I/usr/local/include when checking -I/usr/local/include/*, + to accommodate older versions of gcc. - TD +1997-11-06 +* Use erase() instead of clear() in some places, to avoid unnecessary full + screen repainting even for UNIX (and similar) curses. Renamed LY_SLclear + to LY_SLerase, but it is used for erase() and clear() now, so there should + be no change in behavior for slang introduced by this. - KW +* Added new format for lines in chartrans .tbl files: U+NNNN "a string" where + the string can have C backslash-escaped characters. This allows to write + replacement strings with 8-bit characters that won't be garbled when the + .tbl files are transferred in some non-binary way. Note there is no ':' + between the Unicode value and the beginning quote character. - KW +* Changes to HTMLDTD.c (for SortaSGML parsing) and HTML.c (second line of + defense) for dealing with invalid SELECT tags. Also tolerate SELECT + outside of forms. - KW +* Change in HTLocalName for DOSPATH so that it doesn't depend on whether + HTDOS_name returns a pointer to static memory or not. - KW +* Started new file docs/README.defines. Renamed CHANGES to CHANGES2-7, + removed duplicate 2-7-1 entries. Minor changes to INSTALLATION, other + files. CHANGES.chartrans is gone. - KW +* Tweaked color style stuff again. Statusline may behave better. - KW +* Don't use memmove for HEAD in HTNews.c. - KW +* For UNIX, use normal umask permissions, instead of the extra-cautious temp + file permissions, for files saved to disk by the default actions for PRINT + and DOWNLOAD. - KW +* Changes (untested) in the code dealing with reading of compressed files in + HTFile.c, in parallel to the code for other systems. - KW +1997-11-05 +* Change in LYForms.c to avoid full screen repaint after popup is retracted + for slang. - KW & FM +1997-11-03 +* Internal links code revised. Some details follow, but first a summary + of the basic premises. Links in a document given as href="#fragment" or + href="" (empty, but href attribute is present) mean something different + from href="url#fragment" or href="url" (where url is a non-empty absolute + or relative URL not including a fragment), they are internal links pointing + to an element or a location within the same copy of the document (or to the + document itself, for href=""). In contrast, a URL-Reference with a non- + empty URL refers to a (generally...) external resource. If the "url" + happens to coincide with (or, if it is relative, resolve to) the URL from + which the current document was retrieved, the current document is a + representation of the resource, but not the same thing. In most such cases + we can treat href="#fragment" and href="url#fragment" the same way, i.e. + activating such a link is interpreted as a request to reposition within + the current document; we are using the current document as a cache copy + of the resource (like we would other documents in the memory cache). But + if we have marked our copy as no-cache, it seems more consistent to treat + activation of a href="url#fragment" link as a request for retrieving a + new copy and _then_ locating #fragment in it, as we do for "any-other-url + #fragment" if we have cached a document which represents "any-other-url" + and which is marked no-cache. Following a href="" link should just result + in repositioning to the start of the document, not in a new retrieval for + no-cache documents. + If the current document is the result of a POST submission, there is in + general no way to refer to its underlying resource with a URL, since there + is no URL notation for "url+post_data". Internal links can be used within + the context of this document, but there is no way to hyperlink to it or + parts of it from "outside". A link to a href="url" or href="url#fragment" + target should always imply a GET retrieval, whether it occurs within a + document from a POST submission or not, for consistency. + This understanding also applies to other than <A href=..> uses of URL- + References in documents, for example the link implied between a USEMAP + attribute and a MAP element; but not to all uses, for example a FORM's + ACTION requires an external resource and not an internal reference, so + ACTION="" is resolved to an absolute URL (using a base URL if one is + given). + The semantics for URL-less URL-References are given in Internet Draft + <http://www.ics.uci.edu/~fielding/url/draft-fielding-url-syntax-09.txt>, + including that "Traversal of such a reference should not result in an + additional retrieval action." No comparable prescriptions are made for + references which have a URL, in particular it is not stated that they + should be treated as equivalent when the URL coincides with or resolves + to the current document's retrieval URL. + The changes to the Lynx code attempt to implement what is outlined above, + by keeping track of how a link destination was originally specified. href= + "#fragment" and href="" links are still "resolved" into a "url#fragment" + and "url" form, for use internally, and if an explicit NOCACHE action is + requested, and for generating lists of links etc., and in general for use + outside of the context of the current document. + To the best of my knowledge they do not lead to unwanted (or misdirected) + resubmission of POST content without prompting the user for confirmation + (although the prompt texts probably need improvement). - KW +* The notion of the context of the "current document" is extended, so that + auxiliary LYNXIMGMAP documents generated by Lynx are within the scope of + the underlying document, i.e. the document containing the MAP and AREA + elements. Although they are treated as separate documents for display + and internal handling, following links between the underlying document + and its LYNXIMGMAP documents will result in display from cached data + (if available) even for no-cache documents, if a fragment-only (or empty) + URL-Reference was used in the HTML. This includes the link generated for + pointing from the IMG to the LYNXIMGMAP if the USEMAP attribute value was + was fragment-only; the LYNXIMGMAP is normally regenerated from the list + of MAP and AREA elements kept internally when a link to it is activated. + (Note that a LYNXIMGMAP screen is still not reloaded from external sources + even when RELOAD or NOCACHE keys are used, if data for the MAP is found + in the internal list; but that reloading the underlying document will + refresh the internal lists.) - KW +* List Page screens are also in the context of the underlying document, so + that internal links in the underlying document can be listed and activated + from the List Page. Wen following an internal link from a List Page, it + is not pushed on the history stack (similar to the History List Page), to + reduce the chance of confusion when walking back through history. - KW +* LYNXIMGMAP and List Page auxiliary documents can now be associated with + POST data. This does not mean that the data is posted to a "LYNXIMGMAP:" + or "file:" URL, which is impossible; but that the underlying document is + associated with the POST data. This way these aux documents can still + have links regarded as "internal" pointing to the document of which they + are logically a part, keeping track of what POST data are applicable if + several form submissions have occurred. Normally the underlying document + should be in the document cache when such a link is activated, so that + resubmission of the POST can be overridden. If it is not found, + resubmission may happen after user confirmation. Although the POST data + content is not shown on such aux pages, it can be inspected with the INFO + ('=') command. Note that the association of LYNXIMGMAPs and List Pages + with POST data automatically excludes them from various operations which + may otherwise be possible, such as bookmarking or inclusion in the + 'V'isited Links Page. Note also that such aux pages are treated internally + as different documents from their POST-free counterparts with the same + address, which might be generated for example after typing the address + at a 'g'oto prompt while viewing a different text. It may be possible to + generate confusing situations, but regenerating the displayed data (by + invoking 'L'IST again, or by following a LYNXIMGMAP: link) will always + show the currently applicable information. + For image maps, the change implements link-following capabilities which + come naturally to graphical UAs, which can handle IMG USEMAP and the + corresponding MAP elements from the same data stream as objects within + the same document instance. - KW +* To implement the above, MAP and AREA information from a POST response is + not kept in the global list shared by all other documents, but in a separate + list specific to the underlying (containing) document and the POST data. + The specific lists are managed with the underlying document's anchor + structure so that they can automatically expire after the anchor is removed + from memory and will not stay around and accumulate until session end. - KW +* POST data is kept in mainloop when following an internal link, but is now + always dropped for links that were given with a URL. This removes the + limitation by which a link in a POST response to the URL of the POST + submission script would be inappropriately converted to a resubmission of + the POST data. (example: search form from <http://www.marshall.edu/htbin/ + calendar>) - KW +* Changes to the PREV_DOC handling in mainloop. When encountering documents + that may need to be reloaded while walking back in history, because they + have POST data associated and are not marked "safe" and are either not found + in the memory cache or -resubmit_posts has been set, the user is prompted + for confirmation as before; if the reply is 'n' the document will be skipped + but if the user cancels with ^G the walkback operation is cancelled and the + currently viewed document remains loaded. Some of the aux documents which + can new be associated with POST data may be automatically skipped if their + document structures are not any more in memory. - KW +* When following a link marked internal from a List Page and confirmation is + required, ^G may also have the different effect of cancelling the operation + while responding 'n' may attempt to follow the link as a GET request (i.e. + with POST data dropped). - KW +* In some situations, automatic popping from the history stack in mainloop + after getfile fails to load a new document could lead to resubmission of + a previous POST request without prompting. This is now avoided by jumping + to the code handling PREV_DOC. - KW +* Use new LYinternal_flag variable for propagating info to HTAccess, rather + than overloading LYoverride_no_cache. - KW +* Tweaks for bad form tag soup with crashes on unclosed SELECT. Changes in + HTML.c and GridText.c to prevent memory leaks resulting from insanely + placed or unclosed form field tags, hopefully not introducing other + problems... - KW +1997-11-02 +* Changes in HTParse's scan to leave additional '#' characters alone after + the first has been found when scanning (from left) for fragments, and + to apply the "don't treat '#' as start of a fragment for some kinds of + URLs" hack only when the '#' will become part of what has been scanned + as a path. NNTP articles with more than '#' in the message-id are now + accessible with the "news:" or "nntp:" schemes. We should actually always + escape when generating URLs and unescape when parsing them instead. - KW +* Changed HTUnEscape to leave '%' alone if not followed by two valid hex + digits. - KW +* Allow the HEAD key and -head and -mime_header flags for "lynxcgi:" URLs + and for "news:" and "nntp:" URLs that specify a single news article. - KW +* Change to writing of POST data in LYCgi.c, to close file descriptor after + done writing and before reading as suggested by mhw@bcs.org.uk (Mark + H. Wilkinson), and to check status from the write() call and retry if + neeeded. Note that the code is not appropriate for handling large + amounts of POST data, since it still first does all the writing and + then all the reading. - KW +1997-10-30 +* Get numbering of links on List Page right, by faking hidden links for + form fields which get counted but are not selectable. - KW +* Allow LYNXHIST: links in List Page since the History Page may get + 'L'isted... - KW +1997-10-29 +* Tweak of SortaSGML DTD for insane HTML with FORM start before HEAD. - KW +* Prevent memory leaks from HTChunks for option and textarea with very + bad markup, added TRACE and BAD_HTML_USE_TRACE warnings for those. - KW +* Don't call tigetnum("ncv") for _WINDOWS - BD +1997-10-28 +* Disable setting of the `reloading' flag in HTLoadDocument which would + generate no-cache headers for request where this is not appropriate. - KW +* Memory leak for first OPTION in SELECT removed. - KW +* Changed HTDOS_name to not return pointer to static area. - Binh Do + <bdo@mailman.epnet.com> +* Changes to INSTALLATION file. - NHE +* Fix in HTMIME.c to recognize Content-location. - KW 1997-10-27 * Updated links to www.w3.org in help files. - KW * Some changes for DOS compilation. - DK @@ -21,7 +222,7 @@ file) are duplicated here. - KW] 1997-10-26 * If compiled with -DDONT_TRACK_INTERNAL_LINKS, behavior with respect to internal links as in FM's code. - KW -* Some chartrans tweaks. - KW +* Some chartrans tweaks. - KW 1997-10-25 * Changes to INSTALLATION file. - NHE * Make temp file names conform to 8+3 naming convention for DOS, and @@ -2278,13 +2479,14 @@ file) are duplicated here. - KW] safe (hopefully as safe as the vanilla v2.7.1), but there are no guarantees. - FM 1997-04-04 -======================================================================= ---- Release of Lynx2-7 + BUGFIXES as Lynx v2.7.1 (April 4, 1997) --- ------------------------------------------------------------------------ - Changes listed below were made to the development code in parallel - to the bugfixes which resulted in 2.7.1, and include those bugfixes - (or equivalent changes). -======================================================================= +============================================================================ +--- Release of Lynx2-7 + BUGFIXES as Lynx v2.7.1 (April 4, 1997) by FM --- +============================================================================ +* Note that 2.7.1 was not a release from this code set, but all 2.7 -> 2.7.1 + bugfixes and other changes are also included in this code set, in either + identical or equivalent form. Therefore the entries below this point + comprise the 2.7 -> 2.7.1 changes, and additionally other changes made to + the development code set during that time. - KW 1997-04-02 * add Andrew Kuchling's patch to support mouse-clicks with ncurses. - TD * refine tests that address porting problems to SCO (detecting struct winsize, @@ -2468,9 +2670,14 @@ file) are duplicated here. - KW] * Merged with patches and makefiles from Wayne Buttles (buttles@wsb.champlain.edu) to enable compilation in two new environments: Win32 (95/NT) with Borland C++ 4.52 compiler, and 386 DOS with DJGPP - compiler. See README.win-386 for more info. Separate utility programs - needed for compiling and running Lynx on those platforms are available - from Wayne at <http://www.fdisk.com/doslynx/wlynx/>. - WB, KW + compiler. To add ports for Win32 (95/NT) and 386 DOS computers with a + packet driver, four new defines were created: _WINDOWS (Defined for Win32 + specific code - Mostly TCP related), DJGPP (Defined for 386 specific code - + Mostly TCP related), DOSPATH (Defined for any DOS'ish computer), and + NOSIGHUP (Defined for computers not supporting sighup signal calls). + Separate utility programs needed for compiling and running Lynx on those + platforms are available from Wayne at + <http://www.fdisk.com/doslynx/wlynx/>. - WB, KW * Fixed Telnet for Win32 - WB * (chartrans) Small correction in SGML.c (set_chartrans_handling) - KW 1997-02-26 @@ -2505,7 +2712,10 @@ file) are duplicated here. - KW] -DSLANG_MBCS_HACK (for raw unicode console). New command line options when compiled with -DEXP_CHARTRANS: -assume_charset, -assume_local_charset, -assume_unrec_charset. - See README.chartrans and README files in src/chrtrans for more info. - KW + See README.chartrans and README files in src/chrtrans for more info. + INFO screen shows of effective charset even if not given explicitly. + Translation routines in LYCharUtils.c not chartrans-ified at this point. + - KW * No showing of ™ or ™ as (R) any more, use (TM) instead. - KW * Prefer HTTP-EQUIV over NAME in META tags. - KW 1997-02-22 diff --git a/INSTALLATION b/INSTALLATION index 48ae1628..5ad7e495 100644 --- a/INSTALLATION +++ b/INSTALLATION @@ -36,7 +36,10 @@ Step 2. (define run-time variables -- See the lynx.cfg file for details.) the LYNX_CFG_FILE define in userdefs.h, specified with an environment variable, LYNX_CFG, or specified with the "-cfg" command line option. -Step 3. (Skip this step if you only use English: iso-8859-1 or US-ASCII.) +Step 3. (You can skip this step only if you only use English and are not + interested in any special characters, or if the display and local files + will all use the ISO-8859-1 "ISO Latin 1" Western European character + set.) People who will be running Lynx in an environment with different and incompatible character sets should configure CHARACTER_SET (the Display character set) and ASSUME_LOCAL_CHARSET to work correctly for them @@ -50,7 +53,7 @@ Step 4. (optional -- news for UNIX and VMS) environment variables which affect Lynx.) For news posting ability to be enabled in Lynx, in userdefs.h (and optionally in lynx.cfg) the NEWS_POSTING symbol must be defined to TRUE. Also define LYNX_SIG_FILE - in usersdefs.h or lynx.cfg so that it points to users' signature files + in userdefs.h or lynx.cfg so that it points to users' signature files for appending to posted messages. Step 5. (optional -- UNIX only) @@ -202,8 +205,8 @@ II. Compile instructions -- UNIX Use this option to disable "Up-to" parent-links in directory listings. --enable-color-style (define USE_COLOR_STYLE) - Use this option to enable optional/experimental color style. - (Also defines USEHASH, UNPAINT_CACHE, LINKEDSTYLES) + Use this option to enable optional and *experimental* color style. + (Also defines USE_HASH, LINKEDSTYLES) --enable-debug Use this option to compile-in support for debugging. @@ -221,6 +224,13 @@ II. Compile instructions -- UNIX where $libdir is set in the configure script, e.g., to /usr/local/lib. + --with-lss-file=XXX (defines LYNX_LSS_FILE) + Only for optional and *experimental* color style code. + Use this option to override the location of the site + style-sheet file's pathname. It defaults to $libdir/lynx.lss, + where $libdir is set in the configure script, e.g., to + /usr/local/lib. + --with-screen=XXX Use this option to select the screen type. The option value, XXX must be one of curses (the default), ncurses or slang. @@ -269,6 +279,8 @@ II. Compile instructions -- UNIX top-level Makefile, and instructions on how to compile are given in "docs/INSTALLATION.old". Compilation symbols for which there are no configure options are listed and explained in "docs/Makefile.old". + However, rather than maintain two types of build-mechanisms, we prefer + to fix bugs in the autoconf script. III. Compile instructions -- VMS @@ -375,14 +387,14 @@ IV. Compile instructions -- Win32 (Windows95/NT) NOSIGHUP Defined for computers not supporting sighup signal calls. The original Win32 port was built with Borland C++ 4.52. Later versions - of Borland C++ reportedly can be used, but this is not documented, and no - other compilers have been tested. Before compiling the Lynx sources, you - need a curses library, and you are recommended to have the zlib library. - Get pdcurses2.3 from "http://www.lightlink.com/hessling/". I have - modified it so that mouse support is no longer broken for Lynx (available - from "http://www.fdisk.com/doslynx/"). You will want to get zlib from - "http://www.cdrom.com/pub/infozip/zlib/". Compile these libraries, and - put them in a convenient place (pdcurses inside the Lynx directory). + of Borland C++ reportedly can be used, but no other compilers have been + tested. Before compiling the Lynx sources, you need a curses library, and + it is recommended that you have the zlib library. Get pdcurses2.3 from + "http://www.lightlink.com/hessling/". I have modified it so that mouse + support is no longer broken for Lynx (see "http://www.fdisk.com/doslynx/"). + You will want to get zlib from "http://www.cdrom.com/pub/infozip/zlib/". + Compile these libraries, and put them in a convenient place (pdcurses + inside the Lynx directory). Unpack the latest Lynx source distribution, and make an obj directory under the source root to contain the compile output. Copy in your @@ -415,16 +427,15 @@ V. Compile instructions -- 386 DOS Or do it interactively with the command: "stubedit cc1.exe". (see "http://www.flora.org/lynx-dev/html/month0897/msg00145.html"). - Unpack the source code using a DOS "unzip" program like UNZIP386, DOS - port of GNU "gzip" or "gunzip", or the command line zip available from - "http://www.itribe.net/virtunix/". If you must use PKUNZIP to unpack the - .zip archive, be sure to use the -d command line switch to restore the - directory structure contained in the archive ("pkunzip -d lynx-cur.zip"). - This is not necessary if you use UNZIP386, as it will automatically create - the necessary directories. If you are doing development with DJGPP under - a Win95 or NT DOS shell, DO NOT USE Winzip, because that will create long - long filenames that will not be recognized by DJGPP tools like 'make' and - 'gcc'. In order to compile, all filenames MUST be in DOS 8.3 format. + Unpack the source code using a DOS program like UNZIP386. If you are + using PKUNZIP to unpack the .zip archive, you must use the -d command + line switch to restore the directory structure contained in the archive, + i.e., do "pkunzip -d lynx-cur.zip". No switch is required if you use + unzip386 or unzip. If you are trying to compile the 386DOS port under a + Win95/NT DOS shell, be sure to unpack the source with a DOS program so + that all directories will be adjusted to the DOS 8.3 file format necessary + for compiling with DJGPP. Do NOT use Winzip, because that will create + long filenames that will not be recognized by DJGPP tools. If you wish to compile with "USE_ZLIB" (recommended), you must have the zlib library. Get the source from "http://www.cdrom.com/pub/infozip/zlib/" @@ -662,4 +673,4 @@ VIII. Acknowledgment Thanks to the many volunteers who offered suggestions for making this installation manual as accurate and complete as possible. --- 1997/10/27 - H. Nelson <lynx-admin@irm.nara.kindai.ac.jp> +-- 1997/10/28 - H. Nelson <lynx-admin@irm.nara.kindai.ac.jp> diff --git a/LYMessages_en.h b/LYMessages_en.h index 6286c464..4e2dfab3 100644 --- a/LYMessages_en.h +++ b/LYMessages_en.h @@ -518,10 +518,15 @@ "Redirection of POST content. P)roceed, see U)RL, or C)ancel" #define CONFIRM_POST_RESUBMISSION \ "Document from Form with POST content. Resubmit?" +#define CONFIRM_POST_RESUBMISSION_TO \ + "Resubmit POST content to %s ?" +#define CONFIRM_POST_LIST_RELOAD \ + "List from document with POST data. Reload %s ?" #define CONFIRM_POST_DOC_HEAD \ "Document from POST action, HEAD may not be understood. Proceed?" #define CONFIRM_POST_LINK_HEAD \ "Form submit action is POST, HEAD may not be understood. Proceed?" +#define DISCARDING_POST_DATA "Discarding POST data..." #define WILL_NOT_RELOAD_DOC "Document will not be reloaded!" #define LOCATION_HEADER "Location: " #define STRING_NOT_FOUND "'%s' not found!" diff --git a/README.configure b/README.configure index 6c5e72f7..9547e106 100644 --- a/README.configure +++ b/README.configure @@ -64,10 +64,6 @@ Here's an alphabetical listing of the Lynx-specific options. The actual order shown by the -help option is different due to the requirements of the script: - --disable-char-trans (defines EXP_CHARTRANS) - Use this option to enable optional character-translations with - new charsets, UTF8 mode, etc. - --disable-dired (defines DIRED_SUPPORT) Use this option to enable or disable the optional directory-editor. diff --git a/WWW/Library/Implementation/HTAccess.c b/WWW/Library/Implementation/HTAccess.c index 6dedbeb9..879b34c9 100644 --- a/WWW/Library/Implementation/HTAccess.c +++ b/WWW/Library/Implementation/HTAccess.c @@ -632,6 +632,8 @@ PUBLIC HTStream *HTSaveStream ARGS1( return (*p->saveStream)(anchor); } +extern char LYinternal_flag; /* from LYMainLoop.c */ + /* Load a document - with logging etc HTLoadDocument() ** ---------------------------------- ** @@ -695,6 +697,26 @@ PRIVATE BOOL HTLoadDocument ARGS4( } /* + * If this is marked as an internal link but we don't have the + * document loaded any more, and we haven't explicitly flagged + * that we want to reload with LYforce_no_cache, then something + * has disappeared from the cache when we expected it to be still + * there. The user probably doesn't expect a new network access. + * So if we have POST data and safe is not set in the anchor, + * ask for confirmation, and fail if not granted. The exception + * are LYNXIMGMAP documents, for which we defer to LYLoadIMGmap + * for prompting if necessary. - kw + */ + if (LYinternal_flag && !LYforce_no_cache && + anchor->post_data && !anchor->safe && + (text = (HText *)HTAnchor_document(anchor)) == NULL && + strncmp(full_address, "LYNXIMGMAP:", 11) && + HTConfirm("Document with POST content not found in cache. Resubmit?") + != TRUE) { + return NO; + } + + /* ** If we don't have POST content, check whether this is a previous ** redirecting URL, and keep re-checking until we get to the final ** destination or redirection limit. If we do have POST content, @@ -783,13 +805,16 @@ PRIVATE BOOL HTLoadDocument ARGS4( * testing whether we are just repositioning. For an internal * link, the potential callers of this function from mainloop() * down will either avoid making the call (and do the repositioning - * differently) or set LYoverride_no_cache. + * differently) or set LYinternal_flag (or LYoverride_no_cache). * Note that (a) LYNXIMGMAP pseudo-documents and (b) The "List Page" * document are treated logically as being part of the document on * which they are based, for the purpose of whether to treat a link - * as internal, but the logic for this (by setting LYoverride_no_cache - * as necessary) is implemented elsewhere. For LYNXIMGMAP the same - * caveat as above applies. + * as internal, but the logic for this (by setting LYinternal_flag + * as necessary) is implemented elsewhere. There is a specific + * test for LYNXIMGMAP here so that the generated pseudo-document + * will not be re-used unless LYoverride_no_cache is set. The same + * caveat as above applies w.r.t. reloading of the underlying + * resource. * ** We also should be checking other aspects of cache ** regulation (e.g., based on an If-Modified-Since check, @@ -800,7 +825,9 @@ PRIVATE BOOL HTLoadDocument ARGS4( if (LYoverride_no_cache || !HText_hasNoCacheSet(text) || !HText_AreDifferent(anchor, full_address)) #else - if (LYoverride_no_cache || !HText_hasNoCacheSet(text)) + if (LYoverride_no_cache || + ((LYinternal_flag || !HText_hasNoCacheSet(text)) && + strncmp(full_address, "LYNXIMGMAP:", 11))) #endif /* TRACK_INTERNAL_LINKS */ { if (TRACE) @@ -814,7 +841,12 @@ PRIVATE BOOL HTLoadDocument ARGS4( redirection_attempts = 0; return YES; } else { +#if NOT_USED_CODE + /* disabled 1997-10-28 - kw + callers already do this when requested + */ reloading = TRUE; +#endif ForcingNoCache = YES; if (TRACE) fprintf(stderr, "HTAccess: Auto-reloading document.\n"); diff --git a/WWW/Library/Implementation/HTAnchor.c b/WWW/Library/Implementation/HTAnchor.c index d3c3f34e..c2cf273c 100644 --- a/WWW/Library/Implementation/HTAnchor.c +++ b/WWW/Library/Implementation/HTAnchor.c @@ -238,11 +238,21 @@ PUBLIC HTChildAnchor * HTAnchor_findChildAndLink ARGS4( HTAnchor * dest; parsed_doc.address = HTParse(href, relative_to, PARSE_ALL); - parsed_doc.post_data = NULL; - parsed_doc.post_content_type = NULL; - parsed_doc.bookmark = NULL; - parsed_doc.isHEAD = FALSE; - parsed_doc.safe = FALSE; +#ifndef DONT_TRACK_INTERNAL_LINKS + if (ltype && parent->post_data && ltype == LINK_INTERNAL) { + /* for internal links, find a destination with the same + post data if the source of the link has post data. - kw */ + parsed_doc.post_data = parent->post_data; + parsed_doc.post_content_type = parent->post_content_type; + } else +#endif + { + parsed_doc.post_data = NULL; + parsed_doc.post_content_type = NULL; + } + parsed_doc.bookmark = NULL; + parsed_doc.isHEAD = FALSE; + parsed_doc.safe = FALSE; dest = HTAnchor_findAddress(&parsed_doc); HTAnchor_link((HTAnchor *)child, dest, ltype); @@ -690,6 +700,8 @@ PUBLIC BOOL HTAnchor_delete ARGS1( #ifdef EXP_CHARTRANS FREE (me->UCStages); #endif + ImageMapList_free(me->imaps); + /* * Finally, kill the parent anchor passed in. diff --git a/WWW/Library/Implementation/HTAnchor.h b/WWW/Library/Implementation/HTAnchor.h index 458cac40..b86c372c 100644 --- a/WWW/Library/Implementation/HTAnchor.h +++ b/WWW/Library/Implementation/HTAnchor.h @@ -125,9 +125,8 @@ struct _HTParentAnchor { char * expires; /* Expires */ char * last_modified; /* Last-Modified */ char * server; /* Server */ -#ifdef EXP_CHARTRANS - UCAnchorInfo * UCStages; -#endif + UCAnchorInfo * UCStages; /* chartrans stages */ + HTList * imaps; /* client side image maps */ }; typedef struct { @@ -411,7 +410,6 @@ extern void HTAnchor_setPhysical PARAMS(( #endif /* HTANCHOR_H */ -#ifdef EXP_CHARTRANS extern LYUCcharset * HTAnchor_getUCInfoStage PARAMS((HTParentAnchor * me, int which_stage)); @@ -433,7 +431,8 @@ extern LYUCcharset * HTAnchor_copyUCInfoStage PARAMS((HTParentAnchor * me, int to_stage, int from_stage, int set_by)); -#endif + +extern void ImageMapList_free PARAMS((HTList * list)); /* */ diff --git a/WWW/Library/Implementation/HTDOS.c b/WWW/Library/Implementation/HTDOS.c index c5687808..1e67a1a0 100644 --- a/WWW/Library/Implementation/HTDOS.c +++ b/WWW/Library/Implementation/HTDOS.c @@ -51,7 +51,7 @@ char * HTDOS_wwwName (char *dosname) ** ON EXIT: ** returns dos file specification ** -** Bug: Returns pointer to static -- non-reentrant +** Bug(?): Returns pointer to input string, which is modified */ char * HTDOS_name(char *dosname) { @@ -82,13 +82,15 @@ char * HTDOS_name(char *dosname) { printf("\n\n%s = i%\n\n",cp_url,strlen(cp_url)); sleep(5); /**/ - return(cp_url); + strcpy(dosname, cp_url); + return(dosname); /* return(cp_url); */ } else { /* printf("\n\n%s = %i\n\n",cp_url+1,strlen(cp_url)); sleep(5); /**/ - return(cp_url+1); + strcpy(dosname, cp_url+1); + return(dosname); /* return(cp_url+1); */ } } diff --git a/WWW/Library/Implementation/HTFile.c b/WWW/Library/Implementation/HTFile.c index 3ec307fc..45bd6464 100644 --- a/WWW/Library/Implementation/HTFile.c +++ b/WWW/Library/Implementation/HTFile.c @@ -74,11 +74,9 @@ #include "HTBTree.h" #include "HTAlert.h" #include "HTCJK.h" -#ifdef EXP_CHARTRANS #include "UCDefs.h" #include "UCMap.h" #include "UCAux.h" -#endif /* EXP_CHARTRANS */ #include "LYexit.h" #include "LYLeaks.h" @@ -130,11 +128,9 @@ PUBLIC int HTDirReadme = HT_DIR_README_TOP; extern int current_char_set; extern CONST char *LYchar_set_names[]; +extern BOOLEAN LYRawMode; extern BOOL HTPassEightBitRaw; extern HTCJKlang HTCJK; -#ifndef EXP_CHARTRANS -#define UCLYhndl_HTFile_for_unspec 0 /* a dummy define */ -#endif PRIVATE char *HTMountRoot = "/Net/"; /* Where to find mounts */ #ifdef VMS @@ -573,7 +569,16 @@ PUBLIC char * HTLocalName ARGS1( if (TRACE) fprintf(stderr, "Node `%s' means path `%s'\n", name, path); #ifdef DOSPATH - return(HTDOS_name(path)); + { + char *ret_path = NULL; + StrAllocCopy(ret_path, HTDOS_name(path)); + if (TRACE) { + fprintf(stderr, "HTDOS_name changed `%s' to `%s'\n", + path, ret_path); + } + FREE(path); + return(ret_path); + } #else return(path); #endif /* DOSPATH */ @@ -686,12 +691,12 @@ PUBLIC CONST char * HTFileSuffix ARGS2( suff = (HTSuffix *)HTList_objectAt(HTSuffixes, i); if (suff->rep == rep && #if defined(VMS) || defined(FNAMES_8_3) - /* Don't return a suffix whose first char is a dot and which - has more dots or with asterisks, for + /* Don't return a suffix whose first char is a dot, and which + has more dots or asterisks after that, for these systems - kw */ (!suff->suffix || !suff->suffix[0] || suff->suffix[0] != '.' || (strchr(suff->suffix + 1, '.') == NULL && - strchr(suff->suffix + 1, '.') == NULL)) && + strchr(suff->suffix + 1, '*') == NULL)) && #endif ((trivial_enc && IsUnityEnc(suff->encoding)) || (!trivial_enc && !IsUnityEnc(suff->encoding) && @@ -859,7 +864,6 @@ PUBLIC HTFormat HTCharsetFormat ARGS3( cp2 += 7; while (*cp2 == ' ' || *cp2 == '=') cp2++; -#ifdef EXP_CHARTRANS StrAllocCopy(cp3, cp2); /* copy to mutilate more */ for (cp4 = cp3; (*cp4 != '\0' && *cp4 != '"' && *cp4 != ';' && *cp4 != ':' && @@ -885,7 +889,8 @@ PUBLIC HTFormat HTCharsetFormat ARGS3( format = HTAtom_for(cp); StrAllocCopy(anchor->charset, cp4); HTAnchor_setUCInfoStage(anchor, chndl, - UCT_STAGE_MIME, UCT_SETBY_MIME); + UCT_STAGE_MIME, + UCT_SETBY_MIME); } else if (chndl < 0) { /* ** Got something but we don't recognize it. @@ -894,10 +899,10 @@ PUBLIC HTFormat HTCharsetFormat ARGS3( if (UCCanTranslateFromTo(chndl, current_char_set)) { chartrans_ok = YES; HTAnchor_setUCInfoStage(anchor, chndl, - UCT_STAGE_MIME, UCT_SETBY_DEFAULT); + UCT_STAGE_MIME, + UCT_SETBY_DEFAULT); } } - FREE(cp3); if (chartrans_ok) { LYUCcharset *p_in = HTAnchor_getUCInfoStage(anchor, UCT_STAGE_MIME); @@ -927,18 +932,58 @@ PUBLIC HTFormat HTCharsetFormat ARGS3( UCT_STAGE_HTEXT, UCT_SETBY_DEFAULT); } - if ((p_in->enc != UCT_ENC_CJK) && - (p_in->codepoints & UCT_CP_SUBSETOF_LAT1)) { + if (p_in->enc != UCT_ENC_CJK) { HTCJK = NOCJK; - } else if (chndl == current_char_set) { - HTPassEightBitRaw = TRUE; + if (!(p_in->codepoints & + UCT_CP_SUBSETOF_LAT1) && + chndl == current_char_set) { + HTPassEightBitRaw = TRUE; + } + } else if (p_out->enc == UCT_ENC_CJK) { + if (LYRawMode) { + if ((!strcmp(p_in->MIMEname, "euc-jp") || + !strcmp(p_in->MIMEname, "shift_jis")) && + (!strcmp(p_out->MIMEname, "euc-jp") || + !strcmp(p_out->MIMEname, "shift_jis"))) { + HTCJK = JAPANESE; + } else if (!strcmp(p_in->MIMEname, "euc-cn") && + !strcmp(p_out->MIMEname, "euc-cn")) { + HTCJK = CHINESE; + } else if (!strcmp(p_in->MIMEname, "big-5") && + !strcmp(p_out->MIMEname, "big-5")) { + HTCJK = TAIPEI; + } else if (!strcmp(p_in->MIMEname, "euc-kr") && + !strcmp(p_out->MIMEname, "euc-kr")) { + HTCJK = KOREAN; + } else { + HTCJK = NOCJK; + } + } else { + HTCJK = NOCJK; + } } /* - ** Fall through to old behavior. + ** Check for an iso-8859-# we don't know. - FM */ - } else -#endif /* EXP_CHARTRANS */ - if (!strncmp(cp2, "us-ascii", 8) || + } else if (!strncmp(cp4, "iso-8859-", 9) && + isdigit((unsigned char)cp4[9]) && + !strncmp(LYchar_set_names[current_char_set], + "Other ISO Latin", 15)) { + /* + ** Hope it's a match, for now. - FM + */ + *cp1 = '\0'; + format = HTAtom_for(cp); + cp1 = &cp4[10]; + while (*cp1 && + isdigit((unsigned char)(*cp1))) + cp1++; + *cp1 = '\0'; + StrAllocCopy(anchor->charset, cp4); + HTPassEightBitRaw = TRUE; + HTAlert(anchor->charset); +#ifdef NOT_USED /* pre chartrans */ + } else if (!strncmp(cp2, "us-ascii", 8) || !strncmp(cp2, "iso-8859-1", 10)) { *cp1 = '\0'; format = HTAtom_for(cp); @@ -1022,7 +1067,9 @@ PUBLIC HTFormat HTCharsetFormat ARGS3( *cp1 = '\0'; format = HTAtom_for(cp); StrAllocCopy(anchor->charset, "iso-2022-cn"); +#endif /* NOT_USED */ } + FREE(cp3); } else if (cp1 != NULL) { /* ** No charset parameter is present. @@ -1034,15 +1081,14 @@ PUBLIC HTFormat HTCharsetFormat ARGS3( } FREE(cp); -#ifdef EXP_CHARTRANS if (!chartrans_ok && !anchor->charset && default_LYhndl >= 0) { HTAnchor_setUCInfoStage(anchor, default_LYhndl, - UCT_STAGE_MIME, UCT_SETBY_DEFAULT); + UCT_STAGE_MIME, + UCT_SETBY_DEFAULT); } HTAnchor_copyUCInfoStage(anchor, UCT_STAGE_PARSER, UCT_STAGE_MIME, -1); -#endif return format; } @@ -1628,6 +1674,7 @@ PUBLIC int HTLoadFile ARGS4( HTList_addObject(methods, put); } } + /* ** Trim vmsname at semicolon if a version number was ** included, so it doesn't interfere with the check @@ -1638,7 +1685,34 @@ PUBLIC int HTLoadFile ARGS4( /* ** Fake a Content-Encoding for compressed files. - FM */ - if ((len = strlen(vmsname)) > 2) { + if (!IsUnityEnc(myEncoding)) { + /* + * We already know from the call to HTFileFormat above + * that this is a compressed file, no need to look at + * the filename again. - kw + */ +#ifdef USE_ZLIB + if (strcmp(format_out->name, "www/download") != 0 && + (!strcmp(HTAtom_name(myEncoding), "gzip") || + !strcmp(HTAtom_name(myEncoding), "x-gzip"))) { + fclose(fp); + if (semicolon != NULL) + *semicolon = ';'; + gzfp = gzopen(vmsname, "rb"); + + if (TRACE) + fprintf(stderr, + "HTLoadFile: gzopen of `%s' gives %p\n", + vmsname, (void*)gzfp); + use_gzread = YES; + } else +#endif /* USE_ZLIB */ + { + StrAllocCopy(anchor->content_type, format->name); + StrAllocCopy(anchor->content_encoding, HTAtom_name(myEncoding)); + format = HTAtom_for("www/compressed"); + } + } else if ((len = strlen(vmsname)) > 2) { if ((vmsname[len - 1] == 'Z') && (vmsname[len - 2] == '.' || vmsname[len - 2] == '-' || @@ -1670,12 +1744,14 @@ PUBLIC int HTLoadFile ARGS4( #ifdef USE_ZLIB if (strcmp(format_out->name, "www/download") != 0) { fclose(fp); - gzfp = gzopen(localname, "rb"); + if (semicolon != NULL) + *semicolon = ';'; + gzfp = gzopen(vmsname, "rb"); if (TRACE) fprintf(stderr, "HTLoadFile: gzopen of `%s' gives %p\n", - localname, (void*)gzfp); + vmsname, (void*)gzfp); use_gzread = YES; } #else /* USE_ZLIB */ @@ -1990,15 +2066,14 @@ PUBLIC int HTLoadFile ARGS4( } } FREE(pathname); - -#ifdef EXP_CHARTRANS + if (UCLYhndl_HTFile_for_unspec >= 0) { HTAnchor_setUCInfoStage(anchor, UCLYhndl_HTFile_for_unspec, UCT_STAGE_PARSER, UCT_SETBY_DEFAULT); } -#endif + target = HTML_new(anchor, format_out, sink); targetClass = *target->isa; /* Copy routine entry points */ diff --git a/WWW/Library/Implementation/HTMIME.c b/WWW/Library/Implementation/HTMIME.c index 67795a22..ecd61ac2 100644 --- a/WWW/Library/Implementation/HTMIME.c +++ b/WWW/Library/Implementation/HTMIME.c @@ -15,11 +15,9 @@ #include "HTMIME.h" /* Implemented here */ #include "HTAlert.h" #include "HTCJK.h" -#ifdef EXP_CHARTRANS #include "UCMap.h" #include "UCDefs.h" #include "UCAux.h" -#endif #include "LYLeaks.h" @@ -27,6 +25,7 @@ extern int current_char_set; extern CONST char *LYchar_set_names[]; +extern BOOLEAN LYRawMode; extern BOOL HTPassEightBitRaw; extern HTCJKlang HTCJK; @@ -370,28 +369,26 @@ PRIVATE void HTMIME_put_character ARGS2( cp2 += 7; while (*cp2 == ' ' || *cp2 == '=' || *cp2 == '\"') cp2++; -#ifdef EXP_CHARTRANS StrAllocCopy(cp3, cp2); /* copy to mutilate more */ - for (cp4=cp3; (*cp4 != '\0' && *cp4 != '\"' && - *cp4 != ';' && *cp4 != ':' && - !WHITE(*cp4)); cp4++) - /* nothing */ ; + for (cp4 = cp3; (*cp4 != '\0' && *cp4 != '\"' && + *cp4 != ';' && *cp4 != ':' && + !WHITE(*cp4)); cp4++) + ; /* do nothing */ *cp4 = '\0'; cp4 = cp3; chndl = UCGetLYhndl_byMIME(cp3); if (chndl < 0) { - if (0==strcmp(cp4, "cn-big5")) { + if (!strcmp(cp4, "cn-big5")) { cp4 += 3; chndl = UCGetLYhndl_byMIME(cp4); - } - else if (0==strncmp(cp4, "cn-gb", 5)) { + } else if (!strncmp(cp4, "cn-gb", 5)) { StrAllocCopy(cp3, "gb2312"); cp4 = cp3; chndl = UCGetLYhndl_byMIME(cp4); } } - if (UCCanTranslateFromTo(chndl, current_char_set)) - { + if (UCCanTranslateFromTo(chndl, + current_char_set)) { chartrans_ok = YES; *cp1 = '\0'; me->format = HTAtom_for(cp); @@ -403,8 +400,7 @@ PRIVATE void HTMIME_put_character ARGS2( recognize it */ chndl = UCLYhndl_for_unrec; if (UCCanTranslateFromTo(chndl, - current_char_set)) - { + current_char_set)) { chartrans_ok = YES; *cp1 = '\0'; me->format = HTAtom_for(cp); @@ -416,42 +412,97 @@ PRIVATE void HTMIME_put_character ARGS2( if (chartrans_ok) { LYUCcharset * p_in = HTAnchor_getUCInfoStage(me->anchor, - UCT_STAGE_MIME); + UCT_STAGE_MIME); LYUCcharset * p_out = HTAnchor_setUCInfoStage(me->anchor, current_char_set, - UCT_STAGE_HTEXT, UCT_SETBY_DEFAULT); - if (!p_out) /* try again */ + UCT_STAGE_HTEXT, + UCT_SETBY_DEFAULT); + if (!p_out) + /* + ** Try again. + */ p_out = HTAnchor_getUCInfoStage(me->anchor, - UCT_STAGE_HTEXT); + UCT_STAGE_HTEXT); - if (0==strcmp(p_in->MIMEname,"x-transparent")) - { + if (!strcmp(p_in->MIMEname, + "x-transparent")) { HTPassEightBitRaw = TRUE; HTAnchor_setUCInfoStage(me->anchor, HTAnchor_getUCLYhndl(me->anchor, UCT_STAGE_HTEXT), UCT_STAGE_MIME, UCT_SETBY_DEFAULT); } - if (0==strcmp(p_out->MIMEname,"x-transparent")) - { + if (!strcmp(p_out->MIMEname, + "x-transparent")) { HTPassEightBitRaw = TRUE; HTAnchor_setUCInfoStage(me->anchor, - HTAnchor_getUCLYhndl(me->anchor, - UCT_STAGE_MIME), - UCT_STAGE_HTEXT, UCT_SETBY_DEFAULT); + HTAnchor_getUCLYhndl(me->anchor, + UCT_STAGE_MIME), + UCT_STAGE_HTEXT, + UCT_SETBY_DEFAULT); } - if ((p_in->enc != UCT_ENC_CJK) && - (p_in->codepoints & - UCT_CP_SUBSETOF_LAT1)) { + if (p_in->enc != UCT_ENC_CJK) { HTCJK = NOCJK; - } else if (chndl == current_char_set) { - HTPassEightBitRaw = TRUE; + if (!(p_in->codepoints & + UCT_CP_SUBSETOF_LAT1) && + chndl == current_char_set) { + HTPassEightBitRaw = TRUE; + } + } else if (p_out->enc == UCT_ENC_CJK) { + if (LYRawMode) { + if ((!strcmp(p_in->MIMEname, + "euc-jp") || + !strcmp(p_in->MIMEname, + "shift_jis")) && + (!strcmp(p_out->MIMEname, + "euc-jp") || + !strcmp(p_out->MIMEname, + "shift_jis"))) { + HTCJK = JAPANESE; + } else if (!strcmp(p_in->MIMEname, + "euc-cn") && + !strcmp(p_out->MIMEname, + "euc-cn")) { + HTCJK = CHINESE; + } else if (!strcmp(p_in->MIMEname, + "big-5") && + !strcmp(p_out->MIMEname, + "big-5")) { + HTCJK = TAIPEI; + } else if (!strcmp(p_in->MIMEname, + "euc-kr") && + !strcmp(p_out->MIMEname, + "euc-kr")) { + HTCJK = KOREAN; + } else { + HTCJK = NOCJK; + } + } else { + HTCJK = NOCJK; + } } - } else /* Fall through to old behavior */ -#endif /* EXP_CHARTRANS */ - if (!strncmp(cp2, "us-ascii", 8) || + } else if + (!strncmp(cp4, "iso-8859-", 9) && + isdigit((unsigned char)cp4[9]) && + !strncmp(LYchar_set_names[current_char_set], + "Other ISO Latin", 15)) { + /* + ** Hope it's a match, for now. - FM + */ + *cp1 = '\0'; + me->format = HTAtom_for(cp); + cp1 = &cp4[10]; + while (*cp1 && + isdigit((unsigned char)(*cp1))) + cp1++; + *cp1 = '\0'; + StrAllocCopy(me->anchor->charset, cp4); + HTPassEightBitRaw = TRUE; + HTAlert(me->anchor->charset); +#ifdef NOT_USED /* pre-chartrans */ + } else if (!strncmp(cp2, "us-ascii", 8) || !strncmp(cp2, "iso-8859-1", 10)) { *cp1 = '\0'; me->format = HTAtom_for(cp); @@ -562,7 +613,9 @@ PRIVATE void HTMIME_put_character ARGS2( me->format = HTAtom_for(cp); StrAllocCopy(me->anchor->charset, "iso-2022-cn"); +#endif /* NOT_USED */ } + FREE(cp3); } else { /* ** No charset parameter is present. @@ -1326,6 +1379,16 @@ PRIVATE void HTMIME_put_character ARGS2( "HTMIME: Was CONTENT_L, found E, checking for 'ngth:'\n"); break; + case 'o': + case 'O': + me->check_pointer = "cation:"; + me->if_ok = miCONTENT_LOCATION; + me->state = miCHECK; + if (TRACE) + fprintf(stderr, + "HTMIME: Was CONTENT_L, found O, checking for 'cation:'\n"); + break; + default: if (TRACE) fprintf (stderr, @@ -2207,6 +2270,8 @@ PUBLIC HTStream* HTNetMIME ARGS3( ** ** Written by S. Ichikawa, ** partially inspired by encdec.c of <jh@efd.lth.se>. +** +** Generalized HTmmdecode for chartrans - K. Weide 1997-03-06 */ #define BUFLEN 1024 #ifdef ESC @@ -2292,8 +2357,6 @@ PUBLIC void HTmmdec_quote ARGS2( strcpy(t, buf); } -/* Generalized HTmmdecode for chartrans - kweide 1997-03-06 */ - PUBLIC void HTmmdecode ARGS2( char *, trg, char *, str) @@ -2304,8 +2367,10 @@ PUBLIC void HTmmdecode ARGS2( buf[0] = '\0'; -/* encoded-words look like =?ISO-8859-1?B?SWYgeW91IGNhbiByZWFkIHRoaXMgeW8=?= */ - + /* + ** Encoded-words look like + ** =?ISO-8859-1?B?SWYgeW91IGNhbiByZWFkIHRoaXMgeW8=?= + */ for (s = str, u = buf; *s; ) { base64 = quote = 0; if (*s == '=' && s[1] == '?' && @@ -2313,7 +2378,8 @@ PUBLIC void HTmmdecode ARGS2( { /* must be beginning of word */ qm2 = strchr(s+2, '?'); /* 2nd question mark */ if (qm2 && - (qm2[1] == 'B' || qm2[1] == 'b' || qm2[1] == 'Q' || qm2[1] == 'q') && + (qm2[1] == 'B' || qm2[1] == 'b' || qm2[1] == 'Q' || + qm2[1] == 'q') && qm2[2] == '?') { /* 3rd question mark */ char * qm4 = strchr(qm2 + 3, '?'); /* 4th question mark */ if (qm4 && qm4 - s < 74 && /* RFC 2047 length restriction */ @@ -2327,15 +2393,13 @@ PUBLIC void HTmmdecode ARGS2( } if (!invalid) { int LYhndl; + *qm2 = '\0'; -#ifdef EXP_CHARTRANS for (p = s+2; *p; p++) *p = TOLOWER(*p); invalid = ((LYhndl = UCGetLYhndl_byMIME(s+2)) < 0 || - !UCCanTranslateFromTo(LYhndl, current_char_set)); -#else - invalid = (0!=strncasecomp(s+2, "ISO-2022-JP", 11)); -#endif + !UCCanTranslateFromTo(LYhndl, + current_char_set)); *qm2 = '?'; } if (!invalid) { diff --git a/WWW/Library/Implementation/HTMLDTD.c b/WWW/Library/Implementation/HTMLDTD.c index a519fb82..cbeb35f9 100644 --- a/WWW/Library/Implementation/HTMLDTD.c +++ b/WWW/Library/Implementation/HTMLDTD.c @@ -1430,7 +1430,7 @@ static attr ulist_attr[] = { /* UL attributes */ /* { "BLOCKQUOTE", bq_attr, HTML_BQ_ATTRIBUTES, SGML_MIXED }, */ #define T_BLOCKQUOTE 0x0200, 0xAFBCF,0xAFFFF,0xB6680,0xB6FAF,0x8031F,0x00000 /* { "BODY" , body_attr, HTML_BODY_ATTRIBUTES, SGML_MIXED }, */ -#define T_BODY 0x20000,0x2FB8F,0x2FFFF,0x30000,0x30000,0xDFFFF,0x00003 +#define T_BODY 0x20000,0x2FB8F,0x2FFFF,0x30000,0x30000,0xDFF7F,0x00003 /* { "BODYTEXT", bodytext_attr,HTML_BODYTEXT_ATTRIBUTES, SGML_MIXED }, */ #define T_BODYTEXT 0x20000,0x0FB8F,0xAFFFF,0x30200,0xB7FAF,0x8F17F,0x00003 /* { "BQ" , bq_attr, HTML_BQ_ATTRIBUTES, SGML_MIXED }, */ @@ -1501,7 +1501,7 @@ static attr ulist_attr[] = { /* UL attributes */ /* { "H6" , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED }, */ #define T_H6 0x0100, 0x0B04F,0x0B05F,0x36680,0x37FAF,0x80317,0x00000 /* { "HEAD" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED }, */ -#define T_HEAD 0x40000,0x4F000,0x47000,0x10000,0x10000,0x9FFFF,0x00006 +#define T_HEAD 0x40000,0x4F000,0x47000,0x10000,0x10000,0x9FF7F,0x00006 /* { "HR" , hr_attr, HTML_HR_ATTRIBUTES, SGML_EMPTY }, */ #define T_HR 0x4000, 0x00000,0x00000,0x3FE80,0x3FFBF,0x87F37,0x00001 /* { "HTML" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED }, */ @@ -1574,7 +1574,7 @@ static attr ulist_attr[] = { /* UL attributes */ /* { "SCRIPT" , script_attr, HTML_SCRIPT_ATTRIBUTES, SGML_LITTERAL }, */ #define T_SCRIPT 0x2000, 0x00000,0x00000,0x77F9F,0x77FFF,0x87F5F,0x00000 /* { "SELECT" , select_attr, HTML_SELECT_ATTRIBUTES, SGML_MIXED }, */ -#define T_SELECT 0x0040, 0x08000,0x08000,0x03FAF,0x13FBF,0x80F5F,0x00000 +#define T_SELECT 0x0040, 0x08000,0x08000,0x03FAF,0x13FBF,0x80F5F,0x00008 #define T_SHY 0x1000, 0x00000,0x00000,0x3779F,0x77FBF,0x8101F,0x00001 /* { "SMALL" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED }, */ #define T_SMALL 0x0001, 0x8B04F,0x8FFFF,0xA778F,0xF7FBF,0x00001,0x00004 diff --git a/WWW/Library/Implementation/HTNews.c b/WWW/Library/Implementation/HTNews.c index bfd64e5a..adc9568b 100644 --- a/WWW/Library/Implementation/HTNews.c +++ b/WWW/Library/Implementation/HTNews.c @@ -54,6 +54,10 @@ struct _HTStructured { CONST HTStructuredClass * isa; /* ... */ }; +struct _HTStream +{ + HTStreamClass * isa; +}; #define LINE_LENGTH 512 /* Maximum length of line of ARTICLE etc */ #define GROUP_NAME_LENGTH 256 /* Maximum length of group name */ @@ -62,6 +66,7 @@ extern BOOLEAN LYListNewsNumbers; extern BOOLEAN LYListNewsDates; extern HTCJKlang HTCJK; extern int interrupted_in_htgetcharacter; +extern BOOL keep_mime_headers; /* Include mime headers and force raw text */ extern BOOL using_proxy; /* Are we using an NNTP proxy? */ /* @@ -76,16 +81,24 @@ PRIVATE char response_text[LINE_LENGTH+1]; /* Last response */ /* PRIVATE HText * HT; */ /* the new hypertext */ PRIVATE HTStructured * target; /* The output sink */ PRIVATE HTStructuredClass targetClass; /* Copy of fn addresses */ +PRIVATE HTStream * rawtarget = NULL; /* The output sink for rawtext */ +PRIVATE HTStreamClass rawtargetClass; /* Copy of fn addresses */ PRIVATE HTParentAnchor *node_anchor; /* Its anchor */ PRIVATE int diagnostic; /* level: 0=none 2=source */ +PRIVATE BOOL rawtext = NO; /* Flag: HEAD or -mime_headers */ PRIVATE HTList *NNTP_AuthInfo = NULL; /* AUTHINFO database */ #define PUTC(c) (*targetClass.put_character)(target, c) #define PUTS(s) (*targetClass.put_string)(target, s) +#define RAW_PUTS(s) (*rawtargetClass.put_string)(rawtarget, s) #define START(e) (*targetClass.start_element)(target, e, 0, 0, -1, 0) #define END(e) (*targetClass.end_element)(target, e, 0) #define MAYBE_END(e) if (HTML_dtd.tags[e].contents != SGML_EMPTY) \ (*targetClass.end_element)(target, e, 0) +#define FREE_TARGET if (rawtext) (*rawtargetClass._free)(rawtarget); \ + else (*targetClass._free)(target) +#define ABORT_TARGET if (rawtext) (*rawtargetClass._abort)(rawtarget, NULL); \ + else (*targetClass._abort)(target, NULL) typedef struct _NNTPAuth { char * host; @@ -958,7 +971,7 @@ PRIVATE int read_article NOARGS ** The header fields are either ignored, ** or formatted and put into the text. */ - if (!diagnostic) { + if (!diagnostic && !rawtext) { while (!done) { char ch = *p++ = NEXT_CHAR; if (ch == (char)EOF) { @@ -1217,20 +1230,26 @@ PRIVATE int read_article NOARGS FREE(href); } - if (diagnostic) { + if (rawtext) { + /* + * No tags - kw + */ + ; + } else if (diagnostic) { /* ** Read in the HEAD and BODY of the Article ** as XMP formatted text. - FM */ START(HTML_XMP); + PUTC('\n'); } else { /* ** Read in the BODY of the Article ** as PRE formatted text. - FM */ START(HTML_PRE); + PUTC('\n'); } - PUTC('\n'); p = line; while (!done) { @@ -1258,10 +1277,15 @@ PRIVATE int read_article NOARGS done = YES; break; } else { /* Line starts with dot */ - PUTS(&line[1]); /* Ignore first dot */ + if (rawtext) + RAW_PUTS(&line[1]); + else + PUTS(&line[1]); /* Ignore first dot */ } } else { - if (diagnostic || !scan_for_buried_news_references) { + if (rawtext) { + RAW_PUTS(line); + } else if (diagnostic || !scan_for_buried_news_references) { /* ** All lines are passed as unmodified source. - FM */ @@ -1361,7 +1385,10 @@ PRIVATE int read_article NOARGS p = line; /* Restart at beginning */ } /* if end of line */ } /* Loop over characters */ - + + if (rawtext) + return(HT_LOADED); + if (diagnostic) END(HTML_XMP); else @@ -1955,6 +1982,7 @@ PUBLIC int HTLoadNews ARGS4( BOOL reply_wanted; /* Flag: followup post was asked for */ BOOL spost_wanted; /* Flag: new SSL post to group was asked for */ BOOL sreply_wanted; /* Flag: followup SSL post was asked for */ + BOOL head_wanted = NO; /* Flag: want HEAD of single article */ int first, last; /* First and last articles asked for */ char *cp = 0; char *ListArg = NULL; @@ -1965,6 +1993,7 @@ PUBLIC int HTLoadNews ARGS4( diagnostic = (format_out == WWW_SOURCE || /* set global flag */ format_out == HTAtom_for("www/download") || format_out == HTAtom_for("www/dump")); + rawtext = NO; if (TRACE) fprintf(stderr, "HTNews: Looking for %s\n", arg); @@ -2260,6 +2289,34 @@ PUBLIC int HTLoadNews ARGS4( return NO; /* Ignore if no name */ } + if (!(post_wanted || reply_wanted || spost_wanted || sreply_wanted || + (group_wanted && last != -1) || list_wanted)) { + head_wanted = anAnchor->isHEAD; + if (head_wanted && !strncmp(command, "ARTICLE_", 8)) { + /* overwrite "ARTICLE" - hack... */ + strcpy(command, "HEAD "); + for (cp = command + 5; ; cp++) + if ((*cp = *(cp + 3)) == '\0') + break; + } + rawtext = (head_wanted || keep_mime_headers); + } + if (rawtext) { + node_anchor = anAnchor; + rawtarget = HTStreamStack(WWW_PLAINTEXT, + format_out, + stream, anAnchor); + if (!rawtarget) { + FREE(NewsHost); + FREE(NewsHREF); + FREE(ProxyHost); + FREE(ProxyHREF); + FREE(ListArg); + HTAlert("No target for raw text!"); + return(HT_NOT_LOADED); + } /* Copy routine entry points */ + rawtargetClass = *rawtarget->isa; + } else /* ** Make a hypertext object with an anchor list. */ @@ -2298,8 +2355,9 @@ PUBLIC int HTLoadNews ARGS4( "HTNews: Interrupted on connect; recovering cleanly.\n"); _HTProgress("Connection interrupted."); if (!(post_wanted || reply_wanted || - spost_wanted || sreply_wanted)) - (*targetClass._abort)(target, NULL); + spost_wanted || sreply_wanted)) { + ABORT_TARGET; + } FREE(NewsHost); FREE(NewsHREF); FREE(ProxyHost); @@ -2360,8 +2418,9 @@ PUBLIC int HTLoadNews ARGS4( if (status == HT_INTERRUPTED) { _HTProgress("Connection interrupted."); if (!(post_wanted || reply_wanted || - spost_wanted || sreply_wanted)) - (*targetClass._abort)(target, NULL); + spost_wanted || sreply_wanted)) { + ABORT_TARGET; + } FREE(NewsHost); FREE(NewsHREF); FREE(ProxyHost); @@ -2609,7 +2668,9 @@ Send_NNTP_command: ** the number (first) as the command and go back ** to send it and check the response. - FM */ - sprintf(command, "ARTICLE %d%c%c", first, CR, LF); + sprintf(command, "%s %d%c%c", + head_wanted ? "HEAD" : "ARTICLE", + first, CR, LF); group_wanted = FALSE; retries = 2; goto Send_NNTP_command; @@ -2630,9 +2691,9 @@ Send_NNTP_command: if (!(post_wanted || reply_wanted || spost_wanted || sreply_wanted)) { if (status == HT_NOT_LOADED) { - (*targetClass._abort)(target, NULL); + ABORT_TARGET; } else { - (*targetClass._free)(target); + FREE_TARGET; } } FREE(NewsHREF); @@ -2660,8 +2721,9 @@ Send_NNTP_command: NULL,NULL,NULL, arg);No -- message earlier wil have covered it */ if (!(post_wanted || reply_wanted || - spost_wanted || sreply_wanted)) - (*targetClass._abort)(target, NULL); + spost_wanted || sreply_wanted)) { + ABORT_TARGET; + } FREE(NewsHREF); if (ProxyHREF) { StrAllocCopy(NewsHost, ProxyHost); diff --git a/WWW/Library/Implementation/HTParse.c b/WWW/Library/Implementation/HTParse.c index 3c5fafc5..6f558ef5 100644 --- a/WWW/Library/Implementation/HTParse.c +++ b/WWW/Library/Implementation/HTParse.c @@ -98,6 +98,7 @@ PRIVATE void scan ARGS2( if (*p =='#') { parts->anchor = (p + 1); *p = '\0'; /* terminate the rest */ + break; /* leave things after first # alone - kw */ } } @@ -137,8 +138,12 @@ PRIVATE void scan ARGS2( * or it's an nntp or snews URL, or news URL with a host. * Restore the '#' in the address. */ - *(parts->anchor - 1) = '#'; - parts->anchor = NULL; + /* but only if we have found a path component of which this will + * become part. - kw */ + if (parts->relative || parts->absolute) { + *(parts->anchor - 1) = '#'; + parts->anchor = NULL; + } } } @@ -693,12 +698,13 @@ PUBLIC char * HTUnEscape ARGS1( return str; while (*p != '\0') { - if (*p == HEX_ESCAPE) { + if (*p == HEX_ESCAPE && + p[1] && p[2] && /* tests shouldn't be needed, but.. */ + isxdigit((unsigned char)p[1]) && + isxdigit((unsigned char)p[2])) { p++; - if (*p) - *q = from_hex(*p++) * 16; - if (*p) - *q = FROMASCII(*q + from_hex(*p++)); + *q = from_hex(*p++) * 16; + *q = FROMASCII(*q + from_hex(*p++)); q++; } else { *q++ = *p++; diff --git a/WWW/Library/Implementation/SGML.c b/WWW/Library/Implementation/SGML.c index c2cadecd..6e64714f 100644 --- a/WWW/Library/Implementation/SGML.c +++ b/WWW/Library/Implementation/SGML.c @@ -792,6 +792,16 @@ PRIVATE void start_element ARGS1( new_tag->name); } } + if (context->element_stack && !valid && + (context->element_stack->tag->flags & Tgf_strict) && + !(valid = element_valid_within(new_tag, context->element_stack->tag, + direct_container))) { + if (TRACE) + fprintf(stderr, "SGML: Still open %s \t<- ignoring start <%s>\n", + context->element_stack->tag->name, + new_tag->name); + return; + } if (context->element_stack && !extra_action_taken && canclose_check == close_NO && !valid && (new_tag->flags & Tgf_mafse)) { diff --git a/WWW/Library/Implementation/SGML.h b/WWW/Library/Implementation/SGML.h index d8f90c19..645bf266 100644 --- a/WWW/Library/Implementation/SGML.h +++ b/WWW/Library/Implementation/SGML.h @@ -90,8 +90,10 @@ typedef enum _TagClass { typedef enum _TagFlags { Tgf_endO = 0x00001, /* end tag can be Omitted */ Tgf_startO = 0x00002, /* start tag can be Omitted */ - Tgf_mafse = 0x00004 /* Make Attribute-Free Start-tag End instead + Tgf_mafse = 0x00004, /* Make Attribute-Free Start-tag End instead (if found invalid) */ + Tgf_strict = 0x00008 /* Ignore contained invalid elements, + don't pass them on */ } TagFlags; /* A tag structure describes an SGML element. diff --git a/aclocal.m4 b/aclocal.m4 index 47eef98f..54fb2280 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -8,7 +8,8 @@ dnl dnl --------------------------------------------------------------------------- dnl --------------------------------------------------------------------------- dnl Add an include-directory to $CPPFLAGS. Don't add /usr/include, since it's -dnl redundant. Also, don't add /usr/local/include if we're using gcc. +dnl redundant. We don't normally need to add -I/usr/local/include for gcc, +dnl but old versions (and some misinstalled ones) need that. AC_DEFUN([CF_ADD_INCDIR], [ for cf_add_incdir in $1 @@ -18,9 +19,6 @@ do case $cf_add_incdir in /usr/include) # (vi ;; - /usr/local/include) # (vi - test -z "$GCC" && CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" - ;; *) # (vi CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" ;; @@ -614,7 +612,7 @@ AC_CACHE_VAL(cf_cv_ncurses_header,[ printf("%s\n", NCURSES_VERSION); #else #ifdef __NCURSES_H -printf("maybe 1.8.7\n"); +printf("old\n"); #else make an error #endif @@ -629,12 +627,14 @@ make an error curses.h \ ncurses.h do - if egrep "NCURSES" $cf_incdir/$cf_header 1>&5 2>&1; then +changequote(,)dnl + if egrep "NCURSES_[VH]" $cf_incdir/$cf_header 1>&AC_FD_CC 2>&1; then +changequote([,])dnl cf_cv_ncurses_header=$cf_incdir/$cf_header - test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6 + test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&AC_FD_MSG break fi - test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6 + test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&AC_FD_MSG done test -n "$cf_cv_ncurses_header" && break done @@ -661,6 +661,7 @@ predefined) # (vi CF_ADD_INCDIR($cf_incdir) ;; esac +CF_NCURSES_VERSION ])dnl dnl --------------------------------------------------------------------------- dnl Look for the ncurses library. This is a little complicated on Linux, @@ -711,25 +712,54 @@ AC_DEFUN([CF_NCURSES_VERSION], [AC_MSG_CHECKING(for ncurses version) AC_CACHE_VAL(cf_cv_ncurses_version,[ cf_cv_ncurses_version=no + cf_tempfile=out$$ + AC_TRY_RUN([ +#include <$cf_cv_ncurses_header> +int main() +{ + FILE *fp = fopen("$cf_tempfile", "w"); +#ifdef NCURSES_VERSION +# ifdef NCURSES_VERSION_PATCH + fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH); +# else + fprintf(fp, "%s\n", NCURSES_VERSION); +# endif +#else +# ifdef __NCURSES_H + fprintf(fp, "old\n"); +# else + make an error +# endif +#endif + exit(0); +}],[ + cf_cv_ncurses_version=`cat $cf_tempfile` + rm -f $cf_tempfile],,[ + + # This will not work if the preprocessor splits the line after the + # Autoconf token. The 'unproto' program does that. cat > conftest.$ac_ext <<EOF #include <$cf_cv_ncurses_header> +#undef Autoconf #ifdef NCURSES_VERSION Autoconf NCURSES_VERSION #else #ifdef __NCURSES_H Autoconf "old" #endif +; #endif EOF - cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out" + cf_try="$ac_cpp conftest.$ac_ext 2>&AC_FD_CC | grep '^Autoconf ' >conftest.out" AC_TRY_EVAL(cf_try) if test -f conftest.out ; then changequote(,)dnl - cf_out=`cat conftest.out | sed -e 's@^[^\"]*\"@@' -e 's@\".*@@'` + cf_out=`cat conftest.out | sed -e 's@^Autoconf @@' -e 's@^[^"]*"@@' -e 's@".*@@'` changequote([,])dnl test -n "$cf_out" && cf_cv_ncurses_version="$cf_out" + rm -f conftest.out fi -]) +])]) AC_MSG_RESULT($cf_cv_ncurses_version) ]) dnl --------------------------------------------------------------------------- @@ -1140,11 +1170,13 @@ AC_REQUIRE([CF_WAIT_HEADERS]) AC_MSG_CHECKING([for union wait]) AC_CACHE_VAL(cf_cv_type_unionwait,[ AC_TRY_COMPILE($cf_wait_headers, - [union wait x; + [int x; int y = WEXITSTATUS(x); int z = WTERMSIG(x); ], - [cf_cv_type_unionwait=no],[ + [cf_cv_type_unionwait=no + echo compiles ok w/o union wait 1>&AC_FD_CC + ],[ AC_TRY_COMPILE($cf_wait_headers, [union wait x; #ifdef WEXITSTATUS @@ -1154,7 +1186,9 @@ AC_CACHE_VAL(cf_cv_type_unionwait,[ int z = WTERMSIG(x); #endif ], - [cf_cv_type_unionwait=yes], + [cf_cv_type_unionwait=yes + echo compiles ok with union wait and possibly macros too 1>&AC_FD_CC + ], [cf_cv_type_unionwait=no])])]) AC_MSG_RESULT($cf_cv_type_unionwait) test $cf_cv_type_unionwait = yes && AC_DEFINE(HAVE_TYPE_UNIONWAIT) diff --git a/configure b/configure index a4f866fb..34314745 100755 --- a/configure +++ b/configure @@ -34,8 +34,6 @@ ac_help="$ac_help ac_help="$ac_help Miscellaneous Options:" ac_help="$ac_help - --disable-char-trans enable optional character-translations (default: on)" -ac_help="$ac_help --enable-color-style use optional/experimental color style (default: off)" ac_help="$ac_help --with-lss-file=XXXX specify style-sheet path (default: LIBDIR/lynx.lss)" @@ -602,7 +600,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:606: checking host system type" >&5 +echo "configure:604: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -627,7 +625,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:631: checking for $ac_word" >&5 +echo "configure:629: 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 @@ -656,7 +654,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:660: checking for $ac_word" >&5 +echo "configure:658: 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 @@ -704,7 +702,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:708: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:706: 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. @@ -714,11 +712,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <<EOF -#line 718 "configure" +#line 716 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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 @@ -738,12 +736,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:742: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:740: 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:747: checking whether we are using GNU C" >&5 +echo "configure:745: 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 @@ -752,7 +750,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:756: \"$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:754: \"$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 @@ -767,7 +765,7 @@ if test $ac_cv_prog_gcc = yes; then ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:771: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:769: 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 @@ -795,7 +793,7 @@ else fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:799: checking how to run the C preprocessor" >&5 +echo "configure:797: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -810,13 +808,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 814 "configure" +#line 812 "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:820: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:818: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -827,13 +825,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF -#line 831 "configure" +#line 829 "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:837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:835: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -858,7 +856,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:862: checking for $ac_word" >&5 +echo "configure:860: 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 @@ -885,7 +883,7 @@ else fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:889: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:887: 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 @@ -913,7 +911,7 @@ fi echo $ac_n "checking for style of include in makefiles""... $ac_c" 1>&6 -echo "configure:917: checking for style of include in makefiles" >&5 +echo "configure:915: checking for style of include in makefiles" >&5 make_include_left="" make_include_right="" @@ -974,7 +972,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:978: checking for a BSD compatible install" >&5 +echo "configure:976: 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 @@ -1028,7 +1026,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:1032: checking for $ac_word" >&5 +echo "configure:1030: 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 @@ -1062,7 +1060,7 @@ done echo $ac_n "checking if you want to see long compiling messages""... $ac_c" 1>&6 -echo "configure:1066: checking if you want to see long compiling messages" >&5 +echo "configure:1064: 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 enableval="$enable_echo" @@ -1101,7 +1099,7 @@ echo "$ac_t""$enableval" 1>&6 echo $ac_n "checking if you want to check memory-leaks""... $ac_c" 1>&6 -echo "configure:1105: checking if you want to check memory-leaks" >&5 +echo "configure:1103: 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 enableval="$enable_find_leaks" @@ -1124,7 +1122,7 @@ EOF echo $ac_n "checking if you want to enable debug-code""... $ac_c" 1>&6 -echo "configure:1128: checking if you want to enable debug-code" >&5 +echo "configure:1126: 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 enableval="$enable_debug" @@ -1168,7 +1166,7 @@ fi if test -n "$GCC" then echo $ac_n "checking if you want to turn on gcc warnings""... $ac_c" 1>&6 -echo "configure:1172: checking if you want to turn on gcc warnings" >&5 +echo "configure:1170: 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 enableval="$enable_warnings" @@ -1191,11 +1189,11 @@ then if test -n "$GCC" then cat > conftest.$ac_ext <<EOF -#line 1195 "configure" +#line 1193 "configure" int main(int argc, char *argv[]) { return argv[argc-1] == 0; } EOF echo "checking for gcc warning options" 1>&6 -echo "configure:1199: checking for gcc warning options" >&5 +echo "configure:1197: checking for gcc warning options" >&5 cf_save_CFLAGS="$CFLAGS" EXTRA_CFLAGS="-W -Wall" cf_warn_CONST="" @@ -1213,7 +1211,7 @@ echo "configure:1199: checking for gcc warning options" >&5 Wstrict-prototypes $cf_warn_CONST do CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt" - if { (eval echo configure:1217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + if { (eval echo configure:1215: \"$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" @@ -1231,7 +1229,7 @@ fi echo $ac_n "checking if you want full utility pathnames""... $ac_c" 1>&6 -echo "configure:1235: checking if you want full utility pathnames" >&5 +echo "configure:1233: 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 enableval="$enable_full_paths" @@ -1251,7 +1249,7 @@ echo "$ac_t""$with_full_paths" 1>&6 echo $ac_n "checking for system mailer""... $ac_c" 1>&6 -echo "configure:1255: checking for system mailer" >&5 +echo "configure:1253: 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 @@ -1278,7 +1276,7 @@ EOF echo $ac_n "checking system mail flags""... $ac_c" 1>&6 -echo "configure:1282: checking system mail flags" >&5 +echo "configure:1280: 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 @@ -1306,7 +1304,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:1310: checking for $ac_word" >&5 +echo "configure:1308: 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 @@ -1337,7 +1335,7 @@ fi else echo $ac_n "checking for chmod""... $ac_c" 1>&6 -echo "configure:1341: checking for chmod" >&5 +echo "configure:1339: checking for chmod" >&5 echo "$ac_t""$CHMOD" 1>&6 fi @@ -1371,7 +1369,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:1375: checking for $ac_word" >&5 +echo "configure:1373: 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 @@ -1402,7 +1400,7 @@ fi else echo $ac_n "checking for compress""... $ac_c" 1>&6 -echo "configure:1406: checking for compress" >&5 +echo "configure:1404: checking for compress" >&5 echo "$ac_t""$COMPRESS" 1>&6 fi @@ -1436,7 +1434,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:1440: checking for $ac_word" >&5 +echo "configure:1438: 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 @@ -1467,7 +1465,7 @@ fi else echo $ac_n "checking for cp""... $ac_c" 1>&6 -echo "configure:1471: checking for cp" >&5 +echo "configure:1469: checking for cp" >&5 echo "$ac_t""$COPY" 1>&6 fi @@ -1501,7 +1499,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:1505: checking for $ac_word" >&5 +echo "configure:1503: 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 @@ -1532,7 +1530,7 @@ fi else echo $ac_n "checking for gzip""... $ac_c" 1>&6 -echo "configure:1536: checking for gzip" >&5 +echo "configure:1534: checking for gzip" >&5 echo "$ac_t""$GZIP" 1>&6 fi @@ -1566,7 +1564,7 @@ if test "$with_full_paths" = yes ; then # Extract the first word of "install", so it can be a program name with args. set dummy install; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1570: checking for $ac_word" >&5 +echo "configure:1568: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_INSTALL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1597,7 +1595,7 @@ fi else echo $ac_n "checking for install""... $ac_c" 1>&6 -echo "configure:1601: checking for install" >&5 +echo "configure:1599: checking for install" >&5 echo "$ac_t""$INSTALL" 1>&6 fi @@ -1631,7 +1629,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:1635: checking for $ac_word" >&5 +echo "configure:1633: 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 @@ -1662,7 +1660,7 @@ fi else echo $ac_n "checking for mkdir""... $ac_c" 1>&6 -echo "configure:1666: checking for mkdir" >&5 +echo "configure:1664: checking for mkdir" >&5 echo "$ac_t""$MKDIR" 1>&6 fi @@ -1696,7 +1694,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:1700: checking for $ac_word" >&5 +echo "configure:1698: 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 @@ -1727,7 +1725,7 @@ fi else echo $ac_n "checking for mv""... $ac_c" 1>&6 -echo "configure:1731: checking for mv" >&5 +echo "configure:1729: checking for mv" >&5 echo "$ac_t""$MV" 1>&6 fi @@ -1761,7 +1759,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:1765: checking for $ac_word" >&5 +echo "configure:1763: 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 @@ -1792,7 +1790,7 @@ fi else echo $ac_n "checking for rm""... $ac_c" 1>&6 -echo "configure:1796: checking for rm" >&5 +echo "configure:1794: checking for rm" >&5 echo "$ac_t""$RM" 1>&6 fi @@ -1826,7 +1824,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:1830: checking for $ac_word" >&5 +echo "configure:1828: 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 @@ -1857,7 +1855,7 @@ fi else echo $ac_n "checking for tar""... $ac_c" 1>&6 -echo "configure:1861: checking for tar" >&5 +echo "configure:1859: checking for tar" >&5 echo "$ac_t""$TAR" 1>&6 fi @@ -1891,7 +1889,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:1895: checking for $ac_word" >&5 +echo "configure:1893: 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 @@ -1922,7 +1920,7 @@ fi else echo $ac_n "checking for touch""... $ac_c" 1>&6 -echo "configure:1926: checking for touch" >&5 +echo "configure:1924: checking for touch" >&5 echo "$ac_t""$TOUCH" 1>&6 fi @@ -1956,7 +1954,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:1960: checking for $ac_word" >&5 +echo "configure:1958: 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 @@ -1987,7 +1985,7 @@ fi else echo $ac_n "checking for gunzip""... $ac_c" 1>&6 -echo "configure:1991: checking for gunzip" >&5 +echo "configure:1989: checking for gunzip" >&5 echo "$ac_t""$UNCOMPRESS" 1>&6 fi @@ -2021,7 +2019,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:2025: checking for $ac_word" >&5 +echo "configure:2023: 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 @@ -2052,7 +2050,7 @@ fi else echo $ac_n "checking for unzip""... $ac_c" 1>&6 -echo "configure:2056: checking for unzip" >&5 +echo "configure:2054: checking for unzip" >&5 echo "$ac_t""$UNZIP" 1>&6 fi @@ -2086,7 +2084,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:2090: checking for $ac_word" >&5 +echo "configure:2088: 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 @@ -2117,7 +2115,7 @@ fi else echo $ac_n "checking for uudecode""... $ac_c" 1>&6 -echo "configure:2121: checking for uudecode" >&5 +echo "configure:2119: checking for uudecode" >&5 echo "$ac_t""$UUDECODE" 1>&6 fi @@ -2151,7 +2149,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:2155: checking for $ac_word" >&5 +echo "configure:2153: 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 @@ -2182,7 +2180,7 @@ fi else echo $ac_n "checking for zcat""... $ac_c" 1>&6 -echo "configure:2186: checking for zcat" >&5 +echo "configure:2184: checking for zcat" >&5 echo "$ac_t""$ZCAT" 1>&6 fi @@ -2216,7 +2214,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:2220: checking for $ac_word" >&5 +echo "configure:2218: 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 @@ -2247,7 +2245,7 @@ fi else echo $ac_n "checking for zip""... $ac_c" 1>&6 -echo "configure:2251: checking for zip" >&5 +echo "configure:2249: checking for zip" >&5 echo "$ac_t""$ZIP" 1>&6 fi @@ -2285,7 +2283,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:2289: checking for ${CC-cc} option to accept ANSI C" >&5 +echo "configure:2287: 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 @@ -2303,7 +2301,7 @@ for cf_arg in "-DCC_HAS_PROTOS" "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" -Xc do CFLAGS="$cf_save_CFLAGS $cf_arg" cat > conftest.$ac_ext <<EOF -#line 2307 "configure" +#line 2305 "configure" #include "confdefs.h" #ifndef CC_HAS_PROTOS @@ -2319,7 +2317,7 @@ int main() { struct s2 {int (*f) (double a);}; ; return 0; } EOF -if { (eval echo configure:2323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_ansi_cc="$cf_arg"; break else @@ -2347,12 +2345,12 @@ fi fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2351: checking for working const" >&5 +echo "configure:2349: 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 2356 "configure" +#line 2354 "configure" #include "confdefs.h" int main() { @@ -2401,7 +2399,7 @@ ccp = (char const *const *) p; ; return 0; } EOF -if { (eval echo configure:2405: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2441,7 +2439,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:2445: checking for strcmp in -lc_s" >&5 +echo "configure:2443: 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 @@ -2449,7 +2447,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc_s $LIBS" cat > conftest.$ac_ext <<EOF -#line 2453 "configure" +#line 2451 "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 @@ -2460,7 +2458,7 @@ int main() { strcmp() ; return 0; } EOF -if { (eval echo configure:2464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2538,7 +2536,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:2542: checking for $ac_word" >&5 +echo "configure:2540: 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 @@ -2582,17 +2580,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:2586: checking for $ac_hdr" >&5 +echo "configure:2584: 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 2591 "configure" +#line 2589 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2596: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2594: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2636,17 +2634,17 @@ ultrix*) do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2640: checking for $ac_hdr" >&5 +echo "configure:2638: 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 2645 "configure" +#line 2643 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2650: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2648: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2679,7 +2677,7 @@ esac cf_test_netlibs=no echo $ac_n "checking for network libraries""... $ac_c" 1>&6 -echo "configure:2683: checking for network libraries" >&5 +echo "configure:2681: checking for network libraries" >&5 if eval "test \"`echo '$''{'cf_cv_netlibs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2690,12 +2688,12 @@ cf_test_netlibs=yes for ac_func in gethostname do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2694: checking for $ac_func" >&5 +echo "configure:2692: 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 2699 "configure" +#line 2697 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2718,7 +2716,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2741,7 +2739,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gethostname in -lnsl""... $ac_c" 1>&6 -echo "configure:2745: checking for gethostname in -lnsl" >&5 +echo "configure:2743: 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 @@ -2749,7 +2747,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $cf_cv_netlibs $LIBS" cat > conftest.$ac_ext <<EOF -#line 2753 "configure" +#line 2751 "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 @@ -2760,7 +2758,7 @@ int main() { gethostname() ; return 0; } EOF -if { (eval echo configure:2764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2793,7 +2791,7 @@ else echo $ac_n "checking for gethostname in -lsocket""... $ac_c" 1>&6 -echo "configure:2797: checking for gethostname in -lsocket" >&5 +echo "configure:2795: 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 @@ -2801,7 +2799,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $cf_cv_netlibs $LIBS" cat > conftest.$ac_ext <<EOF -#line 2805 "configure" +#line 2803 "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 @@ -2812,7 +2810,7 @@ int main() { gethostname() ; return 0; } EOF -if { (eval echo configure:2816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2856,21 +2854,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:2860: checking for -linet" >&5 +echo "configure:2858: 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 2867 "configure" +#line 2865 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:2874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_lib_inet=yes else @@ -2893,12 +2891,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:2897: checking for $ac_func" >&5 +echo "configure:2895: 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 2902 "configure" +#line 2900 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2921,7 +2919,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2944,7 +2942,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:2948: checking for socket in -lsocket" >&5 +echo "configure:2946: 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 @@ -2952,7 +2950,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $cf_cv_netlibs $LIBS" cat > conftest.$ac_ext <<EOF -#line 2956 "configure" +#line 2954 "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 @@ -2963,7 +2961,7 @@ int main() { socket() ; return 0; } EOF -if { (eval echo configure:2967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2996,7 +2994,7 @@ else echo $ac_n "checking for socket in -lbsd""... $ac_c" 1>&6 -echo "configure:3000: checking for socket in -lbsd" >&5 +echo "configure:2998: 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 @@ -3004,7 +3002,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lbsd $cf_cv_netlibs $LIBS" cat > conftest.$ac_ext <<EOF -#line 3008 "configure" +#line 3006 "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 @@ -3015,7 +3013,7 @@ int main() { socket() ; return 0; } EOF -if { (eval echo configure:3019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3060,12 +3058,12 @@ fi for ac_func in gethostbyname do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3064: checking for $ac_func" >&5 +echo "configure:3062: 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 3069 "configure" +#line 3067 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3088,7 +3086,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3111,7 +3109,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:3115: checking for gethostbyname in -lnsl" >&5 +echo "configure:3113: 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 @@ -3119,7 +3117,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $cf_cv_netlibs $LIBS" cat > conftest.$ac_ext <<EOF -#line 3123 "configure" +#line 3121 "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 @@ -3130,7 +3128,7 @@ int main() { gethostbyname() ; return 0; } EOF -if { (eval echo configure:3134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3171,12 +3169,12 @@ done for ac_func in strcasecmp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3175: checking for $ac_func" >&5 +echo "configure:3173: 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 3180 "configure" +#line 3178 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3199,7 +3197,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3222,7 +3220,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6 -echo "configure:3226: checking for strcasecmp in -lresolv" >&5 +echo "configure:3224: 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 @@ -3230,7 +3228,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $cf_cv_netlibs $LIBS" cat > conftest.$ac_ext <<EOF -#line 3234 "configure" +#line 3232 "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 @@ -3241,7 +3239,7 @@ int main() { strcasecmp() ; return 0; } EOF -if { (eval echo configure:3245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3286,7 +3284,7 @@ test $cf_test_netlibs = no && echo "$cf_cv_netlibs" >&6 echo $ac_n "checking for screen type""... $ac_c" 1>&6 -echo "configure:3290: checking for screen type" >&5 +echo "configure:3288: checking for screen type" >&5 if eval "test \"`echo '$''{'cf_cv_screen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3317,12 +3315,12 @@ curses) fi echo $ac_n "checking for initscr""... $ac_c" 1>&6 -echo "configure:3321: checking for initscr" >&5 +echo "configure:3319: 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 3326 "configure" +#line 3324 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char initscr(); below. */ @@ -3345,7 +3343,7 @@ initscr(); ; return 0; } EOF -if { (eval echo configure:3349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_initscr=yes" else @@ -3366,7 +3364,7 @@ else case $host_os in #(vi freebsd*) #(vi echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6 -echo "configure:3370: checking for tgoto in -lmytinfo" >&5 +echo "configure:3368: 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 @@ -3374,7 +3372,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lmytinfo $LIBS" cat > conftest.$ac_ext <<EOF -#line 3378 "configure" +#line 3376 "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 @@ -3385,7 +3383,7 @@ int main() { tgoto() ; return 0; } EOF -if { (eval echo configure:3389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3408,7 +3406,7 @@ fi ;; *hp-hpux10.*) echo $ac_n "checking for initscr in -lHcurses""... $ac_c" 1>&6 -echo "configure:3412: checking for initscr in -lHcurses" >&5 +echo "configure:3410: 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 @@ -3416,7 +3414,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lHcurses $LIBS" cat > conftest.$ac_ext <<EOF -#line 3420 "configure" +#line 3418 "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 @@ -3427,7 +3425,7 @@ int main() { initscr() ; return 0; } EOF -if { (eval echo configure:3431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3451,7 +3449,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for initscr in -lcur_color""... $ac_c" 1>&6 -echo "configure:3455: checking for initscr in -lcur_color" >&5 +echo "configure:3453: checking for initscr in -lcur_color" >&5 ac_lib_var=`echo cur_color'_'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 @@ -3459,7 +3457,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcur_color $LIBS" cat > conftest.$ac_ext <<EOF -#line 3463 "configure" +#line 3461 "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 @@ -3470,7 +3468,7 @@ int main() { initscr() ; return 0; } EOF -if { (eval echo configure:3474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3509,12 +3507,12 @@ fi cf_save_LIBS="$LIBS" echo $ac_n "checking for tgoto""... $ac_c" 1>&6 -echo "configure:3513: checking for tgoto" >&5 +echo "configure:3511: 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 3518 "configure" +#line 3516 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char tgoto(); below. */ @@ -3537,7 +3535,7 @@ tgoto(); ; return 0; } EOF -if { (eval echo configure:3541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_tgoto=yes" else @@ -3553,7 +3551,7 @@ if eval "test \"`echo '$ac_cv_func_'tgoto`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for initscr in -lcurses""... $ac_c" 1>&6 -echo "configure:3557: checking for initscr in -lcurses" >&5 +echo "configure:3555: 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 @@ -3561,7 +3559,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcurses $LIBS" cat > conftest.$ac_ext <<EOF -#line 3565 "configure" +#line 3563 "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 @@ -3572,7 +3570,7 @@ int main() { initscr() ; return 0; } EOF -if { (eval echo configure:3576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3606,7 +3604,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6 -echo "configure:3610: checking for tgoto in -ltermcap" >&5 +echo "configure:3608: 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 @@ -3614,7 +3612,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext <<EOF -#line 3618 "configure" +#line 3616 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -3625,7 +3623,7 @@ int main() { tgoto() ; return 0; } EOF -if { (eval echo configure:3629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3643,7 +3641,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then LIBS="-ltermcap $cf_save_LIBS" echo $ac_n "checking for initscr in -lcurses""... $ac_c" 1>&6 -echo "configure:3647: checking for initscr in -lcurses" >&5 +echo "configure:3645: 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 @@ -3651,7 +3649,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcurses $LIBS" cat > conftest.$ac_ext <<EOF -#line 3655 "configure" +#line 3653 "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 @@ -3662,7 +3660,7 @@ int main() { initscr() ; return 0; } EOF -if { (eval echo configure:3666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3689,7 +3687,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for initscr in -lcursesX""... $ac_c" 1>&6 -echo "configure:3693: checking for initscr in -lcursesX" >&5 +echo "configure:3691: checking for initscr in -lcursesX" >&5 ac_lib_var=`echo cursesX'_'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 @@ -3697,7 +3695,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcursesX $LIBS" cat > conftest.$ac_ext <<EOF -#line 3701 "configure" +#line 3699 "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 @@ -3708,7 +3706,7 @@ int main() { initscr() ; return 0; } EOF -if { (eval echo configure:3712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3735,7 +3733,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for initscr in -ljcurses""... $ac_c" 1>&6 -echo "configure:3739: checking for initscr in -ljcurses" >&5 +echo "configure:3737: checking for initscr in -ljcurses" >&5 ac_lib_var=`echo jcurses'_'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 @@ -3743,7 +3741,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ljcurses $LIBS" cat > conftest.$ac_ext <<EOF -#line 3747 "configure" +#line 3745 "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 @@ -3754,7 +3752,7 @@ int main() { initscr() ; return 0; } EOF -if { (eval echo configure:3758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3792,7 +3790,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for initscr in -lcurses""... $ac_c" 1>&6 -echo "configure:3796: checking for initscr in -lcurses" >&5 +echo "configure:3794: 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 @@ -3800,7 +3798,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcurses $LIBS" cat > conftest.$ac_ext <<EOF -#line 3804 "configure" +#line 3802 "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 @@ -3811,7 +3809,7 @@ int main() { initscr() ; return 0; } EOF -if { (eval echo configure:3815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3850,14 +3848,14 @@ fi echo $ac_n "checking for curses performance tradeoff""... $ac_c" 1>&6 -echo "configure:3854: checking for curses performance tradeoff" >&5 +echo "configure:3852: 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 3861 "configure" +#line 3859 "configure" #include "confdefs.h" #include <$cf_cv_ncurses_header> @@ -3871,11 +3869,11 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 3879 "configure" +#line 3877 "configure" #include "confdefs.h" #define CURS_PERFORMANCE @@ -3890,7 +3888,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_curs_performance=yes else @@ -3915,13 +3913,13 @@ EOF ncurses) echo $ac_n "checking for ncurses header file""... $ac_c" 1>&6 -echo "configure:3919: checking for ncurses header file" >&5 +echo "configure:3917: 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 3925 "configure" +#line 3923 "configure" #include "confdefs.h" #include <curses.h> int main() { @@ -3930,7 +3928,7 @@ int main() { printf("%s\n", NCURSES_VERSION); #else #ifdef __NCURSES_H -printf("maybe 1.8.7\n"); +printf("old\n"); #else make an error #endif @@ -3938,7 +3936,7 @@ make an error ; return 0; } EOF -if { (eval echo configure:3942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_ncurses_header=predefined else @@ -3966,7 +3964,7 @@ test "$prefix" != /usr && cf_search="$cf_search /usr/include /usr/incl curses.h \ ncurses.h do - if egrep "NCURSES" $cf_incdir/$cf_header 1>&5 2>&1; then + if egrep "NCURSES_[VH]" $cf_incdir/$cf_header 1>&5 2>&1; then cf_cv_ncurses_header=$cf_incdir/$cf_header test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6 break @@ -4011,9 +4009,6 @@ do case $cf_add_incdir in /usr/include) # (vi ;; - /usr/local/include) # (vi - test -z "$GCC" && CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" - ;; *) # (vi CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" ;; @@ -4026,12 +4021,86 @@ done ;; esac +echo $ac_n "checking for ncurses version""... $ac_c" 1>&6 +echo "configure:4026: 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 + + cf_cv_ncurses_version=no + cf_tempfile=out$$ + if test "$cross_compiling" = yes; then + + + # This will not work if the preprocessor splits the line after the + # Autoconf token. The 'unproto' program does that. + cat > conftest.$ac_ext <<EOF +#include <$cf_cv_ncurses_header> +#undef Autoconf +#ifdef NCURSES_VERSION +Autoconf NCURSES_VERSION +#else +#ifdef __NCURSES_H +Autoconf "old" +#endif +; +#endif +EOF + cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out" + { (eval echo configure:4051: \"$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" + rm -f conftest.out + fi + +else + cat > conftest.$ac_ext <<EOF +#line 4060 "configure" +#include "confdefs.h" + +#include <$cf_cv_ncurses_header> +int main() +{ + FILE *fp = fopen("$cf_tempfile", "w"); +#ifdef NCURSES_VERSION +# ifdef NCURSES_VERSION_PATCH + fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH); +# else + fprintf(fp, "%s\n", NCURSES_VERSION); +# endif +#else +# ifdef __NCURSES_H + fprintf(fp, "old\n"); +# else + make an error +# endif +#endif + exit(0); +} +EOF +if { (eval echo configure:4083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + + cf_cv_ncurses_version=`cat $cf_tempfile` + rm -f $cf_tempfile +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$cf_cv_ncurses_version" 1>&6 + cf_ncurses_LIBS="" echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6 -echo "configure:4035: checking for Gpm_Open in -lgpm" >&5 +echo "configure:4104: 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 @@ -4039,7 +4108,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgpm $LIBS" cat > conftest.$ac_ext <<EOF -#line 4043 "configure" +#line 4112 "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 @@ -4050,7 +4119,7 @@ int main() { Gpm_Open() ; return 0; } EOF -if { (eval echo configure:4054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4066,7 +4135,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:4070: checking for initscr in -lgpm" >&5 +echo "configure:4139: 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 @@ -4074,7 +4143,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgpm $LIBS" cat > conftest.$ac_ext <<EOF -#line 4078 "configure" +#line 4147 "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 @@ -4085,7 +4154,7 @@ int main() { initscr() ; return 0; } EOF -if { (eval echo configure:4089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4123,7 +4192,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:4127: checking for tgoto in -lmytinfo" >&5 +echo "configure:4196: 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 @@ -4131,7 +4200,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lmytinfo $LIBS" cat > conftest.$ac_ext <<EOF -#line 4135 "configure" +#line 4204 "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 @@ -4142,7 +4211,7 @@ int main() { tgoto() ; return 0; } EOF -if { (eval echo configure:4146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4170,12 +4239,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:4174: checking for initscr" >&5 +echo "configure:4243: 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 4179 "configure" +#line 4248 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char initscr(); below. */ @@ -4198,7 +4267,7 @@ initscr(); ; return 0; } EOF -if { (eval echo configure:4202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_initscr=yes" else @@ -4218,17 +4287,17 @@ else cf_save_LIBS="$LIBS" echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6 -echo "configure:4222: checking for initscr in -lncurses" >&5 +echo "configure:4291: checking for initscr in -lncurses" >&5 LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <<EOF -#line 4225 "configure" +#line 4294 "configure" #include "confdefs.h" #include <$cf_cv_ncurses_header> int main() { initscr() ; return 0; } EOF -if { (eval echo configure:4232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cf_cv_have_lib_ncurses=yes @@ -4255,17 +4324,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:4259: checking for -lncurses in $cf_libdir" >&5 +echo "configure:4328: checking for -lncurses in $cf_libdir" >&5 LIBS="-L$cf_libdir -lncurses $cf_save_LIBS" cat > conftest.$ac_ext <<EOF -#line 4262 "configure" +#line 4331 "configure" #include "confdefs.h" #include <$cf_cv_ncurses_header> int main() { initscr() ; return 0; } EOF -if { (eval echo configure:4269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cf_cv_have_lib_ncurses=yes @@ -4292,7 +4361,7 @@ fi 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:4296: checking if we can link ncurses without $cf_ncurses_LIBS" >&5 +echo "configure:4365: 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'$//'` @@ -4301,14 +4370,14 @@ echo "configure:4296: checking if we can link ncurses without $cf_ncurses_LIBS" fi done cat > conftest.$ac_ext <<EOF -#line 4305 "configure" +#line 4374 "configure" #include "confdefs.h" #include <$cf_cv_ncurses_header> int main() { initscr(); mousemask(0,0); tgoto((char *)0, 0, 0); ; return 0; } EOF -if { (eval echo configure:4312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -4332,7 +4401,7 @@ cf_cv_lib_termcap=none # HP-UX 9.x terminfo has setupterm, but no tigetstr. if test "$termlib" = none; then echo $ac_n "checking for tigetstr in -ltermlib""... $ac_c" 1>&6 -echo "configure:4336: checking for tigetstr in -ltermlib" >&5 +echo "configure:4405: 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 @@ -4340,7 +4409,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermlib $LIBS" cat > conftest.$ac_ext <<EOF -#line 4344 "configure" +#line 4413 "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 @@ -4351,7 +4420,7 @@ int main() { tigetstr() ; return 0; } EOF -if { (eval echo configure:4355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4374,7 +4443,7 @@ fi fi if test "$cf_cv_lib_termcap" = none; then echo $ac_n "checking for tgoto in -ltermlib""... $ac_c" 1>&6 -echo "configure:4378: checking for tgoto in -ltermlib" >&5 +echo "configure:4447: 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 @@ -4382,7 +4451,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermlib $LIBS" cat > conftest.$ac_ext <<EOF -#line 4386 "configure" +#line 4455 "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 @@ -4393,7 +4462,7 @@ int main() { tgoto() ; return 0; } EOF -if { (eval echo configure:4397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4417,7 +4486,7 @@ fi if test "$cf_cv_lib_termcap" = none; then # allow curses library for broken AIX system. echo $ac_n "checking for initscr in -lcurses""... $ac_c" 1>&6 -echo "configure:4421: checking for initscr in -lcurses" >&5 +echo "configure:4490: 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 @@ -4425,7 +4494,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcurses $LIBS" cat > conftest.$ac_ext <<EOF -#line 4429 "configure" +#line 4498 "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 @@ -4436,7 +4505,7 @@ int main() { initscr() ; return 0; } EOF -if { (eval echo configure:4440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4457,7 +4526,7 @@ else fi echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6 -echo "configure:4461: checking for tgoto in -ltermcap" >&5 +echo "configure:4530: 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 @@ -4465,7 +4534,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext <<EOF -#line 4469 "configure" +#line 4538 "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 @@ -4476,7 +4545,7 @@ int main() { tgoto() ; return 0; } EOF -if { (eval echo configure:4480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4499,7 +4568,7 @@ fi fi if test "$cf_cv_lib_termcap" = none; then echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6 -echo "configure:4503: checking for tgoto in -ltermcap" >&5 +echo "configure:4572: 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 @@ -4507,7 +4576,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext <<EOF -#line 4511 "configure" +#line 4580 "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 @@ -4518,7 +4587,7 @@ int main() { tgoto() ; return 0; } EOF -if { (eval echo configure:4522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4541,7 +4610,7 @@ fi fi if test "$cf_cv_lib_termcap" = none; then echo $ac_n "checking for tgoto in -lncurses""... $ac_c" 1>&6 -echo "configure:4545: checking for tgoto in -lncurses" >&5 +echo "configure:4614: 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 @@ -4549,7 +4618,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <<EOF -#line 4553 "configure" +#line 4622 "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 @@ -4560,7 +4629,7 @@ int main() { tgoto() ; return 0; } EOF -if { (eval echo configure:4564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4590,20 +4659,20 @@ fi echo $ac_n "checking for slang header file""... $ac_c" 1>&6 -echo "configure:4594: checking for slang header file" >&5 +echo "configure:4663: 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 4600 "configure" +#line 4669 "configure" #include "confdefs.h" #include <slang.h> int main() { printf("%s\n", SLANG_VERSION) ; return 0; } EOF -if { (eval echo configure:4607: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4676: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_slang_header=predefined else @@ -4662,9 +4731,6 @@ do case $cf_add_incdir in /usr/include) # (vi ;; - /usr/local/include) # (vi - test -z "$GCC" && CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" - ;; *) # (vi CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" ;; @@ -4680,12 +4746,12 @@ esac echo $ac_n "checking for acos""... $ac_c" 1>&6 -echo "configure:4684: checking for acos" >&5 +echo "configure:4750: 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 4689 "configure" +#line 4755 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char acos(); below. */ @@ -4708,7 +4774,7 @@ acos(); ; return 0; } EOF -if { (eval echo configure:4712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_acos=yes" else @@ -4727,7 +4793,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for acos in -lm""... $ac_c" 1>&6 -echo "configure:4731: checking for acos in -lm" >&5 +echo "configure:4797: 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 @@ -4735,7 +4801,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS $LIBS" cat > conftest.$ac_ext <<EOF -#line 4739 "configure" +#line 4805 "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 @@ -4746,7 +4812,7 @@ int main() { acos() ; return 0; } EOF -if { (eval echo configure:4750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4786,12 +4852,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:4790: checking for SLtt_get_screen_size" >&5 +echo "configure:4856: 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 4795 "configure" +#line 4861 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char SLtt_get_screen_size(); below. */ @@ -4814,7 +4880,7 @@ SLtt_get_screen_size(); ; return 0; } EOF -if { (eval echo configure:4818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_SLtt_get_screen_size=yes" else @@ -4834,17 +4900,17 @@ else cf_save_LIBS="$LIBS" echo $ac_n "checking for SLtt_get_screen_size in -lslang""... $ac_c" 1>&6 -echo "configure:4838: checking for SLtt_get_screen_size in -lslang" >&5 +echo "configure:4904: checking for SLtt_get_screen_size in -lslang" >&5 LIBS="-lslang $LIBS" cat > conftest.$ac_ext <<EOF -#line 4841 "configure" +#line 4907 "configure" #include "confdefs.h" #include <slang.h> int main() { SLtt_get_screen_size() ; return 0; } EOF -if { (eval echo configure:4848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cf_cv_have_lib_slang=yes @@ -4871,17 +4937,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:4875: checking for -lslang in $cf_libdir" >&5 +echo "configure:4941: checking for -lslang in $cf_libdir" >&5 LIBS="-L$cf_libdir -lslang $cf_save_LIBS" cat > conftest.$ac_ext <<EOF -#line 4878 "configure" +#line 4944 "configure" #include "confdefs.h" #include <slang.h> int main() { SLtt_get_screen_size() ; return 0; } EOF -if { (eval echo configure:4885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cf_cv_have_lib_slang=yes @@ -4910,7 +4976,7 @@ fi esac echo $ac_n "checking for location of config-file""... $ac_c" 1>&6 -echo "configure:4914: checking for location of config-file" >&5 +echo "configure:4980: checking for location of config-file" >&5 # Check whether --with-cfg-file or --without-cfg-file was given. if test "${with_cfg_file+set}" = set; then withval="$with_cfg_file" @@ -4946,12 +5012,12 @@ echo "$ac_t""$LYNX_CFG_FILE" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:4950: checking for ANSI C header files" >&5 +echo "configure:5016: 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 4955 "configure" +#line 5021 "configure" #include "confdefs.h" #include <stdlib.h> #include <stdarg.h> @@ -4959,7 +5025,7 @@ else #include <float.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4976,7 +5042,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 4980 "configure" +#line 5046 "configure" #include "confdefs.h" #include <string.h> EOF @@ -4994,7 +5060,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 4998 "configure" +#line 5064 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -5015,7 +5081,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <<EOF -#line 5019 "configure" +#line 5085 "configure" #include "confdefs.h" #include <ctype.h> #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -5026,7 +5092,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:5030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -5050,12 +5116,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:5054: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:5120: 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 5059 "configure" +#line 5125 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/time.h> @@ -5064,7 +5130,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:5068: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -5089,12 +5155,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:5093: checking for $ac_hdr that defines DIR" >&5 +echo "configure:5159: 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 5098 "configure" +#line 5164 "configure" #include "confdefs.h" #include <sys/types.h> #include <$ac_hdr> @@ -5102,7 +5168,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:5106: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -5127,7 +5193,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:5131: checking for opendir in -ldir" >&5 +echo "configure:5197: 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 @@ -5135,7 +5201,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <<EOF -#line 5139 "configure" +#line 5205 "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 @@ -5146,7 +5212,7 @@ int main() { opendir() ; return 0; } EOF -if { (eval echo configure:5150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5168,7 +5234,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:5172: checking for opendir in -lx" >&5 +echo "configure:5238: 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 @@ -5176,7 +5242,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <<EOF -#line 5180 "configure" +#line 5246 "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 @@ -5187,7 +5253,7 @@ int main() { opendir() ; return 0; } EOF -if { (eval echo configure:5191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5225,17 +5291,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:5229: checking for $ac_hdr" >&5 +echo "configure:5295: 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 5234 "configure" +#line 5300 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5239: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -5263,13 +5329,13 @@ done echo $ac_n "checking termio.h and termios.h""... $ac_c" 1>&6 -echo "configure:5267: checking termio.h and termios.h" >&5 +echo "configure:5333: 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 5273 "configure" +#line 5339 "configure" #include "confdefs.h" #if HAVE_TERMIO_H @@ -5282,7 +5348,7 @@ int main() { putchar (0x0a) ; return 0; } EOF -if { (eval echo configure:5286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_termio_and_termios=yes else @@ -5305,17 +5371,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:5309: checking for $ac_hdr" >&5 +echo "configure:5375: 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 5314 "configure" +#line 5380 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5319: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5385: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -5352,17 +5418,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:5356: checking for $ac_hdr" >&5 +echo "configure:5422: 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 5361 "configure" +#line 5427 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5366: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -5392,17 +5458,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:5396: checking for $ac_hdr" >&5 +echo "configure:5462: 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 5401 "configure" +#line 5467 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5406: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -5443,32 +5509,34 @@ fi echo $ac_n "checking for union wait""... $ac_c" 1>&6 -echo "configure:5447: checking for union wait" >&5 +echo "configure:5513: 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 5453 "configure" +#line 5519 "configure" #include "confdefs.h" $cf_wait_headers int main() { -union wait x; +int x; int y = WEXITSTATUS(x); int z = WTERMSIG(x); ; return 0; } EOF -if { (eval echo configure:5463: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_type_unionwait=no + echo compiles ok w/o union wait 1>&5 + else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 5472 "configure" +#line 5540 "configure" #include "confdefs.h" $cf_wait_headers int main() { @@ -5482,9 +5550,11 @@ union wait x; ; return 0; } EOF -if { (eval echo configure:5486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5554: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_type_unionwait=yes + echo compiles ok with union wait and possibly macros too 1>&5 + else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 @@ -5507,20 +5577,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:5511: checking if union wait can be used as wait-arg" >&5 +echo "configure:5581: 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 5517 "configure" +#line 5587 "configure" #include "confdefs.h" $cf_wait_headers int main() { union wait x; wait(&x) ; return 0; } EOF -if { (eval echo configure:5524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5594: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_arg_union_wait=yes else @@ -5540,20 +5610,20 @@ EOF echo $ac_n "checking if union wait can be used as waitpid-arg""... $ac_c" 1>&6 -echo "configure:5544: checking if union wait can be used as waitpid-arg" >&5 +echo "configure:5614: 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 5550 "configure" +#line 5620 "configure" #include "confdefs.h" $cf_wait_headers int main() { union wait x; waitpid(0, &x, 0) ; return 0; } EOF -if { (eval echo configure:5557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_arg_union_waitpid=yes else @@ -5577,12 +5647,12 @@ fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:5581: checking for pid_t" >&5 +echo "configure:5651: 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 5586 "configure" +#line 5656 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -5611,17 +5681,17 @@ fi ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 -echo "configure:5615: checking for vfork.h" >&5 +echo "configure:5685: 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 5620 "configure" +#line 5690 "configure" #include "confdefs.h" #include <vfork.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -5646,18 +5716,18 @@ else fi echo $ac_n "checking for working vfork""... $ac_c" 1>&6 -echo "configure:5650: checking for working vfork" >&5 +echo "configure:5720: 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:5656: checking for vfork" >&5 +echo "configure:5726: 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 5661 "configure" +#line 5731 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char vfork(); below. */ @@ -5680,7 +5750,7 @@ vfork(); ; return 0; } EOF -if { (eval echo configure:5684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vfork=yes" else @@ -5701,7 +5771,7 @@ fi else cat > conftest.$ac_ext <<EOF -#line 5705 "configure" +#line 5775 "configure" #include "confdefs.h" /* Thanks to Paul Eggert for this test. */ #include <stdio.h> @@ -5796,7 +5866,7 @@ main() { } } EOF -if { (eval echo configure:5800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_vfork_works=yes else @@ -5820,20 +5890,20 @@ fi echo $ac_n "checking for broken/missing definition of remove""... $ac_c" 1>&6 -echo "configure:5824: checking for broken/missing definition of remove" >&5 +echo "configure:5894: 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 5830 "configure" +#line 5900 "configure" #include "confdefs.h" #include <stdio.h> int main() { remove("dummy") ; return 0; } EOF -if { (eval echo configure:5837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cf_cv_baddef_remove=no else @@ -5841,7 +5911,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 5845 "configure" +#line 5915 "configure" #include "confdefs.h" #include <stdio.h> int __unlink(name) { return unlink(name); } @@ -5849,7 +5919,7 @@ int main() { remove("dummy") ; return 0; } EOF -if { (eval echo configure:5853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cf_cv_baddef_remove=yes else @@ -5880,12 +5950,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5884: checking for $ac_func" >&5 +echo "configure:5954: 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 5889 "configure" +#line 5959 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5908,7 +5978,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:5912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5936,13 +6006,13 @@ done echo $ac_n "checking if TRUE/FALSE are defined""... $ac_c" 1>&6 -echo "configure:5940: checking if TRUE/FALSE are defined" >&5 +echo "configure:6010: 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 5946 "configure" +#line 6016 "configure" #include "confdefs.h" #include <$cf_cv_ncurses_header> @@ -5951,7 +6021,7 @@ int main() { int x = TRUE, y = FALSE ; return 0; } EOF -if { (eval echo configure:5955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_bool_defs=yes else @@ -5977,13 +6047,13 @@ fi echo $ac_n "checking for errno external decl""... $ac_c" 1>&6 -echo "configure:5981: checking for errno external decl" >&5 +echo "configure:6051: checking for errno external decl" >&5 if eval "test \"`echo '$''{'cf_cv_extern_errno'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5987 "configure" +#line 6057 "configure" #include "confdefs.h" #include <errno.h> @@ -5991,7 +6061,7 @@ int main() { int x = errno ; return 0; } EOF -if { (eval echo configure:5995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6065: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_extern_errno=yes else @@ -6011,20 +6081,20 @@ EOF echo $ac_n "checking for setlocale()""... $ac_c" 1>&6 -echo "configure:6015: checking for setlocale()" >&5 +echo "configure:6085: 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 6021 "configure" +#line 6091 "configure" #include "confdefs.h" #include <locale.h> int main() { setlocale(LC_ALL, "") ; return 0; } EOF -if { (eval echo configure:6028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cf_cv_locale=yes else @@ -6045,13 +6115,13 @@ EOF echo $ac_n "checking if NGROUPS is defined""... $ac_c" 1>&6 -echo "configure:6049: checking if NGROUPS is defined" >&5 +echo "configure:6119: 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 6055 "configure" +#line 6125 "configure" #include "confdefs.h" #if HAVE_SYS_PARAM_H @@ -6065,7 +6135,7 @@ int main() { int x = NGROUPS ; return 0; } EOF -if { (eval echo configure:6069: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_ngroups=yes else @@ -6073,7 +6143,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 6077 "configure" +#line 6147 "configure" #include "confdefs.h" #if HAVE_SYS_PARAM_H @@ -6087,7 +6157,7 @@ int main() { int x = NGROUPS_MAX ; return 0; } EOF -if { (eval echo configure:6091: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6161: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_ngroups=NGROUPS_MAX else @@ -6118,13 +6188,13 @@ fi echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:6122: checking declaration of sys_errlist" >&5 +echo "configure:6192: checking declaration of sys_errlist" >&5 if eval "test \"`echo '$''{'cf_cv_dcl_sys_errlist'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6128 "configure" +#line 6198 "configure" #include "confdefs.h" #include <stdio.h> @@ -6134,7 +6204,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:6138: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_dcl_sys_errlist=yes else @@ -6155,20 +6225,20 @@ if test $cf_cv_dcl_sys_errlist = no ; then EOF echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6 -echo "configure:6159: checking existence of sys_errlist" >&5 +echo "configure:6229: checking existence of sys_errlist" >&5 if eval "test \"`echo '$''{'cf_cv_have_sys_errlist'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6165 "configure" +#line 6235 "configure" #include "confdefs.h" #include <errno.h> int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:6172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cf_cv_have_sys_errlist=yes else @@ -6185,13 +6255,13 @@ fi echo $ac_n "checking if struct utmp is declared""... $ac_c" 1>&6 -echo "configure:6189: checking if struct utmp is declared" >&5 +echo "configure:6259: 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 6195 "configure" +#line 6265 "configure" #include "confdefs.h" #include <sys/types.h> @@ -6200,7 +6270,7 @@ int main() { struct utmp x; char *y = &x.ut_host[0] ; return 0; } EOF -if { (eval echo configure:6204: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_have_utmp=yes else @@ -6208,14 +6278,14 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 6212 "configure" +#line 6282 "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:6219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6289: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_have_utmp=utmpx else @@ -6246,13 +6316,13 @@ EOF if test $cf_cv_screen != slang ; then echo $ac_n "checking if curses supports alternate-character set""... $ac_c" 1>&6 -echo "configure:6250: checking if curses supports alternate-character set" >&5 +echo "configure:6320: 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 cat > conftest.$ac_ext <<EOF -#line 6256 "configure" +#line 6326 "configure" #include "confdefs.h" #include <$cf_cv_ncurses_header> @@ -6261,7 +6331,7 @@ int main() { chtype x = acs_map['l']; acs_map['m'] = 0 ; return 0; } EOF -if { (eval echo configure:6265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cf_cv_alt_char_set=yes else @@ -6281,13 +6351,13 @@ EOF echo $ac_n "checking if curses supports fancy attributes""... $ac_c" 1>&6 -echo "configure:6285: checking if curses supports fancy attributes" >&5 +echo "configure:6355: 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 6291 "configure" +#line 6361 "configure" #include "confdefs.h" #include <$cf_cv_ncurses_header> @@ -6300,7 +6370,7 @@ attrset(A_UNDERLINE|A_BOLD|A_REVERSE); ; return 0; } EOF -if { (eval echo configure:6304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cf_cv_fancy_curses=yes else @@ -6320,29 +6390,75 @@ EOF echo $ac_n "checking for ncurses version""... $ac_c" 1>&6 -echo "configure:6324: checking for ncurses version" >&5 +echo "configure:6394: 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 cf_cv_ncurses_version=no + cf_tempfile=out$$ + if test "$cross_compiling" = yes; then + + + # This will not work if the preprocessor splits the line after the + # Autoconf token. The 'unproto' program does that. cat > conftest.$ac_ext <<EOF #include <$cf_cv_ncurses_header> +#undef Autoconf #ifdef NCURSES_VERSION Autoconf NCURSES_VERSION #else #ifdef __NCURSES_H Autoconf "old" #endif +; #endif EOF cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out" - { (eval echo configure:6341: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; } + { (eval echo configure:6419: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; } if test -f conftest.out ; then - cf_out=`cat conftest.out | sed -e 's@^[^\"]*\"@@' -e 's@\".*@@'` + cf_out=`cat conftest.out | sed -e 's@^Autoconf @@' -e 's@^[^"]*"@@' -e 's@".*@@'` test -n "$cf_out" && cf_cv_ncurses_version="$cf_out" + rm -f conftest.out fi +else + cat > conftest.$ac_ext <<EOF +#line 6428 "configure" +#include "confdefs.h" + +#include <$cf_cv_ncurses_header> +int main() +{ + FILE *fp = fopen("$cf_tempfile", "w"); +#ifdef NCURSES_VERSION +# ifdef NCURSES_VERSION_PATCH + fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH); +# else + fprintf(fp, "%s\n", NCURSES_VERSION); +# endif +#else +# ifdef __NCURSES_H + fprintf(fp, "old\n"); +# else + make an error +# endif +#endif + exit(0); +} +EOF +if { (eval echo configure:6451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + + cf_cv_ncurses_version=`cat $cf_tempfile` + rm -f $cf_tempfile +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -fr conftest* +fi + fi echo "$ac_t""$cf_cv_ncurses_version" 1>&6 @@ -6351,13 +6467,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:6355: checking for obsolete/broken version of ncurses" >&5 +echo "configure:6471: 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 6361 "configure" +#line 6477 "configure" #include "confdefs.h" #include <$cf_cv_ncurses_header> @@ -6371,7 +6487,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:6375: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_ncurses_broken=no else @@ -6396,13 +6512,13 @@ fi echo $ac_n "checking if curses supports color attributes""... $ac_c" 1>&6 -echo "configure:6400: checking if curses supports color attributes" >&5 +echo "configure:6516: 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 6406 "configure" +#line 6522 "configure" #include "confdefs.h" #include <$cf_cv_ncurses_header> @@ -6417,7 +6533,7 @@ chtype x = COLOR_BLUE; ; return 0; } EOF -if { (eval echo configure:6421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cf_cv_color_curses=yes else @@ -6444,7 +6560,7 @@ fi echo $ac_n "checking declaration of size-change""... $ac_c" 1>&6 -echo "configure:6448: checking declaration of size-change" >&5 +echo "configure:6564: 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 @@ -6458,7 +6574,7 @@ do CFLAGS="$cf_save_CFLAGS" test -n "$cf_opts" && CFLAGS="$CFLAGS -D$cf_opts" cat > conftest.$ac_ext <<EOF -#line 6462 "configure" +#line 6578 "configure" #include "confdefs.h" #include <sys/types.h> #if HAVE_TERMIOS_H @@ -6493,7 +6609,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:6497: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_sizechange=yes else @@ -6525,20 +6641,20 @@ EOF echo $ac_n "checking if ttytype is declared in curses library""... $ac_c" 1>&6 -echo "configure:6529: checking if ttytype is declared in curses library" >&5 +echo "configure:6645: 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 6535 "configure" +#line 6651 "configure" #include "confdefs.h" #include <$cf_cv_ncurses_header> int main() { char *x = &ttytype[1]; *x = 1 ; return 0; } EOF -if { (eval echo configure:6542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cf_cv_have_ttytype=yes else @@ -6563,12 +6679,12 @@ EOF do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6567: checking for $ac_func" >&5 +echo "configure:6683: 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 6572 "configure" +#line 6688 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -6591,7 +6707,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:6595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6623,36 +6739,17 @@ fi -echo $ac_n "checking if character-translation code should be used""... $ac_c" 1>&6 -echo "configure:6628: checking if character-translation code should be used" >&5 -# Check whether --enable-char-trans or --disable-char-trans was given. -if test "${enable_char_trans+set}" = set; then - enableval="$enable_char_trans" - test "$enableval" != no && enableval=yes - if test "$enableval" != "yes" ; then - use_char_trans=$withval - else - use_char_trans=yes - fi -else - enableval=yes - use_char_trans=yes - -fi -echo "$ac_t""$use_char_trans" 1>&6 - -if test ".$use_char_trans" != ".no" ; then +### FIXME: this option is obsolete cat >> confdefs.h <<\EOF #define EXP_CHARTRANS 1 EOF EXTRA_OBJS="$EXTRA_OBJS \$(CHARTRANS_OBJS)" EXTRA_DEPS="$EXTRA_DEPS do_chartrans_stuff" -fi echo $ac_n "checking if color-style code should be used""... $ac_c" 1>&6 -echo "configure:6656: checking if color-style code should be used" >&5 +echo "configure:6753: 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 enableval="$enable_color_style" @@ -6698,7 +6795,7 @@ EOF echo "$ac_t""curses-style" 1>&6 echo $ac_n "checking for location of style-sheet file""... $ac_c" 1>&6 -echo "configure:6702: checking for location of style-sheet file" >&5 +echo "configure:6799: checking for location of style-sheet file" >&5 # Check whether --with-lss-file or --without-lss-file was given. if test "${with_lss_file+set}" = set; then withval="$with_lss_file" @@ -6735,7 +6832,7 @@ EOF esac echo $ac_n "checking if you want to use zlib for decompression of some gzip files""... $ac_c" 1>&6 -echo "configure:6739: checking if you want to use zlib for decompression of some gzip files" >&5 +echo "configure:6836: 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 withval="$with_zlib" @@ -6751,12 +6848,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:6755: checking for gzopen" >&5 +echo "configure:6852: 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 6760 "configure" +#line 6857 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char gzopen(); below. */ @@ -6779,7 +6876,7 @@ gzopen(); ; return 0; } EOF -if { (eval echo configure:6783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_gzopen=yes" else @@ -6799,17 +6896,17 @@ else cf_save_LIBS="$LIBS" echo $ac_n "checking for gzopen in -lz""... $ac_c" 1>&6 -echo "configure:6803: checking for gzopen in -lz" >&5 +echo "configure:6900: checking for gzopen in -lz" >&5 LIBS="-lz $LIBS" cat > conftest.$ac_ext <<EOF -#line 6806 "configure" +#line 6903 "configure" #include "confdefs.h" #include <zlib.h> int main() { gzopen("name","mode") ; return 0; } EOF -if { (eval echo configure:6813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cf_cv_have_lib_z=yes @@ -6836,17 +6933,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:6840: checking for -lz in $cf_libdir" >&5 +echo "configure:6937: checking for -lz in $cf_libdir" >&5 LIBS="-L$cf_libdir -lz $cf_save_LIBS" cat > conftest.$ac_ext <<EOF -#line 6843 "configure" +#line 6940 "configure" #include "confdefs.h" #include <zlib.h> int main() { gzopen("name","mode") ; return 0; } EOF -if { (eval echo configure:6850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cf_cv_have_lib_z=yes @@ -6882,7 +6979,7 @@ fi # All DirEd functions that were enabled on compilation can be disabled # or modified at run time via DIRED_MENU symbols in lynx.cfg. echo $ac_n "checking if directory-editor code should be used""... $ac_c" 1>&6 -echo "configure:6886: checking if directory-editor code should be used" >&5 +echo "configure:6983: 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 enableval="$enable_dired" @@ -6907,7 +7004,7 @@ EOF echo $ac_n "checking if you wish to allow extracting from archives via DirEd""... $ac_c" 1>&6 -echo "configure:6911: checking if you wish to allow extracting from archives via DirEd" >&5 +echo "configure:7008: 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 enableval="$enable_dired_archive" @@ -6925,7 +7022,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:6929: checking if you wish to allow users to redefine DirEd keys" >&5 +echo "configure:7026: 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 enableval="$enable_dired_override" @@ -6950,7 +7047,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:6954: checking if you wish to allow permissions commands via DirEd" >&5 +echo "configure:7051: 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 enableval="$enable_dired_permit" @@ -6975,7 +7072,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:6979: checking if you wish to allow executable-permission commands via DirEd" >&5 +echo "configure:7076: 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 enableval="$enable_dired_xpermit" @@ -6993,7 +7090,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:6997: checking if you wish to allow \"tar\" commands from DirEd" >&5 +echo "configure:7094: 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 enableval="$enable_dired_tar" @@ -7018,7 +7115,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:7022: checking if you wish to allow \"uudecode\" commands from DirEd" >&5 +echo "configure:7119: 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 enableval="$enable_dired_uudecode" @@ -7043,7 +7140,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:7047: checking if you wish to allow \"zip\" and \"unzip\" commands from DirEd" >&5 +echo "configure:7144: 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 enableval="$enable_dired_zip" @@ -7068,7 +7165,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:7072: checking if you wish to allow \"gzip\" and \"gunzip\" commands from DirEd" >&5 +echo "configure:7169: 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 enableval="$enable_dired_gzip" @@ -7094,7 +7191,7 @@ fi fi echo $ac_n "checking if you want long-directory listings""... $ac_c" 1>&6 -echo "configure:7098: checking if you want long-directory listings" >&5 +echo "configure:7195: 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 enableval="$enable_long_list" @@ -7119,7 +7216,7 @@ fi echo "$ac_t""$enableval" 1>&6 echo $ac_n "checking if parent-directory references are permitted""... $ac_c" 1>&6 -echo "configure:7123: checking if parent-directory references are permitted" >&5 +echo "configure:7220: 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 enableval="$enable_parent_dir_refs" diff --git a/configure.in b/configure.in index 906d197b..e8bba261 100644 --- a/configure.in +++ b/configure.in @@ -348,18 +348,19 @@ Miscellaneous Options:) AC_SUBST(EXTRA_OBJS) AC_SUBST(EXTRA_DEPS) -AC_MSG_CHECKING(if character-translation code should be used) -CF_ARG_DISABLE(char-trans, -[ --disable-char-trans enable optional character-translations], - [use_char_trans=$withval], - [use_char_trans=yes]) -AC_MSG_RESULT($use_char_trans) - -if test ".$use_char_trans" != ".no" ; then +dnl AC_MSG_CHECKING(if character-translation code should be used) +dnl CF_ARG_DISABLE(char-trans, +dnl [ --disable-char-trans enable optional character-translations], +dnl [use_char_trans=$enableval], +dnl [use_char_trans=yes]) +dnl AC_MSG_RESULT($use_char_trans) + +dnl if test ".$use_char_trans" != ".no" ; then +### FIXME: this option is obsolete AC_DEFINE(EXP_CHARTRANS) EXTRA_OBJS="$EXTRA_OBJS \$(CHARTRANS_OBJS)" EXTRA_DEPS="$EXTRA_DEPS do_chartrans_stuff" -fi +dnl fi AC_MSG_CHECKING(if color-style code should be used) CF_ARG_ENABLE(color-style, diff --git a/docs/CHANGES.chartrans b/docs/CHANGES.chartrans deleted file mode 100644 index d7bd8d7d..00000000 --- a/docs/CHANGES.chartrans +++ /dev/null @@ -1,204 +0,0 @@ -$Id: CHANGES.chartrans,v 1.1 1997/09/07 17:04:10 tom Exp $ -$ProjectHeader: Lynx 2.7.1ac-0.89 Mon, 27 Oct 1997 12:05:04 -0700 kweide $ - -1997-09-06 - Lynx 2.7.1ac-0.61 - Several new translation tables have been added or modified recently, - associated code changes. -1997-07-25 - Lynx 2.7.1ac-0.42 -* Map charsets of the form "ibmNNN<...>" to "cpNNN<...>" in UCdomap.c - if not already recognized. Also recognize "windows-1252". -1997-07-17 - Lynx 2.7.1ac-0.35 -* Since 1997-06-29 the chartrans code (with minor changes; most relating - to functions in LYStrings.c) is part of Foteos Macrides's "fotemods" - to Lynx 2.7.1. This code ("developmet code") has been compared against - fotemods. Some functions renamed to FM's names. -* Now also include FM's recognition of &xnnnn; character references. - In general more detailed change info can be found in CHANGES.new. -1997-05-15 - Lynx 2.7.1wb+ct-0.26 -* Mods in LYMainLoop.c to not force a cache refresh on a proxy any more - when INLINE_TOGGLE, IMAGE_TOGGLE, RAW_TOGGLE are used. On the other - hand, do force a proxy cache refresh after one of the variables relevant - for content negotiation `language' or `pref_charset' has been changed - from the Options screen, if the current document is from a http, https, or - lynxcgi resource. -* Set HTTP_ACCEPT_CHARSET environment variable for the child process in - LYCgi.c if pref_charset is not NULL. -* Write a META tag with the current display character sets to - the files generated for Bookmarks, List, Info, History, and Visited Links - pages, so title strings contained in those files will (hopefully) not - get erroneously translated again. Use new function add_META_charset_to_fd() - in LUCharUtils for this purpose. -* makeuctb now sets RawUni to UCT_ENC_8BIT if not otherwise set - and if there are char values above 127. -* Change in HTuncache_current_document() to prevent caching of - UCStages info which should be discarded. Still allow caching for this - in the node_anchor for source display, so that a META tag in the parsed - HTML can influence the display after using the SOURCE '\' key. - KW -* Changed display_title() in GridText.c to not rely on sprintf() to get - the number of blanks right. There were problems with C1 characters. -* Added new lynx.cfg symbols ASSUME_CHARSET, - ASSUME_LOCAL_CHARSET, and ASSUME_UNREC_CHARSET. They are only - recognized if compiled with -DEXP_CHARTRANS. They correspond to the - command line options -assume_charset, -assume_local_charset, and - -assume_unrec_charset. - The default for ASSUME_CHARSET is iso-8859-1 (corresponding to display - character set "ISO Latin 1"). If no ASSUME_LOCAL_CHARSET is set, - the explicit or default value for ASSUME_CHARSET will also be used for - local files. ASSUME_UNREC_CHARSET has no default. See added text - in lynx.cfg. -* Changes in LYCharSets.c to HTMLSetCharacterHandling() and - HTMLSetUseDefaultRawMode() to support (hopefully) more consistent - and user-friendly handling of raw mode and its default. - -1997-05-03 - Lynx 2.7.1wb+ct-0.20 - Now always check for LYlowest_eightbit[current_char_set] - near the top of HText_appendCharacter(), to prevent writing C1 control - chars to the terminal if they are not valid as displayabable characters - according to the selected "display character set" Option. - All this should be handled earlier in processing, and this check may - disappear again for testing, but somebody asked for it... - Slightly updated some doc files. - -1997-04-12 - Lynx 2.7.1wb+ct-0.11 - Added TRACE output to UCAuto.c - Changes in LYMail.c and LYPrint.c to send Content-Transfer-Encoding - header and/or charset parameter in mail - -1997-04-08 - Lynx 2.7.1wb+ct-0.3 - New translation tables def7_uni and koi8r_uni. Use them. - Table def7 is based on RFC1345 and mnemonic,ds from ftp://dkuug.dk/i18n/ - and previous Lynx replacements in LYCharSets.c and some IPA FAQ - convention and stuff for Ethiopic and KOI8-R. It maps many of - the accented Latin characters to their unaccented counterparts. - Make def7_uni default table and associate it with us-ascii and - "7 bit approximations". - Lots of new entities from Hynek Med finally integrated. - Those include ascii characters and characters common between - Latin1 and Latin2. Let's see what happens. - Added mappings for some "smart quote" characters to several - translation tables. - Make makeuctb slightly more flexible (accept Unicode range for - mapping to single code point). - Also changes for Đ, ETH;, and ð in LYCharSets.c. - These are basically just data changes; code still hasn't progressed - much, so for example translation of ALT strings (from anything but - iso-8859-1) still doesn't work. - -1997-03-20 - Lynx 2.7ac-0.20 - merged with FM's 27bugfixes up to 1997-03-20 - -1997-03-20 - Lynx 2.7ac-0.9 - merged with FM's 27bugfixes up to 1997-03-17; adapted part of - FM's change re trademark character to the present chartrans code, - as follows: -* Modified SGML.c to handle the numeric character reference ™ as - the named entity ™ also in the non-chartrans case. The - trademark character (given by ™ or ™) will be shown as - "(TM)" as the ASCII substitution unless the current display character - has a code point for the trademark character or unless overridden by a - chartrans translation table. The code of 1997-02-25 prevented showing - the trademark sign as "(R)" but did not work in all non-chartrans - cases. - KW - -1997-03-12 - Lynx 2.7ac-0.6 - some doc changes, make compilation in src/chrtrans less verbose, - no more *.h_old backup copies. - -1997-03-12 - Lynx 2.7ac-0.5 - patch from Tom Dickey for refinement of SVr4 (ncurses) color support - -1997-03-11 - Lynx 2.7ac-0.4 - New patches from Wayne for Win32/DOS applied. - -1997-03-11 - Lynx 2.7ac-0.3 - today's 27bugfixes also merged in. - -1997-03-11 - Lynx 2.7ac-0.2 -* Merged code from Thomas E. Dickey and Jim Spath for auto configuration - and simple (SLang-like) curses color, which was based on 2.7wb+ct-0.4, - with 27bugfixes up to 1997-03-10. - -1997-03-03 - Lynx 2.7wb+ct-0.4 -* (chartrans) Minor cleanups (makeuctb.c, chrtrans/Makefile, HTPlain.c) - to enable successful compilation on Win32. - Also changes and new files from Wayne to fix FTP and enable Mail for Win32, - and to compile chartrans code. - -1997-03-03 - Lynx 2.7ct-0.8 - Lynx 2.7 chartrans + 27bugfixes up to 1997-03-02 - -1997-02-28 - Lynx 2.7ct-0.7 - Lynx 2.7 chartrans + 27bugfixes up to 1997-02-28 - small correction in SGML.c (set_chartrans_handling) - -1997-02-27 - Lynx 2.7ct-0.6 - Lynx 2.7 chartrans + 27bugfixes up to 1997-02-26 - -1997-02-26 - Lynx 2.7ct-0.5 - minor tweaks for packaging - -1997-02-26 - Lynx 2.7ct-0.4 - Ok, now really remove local configuration changes (for distribution)... - -1997-02-25 - Lynx 2.7ct-0.3 - merged with Fote's 27bugfixes up to 1997-02-25 - -1997-02-25 - Lynx 2.7ct-0.2 - Removed some local changes from userdefs.h and Makefile. - Mapping of U+fffd (replacement) to 0x00 removed from the used - iso0x table files. - -1997-02-25 - Lynx 2.7ct-0.1 - Update to work with official Lynx 2.7 distribution. - Add showing of effective charset in LYShowInfo.c even if not explicitly - given. - No showing of (TM) as (R) any more - mostly changes in LYCharUtils.c - (but these are independent of the chartrans stuff, translation routines - in LYCharUtils.c still not chartrans-ified). - Prefer HTTP-EQUIV over NAME in META tags. - Start managing changes with PRCS - the Project Revision Control System. - -1996-12-01 - lynx-patch-2.6ct-0.2.pch - Update to work with 11-30-96 Composite Patch. - Two new translation tables: cp852, windows-1250. - Compiling without -DEXP_CHARTRANS now also works... but one still has to - manually remove (comment out) first line of src/Makefile for that. - Minor changes to README files, this file. - -1996-11-29 - add-to-cp-2.6ct-0.1a.zip - install over Lynx2.6 + 11-28-96 CP. - Full files no diffs. - add-to-offi-2.6ct-0.1a.zip - install over Lynx2.6 to get 11-28-96 CP + - chartrans. Full files, no diffs. - - lynx-patch-2.6ct-0.1a.pch - Update to work with 11-28-96 Composite Patch. - -1996-11-28 - lynx-newfiles-2.6ct-0.1.{zip,tar.gz}, lynx-patch-2.6ct-0.1.pch - First packaged and announced. Works with 11-24-96 Composite Patch - from Hiram Lester. diff --git a/docs/CHANGES b/docs/CHANGES2-7 index bd648e06..559ebd25 100644 --- a/docs/CHANGES +++ b/docs/CHANGES2-7 @@ -1,173 +1,3 @@ ---- Release of Lynx2-7 + BUGFIXES as Lynx v2.7.1 (April 4, 1997) --- -======================================================================= -1997-04-04 -* Fixed typos in LYHistory.c, LYMail.c and LYMain.c which caused - failures of flag setting in the distributed code. - TD -1997-03-31 -* Added a missing check for whether the fragment token is NULL in - LYConvertToURL() of LYUtils.c. Without the check, the for-Unix code - could crash if a local file spec was entered as a startfile or goto - with escaped characters. - KW -* Mod in HTML.c to retain "[INLINE]" as the default ALT string if an - IMG element has an ISMAP attribute but is not in Anchor content such - that it could not in fact function as a server-side image map. - FM -1997-03-28 -* In mainloop(), after the call to HText_pageDisplay() following a change - of the document view, ensure that curdoc.link does not remain set to -1 - if there are any links on the screen. This would otherwise happen if - a document is pushed to the history stack while there are no links, and - later popped (and refreshed) after one or more links have been created. - This change prevents segmentation faults which occurred after creation - of a new file in a previously empty directory via the DIRED menu. The - access to invalid memory only occurred if the screen showing the empty - directory did not have a parent dir reference link (which is always the - case if NO_PARENT_DIR_REFERENCE was specified at compilation time). - KW -1997-03-27 -* Fixed a typo and added comments for the code in LYMainLoop.c which - decides whether to load the URLs for homepage and/or startfile into - the goto buffer at startup. The typo in the distributed code caused - the startfile URL always to be added to the goto buffer, even if - it had POST content such that it could be resent inappropriately - as a GET request via the goto buffer. - FM -* Added a bsdi-slang target to the Makefile. - LE -1997-03-26 -* Modified the HTStream structure and associated code in src/HTFWriter.c - so that we save and use the relevant content of the associated - HTPresentation structure as two HTFormat elements rather than via a - pointer to the HTPresentation structure itself, because the latter - structure might not be valid under some circumstances when - HTFWriter_free() is called. The distributed code might indirectly - result in segmentation faults during downloading on linux and some - other flavors of Unix (though they don't occur for most flavors, or - on VMS). - KW -1997-03-21 -* Mods in LYPrint.c to use ".txt" as the output file extension for - all rendered text/html files regardless of their original extension. - The distributed code was doing this only for ones with an extension - of ".html". The original extension still is retained if the file - is being output as source. - FM -* Added protection against passing a NULL pointer for path_url to - render_item() from dired_options() in LYLocal.c. - GN -1997-03-20 -* Tweaked the protection against URLs directed to port 19 or port 25 so - that it can't be circumvented via lead zeros in the port numbers. - FM -* Changed the compilation default so as not to send From MIME headers to - http or https servers. The default can still be changed via lynx.cfg. - Replaced the -nofrom disabling switch to a -from switch for toggling - the compilation or configuration default. Sending the From header - has become widely regarded as an invasion of privacy risk, particularly - in conjunction with cookie support. - FM -* Corrected a typo in the lynx.cfg comments concerning TRUSTED_LYNXCGI - rules. - KW -1997-03-17 -* Mods of LYNews.c and LYMail.c to prepend a "-- " separator before - appending the LYNX_SIG_FILE signature file to news and email - messages. - FM -* Made the installation mode 755 in the top-level Makefile. The - distributed code used 555, and some install commands were unable - to do the strip. - LWV -1997-03-14 -* Corrected typos and expanded the comments concerning lynxcgi symbols - in userdefs.h and lynx.cfg. - FM -* Modified SGML.c, LYCharSets.c and LYCharUtils.c to handle the numeric - character reference ™ as the named entity ™ and use "(TM)" - as the ASCII substitution if the current character set does not have the - trademark character. The distributed code was substituting ®. - FM -* Include time.h via tcp.h for SVR4 systems. The tcp.h header does include - sys/time.h for Unix systems, but this apparently doesn't get struct tm - and extern char * ctime() declared for SVR4. - FM -1997-03-13 -* Added protection in LYGetFile.c against connections to the port 25 - ESMTP service. - FM -1997-03-11 -* Added protection in LYGetFile.c against denial of service attacks via - the port 19 CHARGEN service. The distributed code left Lynx or proxies - vulnerable to such attacks via direct or redirection URLs. - FM -1997-03-10 -* Fixed error in the handling of numeric character references with values - greater than 255 in SGML.c. The distributed code was breaking after - substitutions instead of falling through to reset the string chunk and - recycle the terminator if not a semi-colon. - FM -1997-03-08 -* Fixed error in the switch positioning of checks for XLOADIMAGE_COMMAND - and wais_proxy in LYReadCFG.c. The distributed code had them reversed - under case 'W' versus case 'X'. - PDS -* Expanded the copyright and licensing statements in the -version - output. - FM -1997-03-04 -* Corrected the offset computation in textsearch() of LYSearch.c so that - WHEREIS searches repeated on a page with no links seek the target - starting at the line immediately following the last displayed. The - distributed code was setting a greater offset. - JS -1997-03-02 -* Don't entify post content for the showinfo display, now that we are - making it an XMP block in that display to handle all of the supported - enctypes. - FM -1997-02-28 -* Changed all references to "image/*" to just "image" in the userdefs.h - and lynx.cfg comments about XLOADIMAGE_COMMAND. The "/*" within the - userdefs.h comments was generating warnings from some compilers. - FM -* Added a snake-slang target to the Makefile, and added -DUNIX to the - LYFLAGS for the snake3 and snake3-slang targets (HP-UX apparently does - not define "unix" itself with the -Ae switch, and thus needs to have - that definition forced via -DUNIX). - HL -1997-02-26 -* Close both descriptors of the pipe() for the NSL_FORK enabled code - in HTTCP.c. The distributed code was closing only one of them on - completed gethostbyname() calls, and neither on 'z'aps. - FM -* Changed the HREF for the "Lynx FAQ" link in the online 'h'elp to - its new URL (http://www.slcc.edu/lynx/faq.html). - FM -1997-02-25 -* More reverse engineering to cope with Netscape's bogus cookie header - parsing. The parser must not require an '=' between the expires - attribute name and value, because Set-Cookie headers are being - transmitted without it (e.g., by http://law.agps.gov.au). So Lynx - now treats that as another special case. - FM -* Cope with invalid use of expires attributes in Version 1 cookies. - An -06 State Management draft recommends that for "backward - compatibility", and has been severely criticized in the HTTP-WG, - but it would be foolish not to assume Netscape will do that. See the - expanded comments in LYSetCookie() of LYCookie.c for more information. - Note that "expires" thus cannot be used as a Version 1 cookie name, but - a provider would be foolish to use that, anyway. Note also that the - possibility of using different header names for Version 1 versus - Version 0 (a.k.a., "Netscape") cookies is being discussed in the - HTTP-WG, which might have been better to do in the first place, but - the -05 draft has been approved as RFC 2109: - http://info.internet.isi.edu/in-notes/rfc/files/rfc2109.txt - so it would be a while before that were done, if ever. - FM -1997-02-22 -* Fixed a memory management glitch which could cause a crash if the - MIME type of a reply to a FORM submission with METHOD=POST caused a - download offer to be invoked. - FM -* Don't simplify ftp URLs by trimming trailing slashes if the URL is - being proxied. The Netscape proxy server for some unknown reason - can return redirection for ftp URLs with the slash appended, and - trimming it can result in a redirection loop. Based on a posted - patch from KW. - FM -* Fixed two typos in the checks for HTPassHighCtrlRaw in LYExpandString() - of LYCharUtils.c. - KW -* Fixed typo in the equality check on line 1553 in HTGopher.c. - AM -1997-02-19 -* Reset the host string after an '@', if present, when trimming default - ":port" fields in the new code aimed at compliance with the Masinter - and Fielding URL drafts, expected to replace RFCs 1738 and 1808. The - distributed code neglected to do that, and was ending up on a ":password" - field, if present, instead of on the ":port" field, causing the username - to be treated as the host name. - FM -* Expand the default port trimming so as to include all of the registered - URL schemes which support a port field in the v2.7 release. - FM -* Correctly uncache the current directory listing when invoking an 'u'pload, - so that it will be updated to include the uploaded file if placed in the - current directory. The released code attempted to do this in a manner - which prevented a pop, so that the directory listing couldn't be restored - on return from the uploader menu. - FM -* Recognize a bookmark file used as the startfile, whether it resides in the - home directory or in a subdirectory off home. The released code failed if - the file was in home, and not in a subdirectory, unless the -book switch - was used instead of a startfile entry or WWW_HOME variable. - FM -======================================================================= ---- Start of v2.7 bug fixes --- ======================================================================= --- Release of Lynx2-6FM as Lynx v2.7 (February 15, 1997) --- ======================================================================= diff --git a/docs/README.chartrans b/docs/README.chartrans index 0c0ebd9c..e4f92c26 100644 --- a/docs/README.chartrans +++ b/docs/README.chartrans @@ -12,15 +12,20 @@ Lynx CHARTRANS - New method to define character sets: used for input charset as well as display character set, translation tables compiled in from - separate files (one per charset). + separate files (one per charset). One table is designated as default + and can be used for fallback translation to 7-bit replacements for + display. - Unicode (UTF8) support: can (attempt to) decode and translate UTF8 to display character set, or pass through UTF to display (if terminal or console understands UTF8). [raw display of UTF only tested with Slang so far, does not always position everything correctly on screen] - - Support for CHARSET attribute on A tag [but not yet on LINK], as in - HTML i18n RFC 2070. A link can suggest the target's charset in this way. + - Support for CHARSET attribute on A tag (and sometimesLINK), as in HTML + i18n RFC 2070 and W3C HTML 4.0 drafts. A link can suggest the target's + charset in this way. + +- Support for ACCEPT-CHARSET attribute of FORM tags. - EXPERIMENTAL, currently enabled only for Linux console: can (attempt to) automatically switch terminal mode and load new @@ -33,7 +38,8 @@ Lynx CHARTRANS Additions/changes to user interface: - many new Display Character Sets are available on O)ptions screen. - (also can now use arrow keys, HOME, END etc. for cycling through the list). + (One can use arrow keys, HOME, END etc. for cycling through the list + or use selection from popup box, as for other options.) - new command line flags: -assume_charset=... assume this as charset for documents that don't @@ -41,16 +47,21 @@ Additions/changes to user interface: -assume_unknown_charset=... in case a charset parameter is not recognized -assume_local_charset=... assume this as charset of local file: docs also available as ASSUME_CHARSET etc. in lynx.cfg + In "Advanced User" mode, ASSUME_CHARSET can be changed during a session + from the Optios Screen. - The "Raw" toggle (from -raw flag, '@' key, or Options screen) - o should work as before for CJK charsets, - o otherwise toggles the assumption "Default remote charset is same - as Display Character Set" on or off. + o toggles the assumption "Default remote charset is same as Display + Character Set" on or off. Toggling of the assumed charset is between Display Character Set and the specified ASSUME_CHARSET or, if they are the same, between the specified ASSUME_CHARSET and ISO-8859-1. o The default for raw mode now depends on the Display Character Set as well as on the specified ASSUME_CHARSET value. + o should work as before for CJK charsets (turning CJK-mode on or off). + o If the effective ASSUME_CHARSET and the Display Character Set are + unchanged from the ISO-8859-1 default, toggling "Raw" may have some + additional effect for characters that can't be translated. (Try the "Transparent" Display Character Set for more "rawness".) Requirements: same as for Lynx in general :) @@ -58,57 +69,21 @@ Requirements: same as for Lynx in general :) The chartrans code is now merged with Wayne Buttle's changes for 32-bit MS Windows and DOS/DJGPP, with Thomas Dickey's and Jim Spath's emerging auto-configure mechanism, and with BUGFIXES from Foteos -Macrides. See the accompanying file CHANGES.few for the current +Macrides. See the accompanying file CHANGES.new for the current status. -A WARNING BEFORE YOU PROCEDE: - -This is experimental. It works already nicely for me, but I have only -tested it on Linux, compiled with Slang. In some cases undisplayable bytes -may get sent to the terminal which are then interpreted as control chars. -Other usual warnings about alpha software apply... +A warning: +In some cases undisplayable bytes may still get sent to the terminal +which are then interpreted as control chars, there is no protection +against if strange things are defined in the table files. HOW TO GET SOURCES: -The location of files mentioned below is currently at - <URL: http://sol.slcc.edu/lynx/klaus/merged/all/> -but it is probably easier to get a full package of the development code -from +The development code is available at <URL: http://sol.slcc.edu/lynx/current/> -(different formats there, check it out.) -Check both locations to find the newest version. - -There are three alternatives: -( Replace the * in the followin filenames with the appropriate subversion ) - -(1.) - Provided as a full Lynx distribution (for now..) - in zip format. - This contains the complete Lynx source package. - - Just get lynx-2.7.1ac-*.zip. - -(2.) - Provided as add-on over the Lynx 2.7.1 distribution, i.e. all files that - are new or have changed - in zip format. - (a) Get the official Lynx 2.7.1 distribution - see list of download sites at - <URL: http://www.crl.com/~subir/lynx/sources.html>. - (b) Get add-to-offi-2.7.1ac-*.zip. - (c) Unpack the official 2.7.1 package, then unzip add-to-offi-2.7.1ac-*.zip - over that directory tree. - -(3.) - Provided in two files (for minimal download time) to install over the - Lynx 2.7.1 distribution - needs gunzip, tar, and patch. - (a) Get the official Lynx 2.7.1 distribution - see list of download sites at - <URL: http://www.crl.com/~subir/lynx/sources.html>. - (b) Get lynx-newfiles-2.7.1ac-*.tar.gz. - (c) Get lynx-patch-2.7.1ac-*.pch.gz. - (d) Unpack the official 2.7.1 package, then unpack - lynx-newfiles-2.7.1ac-*.tar.gz over that directory tree. - (d) Apply patches from lynx-patch-2.7.1ac-*.pch. - +in various formats. HOW TO INSTALL: @@ -119,13 +94,15 @@ HOW TO INSTALL: NOTE that there is a new "#define" in userdefs.h for MAX_CHARSETS near the end (in "Section 3."). - NOTE that in the top-level Makefile, the -DEXP_CHARTRANS must be - in *both* SITE_DEFS *and* SITE_LYDEFS. + If, for some reason, for UNIX you are not using the configure + script but Makefile.old, note that in the top-level Makefile, + the -DEXP_CHARTRANS must be in *both* SITE_DEFS *and* SITE_LYDEFS. (5) Building Lynx: - If you are compiling for VMS you have to figure out for yourself - how to modify the procedure, sorry. + Compiling the chartrans code is now integrated into the normal + installation procedures for UNIX (configure script) and other + platforms. What's supposed to happen (in addition to the usual things when building Lynx): in the new subdirectory src/chrtrans, make should @@ -188,10 +165,10 @@ HOW TO INSTALL: <URL: http://www.accentsoft.com/un/un-all.htm> (9) Please report bugs, unexpected behavior, etc. - to <lynx-dev@sig.net> or <kweide@tezcat.com>. + to <lynx-dev@sig.net>. Suggestions for improvement would be welcome, as well as contributed translation tables (for stuff that is not available at ftp://dkuug.dk or ftp://unicode.org). -KW 1996-05-03 +KW 1997-11-06 diff --git a/docs/README.defines b/docs/README.defines new file mode 100644 index 00000000..49476af3 --- /dev/null +++ b/docs/README.defines @@ -0,0 +1,110 @@ +[ If README.configure goes away, "(see README.configure)" has to change ] + +A place to list preprocessor macros (symbols) which are tested in the +code (typically with ifdef). + +Does not include +- symbols defined and documented in userdefs.h +- symbols expected to be set by compiler to indicate system type or + compiler features +- some symbols set and used only in connection with the ./configure + mechanism - the full and current list can be found in config.hin + (as a template) or, after running ./configure, in lynx_cfg.h. +- symbols and macros defined in the source code + +***Not complete.*** + +A. Symbols primarily to enable compilation on specific systems +============================================================== +See also under B for things needed by some systems. + +# if you have an SVR4 system with the "type any key" problem, try defining +# +# -DSVR4_BSDSELECT + +# Old Data General systems may need this in their SITE_LYDEFS +# for their inet_addr(host) calls. +# +# -DDGUX_OLD + +--- +Ports have been added for Win32 (95/NT) and 386 DOS computers with a +packet driver. I created four new defines to accomplish this. + _WINDOWS Defined for Win32 specific code (Mostly TCP related) + DJGPP Defined for 386 specific code (Mostly TCP related) + DOSPATH Defined for any DOS'ish computer + NOSIGHUP Defined for computers not supporting sighup signal calls. +-- Wayne Buttles lynx-port@fdisk.com + +Added for 8+3 filesystems (DOS): + FNAMES_8_3 also defined in userdefs.h if __DJGPP__ + +B. Symbols to enable or disable specific features, mostly +========================================================= +Note that some of these may be only usable on some system types, +most were originally for UNIX. + +Network related, specific protocols +----------------------------------- +# -DSOCKS For making a SOCKSified lynx. + see comments in makefile.in +# -DSHORTENED_RBIND For a SOCKSified lynx with the short version of Rbind. + see comments in makefile.in +# -DNOPORT if you must use PASV instead of PORT for FTP + +Related to DirEd code - probably one usable for UNIX or similar +--------------------------------------------------------------- +# -DDIRED_SUPPORT (see README.configure) +# -DOK_GZIP (see README.configure) +# -DOK_OVERRIDE (see README.configure) +# -DOK_PERMIT (see README.configure) +# -DOK_TAR (see README.configure) +# -DOK_UUDECODE (see README.configure) +# -DOK_ZIP (see README.configure) +# -DARCHIVE_ONLY (see README.configure) +# -DNO_CHANGE_EXECUTE_PERMS (see README.configure) + +Related to formatting of local directory listings +------------------------------------------------- +# -DLONG_LIST (see README.configure) +# -DNO_PARENT_DIR_REFERENCE (see README.configure) + +Related to screen display +------------------------- +Using curses or ncurses library: +# -DNCURSES (see README.configure) +# -DFANCY_CURSES whether curses lib supports more than very basic stuff + for UNIX handled by ./configure, for VMS defined in code +# -DNO_KEYPAD (old) or HAVE_KEYPAD (new) whether curses lib uses keypad(). + for UNIX handled by ./configure, may be set in HTUtils.h +# -DCOLOR_CURSES whether curses lib supports color (in the right way). + for UNIX handled by ./configure +# -DUNDERLINE_LINKS Define if you want links underlined instead of bold. +# -DHP_TERMINAL For DIM workaround to REVERSE problems on HP terminals. +Using slang library: +# -DUSE_SLANG (see README.configure) +# -DSLANG_MBCS_HACK prevent cutoff lines when using UTF8 console (slang only) +Both: +# -DREVERSE_CLEAR_SCREEN_PROBLEM +# if you have the reverse clear screen problem of some SUN4 systems, or +# to work around some other "garbage on the screen" problems + +Related to *experimental* (unsupported) character style code +------------------------------------------------------------ +# -DUSE_COLOR_STYLE (see README.configure) probably needs -DNCURSES +# -DUSE_HASH (see README.configure) probably needs the above +# -DLINKEDSTYLES (see README.configure) probably needs the above + +Other +----- +# -DDONT_TRACK_INTERNAL_LINKS - Handle following links to same doc differently. +# -DEXP_CHARTRANS (see README.configure - currently needed, WILL GO AWAY) +# -DEXP_CHARTRANS_AUTOSWITCH also let lynx switch term mode(Linux console only) +# -DIGNORE_CTRL_C Define if Control-C shouldn't exit lynx. +# -DLY_FIND_LEAKS (see README.configure) +# -DNO_CPU_LIMIT Disables Max CPU timeout (includes CLOCKS_PER_SECOND) +# -DNSL_FORK For fork-based name server lookups that can be 'z'apped. +# -DSYSLOG_REQUESTED_URLS +# if you would like logging of client requests via syslog() +# -DUSE_ZLIB To use some functions from zlib library if you have it. +# -DDECLARE_WAIS_LOGFILES see comments in makefile.in diff --git a/makefile.in b/makefile.in index 321547ca..602b2dd2 100644 --- a/makefile.in +++ b/makefile.in @@ -72,7 +72,7 @@ WWWINC= WWW/Library/Implementation # ftp://ftp.cnidr.org/pub/NIDR.tools/freewais # If you are using freeWAIS-0.202 or older, include -DDECLARE_WAIS_LOGFILES # in your SITE_DEFS. -# Plese put an ABSOLUTE address here if you want it to work! +# Please put an ABSOLUTE address here if you want it to work! #WAISLIB= ../../freeWAIS-0.202/bin/client.a ../../freeWAIS-0.202/bin/wais.a /usr/lib/libm.a # !!!!!!!!!!!!! SLANG Support (For color version of Lynx). !!!!!!!!!!!!!!!! @@ -192,13 +192,13 @@ depend: cd src && $(MAKE) $@ distclean: clean - -rm -f WWW/Library/unix/makefile src/makefile src/chrtrans/makefile -rm -f WWW/Library/*/*~ -rm -f WWW/Library/*/*.bak -rm -rf src/obsolete - -cd src && $(MAKE) clean - -cd src/chrtrans && $(MAKE) distclean + -cd src && $(MAKE) $@ + -cd src/chrtrans && $(MAKE) $@ -rm -f *~ *.bak *.sav + -rm -f WWW/Library/unix/makefile src/makefile src/chrtrans/makefile -rm -f makefile lynx_cfg.h config.status config.log config.cache -rm -f lynx @@ -229,7 +229,7 @@ save: compress: tar cd ..; rm -f $(lynxname).tar.Z; compress -f -v $(lynxname).tar -install: lynx +install: lynx $(bindir) $(mandir) $(libdir) -mv -f $(bindir)/lynx $(bindir)/lynx.old -mv -f $(libdir)/lynx.cfg $(libdir)/lynx.oldcfg $(installbin) lynx $(bindir)/lynx @@ -240,3 +240,6 @@ uninstall: -rm -f $(bindir)/lynx -rm -f $(mandir)/lynx.1 -rm -f $(libdir)/lynx.cfg + +$(bindir) $(mandir) $(libdir) : + $(srcdir)/mkdirs.sh $@ diff --git a/mkdirs.sh b/mkdirs.sh new file mode 100755 index 00000000..3ea69794 --- /dev/null +++ b/mkdirs.sh @@ -0,0 +1,33 @@ +#!/bin/sh +# mkinstalldirs --- make directory hierarchy +# Author: Noah Friedman <friedman@prep.ai.mit.edu> +# Created: 1993-05-16 +# Last modified: 1994-03-25 +# Public domain +# + +errstatus=0 + +for file in ${1+"$@"} ; do + set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` + shift + + pathcomp= + for d in ${1+"$@"} ; do + pathcomp="$pathcomp$d" + case "$pathcomp" in + -* ) pathcomp=./$pathcomp ;; + esac + + if test ! -d "$pathcomp"; then + echo "mkdir $pathcomp" 1>&2 + mkdir "$pathcomp" || errstatus=$? + fi + + pathcomp="$pathcomp/" + done +done + +exit $errstatus + +# mkinstalldirs ends here diff --git a/samples/lynx.lss b/samples/lynx.lss index 597a2059..1e0e70fe 100644 --- a/samples/lynx.lss +++ b/samples/lynx.lss @@ -10,7 +10,7 @@ i:bold:blue alink:reverse:yellow a:bold:green img:dim:brown -status:normal:yellow:blue +status:reverse:yellow:blue fig:normal:gray caption:reverse:brown hr:normal:yellow diff --git a/src/GridText.c b/src/GridText.c index 3eb1cf0a..25ebf20b 100644 --- a/src/GridText.c +++ b/src/GridText.c @@ -175,7 +175,8 @@ struct _HText { BOOL source; /* Is the text source? */ BOOL toolbar; /* Toolbar set? */ HTList * tabs; /* TAB IDs */ - HTList * hidden_links; /* Content-less links */ + HTList * hidden_links; /* Content-less links ... */ + int hiddenlinkflag; /* ... and how to treat them */ BOOL no_cache; /* Always refresh? */ char LastChar; /* For aborbing white space */ BOOL IgnoreExcess; /* Ignore chars at wrap point */ @@ -472,6 +473,15 @@ PUBLIC HText * HText_new ARGS1( self->stale = YES; self->toolbar = NO; self->tabs = NULL; + /* + * If we are going to render the List Page, always merge in hidden + * links to get the numbering consistent if form fields are numbered + * and show up as hidden links in the list of links. - kw + */ + if (anchor->address && !strcmp(anchor->address, LYlist_temp_url())) + self->hiddenlinkflag = HIDDENLINKS_MERGE; + else + self->hiddenlinkflag = LYHiddenLinks; self->hidden_links = NULL; self->no_cache = ((anchor->no_cache || anchor->post_data) ? YES : NO); @@ -588,9 +598,14 @@ PUBLIC void HText_free ARGS1( /* * Free form fields. */ - if (l->input_field->type == F_OPTION_LIST_TYPE) { + if (l->input_field->type == F_OPTION_LIST_TYPE && + l->input_field->select_list != NULL) { /* - * Free off option lists. + * Free off option lists if present. + * It should always be present for F_OPTION_LIST_TYPE + * unless we had invalid markup which prevented + * HText_setLastOptionValue from finishing its job + * and left the input field in an insane state. - kw */ OptionType *optptr = l->input_field->select_list; OptionType *tmp; @@ -603,7 +618,7 @@ PUBLIC void HText_free ARGS1( } l->input_field->select_list = NULL; /* - * Don't free the value field on option + * Don't free the value field on sane option * lists since it points to a option value * same for orig value. */ @@ -1561,6 +1576,54 @@ PRIVATE void display_page ARGS3( } +#ifdef NOT_USED +/* + * Refresh a form link on the current page after it may have changed. + * Could be used after change_form_link after a popup was opened, IF + * refresh of the rest of the screen is not necessary, instead of a + * full display_page - probably only for VMS curses. - kw + */ +PUBLIC void refresh_form_link ARGS2( + int, linkno, + char *, target) +{ + FormInfo *FormInfo_ptr; + /* + * Update links[] for one input link, and call refresh. + * basically redo some things display_page did. + */ + if (linkno >= 0 && linkno < nlinks && + links[linkno].type == WWW_FORM_LINK_TYPE) { + FormInfo_ptr = links[linkno].form; + + if (FormInfo_ptr->type == F_RADIO_TYPE) { + if (FormInfo_ptr->num_value) + links[linkno].hightext = checked_radio; + else + links[linkno].hightext = unchecked_radio; + + } else if (FormInfo_ptr->type == F_CHECKBOX_TYPE) { + if (FormInfo_ptr->num_value) + links[linkno].hightext = checked_box; + else + links[linkno].hightext = unchecked_box; + + } else if (FormInfo_ptr->type == F_PASSWORD_TYPE) { + links[linkno].hightext = STARS(strlen(FormInfo_ptr->value)); + + } else if (FormInfo_ptr->type == F_HIDDEN_TYPE) { + ; /* should never happen. */ + } else { /* TEXT type */ + links[linkno].hightext = FormInfo_ptr->value; + } + /* + * Bold the link, then update the screen + */ + highlight(OFF, linkno, target); + refresh(); + } +} +#endif /* NOT_USED */ /* Object Building methods ** ----------------------- @@ -2724,7 +2787,7 @@ PUBLIC void HText_endAnchor ARGS2( BOOL remove_numbers_on_empty = ((keypad_mode == LINKS_ARE_NUMBERED || keypad_mode == LINKS_AND_FORM_FIELDS_ARE_NUMBERED) && - (LYHiddenLinks != HIDDENLINKS_MERGE || + (text->hiddenlinkflag != HIDDENLINKS_MERGE || (LYNoISMAPifUSEMAP && HTAnchor_isISMAPScript( HTAnchor_followMainLink((HTAnchor *)a->anchor))))); @@ -3072,7 +3135,7 @@ PUBLIC void HText_endAnchor ARGS2( * to the hidden links list. - FM */ a->extent = 0; - if (LYHiddenLinks != HIDDENLINKS_MERGE) { + if (text->hiddenlinkflag != HIDDENLINKS_MERGE) { a->number = 0; HText_AddHiddenLink(text, a); text->last_anchor_number--; @@ -5665,7 +5728,7 @@ PRIVATE void HText_AddHiddenLink ARGS2( * retrievals. - FM */ if ((dest = HTAnchor_followMainLink((HTAnchor *)textanchor->anchor)) && - (LYHiddenLinks != HIDDENLINKS_IGNORE || + (text->hiddenlinkflag != HIDDENLINKS_IGNORE || HTList_isEmpty(text->hidden_links))) HTList_appendObject(text->hidden_links, HTAnchor_address(dest)); @@ -6111,6 +6174,15 @@ PUBLIC char * HText_setLastOptionValue ARGS7( /* * No option items yet. */ + if (text->last_anchor->input_field->type != F_OPTION_LIST_TYPE) { + if (TRACE) + fprintf(stderr, + "HText_setLastOptionValue: last input_field not OPTION_LIST_TYPE but %d, ignoring!\n", + text->last_anchor->input_field->type); + return NULL; + } + + new_ptr = text->last_anchor->input_field->select_list = (OptionType *) calloc(1, sizeof(OptionType)); if (new_ptr == NULL) @@ -6173,6 +6245,15 @@ PUBLIC char * HText_setLastOptionValue ARGS7( if (first_option) { StrAllocCopy(HTCurSelectedOptionValue, new_ptr->name); text->last_anchor->input_field->num_value = 0; + /* + * If this is the first option in a popup select list, + * HText_beginInput may have allocated the value and + * cp_submit_value fields, so free them now to avoid + * a memory leak. - kw + */ + FREE(text->last_anchor->input_field->value); + FREE(text->last_anchor->input_field->cp_submit_value); + text->last_anchor->input_field->value = text->last_anchor->input_field->select_list->name; text->last_anchor->input_field->orig_value = diff --git a/src/HTAlert.c b/src/HTAlert.c index a83014db..0886d81e 100644 --- a/src/HTAlert.c +++ b/src/HTAlert.c @@ -55,11 +55,24 @@ PUBLIC void HTProgress ARGS1( statusline(Msg); } +PRIVATE BOOL conf_cancelled = NO; /* used by HTConfirm only - kw */ + +PUBLIC BOOL HTLastConfirmCancelled NOARGS +{ + if (conf_cancelled) { + conf_cancelled = NO; /* reset */ + return(YES); + } else { + return(NO); + } +} + /* Seek confirmation. HTConfirm() ** ------------------ */ PUBLIC BOOL HTConfirm ARGS1(CONST char *, Msg) { + conf_cancelled = NO; if (dump_output_immediately) { /* Non-interactive, can't respond */ return(NO); } else { @@ -80,6 +93,8 @@ PUBLIC BOOL HTConfirm ARGS1(CONST char *, Msg) #endif /* VMS */ if (TOUPPER(c) == 'Y') return(YES); + if (c == 7 || c == 3) /* remember we had ^G or ^C */ + conf_cancelled = YES; if (TOUPPER(c) == 'N' || c == 7 || c == 3) /* ^G or ^C cancels */ return(NO); } diff --git a/src/HTAlert.h b/src/HTAlert.h index bb07b2a1..ce40afb5 100644 --- a/src/HTAlert.h +++ b/src/HTAlert.h @@ -40,6 +40,11 @@ extern void HTProgress PARAMS((CONST char * Msg)); extern BOOLEAN mustshow; #define _HTProgress(msg) mustshow = TRUE, HTProgress(msg) +/* + * Indicates whether last HTConfirm was cancelled (^G or ^C) and + * resets flag. (so only call once!) - kw + */ +extern BOOL HTLastConfirmCancelled NOPARAMS; /* Display a message, then wait for 'yes' or 'no'. ** diff --git a/src/HTML.c b/src/HTML.c index 15ed71c6..a020ba56 100644 --- a/src/HTML.c +++ b/src/HTML.c @@ -243,7 +243,24 @@ PUBLIC void HTML_put_character ARGS2(HTStructured *, me, char, c) return; default: - break; + if (me->inSELECT) { + /* + * If we are within a SELECT not caught by the cases + * above - HTML_SELECT or HTML_OPTION may not be the + * last element pushed on the style stack if there were + * invalid markup tags within a SELECT element. For error + * recovery, treat text as part of the OPTION text, it is + * probably meant to show up as user-visible text. + * Having A as an open element while in SELECT is really sick, + * don't make anchor text part of the option text in that case + * since the option text will probably just be discarded. - kw + */ + if (me->sp[0].tag_number == HTML_A) + break; + HTChunkPutc(&me->option, c); + return; + } + break; } /* end first switch */ /* @@ -498,13 +515,57 @@ PUBLIC void HTML_write ARGS3(HTStructured *, me, CONST char*, s, int, l) HTML_put_character(me, *p); } -#ifndef DONT_TRACK_INTERNAL_LINKS +/* + * "Internal links" are hyperlinks whose source and destination are + * within the same document, and for which the destination is given + * as a URL Reference with an empty URL, but possibly with a non-empty + * #fragment. (This terminology re URL-Reference vs. URL follows the + * Fielding URL syntax and semantics drafts). + * Differences: + * (1) The document's base (in whatever way it is given) is not used for + * resolving internal link references. + * (2) Activating an internal link should not result in a new retrieval + * of a copy of the document. + * (3) Internal links are the only way to refer with a hyperlink to a document + * (or a location in it) which is only known as the result of a POST + * request (doesn't have a URL from which the document can be retrieved + * with GET), and can only be used from within that document. + * + * *If DONT_TRACK_INTERNAL_LINKS is not defined, we keep track of whether a + * link destination was given as an internal link. This information is + * recorded in the type of the link between anchor objects, and is available + * to the HText object and the mainloop from there. URL References to + * internal destinations are still resolved into an absolute form before + * being passed on, but using the current stream's retrieval address instead + * of the base URL. + * Examples: (replace [...] to have a valid absolute URL) + * 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 + * 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) + * + * *If DONT_TRACK_INTERNAL_LINKS is defined, URL-less URL-References are + * resolved differently from URL-References with a non-empty URL (using the + * current stream's retrieval address instead of the base), but we make no + * further distinction. Resolution is then as in the examples above, execept + * that there is no "(marked internal)". + * + * *Note that this doesn't apply to form ACTIONs (always resolved using base, + * never marked internal). Also other references encountered or generated + * are not marked internal, whether they have a URL or not, if in a given + * context an internal link makes no sense (e.g. IMG SRC=). + */ +#ifndef DONT_TRACK_INTERNAL_LINKS /* A flag is used to keep track of whether an "URL reference" encountered - had a real "URL" or not. (This is the terminology of the Fielding - Internet Draft.) In the latter case, it will be marked as an "internal" - link. The flag is set before we start messing around with the string - (resolution of relative URLs etc.). - kw */ + had a real "URL" or not. In the latter case, it will be marked as + "internal". The flag is set before we start messing around with the + string (resolution of relative URLs etc.). This variable only used + locally here, don't confuse with LYinternal_flag which is for + for overriding non-caching similar to LYoverride_no_cache. - kw */ #define CHECK_FOR_INTERN(s) intern_flag = (s && (*s=='#' || *s=='\0')) ? TRUE : FALSE; /* Last argument to pass to HTAnchor_findChildAndLink() calls, @@ -741,6 +802,25 @@ PRIVATE void HTML_start_element ARGS6( me->inBadBASE = TRUE; } + if (url_type == LYNXIMGMAP_URL_TYPE) { + /* + * These have a are non-standard form, basically + * strip the prefix or the code below would insert + * a nonsense host into the pseudo URL. These + * should never occur where they would used for + * resolution of relative URLs anyway. We can + * also strip the #map part. - kw + */ + temp = HTParse(base + 11, "", + PARSE_ACCESS+PARSE_HOST+PARSE_PATH + +PARSE_PUNCTUATION); + if (temp) { + FREE(base); + base = temp; + temp = NULL; + } + } + /* * Get parent's address for defaulted fields. */ @@ -754,6 +834,7 @@ PRIVATE void HTML_start_element ARGS6( *temp != '\0') { StrAllocCopy(me->base_href, temp); } else { + FREE(temp); StrAllocCopy(me->base_href, (temp = HTParse(related, "", PARSE_ACCESS+PARSE_PUNCTUATION))); } @@ -773,6 +854,7 @@ PRIVATE void HTML_start_element ARGS6( if (!strcmp(me->base_href, "file:")) { StrAllocCat(me->base_href, "//localhost"); } else if (strcmp(me->base_href, "news:")) { + FREE(temp); StrAllocCat(me->base_href, (temp = HTParse(related, "", PARSE_HOST+PARSE_PUNCTUATION))); } @@ -787,7 +869,6 @@ PRIVATE void HTML_start_element ARGS6( PARSE_PATH+PARSE_PUNCTUATION)) && *temp != '\0') { StrAllocCat(me->base_href, temp); - FREE(temp); } else if (!strcmp(me->base_href, "news:")) { StrAllocCat(me->base_href, "*"); } else if (!strncmp(me->base_href, "news:", 5) || @@ -797,6 +878,7 @@ PRIVATE void HTML_start_element ARGS6( } else { StrAllocCat(me->base_href, "/"); } + FREE(temp); FREE(base); me->inBASE = TRUE; @@ -3307,7 +3389,7 @@ PRIVATE void HTML_start_element ARGS6( FREE(title); } } - LYAddImageMap(me->map_address, title); + LYAddImageMap(me->map_address, title, me->node_anchor); FREE(title); } break; @@ -3401,7 +3483,8 @@ PRIVATE void HTML_start_element ARGS6( StrAllocCopy(alt_string, href); } - LYAddMapElement(me->map_address, href, alt_string, intern_flag); + LYAddMapElement(me->map_address, href, alt_string, + me->node_anchor, intern_flag); FREE(href); FREE(alt_string); } @@ -4622,6 +4705,19 @@ PRIVATE void HTML_start_element ARGS6( } /* + * Check for an unclosed SELECT, try to close it if found. + */ + if (me->inSELECT) { + if (TRACE) { + fprintf(stderr, "HTML: Missing SELECT end tag, faking it...\n"); + } + if (me->sp->tag_number != HTML_SELECT) { + SET_SKIP_STACK(HTML_SELECT); + } + HTML_end_element(me, HTML_SELECT, (char **)&include); + } + + /* * Handle the INPUT as for a FORM. - FM */ if (!(present && present[HTML_INPUT_NAME] && @@ -5059,7 +5155,9 @@ PRIVATE void HTML_start_element ARGS6( me->inBadHTML = TRUE; sleep(MessageSecs); } - SET_SKIP_STACK(HTML_SELECT); + if (me->sp->tag_number != HTML_SELECT) { + SET_SKIP_STACK(HTML_SELECT); + } HTML_end_element(me, HTML_SELECT, (char **)&include); } { @@ -5086,9 +5184,14 @@ PRIVATE void HTML_start_element ARGS6( } /* - * Too likely to cause a crash, so we'll ignore it. - FM - */ + * We should have covered all crash possibilities with the + * current TagSoup parser, so we'll allow it because some + * people with other browsers use SELECT for "information" + * popups, outside of FORM blocks, though no Lynx user + * would do anything that awful, right? - FM + *//*** break; + ***/ } /* @@ -5815,6 +5918,17 @@ PRIVATE void HTML_end_element ARGS3( case HTML_HEAD: if (!me->text) UPDATE_STYLE; + if (me->inBASE && + !strcmp(me->node_anchor->address, LYlist_temp_url())) { + /* If we are parsing the List Page, and have a BASE after + * we are done with the HEAD element, propagate it back + * to the node_anchor object. The base should have been + * inserted by showlist() to record what document the List + * Page is about, and other functions may later look for it + * in the anchor. - kw + */ + StrAllocCopy(me->node_anchor->content_base, me->base_href); + } if (HText_hasToolbar(me->text)) HText_appendParagraph(me->text); break; @@ -6670,7 +6784,9 @@ End_Object: me->inBadHTML = TRUE; sleep(MessageSecs); } - SET_SKIP_STACK(HTML_SELECT); + if (me->sp->tag_number != HTML_SELECT) { + SET_SKIP_STACK(HTML_SELECT); + } HTML_end_element(me, HTML_SELECT, (char **)&include); } @@ -6907,12 +7023,9 @@ End_Object: me->inBadHTML = TRUE; sleep(MessageSecs); } - /* - * Too likely to cause a crash, so we'll ignore it. - kw + * Hopefully won't crash, so we'll ignore it. - kw */ - HTChunkClear(&me->option); - break; } /* @@ -6971,9 +7084,11 @@ End_Object: /* * Add end option character. */ - HText_appendCharacter(me->text, ']'); - HText_setLastChar(me->text, ']'); - me->in_word = YES; + if (!me->first_option) { + HText_appendCharacter(me->text, ']'); + HText_setLastChar(me->text, ']'); + me->in_word = YES; + } HText_setIgnoreExcess(me->text, FALSE); } HTChunkClear(&me->option); @@ -7211,7 +7326,56 @@ PRIVATE void HTML_free ARGS1(HTStructured *, me) HTML_end_element(me, HTML_FORM, (char **)&include); me->inFORM = FALSE; } - + if (me->option.size > 0) { + /* + * If we still have data in the me->option chunk after + * forcing a close of a still-open form, something must + * have gone very wrong. - kw + */ + if (TRACE) { + fprintf(stderr, + "HTML_free: ***** SELECT or OPTION not ended properly *****\n"); + } else if (!me->inBadHTML) { + _statusline(BAD_HTML_USE_TRACE); + me->inBadHTML = TRUE; + sleep(MessageSecs); + } + HTChunkTerminate(&me->option); + /* + * Output the left-over data as text, maybe it was invalid + * markup meant to be shown somewhere. - kw + */ + if (TRACE) + fprintf(stderr, " ***** leftover option data: %s\n", + me->option.data); + HTML_put_string(me, me->option.data); + HTChunkClear(&me->option); + } + if (me->textarea.size > 0) { + /* + * If we still have data in the me->textarea chunk after + * forcing a close of a still-open form, something must + * have gone very wrong. - kw + */ + if (TRACE) { + fprintf(stderr, + "HTML_free: ***** TEXTAREA not used properly *****\n"); + } else if (!me->inBadHTML) { + _statusline(BAD_HTML_USE_TRACE); + me->inBadHTML = TRUE; + sleep(MessageSecs); + } + HTChunkTerminate(&me->textarea); + /* + * Output the left-over data as text, maybe it was invalid + * markup meant to be shown somewhere. - kw + */ + if (TRACE) + fprintf(stderr, " ***** leftover textarea data: %s\n", + me->textarea.data); + HTML_put_string(me, me->textarea.data); + HTChunkClear(&me->textarea); + } /* * If we're interactive and have hidden links but no visible * links, add a message informing the user about this and @@ -7235,6 +7399,48 @@ PRIVATE void HTML_free ARGS1(HTStructured *, me) */ HText_endAppend(me->text); } + if (me->option.size > 0) { + /* + * If we still have data in the me->option chunk after + * forcing a close of a still-open form, something must + * have gone very wrong. - kw + */ + if (TRACE) { + fprintf(stderr, + "HTML_free: ***** SELECT or OPTION not ended properly *****\n"); + } else if (!me->inBadHTML) { + _statusline(BAD_HTML_USE_TRACE); + me->inBadHTML = TRUE; + sleep(MessageSecs); + } + if (TRACE) { + HTChunkTerminate(&me->option); + fprintf(stderr, " ***** leftover option data: %s\n", + me->option.data); + } + HTChunkClear(&me->option); + } + if (me->textarea.size > 0) { + /* + * If we still have data in the me->textarea chunk after + * forcing a close of a still-open form, something must + * have gone very wrong. - kw + */ + if (TRACE) { + fprintf(stderr, + "HTML_free: ***** TEXTAREA not used properly *****\n"); + } else if (!me->inBadHTML) { + _statusline(BAD_HTML_USE_TRACE); + me->inBadHTML = TRUE; + sleep(MessageSecs); + } + if (TRACE) { + HTChunkTerminate(&me->textarea); + fprintf(stderr, " ***** leftover textarea data: %s\n", + me->textarea.data); + } + HTChunkClear(&me->textarea); + } if (me->target) { (*me->targetClass._free)(me->target); @@ -7291,6 +7497,37 @@ PRIVATE void HTML_abort ARGS2(HTStructured *, me, HTError, e) HText_endAppend(me->text); } + if (me->option.size > 0) { + /* + * If we still have data in the me->option chunk after + * forcing a close of a still-open form, something must + * have gone very wrong. - kw + */ + if (TRACE) { + fprintf(stderr, + "HTML_abort: ***** SELECT or OPTION not ended properly *****\n"); + HTChunkTerminate(&me->option); + fprintf(stderr, " ***** leftover option data: %s\n", + me->option.data); + } + HTChunkClear(&me->option); + } + if (me->textarea.size > 0) { + /* + * If we still have data in the me->textarea chunk after + * forcing a close of a still-open form, something must + * have gone very wrong. - kw + */ + if (TRACE) { + fprintf(stderr, + "HTML_abort: ***** TEXTAREA not used properly *****\n"); + HTChunkTerminate(&me->textarea); + fprintf(stderr, " ***** leftover textarea data: %s\n", + me->textarea.data); + } + HTChunkClear(&me->textarea); + } + if (me->target) { (*me->targetClass._abort)(me->target, e); } diff --git a/src/LYCgi.c b/src/LYCgi.c index 4f6d0171..6bb32a34 100644 --- a/src/LYCgi.c +++ b/src/LYCgi.c @@ -307,8 +307,15 @@ PRIVATE int LYLoadCGI ARGS4( int wstatus; #endif - /* Decode full HTTP response */ - format_in = HTAtom_for("www/mime"); + if (anAnchor->isHEAD || keep_mime_headers) { + + /* Show output as plain text */ + format_in = WWW_PLAINTEXT; + } else { + + /* Decode full HTTP response */ + format_in = HTAtom_for("www/mime"); + } target = HTStreamStack(format_in, format_out, @@ -361,6 +368,7 @@ PRIVATE int LYLoadCGI ARGS4( close(fd2[1]); if (anAnchor->post_data) { + int written, remaining, total_written = 0; close(fd1[0]); /* We have form data to push across the pipe */ @@ -371,8 +379,41 @@ PRIVATE int LYLoadCGI ARGS4( "LYNXCGI: Writing:\n%s----------------------------------\n", anAnchor->post_data); } - write(fd1[1], anAnchor->post_data, - strlen(anAnchor->post_data)); + remaining = strlen(anAnchor->post_data); + while ((written = write(fd1[1], + anAnchor->post_data + total_written, + remaining)) != 0) { + if (written < 0) { +#ifdef EINTR + if (errno == EINTR) + continue; +#endif /* EINTR */ +#ifdef ERESTARTSYS + if (errno == ERESTARTSYS) + continue; +#endif /* ERESTARTSYS */ + if (TRACE) { + perror("LYNXCGI: write() of POST data failed"); + } + break; + } + if (TRACE) { + fprintf(stderr, + "LYNXCGI: Wrote %d bytes of POST data.\n", + written); + } + total_written += written; + remaining -= written; + if (remaining == 0) + break; + } + if (remaining != 0) { + if (TRACE) + fprintf(stderr, + "LYNXCGI: %d bytes remain unwritten!\n", + remaining); + } + close(fd1[1]); } total_chars = 0; @@ -404,9 +445,6 @@ PRIVATE int LYLoadCGI ARGS4( break; } #endif /* !HAVE_WAITPID */ - if (anAnchor->post_data) { - close(fd1[1]); - } close(fd2[0]); status = HT_LOADED; @@ -449,6 +487,10 @@ PRIVATE int LYLoadCGI ARGS4( add_environment_value(post_len); } else { close(fileno(stdin)); + + if (anAnchor->isHEAD) { + add_environment_value("REQUEST_METHOD=HEAD"); + } } /* @@ -473,7 +515,7 @@ PRIVATE int LYLoadCGI ARGS4( /* Data for a get/search form */ if (is_www_index) { add_environment_value("REQUEST_METHOD=SEARCH"); - } else { + } else if (!anAnchor->isHEAD) { add_environment_value("REQUEST_METHOD=GET"); } diff --git a/src/LYCurses.c b/src/LYCurses.c index 35bfc6eb..b4738a0f 100644 --- a/src/LYCurses.c +++ b/src/LYCurses.c @@ -75,7 +75,11 @@ PUBLIC void LY_SLrefresh NOARGS return; } -PUBLIC void LY_SLclear NOARGS +/* the following renamed from LY_SLclear since it is more like erase() + described in curses man pages than like clear(); but for USE_SLANG + clear() is still a macro calling this, and will do the same thing as + erase(). - kw */ +PUBLIC void LY_SLerase NOARGS { SLsmg_gotorc (0, 0); SLsmg_erase_eos (); @@ -409,7 +413,7 @@ PRIVATE void LYsetWAttr ARGS1(WINDOW *, win) #endif /* DOSPATH */ } -#ifndef __DJGPP__ +#if ( !defined(__DJGPP__) && !defined(_WINDOWS) ) if (no_color_video < 0) { no_color_video = tigetnum("ncv"); } @@ -1554,9 +1558,17 @@ PUBLIC void VMSbox ARGS3( PUBLIC void lynx_force_repaint NOARGS { #if defined(COLOR_CURSES) - chtype a = (LYShowColor >= SHOW_COLOR_ON) ? COLOR_PAIR(9) : A_NORMAL; + chtype a; +#ifndef USE_COLOR_STYLE + if (LYShowColor >= SHOW_COLOR_ON) + a = COLOR_PAIR(9); + else +#endif + a = A_NORMAL; bkgdset(a | ' '); +#ifndef USE_COLOR_STYLE bkgd(a | ' '); +#endif attrset(a); #endif clearok(curscr, TRUE); diff --git a/src/LYCurses.h b/src/LYCurses.h index 1478cade..89d64c5e 100644 --- a/src/LYCurses.h +++ b/src/LYCurses.h @@ -177,8 +177,9 @@ extern int PHYSICAL_SLtt_Screen_Cols; #define LINES SLtt_Screen_Rows #define move SLsmg_gotorc #define addstr SLsmg_write_string -extern void LY_SLclear NOPARAMS; -#define clear LY_SLclear +extern void LY_SLerase NOPARAMS; +#define erase LY_SLerase +#define clear LY_SLerase #define standout SLsmg_reverse_video #define standend SLsmg_normal_video #define clrtoeol SLsmg_erase_eol diff --git a/src/LYDownload.c b/src/LYDownload.c index 644ade45..0934266f 100644 --- a/src/LYDownload.c +++ b/src/LYDownload.c @@ -366,6 +366,7 @@ check_recall: */ LYDidRename = TRUE; } + chmod(buffer, HIDE_CHMOD); #else /* Unix: */ /* * Prevent spoofing of the shell. @@ -384,10 +385,10 @@ check_recall: fflush(stdout); fflush(stderr); start_curses(); +#if defined(UNIX) + LYRelaxFilePermissions(buffer); +#endif /* defined(UNIX) */ #endif /* VMS */ -#if defined(VMS) || defined(UNIX) - chmod(buffer, HIDE_CHMOD); -#endif /* defined(VMS) || defined(UNIX) */ } else { /* diff --git a/src/LYForms.c b/src/LYForms.c index 12e6f032..d9dee701 100644 --- a/src/LYForms.c +++ b/src/LYForms.c @@ -88,7 +88,7 @@ PUBLIC int change_form_link ARGS6( #if defined(VMS) && !defined(USE_SLANG) c = DO_NOTHING; #else - c = 23; /* CTRL-W for repaint */ + c = 23; /* CTRL-W refresh without clearok */ #endif /* VMS && !USE_SLANG */ else #endif /* FANCY_CURSES || USE_SLANG */ @@ -119,16 +119,17 @@ PUBLIC int change_form_link ARGS6( form->value_cs = opt_ptr->value_cs; } #if defined(FANCY_CURSES) || defined(USE_SLANG) - if (!enable_scrollback && form->num_value == OrigNumValue) + if (!enable_scrollback) #if defined(VMS) && !defined(USE_SLANG) - c = DO_NOTHING; -#else - c = 23; /* CTRL-W for repaint */ -#endif /* VMS && !USE_SLANG */ - else + if (form->num_value == OrigNumValue) + c = DO_NOTHING; + else +#endif /* VMS && !USE_SLANG*/ + c = 23; /* CTRL-W refresh without clearok */ + else #endif /* FANCY_CURSES || USE_SLANG */ - c = 12; /* CTRL-L for repaint */ - break; + c = 12; /* CTRL-L for repaint */ + break; case F_RADIO_TYPE: if (form->disabled == YES) diff --git a/src/LYGetFile.c b/src/LYGetFile.c index 08551035..863c905a 100644 --- a/src/LYGetFile.c +++ b/src/LYGetFile.c @@ -24,6 +24,7 @@ #include "LYKeymap.h" #include "LYBookmark.h" #include "LYMap.h" +#include "LYList.h" #ifdef VMS #include "HTVMSUtils.h" #endif /* VMS */ @@ -251,6 +252,27 @@ Try_Redirected_URL: return(NULLFILE); } } + if (WWWDoc.post_data && + url_type != HTTP_URL_TYPE && + url_type != HTTPS_URL_TYPE && + url_type != LYNXCGI_URL_TYPE && + url_type != LYNXIMGMAP_URL_TYPE && + url_type != GOPHER_URL_TYPE && + url_type != CSO_URL_TYPE && + url_type != PROXY_URL_TYPE && + !(url_type == FILE_URL_TYPE && + *(LYlist_temp_url()) && + !strncmp(WWWDoc.address, LYlist_temp_url(), + strlen(LYlist_temp_url())))) { + if (TRACE) + fprintf(stderr, + "getfile: dropping post_data!\n"); + HTAlert("POST not supported for this URL - ignoring POST data!"); + FREE(doc->post_data); + FREE(doc->post_content_type); + WWWDoc.post_data = NULL; + WWWDoc.post_content_type = NULL; + } #ifndef VMS #ifdef SYSLOG_REQUESTED_URLS syslog(LOG_INFO|LOG_LOCAL5, "%s", doc->address); @@ -350,7 +372,7 @@ Try_Redirected_URL: WWWDoc.safe = doc->safe; #ifndef DONT_TRACK_INTERNAL_LINKS if (doc->internal_link && !reloading) { - LYoverride_no_cache = TRUE; + LYinternal_flag = TRUE; } #endif diff --git a/src/LYGlobalDefs.h b/src/LYGlobalDefs.h index bff8c881..ee2939b6 100644 --- a/src/LYGlobalDefs.h +++ b/src/LYGlobalDefs.h @@ -146,7 +146,8 @@ extern char *lynx_temp_space; extern char *lynx_save_space; extern BOOLEAN LYforce_HTML_mode; extern BOOLEAN LYforce_no_cache; -extern BOOLEAN LYoverride_no_cache; +extern BOOLEAN LYoverride_no_cache; /* don't need fresh copy, from history */ +extern BOOLEAN LYinternal_flag; /* don't need fresh copy, was internal link */ extern BOOLEAN LYresubmit_posts; extern BOOLEAN user_mode; /* novice or advanced */ extern BOOLEAN is_www_index; diff --git a/src/LYHistory.c b/src/LYHistory.c index 1a3a3990..cb6751e3 100644 --- a/src/LYHistory.c +++ b/src/LYHistory.c @@ -507,7 +507,7 @@ PUBLIC BOOLEAN historytarget ARGS1( && !(LYforce_no_cache == TRUE && LYoverride_no_cache == FALSE)) { #ifndef DONT_TRACK_INTERNAL_LINKS LYforce_no_cache = FALSE; - LYoverride_no_cache = TRUE; + LYinternal_flag = TRUE; newdoc->internal_link = TRUE; treat_as_intern = TRUE; #endif @@ -533,7 +533,8 @@ PUBLIC BOOLEAN historytarget ARGS1( LYoverride_no_cache == FALSE)) && !(treat_as_intern && !reloading)) || text == NULL) && - HTConfirm(CONFIRM_POST_RESUBMISSION) == TRUE) { + (!strncmp(newdoc->address, "LYNXIMGMAP:", 11) || + HTConfirm(CONFIRM_POST_RESUBMISSION) == TRUE)) { LYforce_no_cache = TRUE; LYoverride_no_cache = FALSE; } else if (text != NULL) { diff --git a/src/LYList.c b/src/LYList.c index 804da051..f5225c7b 100644 --- a/src/LYList.c +++ b/src/LYList.c @@ -8,8 +8,8 @@ #include "HTUtils.h" #include "tcp.h" #include "LYUtils.h" -#include "LYList.h" #include "GridText.h" +#include "LYList.h" #include "LYSignal.h" #include "LYGlobalDefs.h" #include "LYCharUtils.h" @@ -36,13 +36,18 @@ static char list_filename[256] = "\0"; +/* + * Returns the name of the file used for the List Page, if one has + * been created, as a full URL; otherwise, returns an empty string. + * - kw + */ PUBLIC char * LYlist_temp_url NOARGS { return list_filename; } PUBLIC int showlist ARGS2( - char **, newfile, + document *, newdoc, BOOLEAN, titles) { int cnt; @@ -51,6 +56,7 @@ PUBLIC int showlist ARGS2( static BOOLEAN first = TRUE; FILE *fp0; char *Address = NULL, *Title = NULL, *cp = NULL; + BOOLEAN intern_w_post = FALSE; char *desc = "unknown field or link"; refs = HText_sourceAnchors(HTMainText); @@ -90,13 +96,24 @@ PUBLIC int showlist ARGS2( return(-1); } - StrAllocCopy(*newfile, list_filename); + StrAllocCopy(newdoc->address, list_filename); LYforce_HTML_mode = TRUE; /* force this file to be HTML */ LYforce_no_cache = TRUE; /* force this file to be new */ fprintf(fp0, "<head>\n"); LYAddMETAcharsetToFD(fp0, -1); + if (strchr(HTLoadedDocumentURL(), '"') == NULL) { + /* + * Insert a BASE tag so there is some way to relate the List Page + * file to its underlying document after we are done. It won't + * be actually used for resolving relative URLs. - kw + */ + StrAllocCopy(Address, HTLoadedDocumentURL()); + LYEntify(&Address, FALSE); + fprintf(fp0, "<base href=\"%s\">\n", Address); + FREE(Address); + } fprintf(fp0, "<title>%s</title>\n</head>\n<body>\n", LIST_PAGE_TITLE); fprintf(fp0, "<h1>You have reached the List Page</h1>\n"); @@ -130,10 +147,16 @@ PUBLIC int showlist ARGS2( * ensure that the link numbers on the list page match the * numbering in the original document, but won't create a * forward link to the form. - FM && LE + * + * Changed to create a fake hidden link, to get the numbering + * right in connection with always treating this file as + * HIDDENLINKS_MERGE in GridText.c - kw */ if (keypad_mode == LINKS_AND_FORM_FIELDS_ARE_NUMBERED) { HText_FormDescNumber(cnt, (char **)&desc); - fprintf(fp0, "<li>[%d](<em>%s</em>)</a>\n", cnt, desc); + /* fprintf(fp0, "<li>[%d](<em>%s</em>)\n", cnt, desc); */ + fprintf(fp0, "<li><a id=%d href='#%d'></a>(<em>%s</em>)\n", + cnt, cnt, desc); } continue; } @@ -144,6 +167,19 @@ PUBLIC int showlist ARGS2( dest = dest_intl ? dest_intl : HTAnchor_followMainLink((HTAnchor *)child); parent = HTAnchor_parent(dest); + if (!intern_w_post && dest_intl && + HTMainAnchor && HTMainAnchor->post_data && + parent->post_data && + !strcmp(HTMainAnchor->post_data, parent->post_data)) { + /* + * Set flag to note that we had at least one internal link, + * if the document from which we are generating the list + * has assosiated POST data; after an extra check that the + * link destination really has hthe same POST data so that + * we can believe it is an internal link. + */ + intern_w_post = TRUE; + } address = HTAnchor_address(dest); title = titles ? HTAnchor_title(parent) : NULL; StrAllocCopy(Address, address); @@ -196,6 +232,26 @@ PUBLIC int showlist ARGS2( fprintf(fp0,"\n</%s>\n</body>\n", ((keypad_mode == NUMBERS_AS_ARROWS) ? "ol" : "ul")); + /* + * Make necessary changes to newdoc before returning to caller. + * If the intern_w_post flag is set, we keep the POST data in + * newdoc that have been passed in. They should be the same as + * in the loaded locument for which we generated the list. + * In that case the file we have written will be associated with + * the same POST data when it is loaded after we are done here, + * so that following one of the links we have marked as "internal + * link" can lead back to the underlying document with the right + * address+post_data combination. - kw + */ + if (intern_w_post) { + newdoc->internal_link = TRUE; + } else { + FREE(newdoc->post_data); + FREE(newdoc->post_content_type); + newdoc->internal_link = FALSE; + } + newdoc->isHEAD = FALSE; + newdoc->safe = FALSE; fclose(fp0); return(0); } @@ -256,6 +312,15 @@ PUBLIC void printlist ARGS2( continue; } dest = HTAnchor_followMainLink((HTAnchor *)child); + /* + * Ignore if child anchor points to itself, i.e. we had + * something like <A NAME=xyz HREF="#xyz"> and it is not + * treated as a hidden link. Useful if someone 'P'rints + * the List Page (which isn't a very useful action to do, + * but anyway...) - kw + */ + if (dest == (HTAnchor *)child) + continue; parent = HTAnchor_parent(dest); title = titles ? HTAnchor_title(parent) : NULL; address = HTAnchor_address(dest); diff --git a/src/LYList.h b/src/LYList.h index e1e0b8de..4a717284 100644 --- a/src/LYList.h +++ b/src/LYList.h @@ -3,7 +3,7 @@ #define LYLIST_H extern char * LYlist_temp_url NOPARAMS; -extern int showlist PARAMS((char **newfile, BOOLEAN titles)); +extern int showlist PARAMS((document *newdoc, BOOLEAN titles)); extern void printlist PARAMS((FILE *fp, BOOLEAN titles)); #define LIST_PAGE_TITLE "Lynx List Page" diff --git a/src/LYMain.c b/src/LYMain.c index b5749c9e..5a6875e3 100644 --- a/src/LYMain.c +++ b/src/LYMain.c @@ -164,7 +164,8 @@ PUBLIC int LYrcShowColor = SHOW_COLOR_UNKNOWN; /* ... as last read or written * PUBLIC BOOLEAN LYShowCursor = SHOW_CURSOR; /* to show or not to show */ PUBLIC BOOLEAN LYUseDefShoCur = TRUE; /* Command line -show_cursor toggle */ PUBLIC BOOLEAN LYforce_no_cache = FALSE; -PUBLIC BOOLEAN LYoverride_no_cache = FALSE; +PUBLIC BOOLEAN LYoverride_no_cache = FALSE;/*override no-cache b/c history etc*/ +PUBLIC BOOLEAN LYinternal_flag = FALSE; /* override no-cache b/c internal link*/ PUBLIC BOOLEAN LYresubmit_posts = ALWAYS_RESUBMIT_POSTS; PUBLIC BOOLEAN LYUserSpecifiedURL = TRUE;/* always TRUE the first time */ PUBLIC BOOLEAN LYJumpFileURL = FALSE; /* always FALSE the first time */ @@ -1563,7 +1564,7 @@ PUBLIC int main ARGS2( /* * Check for a valid HEAD request. - FM */ - if (HEAD_request && strncmp(startfile, "http", 4)) { + if (HEAD_request && LYCanDoHEAD(startfile) != TRUE) { fprintf(stderr, "The '-head' switch is for http HEAD requests and cannot be used for\n'%s'.\n", startfile); @@ -1584,7 +1585,7 @@ PUBLIC int main ARGS2( /* * Check for a valid MIME headers request. - FM */ - if (keep_mime_headers && strncmp(startfile, "http", 4)) { + if (keep_mime_headers && LYCanDoHEAD(startfile) != TRUE) { fprintf(stderr, "The '-mime_header' switch is for http URLs and cannot be used for\n'%s'.\n", startfile); diff --git a/src/LYMainLoop.c b/src/LYMainLoop.c index 12e43f5b..11020387 100644 --- a/src/LYMainLoop.c +++ b/src/LYMainLoop.c @@ -56,6 +56,11 @@ #include "LYexit.h" #include "LYLeaks.h" +PRIVATE BOOL confirm_post_resub PARAMS(( + CONST char* address, + CONST char* title, + int if_imgmap, + int if_file)); PRIVATE int are_different PARAMS((document *doc1, document *doc2)); PRIVATE int are_phys_different PARAMS((document *doc1, document *doc2)); PUBLIC void HTGotoURLs_free NOPARAMS; @@ -129,7 +134,8 @@ PRIVATE void free_mainloop_variables NOARGS int mainloop NOARGS { - int c = 0, real_c = 0, old_c = 0, cmd, real_cmd = LYK_DO_NOTHING; + int c = 0, real_c = 0, old_c = 0; + int cmd = LYK_DO_NOTHING, real_cmd = LYK_DO_NOTHING; int getresult; int arrowup = FALSE, show_help = FALSE; int lines_in_file = -1; @@ -336,11 +342,11 @@ try_again: #ifndef DONT_TRACK_INTERNAL_LINKS -#define NONINTERNAL_OR_DIFFERENT(c,n) TRUE +#define NO_INTERNAL_OR_DIFFERENT(c,n) TRUE #define NONINTERNAL_OR_PHYS_DIFFERENT(p,n) (!curdoc.internal_link || \ are_phys_different(p,n)) #else /* TRACK_INTERNAL_LINKS */ -#define NONINTERNAL_OR_DIFFERENT(c,n) are_different(c,n) +#define NO_INTERNAL_OR_DIFFERENT(c,n) are_different(c,n) #define NONINTERNAL_OR_PHYS_DIFFERENT(p,n) are_different(p,n) #endif /* TRACK_INTERNAL_LINKS */ @@ -354,6 +360,7 @@ try_again: */ if (curdoc.internal_link && !are_phys_different(&curdoc, &newdoc)) { + LYinternal_flag = TRUE; LYoverride_no_cache = TRUE; LYforce_no_cache = FALSE; try_internal = TRUE; @@ -362,7 +369,7 @@ try_again: if ((newdoc.bookmark != NULL) || (newdoc.post_data != NULL && !newdoc.safe && LYresubmit_posts && - NONINTERNAL_OR_DIFFERENT(&curdoc, &newdoc))) { + NO_INTERNAL_OR_DIFFERENT(&curdoc, &newdoc))) { LYoverride_no_cache = FALSE; } else { LYoverride_no_cache = TRUE; @@ -374,10 +381,10 @@ try_again: * Make SURE this is an appropriate request. - FM */ if (newdoc.address) { - if (!strncmp(newdoc.address, "http", 4)) { + if (LYCanDoHEAD(newdoc.address) == TRUE) { newdoc.isHEAD = TRUE; } else if (!strncmp(newdoc.address, "LYNXIMGMAP:", 11)) { - if (!strncmp(newdoc.address + 11, "http", 4)) { + if (LYCanDoHEAD(newdoc.address + 11) == TRUE) { StrAllocCopy(temp, newdoc.address + 11); FREE(newdoc.address); newdoc.address = temp; @@ -505,6 +512,7 @@ try_again: */ LYoverride_no_cache = FALSE; /* Was TRUE if popped. - FM */ popped_doc = FALSE; /* Was TRUE if popped. - FM */ + LYinternal_flag = FALSE; /* Reset to default. - kw */ if (trace_mode_flag == TRUE) { WWW_TraceFlag = TRUE; trace_mode_flag = FALSE; @@ -595,6 +603,7 @@ try_again: */ LYoverride_no_cache = FALSE; /* Was TRUE if popped. - FM */ popped_doc = FALSE; /* Was TRUE if popped. - FM */ + LYinternal_flag = FALSE; /* Reset to default. - kw */ if (trace_mode_flag == TRUE) { WWW_TraceFlag = TRUE; trace_mode_flag = FALSE; @@ -632,11 +641,11 @@ try_again: */ if (first_file && homepage && #ifdef VMS - strcasecomp(homepage, startfile) != 0) + strcasecomp(homepage, startfile) != 0 #else - strcmp(homepage, startfile) != 0) + strcmp(homepage, startfile) != 0 #endif /* VMS */ - { + ) { /* * Couldn't return to the first file but there is a * homepage we can use instead. Useful for when the @@ -655,6 +664,7 @@ try_again: newdoc.isHEAD = FALSE; newdoc.safe = FALSE; newdoc.internal_link = FALSE; + goto try_again; } else { if (!dump_output_immediately) cleanup(); @@ -688,6 +698,48 @@ try_again: } } + /* + * Retrieval of a newdoc just failed, and just + * going to try_again would pop the next doc + * from history and try to get it without further + * questions. This may not be the right thing to do if + * we have POST data, so fake a PREV_DOC key if it seems + * that some prompting should be done. Dunno about the + * traversal logic, so I leave that case alone. + */ + if (history[nhist - 1].post_data && + !history[nhist - 1].safe) { + /* Set newdoc fields, just in case the PREV_DOC + * gets cancelled. - kw */ + if (!curdoc.address) { + StrAllocCopy(newdoc.address, HTLoadedDocumentURL()); + StrAllocCopy(newdoc.title, HTLoadedDocumentTitle()); + if (HTMainAnchor && HTMainAnchor->post_data) { + StrAllocCopy(newdoc.post_data, + HTMainAnchor->post_data); + StrAllocCopy(newdoc.post_content_type, + HTMainAnchor->post_content_type); + } else { + FREE(newdoc.post_data); + } + newdoc.isHEAD = HTLoadedDocumentIsHEAD(); + newdoc.safe = HTLoadedDocumentIsSafe(); + newdoc.internal_link = FALSE; + } else { + StrAllocCopy(newdoc.address, curdoc.address); + StrAllocCopy(newdoc.title, curdoc.title); + StrAllocCopy(newdoc.post_data, curdoc.post_data); + StrAllocCopy(newdoc.post_content_type, + curdoc.post_content_type); + newdoc.isHEAD = curdoc.isHEAD; + newdoc.safe = curdoc.safe; + newdoc.internal_link = curdoc.internal_link; + newdoc.line = curdoc.line; + newdoc.link = curdoc.link; + } + cmd = LYK_PREV_DOC; + goto new_cmd; + } goto try_again; break; @@ -696,6 +748,7 @@ try_again: * Marvelously, we got the document! */ LYoverride_no_cache = FALSE; /* Was TRUE if popped. - FM */ + LYinternal_flag = FALSE; /* Reset to default. - kw */ if (trace_mode_flag == TRUE) { WWW_TraceFlag = TRUE; trace_mode_flag = FALSE; @@ -728,10 +781,12 @@ try_again: len = strlen(cp); #ifdef VMS if (!strncasecomp(temp, cp, len) && + strlen(temp) > len) #else if (!strncmp(temp, cp, len) && + strlen(temp) > len) #endif /* VMS */ - strlen(temp) > len) { + { /* * We're interactive and this might be a * bookmark file entered as a startfile @@ -755,11 +810,11 @@ try_again: for (i = 0; i <= MBM_V_MAXFILES; i++) { if (MBM_A_subbookmark[i] && #ifdef VMS - !strcasecomp(cp, MBM_A_subbookmark[i])) + !strcasecomp(cp, MBM_A_subbookmark[i]) #else - !strcmp(cp, MBM_A_subbookmark[i])) + !strcmp(cp, MBM_A_subbookmark[i]) #endif /* VMS */ - { + ) { StrAllocCopy(BookmarkPage, MBM_A_subbookmark[i]); break; @@ -943,7 +998,7 @@ try_again: LYforce_HTML_mode = FALSE; popped_doc = FALSE; - } /* end if (STREQ(newdoc.address, curdoc.address) */ + } /* end if (LYforce_no_cache || force_load || are_different(...)) */ if (dump_output_immediately) { if (crawl) { @@ -1165,7 +1220,10 @@ try_again: * Refresh the screen if neccessary. */ if (refresh_screen) { - clear(); + if (enable_scrollback) + clear(); + else + erase(); HText_pageDisplay(Newline, prev_target); #ifdef DIRED_SUPPORT @@ -1629,22 +1687,112 @@ new_cmd: /* */ StrAllocCopy(newdoc.address, links[lindx].lname); StrAllocCopy(newdoc.title, links[lindx].hightext); +#ifndef DONT_TRACK_INTERNAL_LINKS /* - * Might be an anchor in the same doc from a POST - * form. If so, don't free the content. -- FM + * For internal links, retain POST content if present. + * If we are on the List Page, prevent pushing it on + * the history stack. Otherwise set try_internal to + * signal that the top of the loop should attempt to + * reposition directly, without calling getfile. - kw */ if (links[lindx].type == WWW_INTERN_LINK_TYPE) { - LYoverride_no_cache = TRUE; + LYinternal_flag = TRUE; newdoc.internal_link = TRUE; - if (0==strcmp(curdoc.address, LYlist_temp_url()) && - 0==strcmp((curdoc.title ? curdoc.title : ""), - LIST_PAGE_TITLE)) { + if (0==strcmp((curdoc.title ? curdoc.title : ""), + LIST_PAGE_TITLE) && + 0==strcmp(HTLoadedDocumentURL(), LYlist_temp_url())) { + if (!curdoc.post_data || + /* + * Normal case - List Page is not associated + * with post data. - kw + */ + (!LYresubmit_posts && curdoc.post_data && + history[nhist - 1].post_data && + !strcmp(curdoc.post_data, + history[nhist - 1].post_data) && + HText_getContentBase() && + !strncmp(HText_getContentBase(), + strncmp(history[nhist - 1].address, + "LYNXIMGMAP:", 11) ? + history[nhist - 1].address : + history[nhist - 1].address + 11, + strlen(HText_getContentBase())))) { + /* + * Normal case - as best as we can check, the + * document at the top of the history stack + * seems to be the document the List Page is + * about (or a LYNXIMGMAP derived from it), + * and LYresubmit_posts is not set, so don't + * prompt here. If we actually have to repeat + * a POST because, against expectations, the + * underlying document isn't cached any more, + * HTAccess will prompt for confirmation, + * unless we had LYK_NOCACHE. - kw + */ + LYinternal_flag = TRUE; + } else { + HTLastConfirmCancelled(); /* reset flag */ + if (!confirm_post_resub(newdoc.address, + newdoc.title, + (LYresubmit_posts && + HText_POSTReplyLoaded(&newdoc)) ? 1 : 2, + 2)) { + if (HTLastConfirmCancelled() || + (LYresubmit_posts && + !HText_POSTReplyLoaded(&newdoc))) { + /* cancel the whole thing */ + LYforce_no_cache = FALSE; + reloading = FALSE; + StrAllocCopy(newdoc.address, curdoc.address); + StrAllocCopy(newdoc.title, curdoc.title); + newdoc.internal_link = curdoc.internal_link; + _statusline(CANCELLED); + sleep(InfoSecs); + if (nlinks > 0) + HText_pageDisplay(curdoc.line, prev_target); + break; + } else if (LYresubmit_posts) { + /* If LYresubmit_posts is set, and the + answer was No, and we have a cached + copy, then use it. - kw */ + LYforce_no_cache = FALSE; + } else { + /* if No, but not ^C or ^G, drop + * the post data. Maybe the link + * wasn't meant to be internal after + * all, here we can recover from that + * assumption. - kw */ + FREE(newdoc.post_data); + FREE(newdoc.post_content_type); + newdoc.internal_link = FALSE; + _statusline(DISCARDING_POST_DATA); + sleep(AlertSecs); + } + } + } + /* + * Don't push the List Page if we follow an + * internal link given by it. - kw + */ FREE(curdoc.address); } else try_internal = TRUE; + if (!(LYresubmit_posts && newdoc.post_data)) + LYinternal_flag = TRUE; force_load = TRUE; break; + } else { + /* + * Free POST content if not an internal link. - kw + */ + FREE(newdoc.post_data); + FREE(newdoc.post_content_type); } +#endif /* DONT_TRACK_INTERNAL_LINKS */ + /* + * Might be an anchor in the same doc from a POST + * form. If so, don't free the content. -- FM + */ if (are_different(&curdoc, &newdoc)) { FREE(newdoc.post_data); FREE(newdoc.post_content_type); @@ -1742,7 +1890,8 @@ new_cmd: /* */ if ((curdoc.post_data != NULL && curdoc.safe != TRUE) && - HTConfirm(CONFIRM_POST_RESUBMISSION) == FALSE) { + confirm_post_resub(curdoc.address, curdoc.title, + 1, 1) == FALSE) { _statusline(CANCELLED); sleep(InfoSecs); break; @@ -1832,7 +1981,8 @@ new_cmd: /* */ if ((curdoc.post_data != NULL && curdoc.safe != TRUE) && - HTConfirm(CONFIRM_POST_RESUBMISSION) == FALSE) { + confirm_post_resub(curdoc.address, NULL, + 0, 0) == FALSE) { _statusline(WILL_NOT_RELOAD_DOC); sleep(InfoSecs); } else { @@ -1863,7 +2013,8 @@ new_cmd: /* */ if ((curdoc.post_data != NULL && curdoc.safe != TRUE) && - HTConfirm(CONFIRM_POST_RESUBMISSION) == FALSE) { + confirm_post_resub(curdoc.address, NULL, + 0, 0) == FALSE) { _statusline(WILL_NOT_RELOAD_DOC); sleep(InfoSecs); } else { @@ -1894,7 +2045,8 @@ new_cmd: /* */ if ((curdoc.post_data != NULL && curdoc.safe != TRUE) && - HTConfirm(CONFIRM_POST_RESUBMISSION) == FALSE) { + confirm_post_resub(curdoc.address, NULL, + 1, 1) == FALSE) { _statusline(WILL_NOT_RELOAD_DOC); sleep(InfoSecs); } else { @@ -1919,7 +2071,8 @@ new_cmd: /* */ if ((curdoc.post_data != NULL && curdoc.safe != TRUE) && - HTConfirm(CONFIRM_POST_RESUBMISSION) == FALSE) { + confirm_post_resub(curdoc.address, NULL, + 1, 1) == FALSE) { _statusline(WILL_NOT_RELOAD_DOC); sleep(InfoSecs); } else { @@ -2080,9 +2233,7 @@ new_cmd: /* case LYK_REFRESH: refresh_screen = TRUE; -#if defined(VMS) || defined(USE_SLANG) lynx_force_repaint(); -#endif /* VMS || USE_SLANG */ break; case LYK_HOME: @@ -2398,8 +2549,12 @@ new_cmd: /* */ DocAddress WWWDoc; HTParentAnchor *tmpanchor; + HText *text; + BOOLEAN conf = FALSE, first = TRUE; + HTLastConfirmCancelled(); /* reset flag */ while (nhist > 0) { + conf = FALSE; if (history[(nhist - 1)].post_data == NULL) { break; } @@ -2414,12 +2569,29 @@ new_cmd: /* if (HTAnchor_safe(tmpanchor)) { break; } - if (((HText *)HTAnchor_document(tmpanchor) == NULL || - (LYresubmit_posts && - NONINTERNAL_OR_PHYS_DIFFERENT( + if (((text = + (HText *)HTAnchor_document(tmpanchor)) == NULL && + (!strncmp(WWWDoc.address, "LYNXIMGMAP:", 11) || + (conf = confirm_post_resub(WWWDoc.address, + history[(nhist - 1)].title, + 0, 0)) + == FALSE)) || + ((LYresubmit_posts && !conf && + (NONINTERNAL_OR_PHYS_DIFFERENT( (document *)&history[(nhist - 1)], - &curdoc))) && - HTConfirm(CONFIRM_POST_RESUBMISSION) == FALSE) { + &curdoc) || + NONINTERNAL_OR_PHYS_DIFFERENT( + (document *)&history[(nhist - 1)], + &newdoc))) && + !confirm_post_resub(WWWDoc.address, + history[(nhist - 1)].title, + 2, 2))) { + if (HTLastConfirmCancelled()) { + if (!first && curdoc.internal_link) + FREE(curdoc.address); + cmd = LYK_DO_NOTHING; + goto new_cmd; + } if (nhist == 1) { _statusline(CANCELLED); sleep(InfoSecs); @@ -2429,13 +2601,29 @@ new_cmd: /* } else { _user_message(WWW_SKIP_MESSAGE, WWWDoc.address); sleep(MessageSecs); - LYpop(&curdoc); + do { + LYpop(&curdoc); + } while (nhist > 1 && !are_different( + (document *)&history[(nhist - 1)], + &curdoc)); + first = FALSE; /* have popped at least one */ continue; } } else { + /* + * Break from loop; if user just confirmed to + * load again because document wasn't in cache, + * set LYforce_no_cache to avoid unnecessary + * repeat question down the road. - kw + */ + if (conf) + LYforce_no_cache = TRUE; break; } } + + if (!first) + curdoc.internal_link = FALSE; /* * Set newdoc.address to empty to pop a file. @@ -2494,6 +2682,7 @@ new_cmd: /* if (links[curdoc.link].form->disabled == YES) { HTOutputFormat = WWW_PRESENT; LYforce_no_cache = FALSE; + reloading = FALSE; break; } /* @@ -2506,6 +2695,7 @@ new_cmd: /* sleep(MessageSecs); HTOutputFormat = WWW_PRESENT; LYforce_no_cache = FALSE; + reloading = FALSE; break; } /* @@ -2517,6 +2707,7 @@ new_cmd: /* HTAlert(FORM_MAILTO_DISALLOWED); HTOutputFormat = WWW_PRESENT; LYforce_no_cache = FALSE; + reloading = FALSE; break; } /* @@ -2530,6 +2721,7 @@ new_cmd: /* HTAlert(FILE_ACTIONS_DISALLOWED); HTOutputFormat = WWW_PRESENT; LYforce_no_cache = FALSE; + reloading = FALSE; break; } /* @@ -2586,6 +2778,7 @@ new_cmd: /* } HTOutputFormat = WWW_PRESENT; LYforce_no_cache = FALSE; + reloading = FALSE; break; } #ifdef NOTDEFINED /* We're disabling form inputs instead of using this. - FM */ @@ -2601,6 +2794,7 @@ new_cmd: /* "Enctype multipart/form-data not yet supported! Cannot submit."); HTOutputFormat = WWW_PRESENT; LYforce_no_cache = FALSE; + reloading = FALSE; break; } } @@ -2656,9 +2850,11 @@ new_cmd: /* !strncmp(links[curdoc.link].lname, "file:", 5)) { if (strncmp(curdoc.address, "file:", 5)) { HTAlert(FILE_SERVED_LINKS_DISALLOWED); + reloading = FALSE; break; } else if (curdoc.bookmark != NULL) { HTAlert(FILE_BOOKMARKS_DISALLOWED); + reloading = FALSE; break; } } @@ -2691,7 +2887,8 @@ new_cmd: /* (!strncmp(links[curdoc.link].lname, "LYNXHIST:", 9) && strcmp((curdoc.title ? curdoc.title : ""), - HISTORY_PAGE_TITLE)) || + HISTORY_PAGE_TITLE) && + strcmp(curdoc.address, LYlist_temp_url())) || (!strncmp(links[curdoc.link].lname, "LYNXPRINT:", 10) && strcmp((curdoc.title ? curdoc.title : ""), @@ -2699,6 +2896,7 @@ new_cmd: /* HTAlert(SPECIAL_VIA_EXTERNAL_DISALLOWED); HTOutputFormat = WWW_PRESENT; LYforce_no_cache = FALSE; + reloading = FALSE; break; } /* @@ -2707,6 +2905,13 @@ new_cmd: /* StrAllocCopy(newdoc.address, links[curdoc.link].lname); StrAllocCopy(newdoc.title, links[curdoc.link].hightext); #ifndef DONT_TRACK_INTERNAL_LINKS + /* + * For internal links, retain POST content if present. + * If we are on the List Page, prevent pushing it on + * the history stack. Otherwise set try_internal to + * signal that the top of the loop should attempt to + * reposition directly, without calling getfile. - kw + */ /* * Might be an internal link anchor in the same doc. * If so, take the try_internal shortcut if we didn't @@ -2715,19 +2920,105 @@ new_cmd: /* newdoc.internal_link = (links[curdoc.link].type == WWW_INTERN_LINK_TYPE); if (newdoc.internal_link) { + /* + * Special case of List Page document with an + * internal link indication, which may really stand + * for an internal link within the document the + * List Page is about. - kw + */ if (0==strcmp(curdoc.address, LYlist_temp_url()) && 0==strcmp((curdoc.title ? curdoc.title : ""), LIST_PAGE_TITLE)) { + if (!curdoc.post_data || + /* + * Normal case - List Page is not associated + * with post data. - kw + */ + (!LYresubmit_posts && curdoc.post_data && + history[nhist - 1].post_data && + !strcmp(curdoc.post_data, + history[nhist - 1].post_data) && + HText_getContentBase() && + !strncmp(HText_getContentBase(), + strncmp(history[nhist - 1].address, + "LYNXIMGMAP:", 11) ? + history[nhist - 1].address : + history[nhist - 1].address + 11, + strlen(HText_getContentBase())))) { + /* + * Normal case - as best as we can check, the + * document at the top of the history stack + * seems to be the document the List Page is + * about (or a LYNXIMGMAP derived from it), + * and LYresubmit_posts is not set, so don't + * prompt here. If we actually have to repeat + * a POST because, against expectations, the + * underlying document isn't cached any more, + * HTAccess will prompt for confirmation, + * unless we had LYK_NOCACHE. - kw + */ + LYinternal_flag = TRUE; + } else { + HTLastConfirmCancelled(); /* reset flag */ + if (!confirm_post_resub(newdoc.address, + newdoc.title, + (LYresubmit_posts && + HText_POSTReplyLoaded(&newdoc)) ? 1 : 2, + 2)) { + if (HTLastConfirmCancelled() || + (LYresubmit_posts && + cmd != LYK_NOCACHE && + !HText_POSTReplyLoaded(&newdoc))) { + /* cancel the whole thing */ + LYforce_no_cache = FALSE; + reloading = FALSE; + StrAllocCopy(newdoc.address, curdoc.address); + StrAllocCopy(newdoc.title, curdoc.title); + newdoc.internal_link = curdoc.internal_link; + _statusline(CANCELLED); + sleep(InfoSecs); + break; + } else if (LYresubmit_posts && + cmd != LYK_NOCACHE) { + /* If LYresubmit_posts is set, and the + answer was No, and the key wasn't + NOCACHE, and we have a cached copy, + then use it. - kw */ + LYforce_no_cache = FALSE; + } else { + /* if No, but not ^C or ^G, drop + * the post data. Maybe the link + * wasn't meant to be internal after + * all, here we can recover from that + * assumption. - kw */ + FREE(newdoc.post_data); + FREE(newdoc.post_content_type); + newdoc.internal_link = FALSE; + _statusline(DISCARDING_POST_DATA); + sleep(AlertSecs); + } + } + } + /* + * Don't push the List Page if we follow an + * internal link given by it. - kw + */ FREE(curdoc.address); } else if (cmd != LYK_NOCACHE) { try_internal = TRUE; } - LYoverride_no_cache = TRUE; /* ??? */ + if (!(LYresubmit_posts && newdoc.post_data)) + LYinternal_flag = TRUE; /* We still set force_load so that history pushing ** etc. will be done. - kw */ force_load = TRUE; break; } else { + /* + * Free POST content if not an internal link. - kw + */ + FREE(newdoc.post_data); + FREE(newdoc.post_content_type); } #endif /* TRACK_INTERNAL_LINKS */ /* @@ -3309,7 +3600,8 @@ check_goto_URL: */ if ((curdoc.post_data != NULL && curdoc.safe != TRUE) && - HTConfirm(CONFIRM_POST_RESUBMISSION) == FALSE) { + confirm_post_resub(curdoc.address, curdoc.title, + 2, 1) == FALSE) { _statusline(WILL_NOT_RELOAD_DOC); sleep(InfoSecs); @@ -3814,6 +4106,10 @@ check_goto_URL: curdoc.bookmark); } else { /* behave like REFRESH for backward compatability */ refresh_screen = TRUE; + if (old_c != real_c) { + old_c = real_c; + lynx_force_repaint(); + } break; } if (TOUPPER(c) == 'Y') { @@ -3914,15 +4210,16 @@ check_goto_URL: /* * Print list page to file. */ - if (showlist(&newdoc.address, TRUE) < 0) + if (showlist(&newdoc, TRUE) < 0) break; StrAllocCopy(newdoc.title, LIST_PAGE_TITLE); - FREE(newdoc.post_data); - FREE(newdoc.post_content_type); - FREE(newdoc.bookmark); - newdoc.isHEAD = FALSE; - newdoc.safe = FALSE; - newdoc.internal_link = FALSE; + /* + * showlist will sett newdoc's other fields. It may leave + * post_data intact so the list can be used to follow + * internal links in the current document even if it is + * a POST response. - kw + */ + refresh_screen = TRUE; /* redisplay */ if (LYValidate || check_realm) { LYPermitURL = TRUE; @@ -4207,6 +4504,14 @@ check_goto_URL: * exists in this bookmark file. - FM */ _statusline(MULTIBOOKMARKS_SELF); + } else if (curdoc.post_data != NULL && + links[curdoc.link].type == WWW_INTERN_LINK_TYPE) { + /* + * Internal link, and document has POST content. + */ + _statusline(NOBOOK_POST_FORM); + sleep(MessageSecs); + break; } else { /* * Only offer the link in a document with @@ -4219,6 +4524,15 @@ check_goto_URL: c = LYgetch(); } if (TOUPPER(c) == 'L') { + if (curdoc.post_data != NULL && + links[curdoc.link].type == WWW_INTERN_LINK_TYPE) { + /* + * Internal link, and document has POST content. + */ + _statusline(NOBOOK_POST_FORM); + sleep(MessageSecs); + break; + } /* * User does want to save the link. - FM */ @@ -4468,7 +4782,8 @@ check_add_bookmark_to_self: #endif /* DIRED_SUPPORT */ } else if (!strcmp((curdoc.title ? curdoc.title : ""), - HISTORY_PAGE_TITLE)) { + HISTORY_PAGE_TITLE) && + !strncmp(links[curdoc.link].lname, "LYNXHIST:", 9)) { int number = atoi(links[curdoc.link].lname+9); if ((history[number].post_data != NULL && history[number].safe != TRUE) && @@ -4528,18 +4843,27 @@ check_add_bookmark_to_self: */ StrAllocCopy(newdoc.address, links[curdoc.link].lname); StrAllocCopy(newdoc.title, links[curdoc.link].hightext); - newdoc.internal_link = FALSE; +#ifndef DONT_TRACK_INTERNAL_LINKS + /* + * Might be an internal link in the same doc from a + * POST form. If so, don't free the content. - kw + */ + if (links[curdoc.link].type != WWW_INTERN_LINK_TYPE) +#else /* * Might be an anchor in the same doc from a POST * form. If so, don't free the content. -- FM */ - if (are_different(&curdoc, &newdoc)) { + if (are_different(&curdoc, &newdoc)) +#endif /* TRACK_INTERNAL_LINKS */ + { FREE(newdoc.post_data); FREE(newdoc.post_content_type); FREE(newdoc.bookmark); newdoc.isHEAD = FALSE; newdoc.safe = FALSE; } + newdoc.internal_link = FALSE; newdoc.link = 0; HTOutputFormat = HTAtom_for("www/download"); /* @@ -4744,7 +5068,7 @@ check_add_bookmark_to_self: if (TOUPPER(c) == 'D') { char *scheme = strncmp(curdoc.address, "LYNXIMGMAP:", 11) ? curdoc.address : curdoc.address + 11; - if (strncmp(scheme, "http", 4)) { + if (LYCanDoHEAD(scheme) != TRUE) { _statusline(DOC_NOT_HTTP_URL); sleep(MessageSecs); } else { @@ -4776,6 +5100,7 @@ check_add_bookmark_to_self: strncmp(links[curdoc.link].lname, "http", 4) && strncmp(links[curdoc.link].lname, "LYNXIMGMAP:http", 15) && + LYCanDoHEAD(links[curdoc.link].lname) != TRUE && (links[curdoc.link].type != WWW_INTERN_LINK_TYPE || !curdoc.address || strncmp(curdoc.address, "http", 4))) { @@ -4787,6 +5112,8 @@ check_add_bookmark_to_self: sleep(MessageSecs); } else if (links[curdoc.link].type == WWW_FORM_LINK_TYPE && strncmp(links[curdoc.link].form->submit_action, + "lynxcgi:", 8) && + strncmp(links[curdoc.link].form->submit_action, "http", 4)) { _statusline(FORM_ACTION_NOT_HTTP_URL); sleep(MessageSecs); @@ -4799,8 +5126,6 @@ check_add_bookmark_to_self: } else { HEAD_request = TRUE; LYforce_no_cache = TRUE; - StrAllocCopy(newdoc.title, links[curdoc.link].hightext); - StrAllocCat(newdoc.title, " - (HEAD)"); cmd = LYK_ACTIVATE; goto new_cmd; } @@ -4844,7 +5169,7 @@ check_add_bookmark_to_self: * a HEAD request is appropriate for the * current document. - FM */ - if (strncmp(scheme, "http", 4)) { + if (LYCanDoHEAD(scheme) != TRUE) { _statusline(DOC_NOT_HTTP_URL); sleep(MessageSecs); } else { @@ -4998,6 +5323,88 @@ check_add_bookmark_to_self: } } +/* + * Ask a post resubmission prompt with some indication of what would + * be resubmitted, useful especially for going backward in history. + * Try to use parts of the address or, if given, the title, depending + * on how much fits on the statusline. + * if_imgmap and if_file indicate how to handle an address that is + * a "LYNXIMGMAP:", or a "file:" URL (presumably the List Page file), + * respectively: 0: auto-deny, 1: auto-confirm, 2: prompt. + * - kw + */ + +PRIVATE BOOL confirm_post_resub ARGS4( + CONST char*, address, + CONST char*, title, + int, if_imgmap, + int, if_file) +{ + size_t len1; + CONST char *msg = CONFIRM_POST_RESUBMISSION_TO; + char buf[240]; + char *temp = NULL; + BOOL res; + size_t maxlen = LYcols - 6; + if (!address) { + return(NO); + } else if (!strncmp(address, "LYNXIMGMAP:", 11)) { + if (if_imgmap <= 0) + return(NO); + else if (if_imgmap == 1) + return(YES); + else + msg = CONFIRM_POST_LIST_RELOAD; + } else if (!strncmp(address, "file:", 5)) { + if (if_file <= 0) + return(NO); + else if (if_file == 1) + return(YES); + else + msg = CONFIRM_POST_LIST_RELOAD; + } else if (dump_output_immediately) { + return(NO); + } + if (maxlen >= sizeof(buf)) + maxlen = sizeof(buf) - 1; + if ((len1 = strlen(msg)) + + strlen(address) <= maxlen) { + sprintf(buf, msg, address); + return HTConfirm(buf); + } + if (len1 + strlen(temp = HTParse(address, "", + PARSE_ACCESS+PARSE_HOST+PARSE_PATH + +PARSE_PUNCTUATION)) <= maxlen) { + sprintf(buf, msg, temp); + res = HTConfirm(buf); + FREE(temp); + return(res); + } + FREE(temp); + if (title && (len1 + strlen(title) <= maxlen)) { + sprintf(buf, msg, title); + return HTConfirm(buf); + } + if (len1 + strlen(temp = HTParse(address, "", + PARSE_ACCESS+PARSE_HOST + +PARSE_PUNCTUATION)) <= maxlen) { + sprintf(buf, msg, temp); + res = HTConfirm(buf); + FREE(temp); + return(res); + } + FREE(temp); + if ((temp = HTParse(address, "", PARSE_HOST)) && *temp && + len1 + strlen(temp) <= maxlen) { + sprintf(buf, msg, temp); + res = HTConfirm(buf); + FREE(temp); + return(res); + } + FREE(temp); + return HTConfirm(CONFIRM_POST_RESUBMISSION); +} + PRIVATE int are_different ARGS2( document *, doc1, document *, doc2) diff --git a/src/LYMap.c b/src/LYMap.c index 103a41eb..1c2a194e 100644 --- a/src/LYMap.c +++ b/src/LYMap.c @@ -53,13 +53,14 @@ PRIVATE HTList * LynxMaps = NULL; PUBLIC BOOL LYMapsOnly = FALSE; /* - * Utility for freeing the list of MAPs. - FM + * Utility for freeing a list of MAPs. */ -PRIVATE void LYLynxMaps_free NOARGS +PUBLIC void ImageMapList_free ARGS1( + HTList *, theList) { LYImageMap *map; LYMapElement *element; - HTList *cur = LynxMaps; + HTList *cur = theList; HTList *current; if (!cur) @@ -81,36 +82,92 @@ PRIVATE void LYLynxMaps_free NOARGS } FREE(map); } - HTList_delete(LynxMaps); + HTList_delete(theList); + return; +} + +/* + * Utility for freeing the global list of MAPs. - kw + */ +PRIVATE void LYLynxMaps_free NOARGS +{ + ImageMapList_free(LynxMaps); LynxMaps = NULL; return; } +/* + * We keep two kinds of lists: + * - A global list (LynxMaps) shared by MAPs from all documents that + * do not have POST data. + * - For each response to a POST which contains MAPs, a list specific + * to this combination of URL and post_data. It is kept in the + * HTParentAnchor structure and is freed when the document is removed + * from memory, in the course of normal removal of anchors. + * MAPs from POST responses can only be accessed via internal links, + * i.e. from within the same document (with the same post_data). + * The notion of "same document" is extended, so that LYNXIMGMAP: + * and List Page screens are logically part of the document on which + * they are based. - kw + * + * If DONT_TRACK_INTERNAL_LINKS is defined, only the global list will + * be used for all MAPs. + * + */ + /* - * Utility for creating an LYImageMap list (LynxMaps), if it doesn't + * Utility for creating an LYImageMap list, if it doesn't * exist already, adding LYImageMap entry structures if needed, and * removing any LYMapElements in a pre-existing LYImageMap entry so that * it will have only those from AREA tags for the current analysis of * MAP element content. - FM */ -PUBLIC BOOL LYAddImageMap ARGS2( +PUBLIC BOOL LYAddImageMap ARGS3( char *, address, - char *, title) + char *, title, + HTParentAnchor *, node_anchor) { LYImageMap *new = NULL; LYImageMap *old = NULL; HTList *cur = NULL; + HTList *theList = NULL; HTList *curele = NULL; LYMapElement *ele = NULL; if (!(address && *address)) return FALSE; + if (!(node_anchor && node_anchor->address)) + return FALSE; - if (!LynxMaps) { - LynxMaps = HTList_new(); - atexit(LYLynxMaps_free); - } else { - cur = LynxMaps; + /* + * Set theList to either the global LynxMaps list or, if we + * are associated with post data, the specific list. The + * list is created if it doesn't already exist. - kw + */ +#ifndef DONT_TRACK_INTERNAL_LINKS + if (node_anchor->post_data) { + /* + * We are handling a MAP element found while parsing + * node_anchor's stream of data, and node_anchor has + * post_data associated and should therefore represent + * a POST response, so use the specific list. - kw + */ + theList = node_anchor->imaps; + if (!theList) { + theList = node_anchor->imaps = HTList_new(); + } + } else +#endif + { + if (!LynxMaps) { + LynxMaps = HTList_new(); + atexit(LYLynxMaps_free); + } + theList = LynxMaps; + } + + if (theList) { + cur = theList; while (NULL != (old = (LYImageMap *)HTList_nextObject(cur))) { if (!strcmp(old->address, address)) { FREE(old->address); @@ -141,31 +198,59 @@ PUBLIC BOOL LYAddImageMap ARGS2( if (title && *title) StrAllocCopy(new->title, title); if (new != old) - HTList_addObject(LynxMaps, new); + HTList_addObject(theList, new); return TRUE; } /* * Utility for adding LYMapElements to LYImageMaps - * in the LynxMaps list. - FM + * in the appropriate list. - FM */ -PUBLIC BOOL LYAddMapElement ARGS4( +PUBLIC BOOL LYAddMapElement ARGS5( char *, map, char *, address, char *, title, + HTParentAnchor *, node_anchor, BOOL, intern_flag) { LYMapElement *new = NULL; LYImageMap *theMap = NULL; + HTList *theList = NULL; HTList *cur = NULL; if (!(map && *map && address && *address)) return FALSE; + if (!(node_anchor && node_anchor->address)) + return FALSE; - if (!LynxMaps) - LYAddImageMap(map, NULL); + /* + * Set theList to either the global LynxMaps list or, if we + * are associated with post data, the specific list. The + * list should already exist, since this function is only called + * if the AREA tag we are handling was within a MAP element + * in node_anchor's stream of data, so that LYAddImageMap has + * been called. - kw + */ +#ifndef DONT_TRACK_INTERNAL_LINKS + if (node_anchor->post_data) { + /* + * We are handling an AREA tag found while parsing + * node_anchor's stream of data, and node_anchor has + * post_data associated and should therefore represent + * a POST response, so use the specific list. - kw + */ + theList = node_anchor->imaps; + if (!theList) + return FALSE; + } else +#endif + { + if (!LynxMaps) + LYAddImageMap(map, NULL, node_anchor); + theList = LynxMaps; + } - cur = LynxMaps; + cur = theList; while (NULL != (theMap = (LYImageMap *)HTList_nextObject(cur))) { if (!strcmp(theMap->address, map)) { break; @@ -224,6 +309,82 @@ PUBLIC BOOL LYHaveImageMap ARGS1( return FALSE; } +/* + * Fills in a Doccaddress structure for getting the HTParentAnchor of + * the underlying resource. ALso returns a pointer to that anchor in + * *punderlying if we are dealing with POST data. - kw + * + * address is the address of the underlying resource, i.e. the one + * containing the MAP element, the MAP's name appended as + * fragment is ignored. + * anAnchor is the LYNXIMGMAP: anchor; if it is associated with POST + * data, we want the specific list, otherwise the global list. + */ +PRIVATE void fill_DocAddress ARGS4( + DocAddress *, wwwdoc, + char *, address, + HTParentAnchor *, anAnchor, + HTParentAnchor **, punderlying) +{ + HTParentAnchor * underlying; + if (anAnchor && anAnchor->post_data) { + wwwdoc->address = address; + wwwdoc->post_data = anAnchor->post_data; + wwwdoc->post_content_type = anAnchor->post_content_type; + wwwdoc->bookmark = NULL; + wwwdoc->isHEAD = FALSE; + wwwdoc->safe = FALSE; + underlying = HTAnchor_parent(HTAnchor_findAddress(wwwdoc)); + if (underlying->safe) + wwwdoc->safe = TRUE; + if (punderlying) + *punderlying = underlying; + } else { + wwwdoc->address = address; + wwwdoc->post_data = NULL; + wwwdoc->post_content_type = NULL; + wwwdoc->bookmark = NULL; + wwwdoc->isHEAD = FALSE; + wwwdoc->safe = FALSE; + if (punderlying) + *punderlying = NULL; + } +} + +/* + * Get the appropriate list for creating a LYNXIMGMAP: pseudo- + * document: either the global list (LynxMaps), or the specific + * list if a List Page for a POST response is requested. Also + * fill in the DocAddress structure etc. by calling fill_DocAddress(). + * + * address is the address of the underlying resource, i.e. the one + * containing the MAP element, the MAP's name appended as + * fragment is ignored. + * anchor is the LYNXIMGMAP: anchor for which LYLoadIMGmap() is + * requested; if it is associated with POST data, we want the + * specific list for this combination of address+post_data. + * + * if DONT_TRACK_INTERNAL_LINKS is defined, the Anchor passed to + * LYLoadIMGmap() will never have post_data, so that the global list + * will be used. - kw + */ +PRIVATE HTList * get_the_list ARGS4( + DocAddress *, wwwdoc, + char *, address, + HTParentAnchor *, anchor, + HTParentAnchor **, punderlying) +{ + if (anchor && anchor->post_data) { + fill_DocAddress(wwwdoc, address, anchor, punderlying); + if (punderlying && *punderlying) + return (*punderlying)->imaps; + return anchor->imaps; + } else { + fill_DocAddress(wwwdoc, address, NULL, punderlying); + return LynxMaps; + } +} + /* LYLoadIMGmap - F.Macrides (macrides@sci.wfeb.edu) ** ------------ ** Create a text/html stream with a list of links @@ -243,10 +404,12 @@ PRIVATE int LYLoadIMGmap ARGS4 ( LYImageMap *theMap = NULL; char *MapTitle = NULL; char *MapAddress = NULL; + HTList *theList; HTList *cur = NULL; char *address = NULL; char *cp = NULL; DocAddress WWWDoc; + HTParentAnchor * underlying; BOOL old_cache_setting = LYforce_no_cache; BOOL old_reloading = reloading; HTFormat old_format_out = HTOutputFormat; @@ -259,13 +422,17 @@ PRIVATE int LYLoadIMGmap ARGS4 ( return(HT_NOT_LOADED); } - if (!LynxMaps) { - WWWDoc.address = address; - WWWDoc.post_data = NULL; - WWWDoc.post_content_type = NULL; - WWWDoc.bookmark = NULL; - WWWDoc.isHEAD = FALSE; - WWWDoc.safe = FALSE; + theList = get_the_list(&WWWDoc, address, anAnchor, &underlying); + if (WWWDoc.safe) + anAnchor->safe = TRUE; + + if (!theList) { + if (anAnchor->post_data && !WWWDoc.safe && + ((underlying && underlying->document && !LYforce_no_cache) || + HTConfirm("LYNXIMGMAP: " CONFIRM_POST_RESUBMISSION) != TRUE)) { + HTAlert("Image map from POST response not available!"); + return(HT_NOT_LOADED); + } LYforce_no_cache = TRUE; reloading = TRUE; HTOutputFormat = WWW_PRESENT; @@ -282,26 +449,27 @@ PRIVATE int LYLoadIMGmap ARGS4 ( reloading = old_reloading; HTOutputFormat = old_format_out; LYMapsOnly = FALSE; + theList = get_the_list(&WWWDoc, address, anAnchor, &underlying); } - if (!LynxMaps) { + if (!theList) { HTAlert(MAPS_NOT_AVAILABLE); return(HT_NOT_LOADED); } - cur = LynxMaps; + cur = theList; while (NULL != (theMap = (LYImageMap *)HTList_nextObject(cur))) { if (!strcmp(theMap->address, address)) { break; } } if (!(theMap && theMap->elements)) { - WWWDoc.address = address; - WWWDoc.post_data = NULL; - WWWDoc.post_content_type = NULL; - WWWDoc.bookmark = NULL; - WWWDoc.isHEAD = FALSE; - WWWDoc.safe = FALSE; + if (anAnchor->post_data && !WWWDoc.safe && + ((underlying && underlying->document && !LYforce_no_cache) || + HTConfirm("LYNXIMGMAP: " CONFIRM_POST_RESUBMISSION) != TRUE)) { + HTAlert("Image map from POST response not available!"); + return(HT_NOT_LOADED); + } LYforce_no_cache = TRUE; reloading = TRUE; HTOutputFormat = WWW_PRESENT; @@ -318,7 +486,7 @@ PRIVATE int LYLoadIMGmap ARGS4 ( reloading = old_reloading; HTOutputFormat = old_format_out; LYMapsOnly = FALSE; - cur = LynxMaps; + cur = get_the_list(&WWWDoc, address, anAnchor, &underlying); while (NULL != (theMap = (LYImageMap *)HTList_nextObject(cur))) { if (!strcmp(theMap->address, address)) { break; @@ -330,7 +498,9 @@ PRIVATE int LYLoadIMGmap ARGS4 ( } } +#ifdef DONT_TRACK_INTERNAL_LINKS anAnchor->no_cache = TRUE; +#endif target = HTStreamStack(format_in, format_out, diff --git a/src/LYMap.h b/src/LYMap.h index 48829eb7..a0ef6337 100644 --- a/src/LYMap.h +++ b/src/LYMap.h @@ -4,7 +4,11 @@ extern BOOL LYMapsOnly; -extern BOOL LYAddImageMap PARAMS((char *address, char *title)); -extern BOOL LYAddMapElement PARAMS((char *map, char *address, char *title, BOOL intern_flag)); +extern void ImageMapList_free PARAMS((HTList * list)); +extern BOOL LYAddImageMap PARAMS((char *address, char *title, + HTParentAnchor *node_anchor)); +extern BOOL LYAddMapElement PARAMS((char *map, char *address, char *title, + HTParentAnchor *node_anchor, + BOOL intern_flag)); #endif /* LYMAP_H */ diff --git a/src/LYOptions.c b/src/LYOptions.c index 61f9e187..8eaa64a0 100644 --- a/src/LYOptions.c +++ b/src/LYOptions.c @@ -205,7 +205,10 @@ draw_options: * might have non-ASCII or multibyte/CJK characters. - FM */ response = 0; - clear(); + if (enable_scrollback) + clear(); + else + erase(); move(0, 5); lynx_start_h1_color (); @@ -1792,7 +1795,10 @@ draw_bookmark_list: * to increase the chances that any non-ASCII or multibyte/CJK * characters will be handled properly. - FM */ - clear(); + if (enable_scrollback) + clear(); + else + erase(); move(0, 5); lynx_start_h1_color (); diff --git a/src/LYPrint.c b/src/LYPrint.c index 5ded8fc1..b466ff74 100644 --- a/src/LYPrint.c +++ b/src/LYPrint.c @@ -16,16 +16,14 @@ #include "LYHistory.h" #include "LYSystem.h" #include "LYList.h" +#include "LYCharSets.h" /* To get current charset for mail header. */ #ifdef VMS #include "HTVMSUtils.h" #endif /* VMS */ #ifdef DOSPATH #include "HTDOS.h" #endif -#ifdef EXP_CHARTRANS -#include "LYCharSets.h" /* to get current charset for mail header */ extern BOOLEAN LYHaveCJKCharacterSet; -#endif #include "LYLeaks.h" @@ -104,19 +102,23 @@ PUBLIC int printfile ARGS1( WWWDoc.safe = newdoc->safe; if (!HTLoadAbsolute(&WWWDoc)) return(NOT_FOUND); - + + /* + * If we have an explicit content-base, we may use it even + * if not in source mode. - kw + */ + if (HText_getContentBase()) { + StrAllocCopy(content_base, HText_getContentBase()); + collapse_spaces(content_base); + if (!(content_base && *content_base)) { + FREE(content_base); + } + } /* * If document is source, load the content_base * and content_location strings. - FM */ if (HTisDocumentSource()) { - if (HText_getContentBase()) { - StrAllocCopy(content_base, HText_getContentBase()); - collapse_spaces(content_base); - if (!(content_base && *content_base)) { - FREE(content_base); - } - } if (HText_getContentLocation()) { StrAllocCopy(content_location, HText_getContentLocation()); collapse_spaces(content_location); @@ -433,13 +435,16 @@ PUBLIC int printfile ARGS1( } } - if ((outfile_fp = LYNewTxtFile(buffer)) == NULL) { + if ((outfile_fp = fopen(buffer,"w")) == NULL) { HTAlert(CANNOT_WRITE_TO_FILE); _statusline(NEW_FILENAME_PROMPT); FirstRecall = TRUE; FnameNum = FnameTotal; goto retry; } +#ifdef VMS + chmod(buffer, 0600); +#endif if (HTisDocumentSource()) { /* @@ -611,7 +616,6 @@ PUBLIC int printfile ARGS1( * if the document has 8-bit characters and we we seem * to have a valid charset. - kw */ -#ifdef EXP_CHARTRANS use_cte = HTLoadedDocumentEightbit(); disp_charset = LYCharSet_UC[current_char_set].MIMEname; /* @@ -623,10 +627,12 @@ PUBLIC int printfile ARGS1( strncasecomp(disp_charset, "x-", 2) == 0) { disp_charset = NULL; } -#else - use_cte = NO; - disp_charset = NULL; -#endif /* EXP_CHARTRANS */ +#ifdef NOTDEFINED + /* Enable this if indicating an 8-bit transfer without + * also indicating the charset causes problems. - kw */ + if (use_cte && !disp_charse) + use_cte = FALSE; +#endif /* NOTDEFINED */ use_type = (disp_charset || HTisDocumentSource()); use_mime = (use_cte || use_type); @@ -648,10 +654,6 @@ PUBLIC int printfile ARGS1( } else { fprintf(outfile_fp, "\n"); } - fprintf(outfile_fp, "Content-Base: %s\n", - content_base); - fprintf(outfile_fp, "Content-Location: %s\n", - content_location); } else { /* * Add Content-Type: text/plain if we have 8-bit @@ -665,6 +667,20 @@ PUBLIC int printfile ARGS1( } } /* + * If we are using MIME headers, add content-base and + * content-location if we have them. This will always + * be the case if the document is source. - kw + */ + if (use_mime) { + if (content_base) + fprintf(outfile_fp, "Content-Base: %s\n", + content_base); + if (content_location) + fprintf(outfile_fp, "Content-Location: %s\n", + content_location); + } + + /* * Add the To, Subject, and X-URL headers. - FM */ fprintf(outfile_fp, "To: %s\nSubject: %s\n", diff --git a/src/LYStyle.c b/src/LYStyle.c index 160eff5f..a596214e 100644 --- a/src/LYStyle.c +++ b/src/LYStyle.c @@ -237,6 +237,10 @@ where OBJECT is one of EM,STRONG,B,I,U,BLINK etc.\n\n", buffer); { parse_attributes(mono,fg,bg,DSTYLE_HIGH,"high"); } + else if (!strcmp(element, "normal")) /* added - kw */ + { + parse_attributes(mono,fg,bg,DSTYLE_NORMAL,"html"); + } /* this may vanish */ else if (!strncasecmp(element, "candy", 5)) /* [INLINE]'s */ { diff --git a/src/LYUtils.c b/src/LYUtils.c index a39042f3..47a2fca1 100644 --- a/src/LYUtils.c +++ b/src/LYUtils.c @@ -1897,11 +1897,18 @@ PUBLIC void statusline ARGS1( int a=(strncmp(buffer, "Alert", 5) || !hashStyles[s_alert].name ? s_status : s_alert); LynxChangeStyle (a, ABS_ON, 1); addstr(buffer); - wbkgdset(stdscr, (lynx_has_color - ? hashStyles[a].color - : hashStyles[a].mono) | ' '); + wbkgdset(stdscr, + ((lynx_has_color && LYShowColor >= SHOW_COLOR_ON) + ? hashStyles[a].color + :A_NORMAL) | ' '); clrtoeol(); - wbkgdset(stdscr, hashStyles[s_normal].color | ' '); + if (s_normal != NOSTYLE) + wbkgdset(stdscr, hashStyles[s_normal].color | ' '); + else + wbkgdset(stdscr, + ((lynx_has_color && LYShowColor >= SHOW_COLOR_ON) + ? displayStyles[DSTYLE_NORMAL].color + : A_NORMAL) | ' '); LynxChangeStyle (a, ABS_OFF, 0); } #endif @@ -2697,6 +2704,47 @@ PUBLIC int is_url ARGS1( } /* + * Determine whether we allow HEAD and related flags for a URL. - kw + */ +PUBLIC BOOLEAN LYCanDoHEAD ARGS1( + CONST char *, address + ) +{ + char *temp0 = NULL; + int isurl; + if (!(address && *address)) + return FALSE; + if (!strncmp(address, "http", 4)) + return TRUE; + /* Make copy for is_url() since caller may not care for case changes */ + StrAllocCopy(temp0, address); + isurl = is_url(temp0); + FREE(temp0); + if (!isurl) + return FALSE; + if (isurl == LYNXCGI_URL_TYPE) { +#if defined(LYNXCGI_LINKS) && !defined(VMS) + return TRUE; +#else + return FALSE; +#endif + } + if (isurl == NEWS_URL_TYPE || isurl == NNTP_URL_TYPE) { + char *temp = HTParse(address, "", PARSE_PATH); + char *cp = strrchr(temp, '/'); + if (strchr((cp ? cp : temp), '@') != NULL) { + FREE(temp); + return TRUE; + } + if (cp && isdigit(cp[1]) && strchr(cp, '-') == NULL) { + FREE(temp); + return TRUE; + } + FREE(temp); + } + return FALSE; +} +/* * Remove backslashes from any string. */ PUBLIC void remove_backslashes ARGS1( @@ -5530,3 +5578,29 @@ PUBLIC FILE *LYAppendToTxtFile ARGS1(char *, name) #endif return fp; } + +#ifdef UNIX +/* + * Restore normal permisions to a copy of a file that we have created + * with temp file restricted permissions. The normal umask should + * apply for user files. - kw + */ +PUBLIC void LYRelaxFilePermissions ARGS1(CONST char *, name) +{ + int mode; + struct stat stat_buf; + if (stat(name, &stat_buf) == 0 && + S_ISREG(stat_buf.st_mode) && + (mode = (stat_buf.st_mode & 0777)) == HIDE_CHMOD) { + /* + * It looks plausible that this is a file we created with + * temp file paranoid permissions (and the umask wasn't even + * more restrictive when it was copied). - kw + */ + int save = umask(HIDE_UMASK); + mode = ((mode & 0700) | 0066) & ~save; + umask(save); + chmod(name, mode); + } +} +#endif diff --git a/src/LYUtils.h b/src/LYUtils.h index 7af31349..9b8a8b35 100644 --- a/src/LYUtils.h +++ b/src/LYUtils.h @@ -25,6 +25,7 @@ extern void LYAddLocalhostAlias PARAMS((char *alias)); extern BOOLEAN LYisLocalAlias PARAMS((char *filename)); extern int LYCheckForProxyURL PARAMS((char *filename)); extern int is_url PARAMS((char *filename)); +extern BOOLEAN LYCanDoHEAD PARAMS((CONST char *address)); extern void remove_backslashes PARAMS((char *buf)); extern char *quote_pathname PARAMS((char *pathname)); extern BOOLEAN inlocaldomain NOPARAMS; @@ -61,7 +62,9 @@ extern int putenv PARAMS((CONST char *string)); FILE *LYNewBinFile PARAMS((char * name)); FILE *LYNewTxtFile PARAMS((char * name)); FILE *LYAppendToTxtFile PARAMS((char * name)); - +#ifdef UNIX +extern void LYRelaxFilePermissions PARAMS((CONST char * name)); +#endif /* * Whether or not the status line must be shown. */ diff --git a/src/LYexit.c b/src/LYexit.c index 625c05e3..74ce16c3 100644 --- a/src/LYexit.c +++ b/src/LYexit.c @@ -107,6 +107,7 @@ PUBLIC void LYexit ARGS1( #endif /* exit */ #ifndef VMS /* On VMS, the VMSexit() handler does these. - FM */ + fflush(stderr); if (LYOutOfMemory == TRUE) { LYOutOfMemory = FALSE; printf("\r\n%s\r\n\r\n", MEMORY_EXHAUSTED_ABORT); diff --git a/src/chrtrans/README.format b/src/chrtrans/README.format index 58f0b1cc..0ec556a2 100644 --- a/src/chrtrans/README.format +++ b/src/chrtrans/README.format @@ -96,11 +96,14 @@ d) string replacement definitions: * Syntax accepted: * <unicode> :<replace> * <unicode range> :<replace> + * <unicode> "<C replace>" + * <unicode range> "<C replace>" * * where <unicode range> ::= <unicode>-<unicode> * and <unicode> ::= U+<h><h><h><h> * and <h> ::= <hexadecimal digit> - * and <replace> any string not containing '\n' or '\0' + * and <replace> any string not containing '\n' or '\0', taken verbatim + * and <C replace> any string, with backslash having the usual C meaning Motivation: diff --git a/src/chrtrans/cp437_uni.tbl b/src/chrtrans/cp437_uni.tbl index ed97a69c..6bfbab22 100644 --- a/src/chrtrans/cp437_uni.tbl +++ b/src/chrtrans/cp437_uni.tbl @@ -1,7 +1,5 @@ #Shall this become the "default" translation? -#Meaning of that is currently unclear... It's different -#from the default input or defualt output charset... -#but there has to be exactly one table marked as "default". +#There has to be exactly one table marked as "default". D0 # #The MIME name of this charset. @@ -287,7 +285,7 @@ OIBM PC character set 0xff U+00a0 #NO-BREAK SPACE U+03ac:a' -U+03ad:î' +U+03ad "\356'" #:î' U+03ae:h' U+03af:i' U+03cc:o' diff --git a/src/chrtrans/iso01_uni.tbl b/src/chrtrans/iso01_uni.tbl index 14f71ff3..d2147771 100644 --- a/src/chrtrans/iso01_uni.tbl +++ b/src/chrtrans/iso01_uni.tbl @@ -21,7 +21,7 @@ OISO Latin 1 0x63 U+0063 U+0107 U+0109 U+010B U+010D 0x64-0x7e idem 0xa0-0xff idem -#0x00 U+fffd # don't let failed char lookups return '\0' +#0x00 U+fffd # don't let failed char lookups return 0 # Mappings of C0 control chars from original, disabled #0x01 U+263A #0x02 U+263B @@ -75,4 +75,4 @@ U+2122:(TM) 0x27 U+2019-U+201b # various single quotation marks 0x22 U+201c-U+201f # various double quotation marks -U+2297:(×) \ No newline at end of file +U+2297 "(\327)" \ No newline at end of file diff --git a/src/chrtrans/iso01_uni.tbl.orig b/src/chrtrans/iso01_uni.tbl.orig new file mode 100644 index 00000000..14f71ff3 --- /dev/null +++ b/src/chrtrans/iso01_uni.tbl.orig @@ -0,0 +1,78 @@ +# +# Unicode mapping table for ISO 8859-1 fonts iso01.* +# [use: unicode_start iso01.f16 iso01] +# +#Shall this become the "default" translation? +#Meaning of that is currently not well defined. It is different +#from the default input or default output charset... +#but there has to be exactly one table marked as "default". +D0 +# +#The MIME name of this charset. +Miso-8859-1 + +#Name as a Display Charset (used on Options screen) +OISO Latin 1 + +0x20 U+0020 U+1360 +0x21-0x62 idem +# The following line is an example for mapping several accented versions +# of small letter 'c' to 'c': +0x63 U+0063 U+0107 U+0109 U+010B U+010D +0x64-0x7e idem +0xa0-0xff idem +#0x00 U+fffd # don't let failed char lookups return '\0' +# Mappings of C0 control chars from original, disabled +#0x01 U+263A +#0x02 U+263B +#0x03 U+2665 +#0x04 U+2666 +#0x05 U+2663 +#0x06 U+2660 +#0x07 U+2022 +#0x08 U+25D8 +#0x09 U+25CB +#0x0A U+25D9 +#0x0B U+2642 +#0x0C U+2640 +#0x0D U+266A +#0x0E U+266B +#0x0E U+266C +#0x0F U+263C +#0x10 U+25B6 +#0x10 U+25BA +#0x11 U+25C0 +#0x11 U+25C4 +#0x12 U+2195 +#0x13 U+203C +#0x14 U+00B6 +#0x15 U+00A7 +#0x16 U+25AC +#0x17 U+21A8 +#0x18 U+2191 +#0x19 U+2193 +#0x1A U+2192 +#0x1B U+2190 +#0x1C U+221F +#0x1C U+2319 +#0x1D U+2194 +#0x1E U+25B2 +#0x1F U+25BC +#0x7f U+2302 + +0xd0 U+0110 # Dstrok and ETH are nearly the same... + +# Dont wanna see these: +# POP DIRECTIONAL FORMATTING 202C +U+202c: +# LEFT-TO-RIGHT OVERRIDE 202D +U+202d: + +# TRADE MARK SIGN: +U+2122:(TM) + +0x60 U+2018 # left single quotation mark +0x27 U+2019-U+201b # various single quotation marks +0x22 U+201c-U+201f # various double quotation marks + +U+2297:(×) \ No newline at end of file diff --git a/src/chrtrans/iso08_uni.tbl b/src/chrtrans/iso08_uni.tbl index f11dff4a..d1c33b1d 100644 --- a/src/chrtrans/iso08_uni.tbl +++ b/src/chrtrans/iso08_uni.tbl @@ -89,12 +89,12 @@ OISO 8859-8 Hebrew #Hebrew points - map to empty string U+05B0-U+05C2: -#HEBREW LETTER DOUBLE VAV -U+05F0:åå -#HEBREW LETTER VAV YOD -U+05F1:éå -#HEBREW LETTER DOUBLE YOD -U+05F2:éé +#HEBREW LETTER DOUBLE VAV #U+05F0:åå +U+05F0 "\345\345" +#HEBREW LETTER VAV YOD #U+05F1:éå +U+05F1 "\351\345" +#HEBREW LETTER DOUBLE YOD #U+05F2:éé +U+05F2 "\351\351" # TRADE MARK SIGN: diff --git a/src/chrtrans/makeuctb.c b/src/chrtrans/makeuctb.c index e0630cc3..ad95c534 100644 --- a/src/chrtrans/makeuctb.c +++ b/src/chrtrans/makeuctb.c @@ -256,7 +256,8 @@ PUBLIC int main ARGS2( if ((p = strchr(buffer, '\n')) != NULL) { *p = '\0'; } else { - fprintf(stderr, "%s: Warning: line too long\n", tblname); + fprintf(stderr, "%s: Warning: line too long or incomplete\n", + tblname); } /* @@ -268,11 +269,14 @@ PUBLIC int main ARGS2( * <range> <unicode range> * <unicode> :<replace> * <unicode range> :<replace> + * <unicode> "<C replace>" + * <unicode range> "<C replace>" * * where <range> ::= <fontpos>-<fontpos> * and <unicode> ::= U+<h><h><h><h> * and <h> ::= <hexadecimal digit> * and <replace> any string not containing '\n' or '\0' + * and <C replace> any string with C backslash escapes */ p = buffer; while (*p == ' ' || *p == '\t') { @@ -405,24 +409,51 @@ PUBLIC int main ARGS2( p++; } } - if (*p != ':') { - fprintf(stderr, "No ':' where expected: %s\n", buffer); + + if (*p != ':' && *p != '"') { + fprintf(stderr, "No ':' or '\"' where expected: %s\n", + buffer); continue; } - tbuf = (char *) malloc (4*strlen(++p) + 1); + tbuf = (char *) malloc (4*strlen(p)); if (!(p1 = tbuf)) { fprintf(stderr, "%s: Out of memory\n", tblname); exit(EX_DATAERR); } - for (ch = *p; (ch = *p) != '\0'; p++, p1++) { - if ((unsigned char)ch < 32 || ch == '\\' || ch == '\"' || - (unsigned char)ch >= 127) { - sprintf(p1, "\\%.3o", (unsigned char)ch); + if (*p == '"') { + /* + * handle "<C replace>" + * Copy chars verbatim until first '"' not \-escaped or + * end of buffer + */ + int escaped = 0; + for (ch = *++p; (ch = *p) != '\0'; p++) { + if (escaped) { + escaped = 0; + } else if (ch == '"') { + break; + } else if (ch == '\\') { + escaped = 1; + } + *p1++ = ch; + } + if (escaped || ch != '"') { + fprintf(stderr, "Warning: String not terminated: %s\n", + buffer); + if (escaped) + *p1++ = '\n'; + } + } else { /* we had ':' */ + for (ch = *++p; (ch = *p) != '\0'; p++, p1++) { + if ((unsigned char)ch < 32 || ch == '\\' || ch == '\"' || + (unsigned char)ch >= 127) { + sprintf(p1, "\\%.3o", (unsigned char)ch); /* fprintf(stderr, "%s\n", tbuf); */ - p1 += 3; - } else { - *p1 = ch; + p1 += 3; + } else { + *p1 = ch; + } } } *p1 = '\0'; diff --git a/src/chrtrans/viscii_uni.tbl b/src/chrtrans/viscii_uni.tbl index 006fa0ea..33677163 100644 --- a/src/chrtrans/viscii_uni.tbl +++ b/src/chrtrans/viscii_uni.tbl @@ -210,7 +210,7 @@ U+001a:^Z 0x86 U+1ea8 0xa6 U+1ea9 0x06 U+1eaa -U+1eaa:Â~ +U+1eaa "\302~" # A with circumflex (same code as in iso-8859-1) and tilde 0xe7 U+1eab 0x87 U+1eac 0xa7 U+1ead |