diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 1997-02-06 21:38:08 -0500 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 1997-02-06 21:38:08 -0500 |
commit | 9c63ba04a5785f8ad069bf660402530617451a06 (patch) | |
tree | 8597ad92f9e4398c149583c22798d67e31e3dbad | |
parent | c3ec4181d988501e4d7116f32c669d5ca69e7060 (diff) | |
download | lynx-snapshots-9c63ba04a5785f8ad069bf660402530617451a06.tar.gz |
snapshot of project "lynx", label v2_6fm_970206
-rw-r--r-- | CHANGES | 60 | ||||
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | PROBLEMS | 18 | ||||
-rw-r--r-- | RELEASE_STATEMENT | 6 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTParse.c | 6 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTWriter.c | 2 | ||||
-rw-r--r-- | lynx.cfg | 82 | ||||
-rw-r--r-- | lynx.hlp | 8 | ||||
-rw-r--r-- | lynx.man | 8 | ||||
-rw-r--r-- | lynx_help/Lynx_users_guide.html | 20 | ||||
-rw-r--r-- | lynx_help/keystroke_commands/option_help.html | 24 | ||||
-rw-r--r-- | lynx_help/lynx_url_support.html | 2 | ||||
-rw-r--r-- | samples/lynx.cfg | 82 | ||||
-rw-r--r-- | src/GridText.c | 16 | ||||
-rw-r--r-- | src/HTFWriter.c | 3 | ||||
-rw-r--r-- | src/HTInit.c | 14 | ||||
-rw-r--r-- | src/HTML.c | 6 | ||||
-rw-r--r-- | src/LYBookmark.c | 2 | ||||
-rw-r--r-- | src/LYCharUtils.c | 36 | ||||
-rw-r--r-- | src/LYCurses.c | 10 | ||||
-rw-r--r-- | src/LYEdit.c | 4 | ||||
-rw-r--r-- | src/LYGlobalDefs.h | 2 | ||||
-rw-r--r-- | src/LYKeymap.c | 2 | ||||
-rw-r--r-- | src/LYLocal.c | 16 | ||||
-rw-r--r-- | src/LYMain.c | 88 | ||||
-rw-r--r-- | src/LYMainLoop.c | 158 | ||||
-rw-r--r-- | src/LYNews.c | 24 | ||||
-rw-r--r-- | src/LYReadCFG.c | 8 | ||||
-rw-r--r-- | src/LYUtils.c | 20 | ||||
-rw-r--r-- | src/LYUtils.h | 2 | ||||
-rw-r--r-- | src/LYVMSdef.h | 18 | ||||
-rw-r--r-- | userdefs.h | 63 | ||||
-rw-r--r-- | utils/inews/clientlib.c | 46 | ||||
-rw-r--r-- | utils/inews/inews.c | 23 |
34 files changed, 607 insertions, 278 deletions
diff --git a/CHANGES b/CHANGES index 41c35a4a..8cfb9aa0 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,63 @@ +02-06-97 +* Added support for both hex escaped and unescaped white characters + in lynxexec and lynxprog URLs. Normally, Lynx strips out any white + characters that are not hex escaped in attribute values that are + to be resolved as URLs, on the assumption that they were derived + from wrapping in the markup. Any serial white characters in + lynxexec and lynxprog URLs are condensed to one space (' '), and + any lead or trailing white characters are trimmed. Note that we + still require hex escaping of spaces in mailto URLs, e.g, + HREF="mailto:lynx-dev@sig.net%20(I%20found%20a%20bug.)". - FM +* Removed the 'e' switch from tar commands in LYLocal.c for greater + portability across all supported Unix flavors. - FM +* Expanded the information in the PROBLEMS file on how to deal with + DECC and MultiNet header incompatibilites for different combinations + of the VMS compiler and socket library versions. - FM +* Added TRACE message of the edit command created for the system() + call in LYEdit.c. - LWV +* Fixed a typo in the userdefs.h comments. - NHE +02-04-97 +* Mod in LYMainLoop.c to bypass mailing "not found" messages when + MAIL_SYSTEM_ERROR_LOGGING was set TRUE (which it should NOT be, + indescriminately) if the document's owner is the lynx-dev list. - FM +* Added crash protection checks for the actual presence of anchors + in all HText structure anchor scans in GridText.c, based on a crash + report and suggested fix for one of them from Jonathan Sergent + (sergent@hillres55-129.cc.purdue.edu). - FM +* Eliminated the typecast for ttytype (apparently varies across flavors, + and each flavor should know it's own typing; we'll see) in LYCurses.c, + and moved VMS system definitions with non-ANSI conformant tokens to a + separate header for VMS (LYVMSdef.h). - BL +* Made the description of HISTORY in the 'k'eymap page more clear that + it invokes a list of the "suspended" documents currently held in the + history stack. - DC +* Typo fixes in the help files and lynx.cfg. - LWV +02-03-97 +* Today's distribution is a pre-release of v2.7. The projected official + release date is 02-15-97. All header, help and documentation files, + and the top directory name, have been updated for v2.7. - FM +* Made xli, which is freeware, the default XLOADIMAGE_COMMAND for Unix + in userdefs.h (still xv on VMS, since its port is freeware), and + expanded the "self-documentation" to indicate where to get this + freeware. Added XLOADIMAGE_COMMAND as a configuration symbol in + lynx.cfg, so that the compilation default can be overridden on + systems which have and prefer xv (all users can override the default + mappings for image helper apps via their mailcap files) - FM +* Added a -base command line switch which can be used with -source or + -mime_header to prepend the request URL as a comment, and a BASE tag + (which may or may not be the same as the request URL, depending on + HTTP/1.1 headers) for text/html documents, equivalent to the prepend + kludge for 'd'ownloads (see 09-20-96 mods). - FM +* Added a check for an "ORGANIZATION" environment variable for inclusion + as a news post header on Unix (all system logicals intended for news + post headers automatically are included on VMS), and a sleep() before + restoring curses mode after the post, to allow reading of any error + messages from the news software. - FM +* Fixed bug which yielded a "[LINK]" instead of "[INLINE]" pseduo-ALT + for ALT-less IMG tags used as the content for NAME-ed Anchors without + an HREF. - FM +* Portability tweaks for the mini inews utility. - FM +* Fixed an old and irrelevant typo in HTWriter.c. - JS 01-29-97 * Added more REL tokens that are acceptible for banner links. - FM * Ifdef'ed the standard foo_PATH definitions for FreeBSD at the bottom of diff --git a/Makefile b/Makefile index 629aea65..d2b6ed27 100644 --- a/Makefile +++ b/Makefile @@ -6,11 +6,11 @@ SHELL = /bin/sh #MAKE= make ##this is the name of the directory the lynx source code is in. -##(e.g. lynx2-6, not the full path) -lynxdir= lynx2-6FM +##(e.g. lynx2-7, not the full path) +lynxdir= lynx2-7 ##this is the filename for .zip, .tar and .tar.Z archives. -lynxname= lynx2-6fm +lynxname= lynx2-7 ##change the next line if you want lynx installed somewhere ##besides /usr/local/bin diff --git a/PROBLEMS b/PROBLEMS index 1f21eff4..e1a067ea 100644 --- a/PROBLEMS +++ b/PROBLEMS @@ -11,10 +11,8 @@ they will be outlined in this file. Screen resizing can be a bit funny. If you resize the screen, documents that have been cached will be out of whack. Any further - documents will look fine. This is a curses program anyway, so - resizeable terminals are not that common. On some systems - (i.e. HP/UX) terminal resizing does not work at all. - You can reload documents to the current window size with CTRL-R + documents will look fine. You can reload documents to the current + window size with CTRL-R On a Sun system, the message: "Alert!: Unable to connect to remote host" @@ -91,6 +89,8 @@ they will be outlined in this file. the select() problem, so that "-lc" is no longer needed, but the curses glitch is not yet fixed, and you should still include "-lHcurses". + Updated NOTE (02-03-97): The problems reportedly are fixed with + patches PHCO_8086 and PHCO_8947 from HP. Lynx juggles variable abilities of curses packages or emulations to display bolding and underlining simultaneously. One consequence of @@ -108,8 +108,10 @@ they will be outlined in this file. libwww-FM had previously been successful in dealing with this problem across all versions of MultiNet and of DECC, VAXC, and Pat Rankin's VMS port of GNUC, but are now not 100% successful. If you get compiler - messages about "struct timeval timeout" having no linkage, add this - immediately below the inclusion of ioctl.h for MultiNet in tcp.h: + messages about "struct timeval timeout" having no linkage, add that + declaration immediately below the inclusion of ioctl.h for MultiNet in + tcp.h (by deleting the "#ifdef NOT_DEFINED" and "#endif /* NOT_DEFINED */" + lines): [...] #include "multinet_root:[multinet.include.sys]ioctl.h" struct timeval { @@ -117,4 +119,8 @@ they will be outlined in this file. long tv_usec; /* microseconds */ }; [...] + If you get compiler warnings about incompatible multinet_foo() + declarations, delete those where indicated in tcp.h. For the most + current versions of MultiNet, you can modify tcp.h to use the DECC + socket and related headers. diff --git a/RELEASE_STATEMENT b/RELEASE_STATEMENT index e660d46f..07a655e0 100644 --- a/RELEASE_STATEMENT +++ b/RELEASE_STATEMENT @@ -1,5 +1,5 @@ -Lynx Ver. 2.6 is now available. +Lynx Ver. 2.7 is now available. Lynx is a hypertext browser with full World Wide Web capabilities. It is distributed under the GNU General Public License without restrictions @@ -12,8 +12,8 @@ are maintained in the: "Lynx links" <URL:http://www.crl.com/~subir/lynx.html> - Version 2.6 is an official release of the Lynx2-5FM code set -through September 2, 1996. + Version 2.7 is an official release of the Lynx2-6FM code set +through February 15, 1997. See the CHANGES file in the Lynx distribution for a complete list of changes and bug fixes in this release. diff --git a/WWW/Library/Implementation/HTParse.c b/WWW/Library/Implementation/HTParse.c index 750d8b0c..223bbf5b 100644 --- a/WWW/Library/Implementation/HTParse.c +++ b/WWW/Library/Implementation/HTParse.c @@ -374,7 +374,11 @@ PUBLIC char * HTParse ARGS3( if (TRACE) fprintf(stderr, "4\n"); } else { /* No inheritance */ - strcat(result, "/"); + if (strncasecomp(aName, "lynxcgi:", 8) && + strncasecomp(aName, "lynxexec:", 9) && + strncasecomp(aName, "lynxprog:", 9)) { + strcat(result, "/"); + } if (!strcmp(result, "news:/")) result[5] = '*'; if (TRACE) diff --git a/WWW/Library/Implementation/HTWriter.c b/WWW/Library/Implementation/HTWriter.c index 03a55648..e9a369aa 100644 --- a/WWW/Library/Implementation/HTWriter.c +++ b/WWW/Library/Implementation/HTWriter.c @@ -40,7 +40,7 @@ PRIVATE void flush ARGS1(HTStream *, me) char *read_pointer = me->buffer; char *write_pointer = me->write_pointer; -#ifdef NOT_ASCCII +#ifdef NOT_ASCII if (me->make_ascii) { char * p; for(p = me->buffer; p < me->write_pointer; p++) diff --git a/lynx.cfg b/lynx.cfg index 6f72104e..2c82138c 100644 --- a/lynx.cfg +++ b/lynx.cfg @@ -339,8 +339,8 @@ CHARACTER_SET:ISO Latin 1 # executed. This is much less dangerous than enabling all execution # links, but can still be dangerous. # -LOCAL_EXECUTION_LINKS_ALWAYS_ON:FALSE -LOCAL_EXECUTION_LINKS_ON_BUT_NOT_REMOTE:FALSE +#LOCAL_EXECUTION_LINKS_ALWAYS_ON:FALSE +#LOCAL_EXECUTION_LINKS_ON_BUT_NOT_REMOTE:FALSE # If LOCAL_EXECUTION_LINK_ON_BUT_NOT_REMOTE is TRUE, and no TRUSTED_EXEC # rule is defined, it defaults to "file://localhost/" and any lynxexec @@ -511,7 +511,7 @@ LOCAL_EXECUTION_LINKS_ON_BUT_NOT_REMOTE:FALSE #USE_SELECT_POPUPS:TRUE # If COLLAPSE_BR_TAGS is set FALSE, Lynx will not collapse serial BR tags. -* Note that the valid way to insert extra blank lines in HTML is via a PRE +# Note that the valid way to insert extra blank lines in HTML is via a PRE # block with only newlines in the block. # The default is defined in userdefs.h, and can be overridden here. # @@ -533,8 +533,11 @@ LOCAL_EXECUTION_LINKS_ON_BUT_NOT_REMOTE:FALSE # have posting privileges (the news server could also be ANU-NEWS, or any # other server to which the ANU-NEWS client has access). You can disable # news posting by setting INEWS to "none", or via -restrictions switches. +# The default is defined in userdefs.h and can be overridden here. # The ANU-NEWS software for VMS is available from ftp.cc.ukans.edu. Note -# that posting is supported only for news: (not nntp:) URLs. +# that posting is supported only for news: (not nntp: or snews:) URLs, and +# only via the default nntp server defined with the NNTPSERVER configuration +# (see above) or environment variable. # #INEWS:NEWS @@ -543,9 +546,12 @@ LOCAL_EXECUTION_LINKS_ON_BUT_NOT_REMOTE:FALSE # Set INEWS to the full path and name of your program for posting to # newsgroups. A "mini" inews is included in the utils subdirectory of # the Lynx distribution. You can disable news posting by setting INEWS -# to "none", or via -restrictions switches. -# Note that INN may require an -h switch added to the path. Also note -# that posting is supported only for news: (not nntp:) URLs. +# to "none", or via -restrictions switches. The default is defined in +# userdefs.h and can be overridden here. Note that some news software, +# such as INN's inews, requires an -h switch added to the path. Also +# note that posting is supported only for news: (not nntp: or snews:) +# URLs, and only via the default nntp server defined with the NNTPSERVER +# configuration (see above) or environment variable. # #INEWS:inews @@ -1050,6 +1056,40 @@ MINIMAL_COMMENTS:TRUE # VMS (sought in user's sys$login directory): #PERSONAL_EXTENSION_MAP:mime.types +# VMS: +# ==== +# XLOADIMAGE_COMMAND will be used as a default in src/HTInit.c +# for viewing image/* content types when the DECW$DISPLAY logical +# is set. Make it the foreign command for your system's X image +# viewer (commonly, "xv"). Make it "exit" or something like that +# if you don't have one. It can be anything that will handle GIF, +# TIFF and other popular image formats. Freeware ports of xv for +# VMS are available in the ftp://ftp.wku.edu/vms/unsupported and +# http://www.openvms.digital.com/cd/XV310A/ subdirectories. You +# must also have a "%s" for the filename. The default is defined +# in userdefs.h and can be overridden here, or via the global or +# personal mailcap files (see below). +# +#XLOADIMAGE_COMMAND:xv %s + +# Unix: +# ===== +# XLOADIMAGE_COMMAND will be used as a default in src/HTInit.c for +# viewing image/* content types when the DISPLAY environment variable +# is set. Make it the full path and name of the xli (also know as +# xloadimage or xview) command, or other image viewer. Put 'echo' or +# something like it here if you don't have a suitable viewer. It can +# be anything that will handle GIF, TIFF and other popular image formats +# (xli does). The freeware distribution of xli is available in the +# ftp://ftp.x.org/contrib subdirectory. The shareware, xv, also is +# suitable. You must also have a "%s" for the filename; "&" for +# background is optional. The default is defined in userdefs.h and can be +# overridden here, or via the global or personal mailcap files (see below). +# Note that open is used as the default for NeXT, instead of the +# XLOADIMAGE_COMMAND definition. +# +#XLOADIMAGE_COMMAND:xli %s & + # MIME types may be assigned to external viewers using # the VIEWER definition. # @@ -1063,7 +1103,7 @@ MINIMAL_COMMENTS:TRUE # -viewer command is a system command that can be # used to display the file where %s is replaced # within the command with the physical filename -# (i.e. "xv %s" becomes "xv /tmp/tempgiffile") +# (e.g. "ghostview %s" becomes "ghostview /tmp/temppsfile") # -environment is optional. The only valid keywords # are currently XWINDOWS and NON_XWINDOWS. If the XWINDOWS # environment is specified then the viewer will only be @@ -1072,7 +1112,7 @@ MINIMAL_COMMENTS:TRUE # is specified the specified viewer will only be defined when the # user DOES NOT have the environment variable DISPLAY defined. # examples: -# VIEWER:image/gif:xv %s:XWINDOWS +# VIEWER:image/gif:xli %s:XWINDOWS # VIEWER:image/gif:ascii-view %s:NON_XWINDOWS # VIEWER:application/start-elm:elm # @@ -1082,21 +1122,21 @@ MINIMAL_COMMENTS:TRUE # # The MIME_type:viewer:XWINDOWS definitions listed here in the lynx.cfg # file are among those established via src/HTInit.c. For the image types, -# HTInit.c uses the XLOADIMAGE definition in userdefs.h (open is used for -# NeXT). You can change any of these defaults via the global or personal -# mailcap files at run time. They will be overridden if you assign them -# here. +# HTInit.c uses the XLOADIMAGE_COMMAND definition in userdefs.h or above +# (open is used for NeXT). You can change any of these defaults via the +# global or personal mailcap files at run time. They will be overridden +# if you assign them here. # #VIEWER:application/postscript:ghostview %s&:XWINDOWS -#VIEWER:image/gif:xv %s&:XWINDOWS -#VIEWER:image/x-xbm:xv %s&:XWINDOWS -#VIEWER:image/x-rgb:xv %s&:XWINDOWS -#VIEWER:image/x-tiff:xv %s&:XWINDOWS -#VIEWER:image/jpeg:xv %s&:XWINDOWS +#VIEWER:image/gif:xli %s&:XWINDOWS +#VIEWER:image/x-xbm:xli %s&:XWINDOWS +#VIEWER:image/x-rgb:xli %s&:XWINDOWS +#VIEWER:image/x-tiff:xli %s&:XWINDOWS +#VIEWER:image/jpeg:xli %s&:XWINDOWS #VIEWER:video/mpeg:mpeg_play %s &:XWINDOWS # The global and personal MAILCAP files allow you to specify external -# viewers to spawned when Lynx encounters different MIME types, which +# viewers to be spawned when Lynx encounters different MIME types, which # will override any of the suffix maps in this (lynx.cfg) configuration # file, or in src/HTInit.c. See RFC-MAILCAP.txt in the docs subdirectory # and the example mailcap file in the samples subdirectory. @@ -1167,8 +1207,8 @@ MINIMAL_COMMENTS:TRUE #KEYMAP:>:DOWN_LINK # Move to the link below #KEYMAP:0x00:RIGHT_LINK # Move to the link to the right #KEYMAP:0x00:LEFT_LINK # Move to the link to the left -#KEYMAP:0x7F:HISTORY # Show the history list -#KEYMAP:0x08:HISTORY # Show the history list +#KEYMAP:0x7F:HISTORY # Display stack of currently-suspended documents +#KEYMAP:0x08:HISTORY # Display stack of currently-suspended documents #KEYMAP:0x103:PREV_DOC # Return to the previous document #KEYMAP:0x102:ACTIVATE # Select the current link #KEYMAP:0x109:ACTIVATE # Function key Do - Select the current link diff --git a/lynx.hlp b/lynx.hlp index f5636d6a..5c8aa4d0 100644 --- a/lynx.hlp +++ b/lynx.hlp @@ -41,6 +41,10 @@ set authorization ID and password for protected documents at startup. + -base + prepend a request URL comment and BASE tag to text/html + outputs for -source or -mime_header dumps. + -book use the bookmark page as the startfile. The default or command line startfile is still set for the Main screen command, and will @@ -358,7 +362,7 @@ o Type "k" for a complete list of the current key-stroke command mappings. 2 NOTES - This is the Lynx v2.6 Release for Unix/VMS + This is the Lynx v2.7 Release for Unix/VMS If you wish to contribute to the further development of Lynx, subscribe to our mailing list. Send email to <majordomo@sig.net> with @@ -385,7 +389,7 @@ ported much of Lynx to VMS and did or organized most of its development since the departures of Lou Montulli and Garrett Blythe from the University of Kansas in the summer of 1994 through the current release - of v2.6, and to everyone on the net who has contributed to Lynx's + of v2.7, and to everyone on the net who has contributed to Lynx's development either directly (through patches, comments or bug reports) or indirectly (through inspiration and development of other systems). diff --git a/lynx.man b/lynx.man index bec46b97..9d20bb3a 100644 --- a/lynx.man +++ b/lynx.man @@ -66,6 +66,10 @@ used to specify the anonymous account. set authorization ID and password for protected documents at startup. .TP +.B -base +prepend a request URL comment and BASE tag to text/html +outputs for -source or -mime_header dumps. +.TP .B -book use the bookmark page as the startfile. The default or command line startfile is still set for the Main screen command, and will @@ -426,7 +430,7 @@ of key-stroke commands. o Type \fB"k"\fR for a complete list of the current key-stroke command mappings. .SH NOTES -This is the Lynx v2.6 Release for Unix/VMS +This is the Lynx v2.7 Release for Unix/VMS .PP If you wish to contribute to the further development of \fILynx\fR, subscribe to our mailing list. Send email to @@ -451,7 +455,7 @@ Lynx rely on the WWW client library code developed by Tim Berners-Lee and the WWW community. Also a special thanks to Foteos Macrides who ported much of Lynx to VMS and did or organized most of its development since the departures of Lou Montulli and Garrett Blythe from the University of Kansas -in the summer of 1994 through the current release of v2.6, and to everyone +in the summer of 1994 through the current release of v2.7, and to everyone on the net who has contributed to Lynx's development either directly (through patches, comments or bug reports) or indirectly (through inspiration and development of other systems). diff --git a/lynx_help/Lynx_users_guide.html b/lynx_help/Lynx_users_guide.html index 7eea006c..74122162 100644 --- a/lynx_help/Lynx_users_guide.html +++ b/lynx_help/Lynx_users_guide.html @@ -1,12 +1,12 @@ <!DOCTYPE html public "-//IETF//DTD HTML 3.0//EN"> <html> <head> -<title>Lynx Users Guide v2.6FM</title> +<title>Lynx Users Guide v2.7</title> <link rev="made" href="mailto:lynx-dev@sig.net"> </head> <body> -<h1>Lynx Users Guide v2.6FM</h1> +<h1>Lynx Users Guide v2.7</h1> Lynx is a fully-featured <em>World Wide Web</em> (<em>WWW</em>) client for users running cursor-addressable, character-cell display devices (e.g., @@ -536,7 +536,7 @@ return to Lynx or the '<em>></em>' command to save the options to a English alphabet), for editing their filenames and locations (<em>filepath</em>), and descriptions. Lynx will create bookmark files, if they don't already exist, when you first '<em>a</em>'dd - a bookmark link to them. However, if you've specifed a + a bookmark link to them. However, if you've specified a subdirectory (e.g., ./BM/lynx_bookmarks.html), that subdirectory must already exist. Note that on VMS you should use the URL syntax for the filepath (e.g., <em>not</em> @@ -669,7 +669,7 @@ return to Lynx or the '<em>></em>' command to save the options to a <dd>The header string which Lynx sends to servers to indicate the User-Agent is displayed here. Changes may be disallowed via the <em>-restrictions</em> switch. Otherwise, the header can be - changed temporarily to a string such as <em>L_y_n_x/2.6</em> + changed temporarily to a string such as <em>L_y_n_x/2.7</em> for access to sites which discriminate against Lynx based on checks for the presence of "Lynx" in the header. If changed during a Lynx session, the default User-Agent header can @@ -1131,13 +1131,13 @@ to the VALUE, as it would for a normal submit button. Some document authors incorrectly use an ALT instead of VALUE attribute for this purpose. Lynx "cooperates" by treating ALT as a synonym for VALUE when present in an INPUT tag with TYPE="image". If neither a VALUE nor an ALT attribute -is present, Lynx dispays "[IMAGE]-Submit" as the string for such buttons. +is present, Lynx displays "[IMAGE]-Submit" as the string for such buttons. If clickable images is set, the "[IMAGE]" portion of the string is a link for the image, and the "Submit" portion is the button for submitting the form. Otherwise, the entire string is treated as a submit button. If a VALUE or ALT attribute is present and clickable images is set, Lynx prepends "[IMAGE]" as a link for the image, followed by '-' and then -the attribute's value as the dispayed string for the submit button. +the attribute's value as the displayed string for the submit button. Note that earlier versions of Lynx would send a name=value pair instead of a 0,0 coordinate pair if a TYPE="image" submit button was NAME-ed, had a VALUE attribute in the INPUT tag, and was used to submit the form. The @@ -1584,7 +1584,7 @@ TYPE="hidden" can be used as a sort of state management by <a href="#19" >HTML Forms</a>, a more general approach involves exchanges of MIME headers between the server and browser. When replying to a request, the server can send a <em>Set-Cookie</em> MIME header which contains -information (<em>cookies</em>) relevent to the browser's request, and in +information (<em>cookies</em>) relevant to the browser's request, and in subsequent requests the browser can send a <em>Cookie</em> MIME header with information derived from previously received cookies. @@ -1682,6 +1682,9 @@ where <dd>used to specify the anonymous account. <dt><code>-auth=ID:PW</code> <dd>id and password for protected pages. + <dt><code>-base</code> + <dd>prepend a request URL comment and BASE tag to text/html + outputs for -source or -mime_header dumps. <dt><code>-book</code> <dd>use the bookmark page as the startfile. The default or command line startfile is still set for the Main screen @@ -2014,7 +2017,8 @@ Craig Lavender. developed and supported Lynx since release of v2.3 in May 1994. The Lynx2-3FM code set was released as v2.4 in June 1995. The Lynx2-4FM code set was released as v2.5 in May 1996. The Lynx2-5FM code set was -released as v2.6 in September 1996. +released as v2.6 in September 1996. The Lynx2-6FM code set was released +as v2.7 in February 1997. <p>Lynx has incorporated code from a variety of sources along the way. The earliest versions of Lynx included code from Earl Fogel diff --git a/lynx_help/keystroke_commands/option_help.html b/lynx_help/keystroke_commands/option_help.html index 147e698d..1c636fe8 100644 --- a/lynx_help/keystroke_commands/option_help.html +++ b/lynx_help/keystroke_commands/option_help.html @@ -29,7 +29,7 @@ letter of the desired bookmark file, but can enter '=' to invoke the STANDARD selection menu, or RETURN for the default bookmark file. - + Bookmark file - If non-empty and multi-bookmarks is OFF, it specifies your default '<A HREF="bookmark_help.html">Bookmark file</A>'. If multi-bookmarks is STANDARD or ADVANCED, @@ -47,11 +47,11 @@ will be sorted within FTP listings. The current options include "By Filename", "By Size", "By Type", and "By Date". - + Personal Mail - You may set your mail address here so that Address when mailing messages to other people or mailing files to yourself, your email address - can be automatically filled in. You email + can be automatically filled in. Your email address will also be sent to HTTP servers in a from: field. @@ -92,7 +92,7 @@ e.g., en for English, fr for French, etc. Can be a comma-separated list in descending order of preferences. - + Preferred Document - The character set you prefer if sets in addition Charset to ISO-8859-1 and US-ASCII are available from servers. Use MIME notation (e.g., ISO-8859-2) @@ -100,7 +100,7 @@ those values are always assumed by default. Can be a comma-separated list in descending order of preferences. - + VI keys - If set to 'ON' then the lowercase h, j, k, and l, keys will be mapped to left-arrow, down-arrow, up-arrow, and right-arrow, respectively. The @@ -168,7 +168,7 @@ to indicate the User-Agent is displayed here. Changes may be disallowed via the -restrictions switch. Otherwise, the header can be changed - temporarily to a string such as L_y_n_x/2.6 for + temporarily to a string such as L_y_n_x/2.7 for access to sites which discriminate against Lynx based on checks for the presence of "Lynx" in the header. If changed during a Lynx session, the @@ -178,13 +178,13 @@ current document is reloaded, with the no-cache flags set, on exit from the Options Menu. Changes of the header are not saved in the RC file. - NOTE that Netscape Communications Corp. has + NOTE that Netscape Communications Corp. has claimed that false transmissions of "Mozilla" as - the are a copyright infringement, which will be - prosecuted. DO NOT misrepresent Lynx as Mozilla. - The Options Menu issues a warning about possible - copyright infringement whenever the header is - changed to one which does not include "Lynx" or + the User-Agent are a copyright infringement, which + will be prosecuted. DO NOT misrepresent Lynx as + Mozilla. The Options Menu issues a warning about + possible copyright infringement whenever the header + is changed to one which does not include "Lynx" or "lynx". Local execution - If set to 'ALWAYS ON', Lynx will locally execute diff --git a/lynx_help/lynx_url_support.html b/lynx_help/lynx_url_support.html index 153c8d4e..61800f4f 100644 --- a/lynx_help/lynx_url_support.html +++ b/lynx_help/lynx_url_support.html @@ -359,7 +359,7 @@ in FORM tags, and Lynx recognizes that as a synonym for TITLE. URLs. The <em>cc</em> values can be single addresses, or comma- or semi-colon-separated lists of addresses. All addresses, and any <em>body</em> values, will be offered for approval by the user before -proceding with a mailing, and any other name=value pairs in the +proceeding with a mailing, and any other name=value pairs in the <em>?searchpart</em> will be ignored. Also, if the mailto URL is the ACTION for a FORM, any <em>body</em> in a <em>?searchpart</em> tack-on will be ignored, because the body of the mailing must be constructed diff --git a/samples/lynx.cfg b/samples/lynx.cfg index 6f72104e..2c82138c 100644 --- a/samples/lynx.cfg +++ b/samples/lynx.cfg @@ -339,8 +339,8 @@ CHARACTER_SET:ISO Latin 1 # executed. This is much less dangerous than enabling all execution # links, but can still be dangerous. # -LOCAL_EXECUTION_LINKS_ALWAYS_ON:FALSE -LOCAL_EXECUTION_LINKS_ON_BUT_NOT_REMOTE:FALSE +#LOCAL_EXECUTION_LINKS_ALWAYS_ON:FALSE +#LOCAL_EXECUTION_LINKS_ON_BUT_NOT_REMOTE:FALSE # If LOCAL_EXECUTION_LINK_ON_BUT_NOT_REMOTE is TRUE, and no TRUSTED_EXEC # rule is defined, it defaults to "file://localhost/" and any lynxexec @@ -511,7 +511,7 @@ LOCAL_EXECUTION_LINKS_ON_BUT_NOT_REMOTE:FALSE #USE_SELECT_POPUPS:TRUE # If COLLAPSE_BR_TAGS is set FALSE, Lynx will not collapse serial BR tags. -* Note that the valid way to insert extra blank lines in HTML is via a PRE +# Note that the valid way to insert extra blank lines in HTML is via a PRE # block with only newlines in the block. # The default is defined in userdefs.h, and can be overridden here. # @@ -533,8 +533,11 @@ LOCAL_EXECUTION_LINKS_ON_BUT_NOT_REMOTE:FALSE # have posting privileges (the news server could also be ANU-NEWS, or any # other server to which the ANU-NEWS client has access). You can disable # news posting by setting INEWS to "none", or via -restrictions switches. +# The default is defined in userdefs.h and can be overridden here. # The ANU-NEWS software for VMS is available from ftp.cc.ukans.edu. Note -# that posting is supported only for news: (not nntp:) URLs. +# that posting is supported only for news: (not nntp: or snews:) URLs, and +# only via the default nntp server defined with the NNTPSERVER configuration +# (see above) or environment variable. # #INEWS:NEWS @@ -543,9 +546,12 @@ LOCAL_EXECUTION_LINKS_ON_BUT_NOT_REMOTE:FALSE # Set INEWS to the full path and name of your program for posting to # newsgroups. A "mini" inews is included in the utils subdirectory of # the Lynx distribution. You can disable news posting by setting INEWS -# to "none", or via -restrictions switches. -# Note that INN may require an -h switch added to the path. Also note -# that posting is supported only for news: (not nntp:) URLs. +# to "none", or via -restrictions switches. The default is defined in +# userdefs.h and can be overridden here. Note that some news software, +# such as INN's inews, requires an -h switch added to the path. Also +# note that posting is supported only for news: (not nntp: or snews:) +# URLs, and only via the default nntp server defined with the NNTPSERVER +# configuration (see above) or environment variable. # #INEWS:inews @@ -1050,6 +1056,40 @@ MINIMAL_COMMENTS:TRUE # VMS (sought in user's sys$login directory): #PERSONAL_EXTENSION_MAP:mime.types +# VMS: +# ==== +# XLOADIMAGE_COMMAND will be used as a default in src/HTInit.c +# for viewing image/* content types when the DECW$DISPLAY logical +# is set. Make it the foreign command for your system's X image +# viewer (commonly, "xv"). Make it "exit" or something like that +# if you don't have one. It can be anything that will handle GIF, +# TIFF and other popular image formats. Freeware ports of xv for +# VMS are available in the ftp://ftp.wku.edu/vms/unsupported and +# http://www.openvms.digital.com/cd/XV310A/ subdirectories. You +# must also have a "%s" for the filename. The default is defined +# in userdefs.h and can be overridden here, or via the global or +# personal mailcap files (see below). +# +#XLOADIMAGE_COMMAND:xv %s + +# Unix: +# ===== +# XLOADIMAGE_COMMAND will be used as a default in src/HTInit.c for +# viewing image/* content types when the DISPLAY environment variable +# is set. Make it the full path and name of the xli (also know as +# xloadimage or xview) command, or other image viewer. Put 'echo' or +# something like it here if you don't have a suitable viewer. It can +# be anything that will handle GIF, TIFF and other popular image formats +# (xli does). The freeware distribution of xli is available in the +# ftp://ftp.x.org/contrib subdirectory. The shareware, xv, also is +# suitable. You must also have a "%s" for the filename; "&" for +# background is optional. The default is defined in userdefs.h and can be +# overridden here, or via the global or personal mailcap files (see below). +# Note that open is used as the default for NeXT, instead of the +# XLOADIMAGE_COMMAND definition. +# +#XLOADIMAGE_COMMAND:xli %s & + # MIME types may be assigned to external viewers using # the VIEWER definition. # @@ -1063,7 +1103,7 @@ MINIMAL_COMMENTS:TRUE # -viewer command is a system command that can be # used to display the file where %s is replaced # within the command with the physical filename -# (i.e. "xv %s" becomes "xv /tmp/tempgiffile") +# (e.g. "ghostview %s" becomes "ghostview /tmp/temppsfile") # -environment is optional. The only valid keywords # are currently XWINDOWS and NON_XWINDOWS. If the XWINDOWS # environment is specified then the viewer will only be @@ -1072,7 +1112,7 @@ MINIMAL_COMMENTS:TRUE # is specified the specified viewer will only be defined when the # user DOES NOT have the environment variable DISPLAY defined. # examples: -# VIEWER:image/gif:xv %s:XWINDOWS +# VIEWER:image/gif:xli %s:XWINDOWS # VIEWER:image/gif:ascii-view %s:NON_XWINDOWS # VIEWER:application/start-elm:elm # @@ -1082,21 +1122,21 @@ MINIMAL_COMMENTS:TRUE # # The MIME_type:viewer:XWINDOWS definitions listed here in the lynx.cfg # file are among those established via src/HTInit.c. For the image types, -# HTInit.c uses the XLOADIMAGE definition in userdefs.h (open is used for -# NeXT). You can change any of these defaults via the global or personal -# mailcap files at run time. They will be overridden if you assign them -# here. +# HTInit.c uses the XLOADIMAGE_COMMAND definition in userdefs.h or above +# (open is used for NeXT). You can change any of these defaults via the +# global or personal mailcap files at run time. They will be overridden +# if you assign them here. # #VIEWER:application/postscript:ghostview %s&:XWINDOWS -#VIEWER:image/gif:xv %s&:XWINDOWS -#VIEWER:image/x-xbm:xv %s&:XWINDOWS -#VIEWER:image/x-rgb:xv %s&:XWINDOWS -#VIEWER:image/x-tiff:xv %s&:XWINDOWS -#VIEWER:image/jpeg:xv %s&:XWINDOWS +#VIEWER:image/gif:xli %s&:XWINDOWS +#VIEWER:image/x-xbm:xli %s&:XWINDOWS +#VIEWER:image/x-rgb:xli %s&:XWINDOWS +#VIEWER:image/x-tiff:xli %s&:XWINDOWS +#VIEWER:image/jpeg:xli %s&:XWINDOWS #VIEWER:video/mpeg:mpeg_play %s &:XWINDOWS # The global and personal MAILCAP files allow you to specify external -# viewers to spawned when Lynx encounters different MIME types, which +# viewers to be spawned when Lynx encounters different MIME types, which # will override any of the suffix maps in this (lynx.cfg) configuration # file, or in src/HTInit.c. See RFC-MAILCAP.txt in the docs subdirectory # and the example mailcap file in the samples subdirectory. @@ -1167,8 +1207,8 @@ MINIMAL_COMMENTS:TRUE #KEYMAP:>:DOWN_LINK # Move to the link below #KEYMAP:0x00:RIGHT_LINK # Move to the link to the right #KEYMAP:0x00:LEFT_LINK # Move to the link to the left -#KEYMAP:0x7F:HISTORY # Show the history list -#KEYMAP:0x08:HISTORY # Show the history list +#KEYMAP:0x7F:HISTORY # Display stack of currently-suspended documents +#KEYMAP:0x08:HISTORY # Display stack of currently-suspended documents #KEYMAP:0x103:PREV_DOC # Return to the previous document #KEYMAP:0x102:ACTIVATE # Select the current link #KEYMAP:0x109:ACTIVATE # Function key Do - Select the current link diff --git a/src/GridText.c b/src/GridText.c index b4b92503..da643f91 100644 --- a/src/GridText.c +++ b/src/GridText.c @@ -3342,7 +3342,7 @@ PUBLIC void HText_endForm ARGS1( /* * Go through list of anchors and get our input field. - FM */ - while (1) { + while (a) { if (a->link_type == INPUT_ANCHOR && a->input_field->number == HTFormNumber && a->input_field->type == F_TEXT_TYPE) { @@ -3482,7 +3482,7 @@ PUBLIC char * HText_setLastOptionValue ARGS5( /* * Deal with newlines or tabs. */ - convert_to_spaces(value); + convert_to_spaces(value, FALSE); if (!op_ptr) { /* @@ -3650,7 +3650,7 @@ PUBLIC int HText_beginInput ARGS2( } else { TextAnchor * b = text->first_anchor; int i = 0; - while (1) { + while (b) { if (b->link_type == INPUT_ANCHOR && b->input_field->type == F_RADIO_TYPE && b->input_field->number == HTFormNumber) { @@ -4020,7 +4020,7 @@ PUBLIC void HText_SubmitForm ARGS4( /* * Go through list of anchors and get size first. */ - while (1) { + while (anchor_ptr) { if (anchor_ptr->link_type == INPUT_ANCHOR) { if (anchor_ptr->input_field->number == form_number) { @@ -4135,7 +4135,7 @@ PUBLIC void HText_SubmitForm ARGS4( /* * Go through list of anchors and assemble URL query. */ - while (1) { + while (anchor_ptr) { if (anchor_ptr->link_type == INPUT_ANCHOR) { if (anchor_ptr->input_field->number == form_number) { @@ -4681,7 +4681,7 @@ PUBLIC void HText_DisableCurrentForm NOARGS /* * Go through list of anchors and set the disabled flag. */ - while (1) { + while (anchor_ptr) { if (anchor_ptr->link_type == INPUT_ANCHOR && anchor_ptr->input_field->number == HTFormNumber) { @@ -4708,7 +4708,7 @@ PUBLIC void HText_ResetForm ARGS1( /* * Go through list of anchors and reset values. */ - while (1) { + while (anchor_ptr) { if (anchor_ptr->link_type == INPUT_ANCHOR) { if (anchor_ptr->input_field->number == form->number) { @@ -4752,7 +4752,7 @@ PUBLIC void HText_activateRadioButton ARGS1( TextAnchor * anchor_ptr = HTMainText->first_anchor; int form_number = form->number; - while (1) { + while (anchor_ptr) { if (anchor_ptr->link_type == INPUT_ANCHOR && anchor_ptr->input_field->type == F_RADIO_TYPE) { diff --git a/src/HTFWriter.c b/src/HTFWriter.c index 820d0fa0..fac0af78 100644 --- a/src/HTFWriter.c +++ b/src/HTFWriter.c @@ -544,6 +544,8 @@ PUBLIC HTStream* HTSaveToFile ARGS3( if (dump_output_immediately) { ret_obj->fp = stdout; /* stdout*/ + if (HTOutputFormat == HTAtom_for("www/download")) + goto Prepend_BASE; return ret_obj; } @@ -708,6 +710,7 @@ PUBLIC HTStream* HTSaveToFile ARGS3( _statusline(RETRIEVING_FILE); StrAllocCopy(anchor->FileCache, fnam); +Prepend_BASE: if (!strncasecomp(pres->rep->name, "text/html", 9)) { /* * Add the document's base as a BASE tag at the top of the file, diff --git a/src/HTInit.c b/src/HTInit.c index 0864816c..e5dff4e1 100644 --- a/src/HTInit.c +++ b/src/HTInit.c @@ -57,13 +57,13 @@ PUBLIC void HTFormatInit NOARGS if ((cp = getenv(DISPLAY)) != NULL && *cp != '\0') { /* Must have X11 */ HTSetPresentation("application/postscript", "ghostview %s&", 1.0, 3.0, 0.0, 0); - HTSetPresentation("image/gif", XLOADIMAGE_COMMAND, 1.0, 3.0, 0.0, 0); - HTSetPresentation("image/x-xbm", XLOADIMAGE_COMMAND, 1.0, 3.0, 0.0, 0); - HTSetPresentation("image/x-xbitmap", XLOADIMAGE_COMMAND, 1.0, 3.0, 0.0, 0); - HTSetPresentation("image/x-png", XLOADIMAGE_COMMAND, 1.0, 3.0, 0.0, 0); - HTSetPresentation("image/x-rgb", XLOADIMAGE_COMMAND, 1.0, 3.0, 0.0, 0); - HTSetPresentation("image/x-tiff", XLOADIMAGE_COMMAND, 1.0, 3.0, 0.0, 0); - HTSetPresentation("image/jpeg", XLOADIMAGE_COMMAND, 1.0, 3.0, 0.0, 0); + HTSetPresentation("image/gif", XLoadImageCommand, 1.0, 3.0, 0.0, 0); + HTSetPresentation("image/x-xbm", XLoadImageCommand, 1.0, 3.0, 0.0, 0); + HTSetPresentation("image/x-xbitmap", XLoadImageCommand, 1.0, 3.0, 0.0, 0); + HTSetPresentation("image/x-png", XLoadImageCommand, 1.0, 3.0, 0.0, 0); + HTSetPresentation("image/x-rgb", XLoadImageCommand, 1.0, 3.0, 0.0, 0); + HTSetPresentation("image/x-tiff", XLoadImageCommand, 1.0, 3.0, 0.0, 0); + HTSetPresentation("image/jpeg", XLoadImageCommand, 1.0, 3.0, 0.0, 0); HTSetPresentation("video/mpeg", "mpeg_play %s &", 1.0, 3.0, 0.0, 0); } diff --git a/src/HTML.c b/src/HTML.c index 5ca1756c..dcdb5fbe 100644 --- a/src/HTML.c +++ b/src/HTML.c @@ -2287,7 +2287,7 @@ PRIVATE void HTML_start_element ARGS5( else if (dest_ismap || present[HTML_IMG_ISMAP]) { StrAllocCopy(alt_string, (title ? title : "[ISMAP]")); - } else if (me->inA == TRUE) { + } else if (me->inA == TRUE && dest) { StrAllocCopy(alt_string, (title ? title : "[LINK]")); } else { @@ -2307,7 +2307,7 @@ PRIVATE void HTML_start_element ARGS5( StrAllocCopy(alt_string, (title ? title : "[ISMAP]")); - } else if (me->inA == TRUE) { + } else if (me->inA == TRUE && dest) { StrAllocCopy(alt_string, (title ? title : "[LINK]")); @@ -3728,7 +3728,7 @@ PRIVATE void HTML_start_element ARGS5( * Convert any newlines or tabs to spaces, * and trim any lead or trailing spaces. - FM */ - convert_to_spaces(I.value); + convert_to_spaces(I.value, FALSE); while (I.value && I.value[0] == ' ') I.value++; len = strlen(I.value) - 1; diff --git a/src/LYBookmark.c b/src/LYBookmark.c index 8f574bc1..de1b8d07 100644 --- a/src/LYBookmark.c +++ b/src/LYBookmark.c @@ -285,7 +285,7 @@ PUBLIC void save_bookmark_link ARGS2( */ string_buffer[255] = '\0'; LYstrncpy(string_buffer, title, 255); - convert_to_spaces(string_buffer); + convert_to_spaces(string_buffer, FALSE); LYMBM_statusline(TITLE_PROMPT); LYgetstr(string_buffer, VISIBLE, sizeof(string_buffer), NORECALL); if (*string_buffer == '\0') { diff --git a/src/LYCharUtils.c b/src/LYCharUtils.c index 5b6b94dd..22085ca5 100644 --- a/src/LYCharUtils.c +++ b/src/LYCharUtils.c @@ -980,9 +980,9 @@ PUBLIC void LYEntify ARGS2( } /* -** This function trims characters <= that of a space (32), -** including HT_NON_BREAK_SPACE (1) and HT_EM_SPACE (2), -** but not ESC, from the tails of strings. - FM +** This function trims characters <= that of a space (32), +** including HT_NON_BREAK_SPACE (1) and HT_EM_SPACE (2), +** but not ESC, from the heads of strings. - FM */ PUBLIC void LYTrimHead ARGS1( char *, str) @@ -1003,9 +1003,9 @@ PUBLIC void LYTrimHead ARGS1( } /* -** This function trims characters <= that of a space (32), -** including HT_NON_BREAK_SPACE (1), HT_EM_SPACE (2), and -** ESC from the tails of strings. - FM +** This function trims characters <= that of a space (32), +** including HT_NON_BREAK_SPACE (1), HT_EM_SPACE (2), and +** ESC from the tails of strings. - FM */ PUBLIC void LYTrimTail ARGS1( char *, str) @@ -1584,7 +1584,7 @@ PUBLIC void LYHandleMETA ARGS4( if (present[HTML_META_HTTP_EQUIV] && value[HTML_META_HTTP_EQUIV] && *value[HTML_META_HTTP_EQUIV]) { StrAllocCopy(http_equiv, value[HTML_META_HTTP_EQUIV]); - convert_to_spaces(http_equiv); + convert_to_spaces(http_equiv, TRUE); LYUnEscapeToLatinOne(&http_equiv, FALSE); LYTrimHead(http_equiv); LYTrimTail(http_equiv); @@ -1595,7 +1595,7 @@ PUBLIC void LYHandleMETA ARGS4( if (present[HTML_META_NAME] && value[HTML_META_NAME] && *value[HTML_META_NAME]) { StrAllocCopy(name, value[HTML_META_NAME]); - convert_to_spaces(name); + convert_to_spaces(name, TRUE); LYUnEscapeToLatinOne(&name, FALSE); LYTrimHead(name); LYTrimTail(name); @@ -1617,7 +1617,7 @@ PUBLIC void LYHandleMETA ARGS4( * of it might be sent to the screen. - FM */ StrAllocCopy(content, value[HTML_META_CONTENT]); - convert_to_spaces(content); + convert_to_spaces(content, FALSE); LYTrimHead(content); LYTrimTail(content); if (*content == '\0') { @@ -2017,7 +2017,23 @@ PUBLIC int LYLegitimizeHREF ARGS3( if (!me || !href || *href == NULL || *(*href) == '\0') return(url_type); - collapse_spaces(*href); + LYTrimHead(*href); + if (!strncasecomp(*href, "lynxexec:", 9) || + !strncasecomp(*href, "lynxprog:", 9)) { + /* + * The original implementions of these schemes expected + * white space without hex escaping, and did not check + * for hex escaping, so we'll continue to support that, + * until that code is redone in conformance with SGML + * principles. - FM + */ + HTUnEscapeSome(*href, " \r\n\t"); + convert_to_spaces(*href, TRUE); + } else { + collapse_spaces(*href); + } + if (*(*href) == '\0') + return(url_type); LYUnEscapeToLatinOne(&(*href), TRUE); url_type = is_url(*href); if (!url_type && force_slash && diff --git a/src/LYCurses.c b/src/LYCurses.c index 8ec8b4d2..d4bda6f1 100644 --- a/src/LYCurses.c +++ b/src/LYCurses.c @@ -394,7 +394,7 @@ PUBLIC BOOLEAN setup ARGS1( * Get terminal type (strip 'dec-' from vms style types). */ if (strncmp((CONST char*)ttytype, "dec-vt", 6) == 0) { - (void) setterm((char *)ttytype + 4); + (void) setterm(ttytype + 4); } #endif /* !NO_TTYTYPE */ @@ -485,13 +485,7 @@ PRIVATE int dumbterm ARGS1( #undef system #endif /* system */ #include <processes.h> - -#ifndef CLI$M_TRUSTED -#define CLI$M_TRUSTED 64 /* May not be in the compiler's clidef.h */ -#endif /* !CLI$M_TRUSTED */ -#ifndef LIB$_INVARG -#define LIB$_INVARG 1409588 -#endif /* !LIB$_INVARG */ +#include "LYVMSdef.h" #define EFN 0 /* Event flag */ diff --git a/src/LYEdit.c b/src/LYEdit.c index 5ac37fbe..2f01982d 100644 --- a/src/LYEdit.c +++ b/src/LYEdit.c @@ -106,6 +106,10 @@ PUBLIC int edit_current_file ARGS3(char *,newfile, int,cur, int,lineno) else sprintf(command,"%s \"%s\"",editor, filename); #endif /* VMS */ + if (TRACE) { + fprintf(stderr, "LYEdit: %s\n",command); + sleep(MessageSecs); + } FREE(filename); stop_curses(); diff --git a/src/LYGlobalDefs.h b/src/LYGlobalDefs.h index bff9785e..005dda32 100644 --- a/src/LYGlobalDefs.h +++ b/src/LYGlobalDefs.h @@ -264,5 +264,5 @@ extern BOOLEAN LYMBMAdvanced; /* MBM statusline for ADVANCED? */ extern int LYStatusLine; /* Line for statusline() or -1 */ extern BOOLEAN LYCollapseBRs; /* Collapse serial BRs? */ extern BOOLEAN LYSetCookies; /* Process Set-Cookie headers? */ - +extern char *XLoadImageCommand; /* Default image viewer for X */ #endif /* LYGLOBALDEFS_H */ diff --git a/src/LYKeymap.c b/src/LYKeymap.c index 2545f6a6..62382e44 100644 --- a/src/LYKeymap.c +++ b/src/LYKeymap.c @@ -416,7 +416,7 @@ PRIVATE struct rmap revmap[] = { { "DOWN_LINK", "move down the page to another link" }, { "RIGHT_LINK", "move right to another link" }, { "LEFT_LINK", "move left to a previous link" }, -{ "HISTORY", "display a list of previously viewed documents" }, +{ "HISTORY", "display stack of currently-suspended documents" }, { "PREV_DOC", "go back to the previous document" }, { "ACTIVATE", "go to the document given by the current link" }, { "GOTO", "go to a document given as a URL" }, diff --git a/src/LYLocal.c b/src/LYLocal.c index d7d36052..78c0233f 100644 --- a/src/LYLocal.c +++ b/src/LYLocal.c @@ -1382,7 +1382,8 @@ PUBLIC int local_dired ARGS1( tp = quote_pathname(line+20); *cp++ = '\0'; cp = quote_pathname(line+20); - sprintf(buffer,"%s -qdc %s | (cd %s; %s -xfe -)",GZIP_PATH, tp,cp, TAR_PATH); + sprintf(buffer, "%s -qdc %s | (cd %s; %s -xf -)", + GZIP_PATH, tp, cp, TAR_PATH); FREE(cp); FREE(tp); # endif /* OK_GZIP */ @@ -1391,7 +1392,8 @@ PUBLIC int local_dired ARGS1( tp = quote_pathname(line+19); *cp++ = '\0'; cp = quote_pathname(line+19); - sprintf(buffer,"%s %s | (cd %s; %s -xfe -)", ZCAT_PATH, tp,cp,TAR_PATH); + sprintf(buffer, "%s %s | (cd %s; %s -xf -)", + ZCAT_PATH, tp, cp, TAR_PATH); FREE(cp); FREE(tp); @@ -1399,7 +1401,7 @@ PUBLIC int local_dired ARGS1( tp = quote_pathname(line+17); *cp++ = '\0'; cp = quote_pathname(line+17); - sprintf(buffer,"cd %s; %s -xfe %s", cp,TAR_PATH, tp); + sprintf(buffer,"cd %s; %s -xf %s", cp, TAR_PATH, tp); FREE(cp); FREE(tp); # endif /* !ARCHIVE_ONLY */ @@ -1409,7 +1411,8 @@ PUBLIC int local_dired ARGS1( *cp++ = '\0'; cp = quote_pathname(cp); tp = quote_pathname(line+18); - sprintf(buffer,"(cd %s; %s -cfe - %s) | %s -qc >%s/%s.tar.gz",tp, TAR_PATH, cp, GZIP_PATH, tp,cp); + sprintf(buffer, "(cd %s; %s -cf - %s) | %s -qc >%s/%s.tar.gz", + tp, TAR_PATH, cp, GZIP_PATH, tp, cp); FREE(cp); FREE(tp); # endif /* OK_GZIP */ @@ -1418,7 +1421,8 @@ PUBLIC int local_dired ARGS1( *cp++ = '\0'; cp = quote_pathname(cp); tp = quote_pathname(line+17); - sprintf(buffer,"(cd %s; %s -cfe - %s) | %s >%s/%s.tar.Z",tp,TAR_PATH, cp,COMPRESS_PATH, tp,cp); + sprintf(buffer, "(cd %s; %s -cf - %s) | %s >%s/%s.tar.Z", + tp, TAR_PATH, cp, COMPRESS_PATH, tp, cp); FREE(cp); FREE(tp); @@ -1426,7 +1430,7 @@ PUBLIC int local_dired ARGS1( *cp++ = '\0'; cp = quote_pathname(cp); tp = quote_pathname(line+15); - sprintf(buffer,"(cd %s; %s -cfe %s.tar %s)",tp,TAR_PATH, cp, cp); + sprintf(buffer,"(cd %s; %s -cf %s.tar %s)", tp, TAR_PATH, cp, cp); FREE(cp); FREE(tp); #endif /* OK_TAR */ diff --git a/src/LYMain.c b/src/LYMain.c index 6c45c54d..85167077 100644 --- a/src/LYMain.c +++ b/src/LYMain.c @@ -305,6 +305,7 @@ PUBLIC BOOLEAN LYMBMAdvanced = TRUE; PUBLIC int LYStatusLine = -1; /* Line for statusline() if > -1 */ PUBLIC BOOLEAN LYCollapseBRs = COLLAPSE_BR_TAGS; /* Collapse serial BRs? */ PUBLIC BOOLEAN LYSetCookies = SET_COOKIES; /* Process Set-Cookie headers? */ +PUBLIC char *XLoadImageCommand = NULL; /* Default image viewer for X */ /* These are declared in cutil.h for current freeWAIS libraries. - FM */ #ifdef DECLARE_WAIS_LOGFILES @@ -323,6 +324,7 @@ PRIVATE BOOLEAN stack_dump = FALSE; PRIVATE char *terminal = NULL; PRIVATE char *pgm; PRIVATE BOOLEAN number_links = FALSE; +PRIVATE BOOLEAN LYPrependBase = FALSE; PRIVATE void parse_arg PARAMS((char **arg, int *i, int argc)); #ifndef VMS @@ -397,6 +399,7 @@ PRIVATE void free_lynx_globals NOARGS FREE(personal_mail_address); FREE(URLDomainPrefixes); FREE(URLDomainSuffixes); + FREE(XLoadImageCommand); for (i = 0; i < nlinks; i++) { FREE(links[i].lname); } @@ -479,6 +482,19 @@ PUBLIC int main ARGS2( AlertSecs = (int)ALERTSECS; StrAllocCopy(helpfile, HELPFILE); StrAllocCopy(startfile, STARTFILE); + LYTrimHead(startfile); + if (!strncasecomp(startfile, "lynxexec:", 9) || + !strncasecomp(startfile, "lynxprog:", 9)) { + /* + * The original implementions of these schemes expected + * white space without hex escaping, and did not check + * for hex escaping, so we'll continue to support that, + * until that code is redone in conformance with SGML + * principles. - FM + */ + HTUnEscapeSome(startfile, " \r\n\t"); + convert_to_spaces(startfile, TRUE); + } StrAllocCopy(jumpprompt, JUMP_PROMPT); #ifdef JUMPFILE StrAllocCopy(jumpfile, JUMPFILE); @@ -579,7 +595,7 @@ PUBLIC int main ARGS2( StrAllocCopy(LYLocalDomain, LOCAL_DOMAIN); StrAllocCopy(URLDomainPrefixes, URL_DOMAIN_PREFIXES); StrAllocCopy(URLDomainSuffixes, URL_DOMAIN_SUFFIXES); - + StrAllocCopy(XLoadImageCommand, XLOADIMAGE_COMMAND); /* * Set up the compilation default character set. - FM */ @@ -786,8 +802,22 @@ PUBLIC int main ARGS2( /* * Get WWW_HOME environment variable if it exists. */ - if ((cp = getenv("WWW_HOME")) != NULL) + if ((cp = getenv("WWW_HOME")) != NULL) { StrAllocCopy(startfile, cp); + LYTrimHead(startfile); + if (!strncasecomp(startfile, "lynxexec:", 9) || + !strncasecomp(startfile, "lynxprog:", 9)) { + /* + * The original implementions of these schemes expected + * white space without hex escaping, and did not check + * for hex escaping, so we'll continue to support that, + * until that code is redone in conformance with SGML + * principles. - FM + */ + HTUnEscapeSome(startfile, " \r\n\t"); + convert_to_spaces(startfile, TRUE); + } + } /* * Set the LynxHome URL. If it's a file URL and the @@ -1189,6 +1219,19 @@ PRIVATE void parse_arg ARGS3( */ if (argv[0][0] != '-') { StrAllocCopy(startfile, argv[0]); + LYTrimHead(startfile); + if (!strncasecomp(startfile, "lynxexec:", 9) || + !strncasecomp(startfile, "lynxprog:", 9)) { + /* + * The original implementions of these schemes expected + * white space without hex escaping, and did not check + * for hex escaping, so we'll continue to support that, + * until that code is redone in conformance with SGML + * principles. - FM + */ + HTUnEscapeSome(startfile, " \r\n\t"); + convert_to_spaces(startfile, TRUE); + } return; } @@ -1236,7 +1279,17 @@ PRIVATE void parse_arg ARGS3( break; case 'b': - if (strcmp(argv[0], "-book") == 0) { + if (strcmp(argv[0], "-base") == 0) { + /* + * Treat -source equivalently to an interactive + * download, so that a BASE tag is prepended for + * text/html content types. - FM + */ + LYPrependBase = TRUE; + if (HTOutputFormat == HTAtom_for("www/dump")) + HTOutputFormat = HTAtom_for("www/download"); + + } else if (strcmp(argv[0], "-book") == 0) { /* * Use bookmarks as startfile. */ @@ -1447,9 +1500,22 @@ PRIVATE void parse_arg ARGS3( historical_comments = TRUE; } else if (strncmp(argv[0], "-homepage", 9) == 0) { - if (nextarg) - StrAllocCopy(homepage,cp); - + if (nextarg) { + StrAllocCopy(homepage, cp); + LYTrimHead(homepage); + if (!strncasecomp(homepage, "lynxexec:", 9) || + !strncasecomp(homepage, "lynxprog:", 9)) { + /* + * The original implementions of these schemes expected + * white space without hex escaping, and did not check + * for hex escaping, so we'll continue to support that, + * until that code is redone in conformance with SGML + * principles. - FM + */ + HTUnEscapeSome(homepage, " \r\n\t"); + convert_to_spaces(homepage, TRUE); + } + } } else { goto Output_Error_and_Help_List; } @@ -1496,7 +1562,8 @@ PRIVATE void parse_arg ARGS3( */ keep_mime_headers = TRUE; dump_output_immediately = TRUE; - HTOutputFormat = HTAtom_for("www/dump"); + HTOutputFormat = (LYPrependBase ? + HTAtom_for("www/download") : HTAtom_for("www/dump")); LYcols=999; } else if (strncmp(argv[0], "-minimal", 11) == 0) { @@ -1776,7 +1843,8 @@ PRIVATE void parse_arg ARGS3( } else if (strncmp(argv[0], "-source", 7) == 0) { dump_output_immediately = TRUE; - HTOutputFormat = HTAtom_for("www/dump"); + HTOutputFormat = (LYPrependBase ? + HTAtom_for("www/download") : HTAtom_for("www/dump")); LYcols=999; } else if (strncmp(argv[0], "-stack_dump", 11) == 0) { @@ -1843,7 +1911,7 @@ PRIVATE void parse_arg ARGS3( parse_restrictions("all"); } else if (strncmp(argv[0], "-version", 8) == 0) { - printf("\n%s Version %s\n(c)1996 GNU General Public License\n\ + printf("\n%s Version %s\n(c)1997 GNU General Public License\n\ <URL:http://lynx.browser.org/>\n\n", LYNX_NAME, LYNX_VERSION); exit(0); @@ -1874,6 +1942,8 @@ Output_Help_List: printf(" in double-quotes (\"-\") on VMS)\n"); printf(" -anonymous used to specify the anonymous account\n"); printf(" -auth=id:pw authentication information for protected forms\n"); + printf(" -base prepend a request URL comment and BASE tag to text/html\n"); + printf(" outputs for -source or -mime_header dumps\n"); printf(" -book use the bookmark page as the startfile\n"); printf(" -buried_news toggles scanning of news articles for buried references\n"); printf(" -cache=NUMBER NUMBER of documents cached in memory (default is %d)\n",DEFAULT_CACHE_SIZE); diff --git a/src/LYMainLoop.c b/src/LYMainLoop.c index bce1652c..0cb80d9a 100644 --- a/src/LYMainLoop.c +++ b/src/LYMainLoop.c @@ -321,18 +321,23 @@ try_again: * Do any error logging, if appropriate. */ LYoverride_no_cache = FALSE; /* Was TRUE if popped. - FM */ - if (error_logging && !first_file && owner_address && - !LYCancelledFetch) { + if (error_logging && + first_file && owner_address && !LYCancelledFetch) { /* - * Send an error message. + * Email a bad link message to the owner of + * the document (but NOT to lynx-dev). - FM */ - if (!strncasecomp(owner_address, "mailto:", 7)) { - mailmsg(curdoc.link, - (owner_address+7), - history[nhist-1].address, - history[nhist-1].title); + if (strncasecomp(owner_address, "mailto:", 7)) { + if (strncasecomp((owner_address + 7), + "lynx-dev@", 9)) { + mailmsg(curdoc.link, + (owner_address+7), + history[nhist-1].address, + history[nhist-1].title); + } } - } else if (traversal && !first_file && !LYCancelledFetch) { + } + if (traversal && !first_file && !LYCancelledFetch) { FILE *ofp; if ((ofp = fopen(TRAVERSE_ERRORS,"a+")) == NULL) { @@ -2187,7 +2192,21 @@ check_recall: /* * Get rid of leading spaces (and any other spaces). */ - collapse_spaces(user_input_buffer); + LYTrimHead(user_input_buffer); + if (!strncasecomp(user_input_buffer, "lynxexec:", 9) || + !strncasecomp(user_input_buffer, "lynxprog:", 9)) { + /* + * The original implementions of these schemes expected + * white space without hex escaping, and did not check + * for hex escaping, so we'll continue to support that, + * until that code is redone in conformance with SGML + * principles. - FM + */ + HTUnEscapeSome(user_input_buffer, " \r\n\t"); + convert_to_spaces(user_input_buffer, TRUE); + } else { + collapse_spaces(user_input_buffer); + } if (*user_input_buffer == '\0' && !(recall && (ch == UPARROW || ch == DNARROW))) { strcpy(user_input_buffer, temp); @@ -3871,60 +3890,77 @@ check_add_bookmark_to_self: case LYK_JUMP: { - char *ret; - - if (no_jump || JThead == NULL) { - if (old_c != real_c) { - old_c = real_c; - if (no_jump) - _statusline(JUMP_DISALLOWED); - else - _statusline(NO_JUMPFILE); - sleep(MessageSecs); - } - } else { - LYJumpFileURL = TRUE; - if ((ret = LYJump(c)) != NULL) { + char *ret; + + if (no_jump || JThead == NULL) { + if (old_c != real_c) { + old_c = real_c; + if (no_jump) + _statusline(JUMP_DISALLOWED); + else + _statusline(NO_JUMPFILE); + sleep(MessageSecs); + } + } else { + LYJumpFileURL = TRUE; + if ((ret = LYJump(c)) != NULL) { #ifdef PERMIT_GOTO_FROM_JUMP - if (!strncasecomp(ret, "Go ", 3)) { - LYJumpFileURL = FALSE; - StrAllocCopy(temp, user_input_buffer); - URLTotal = (Goto_URLs ? HTList_count(Goto_URLs) : 0); - recall = ((URLTotal >= 1) ? RECALL : NORECALL); - URLNum = URLTotal; - FirstURLRecall = TRUE; - if (!strcasecomp(ret, "Go :")) { - if (recall) { - ch = UPARROW; - goto check_recall; - } - FREE(temp); - statusline(NO_RANDOM_URLS_YET); - sleep(MessageSecs); - break; - } - ret = HTParse((ret+3), startfile, PARSE_ALL); - strcpy(user_input_buffer, ret); - FREE(ret); - goto check_recall; - } + if (!strncasecomp(ret, "Go ", 3)) { + LYJumpFileURL = FALSE; + StrAllocCopy(temp, user_input_buffer); + URLTotal = (Goto_URLs ? + HTList_count(Goto_URLs) : 0); + recall = ((URLTotal >= 1) ? RECALL : NORECALL); + URLNum = URLTotal; + FirstURLRecall = TRUE; + if (!strcasecomp(ret, "Go :")) { + if (recall) { + ch = UPARROW; + goto check_recall; + } + FREE(temp); + statusline(NO_RANDOM_URLS_YET); + sleep(MessageSecs); + break; + } + ret = HTParse((ret+3), startfile, PARSE_ALL); + strcpy(user_input_buffer, ret); + FREE(ret); + goto check_recall; + } #endif /* PERMIT_GOTO_FROM_JUMP */ - ret = HTParse(ret, startfile, PARSE_ALL); - StrAllocCopy(newdoc.address, ret); - StrAllocCopy(lynxjumpfile, ret); - FREE(newdoc.post_data); - FREE(newdoc.post_content_type); - FREE(newdoc.bookmark); - newdoc.isHEAD = FALSE; - newdoc.safe = FALSE; - FREE(ret); - LYUserSpecifiedURL = TRUE; - } else { - LYJumpFileURL = FALSE; - } - } - break; + ret = HTParse(ret, startfile, PARSE_ALL); + LYTrimHead(ret); + if (!strncasecomp(ret, "lynxexec:", 9) || + !strncasecomp(ret, "lynxprog:", 9)) { + /* + * The original implementions of these schemes + * expected white space without hex escaping, + * and did not check for hex escaping, so we'll + * continue to support that, until that code is + * redone in conformance with SGML principles. + * - FM + */ + HTUnEscapeSome(ret, " \r\n\t"); + convert_to_spaces(ret, TRUE); + } else { + collapse_spaces(user_input_buffer); + } + StrAllocCopy(newdoc.address, ret); + StrAllocCopy(lynxjumpfile, ret); + FREE(newdoc.post_data); + FREE(newdoc.post_content_type); + FREE(newdoc.bookmark); + newdoc.isHEAD = FALSE; + newdoc.safe = FALSE; + FREE(ret); + LYUserSpecifiedURL = TRUE; + } else { + LYJumpFileURL = FALSE; + } + } } + break; #ifdef NOT_USED case LYK_VERSION: diff --git a/src/LYNews.c b/src/LYNews.c index eb1da221..b852e484 100644 --- a/src/LYNews.c +++ b/src/LYNews.c @@ -13,6 +13,7 @@ #include "LYHistory.h" #include "LYSystem.h" #include "GridText.h" +#include "LYSignal.h" #include "LYGlobalDefs.h" @@ -159,14 +160,20 @@ PUBLIC int LYNewsPost ARGS2(document *,newdoc, BOOLEAN,followup) #else fprintf(fd,"%s\n",user_input); - /* add Organization: */ - { FILE *fp; - - if (fp = fopen("/etc/organization", "r")) { - if (fgets(user_input, sizeof(user_input), fp) != NULL) - fprintf(fd, "Organization: %s", user_input); - fclose(fp); - } + /* + * Add Organization: header. + */ + { + FILE *fp; + char *org; + + if ((org = getenv("ORGANIZATION")) != NULL && *org != '\0') { + fprintf(fd, "Organization: %s\n", org); + } else if (fp = fopen("/etc/organization", "r")) { + if (fgets(user_input, sizeof(user_input), fp) != NULL) + fprintf(fd, "Organization: %s", user_input); + fclose(fp); + } } /* add Newsgroups: summary: and Keywords: */ @@ -260,6 +267,7 @@ PUBLIC int LYNewsPost ARGS2(document *,newdoc, BOOLEAN,followup) stop_curses(); printf("Posting your message:\n\n%s\n\nPlease wait...", cmd); system(cmd); + sleep(MessageSecs); start_curses(); /* come here to cleanup and exit */ diff --git a/src/LYReadCFG.c b/src/LYReadCFG.c index c0ede5b9..af340803 100644 --- a/src/LYReadCFG.c +++ b/src/LYReadCFG.c @@ -987,7 +987,7 @@ PUBLIC void read_cfg ARGS1( #endif /* VMS */ } else if (!strncasecomp(buffer, "USE_SELECT_POPUPS:", 18)) { - LYSelectPopups = is_true(buffer+18); + LYSelectPopups = is_true(buffer+18); } break; @@ -1043,6 +1043,12 @@ PUBLIC void read_cfg ARGS1( break; case 'W': + if (!strncasecomp(buffer, "XLOADIMAGE_COMMAND:", 19)) { + StrAllocCat(XLoadImageCommand, (char *)&buffer[19]); + } + break; + + case 'X': if (!strncasecomp(buffer, "wais_proxy:", 11)) { if (getenv("wais_proxy") == NULL) { #ifdef VMS diff --git a/src/LYUtils.c b/src/LYUtils.c index c003579e..c479d440 100644 --- a/src/LYUtils.c +++ b/src/LYUtils.c @@ -230,12 +230,15 @@ PUBLIC void collapse_spaces ARGS1( } /* - * Convert single or serial newlines to single spaces throughout a string - * (ignore newlines if the preceding character is a space) and convert - * tabs to single spaces (but don't ignore any explicit tabs or spaces). + * Convert single or serial newlines to single spaces throughout a string + * (ignore newlines if the preceding character is a space) and convert + * tabs to single spaces. Don't ignore any explicit tabs or spaces if + * the condense argument is FALSE, otherwise, condense any serial spaces + * or tabs to one space. - FM */ -PUBLIC void convert_to_spaces ARGS1( - char *, string) +PUBLIC void convert_to_spaces ARGS2( + char *, string, + BOOL, condense) { char *s = string; char *ns = string; @@ -248,7 +251,8 @@ PUBLIC void convert_to_spaces ARGS1( switch (*s) { case ' ': case '\t': - *(ns++) = ' '; + if (!(condense && last_is_space)) + *(ns++) = ' '; last_is_space = TRUE; break; @@ -347,7 +351,7 @@ PUBLIC void statusline ARGS1( /* * Deal with any newlines or tabs in the string. - FM */ - convert_to_spaces((char *)temp); + convert_to_spaces((char *)temp, FALSE); /* * Handle the Kanji, making sure the text is not @@ -382,7 +386,7 @@ PUBLIC void statusline ARGS1( /* * Deal with any newlines or tabs in the string. - FM */ - convert_to_spaces(buffer); + convert_to_spaces(buffer, FALSE); } /* diff --git a/src/LYUtils.h b/src/LYUtils.h index 05bdff41..b03b1c1d 100644 --- a/src/LYUtils.h +++ b/src/LYUtils.h @@ -11,7 +11,7 @@ extern void highlight PARAMS((int flag, int cur)); extern void free_and_clear PARAMS((char **obj)); extern void collapse_spaces PARAMS((char *string)); -extern void convert_to_spaces PARAMS((char *string)); +extern void convert_to_spaces PARAMS((char *string, BOOL condense)); extern char * strip_trailing_slash PARAMS((char * dirname)); extern void statusline PARAMS((char *text)); extern void toggle_novice_line NOPARAMS; diff --git a/src/LYVMSdef.h b/src/LYVMSdef.h new file mode 100644 index 00000000..35e3f577 --- /dev/null +++ b/src/LYVMSdef.h @@ -0,0 +1,18 @@ + +#ifndef LYVMSDEF_H +#define LYVMSDEF_H + +/* +** These are VMS system definitions which may not be in the headers +** of old VMS compilers and contain non-ANSI extended tokens that +** genterate warnings by some Unix compilers while looking for the +** "#endif" which closes the outer "#ifdef VMS". +*/ +#ifndef CLI$M_TRUSTED +#define CLI$M_TRUSTED 64 /* May not be in the compiler's clidef.h */ +#endif /* !CLI$M_TRUSTED */ +#ifndef LIB$_INVARG +#define LIB$_INVARG 1409588 /* May not be in the compiler's libdef.h */ +#endif /* !LIB$_INVARG */ + +#endif /* LYVMSDEF_H */ diff --git a/userdefs.h b/userdefs.h index e305ea01..abe4f458 100644 --- a/userdefs.h +++ b/userdefs.h @@ -94,12 +94,17 @@ #define PERSONAL_MAILCAP ".mailcap" /************************** - * This define will be used for a default in src/HTInit.c. - * Make it the full path and name of the xloadimage command. - * Put 'echo' or something like it here if you don't have it. - * It can be anything that will handle GIF, TIFF and other - * popular image formats (xv does). - * You must also have a "%s" for the filename + * XLOADIMAGE_COMMAND will be used as a default in src/HTInit.c + * for viewing image/* content types when the DECW$DISPLAY logical + * is set. Make it the foreign command for your system's X image + * viewer (commonly, "xv"). Make it "exit" or something like that + * if you don't have one. It can be anything that will handle GIF, + * TIFF and other popular image formats. Freeware ports of xv for + * VMS are available in the ftp://ftp.wku.edu/vms/unsupported and + * http://www.openvms.digital.com/cd/XV310A/ subdirectories. You + * must also have a "%s" for the filename. The default defined + * here can be overridden in lynx.cfg, or via the global or personal + * mailcap files. */ #define XLOADIMAGE_COMMAND "xv %s" @@ -139,6 +144,10 @@ * * Define INEWS as "none" if you do not have access to an ANU-NEWS * client with a server for posting to newsgroups from Lynx. + * + * Note that posting is supported only for news: (not nntp: or snews:) + * URLs, and only via the default nntp server defined with the NNTPSERVER + * configuration or environment variable. */ #define INEWS "NEWS" @@ -262,23 +271,33 @@ */ #define RLOGIN_COMMAND "rlogin" -/************************* - * This define will be used for a default in src/HTInit.c. - * Make it the full path and name of the xloadimage command. - * Put 'echo' or something like it here if you don't have it. - * It can be anything that will handle GIF, TIFF and other - * popular image formats (xv does). - * You must also have a "%s" for the filename; "&" for - * background is optional - */ -#define XLOADIMAGE_COMMAND "xv %s &" +/************************** + * XLOADIMAGE_COMMAND will be used as a default in src/HTInit.c for + * viewing image/* content types when the DISPLAY environment variable + * is set. Make it the full path and name of the xli (also known as + * xloadimage or xview) command, or other image viewer. Put 'echo' or + * something like it here if you don't have a suitable viewer. It can + * be anything that will handle GIF, TIFF and other popular image formats + * (xli does). The freeware distribution of xli is available in the + * ftp://ftp.x.org/contrib/ subdirectory. The shareware, xv, also is + * suitable. You must also have a "%s" for the filename; "&" for + * background is optional. The default defined here can be overridden + * in lynx.cfg, or via the global or personal mailcap files. Note that + * open is used as the default for NeXT, instead of the XLOADIMAGE_COMMAND + * definition. + */ +#define XLOADIMAGE_COMMAND "xli %s &" /************************* - * The full path and name of the inews program - * - * A "mini" inews has been included in the utils directory. - * - * set empty or to "none" if you don't have or want it. + * Set INEWS to the full path and name of your program for posting to + * newsgroups. A "mini" inews is included in the utils subdirectory of + * the Lynx distribution. You can disable news posting by setting INEWS + * to "none", or via -restrictions switches. The default defined here + * can be overridden in lynx.cfg. + * Note that some news software, such as INN's inews, requires an -h switch + * added to the path. Also note that posting is supported only for news: + * (not nntp: or snews:) URLs, and only via the default nntp server defined + * with the NNTPSERVER configuration or environment variable. */ #define INEWS "inews" @@ -1140,7 +1159,7 @@ */ #define LYNX_NAME "Lynx" -#define LYNX_VERSION "2.6FM" +#define LYNX_VERSION "2.7" /**************************************************************** * The LYMessages_en.h header defines default, English strings diff --git a/utils/inews/clientlib.c b/utils/inews/clientlib.c index 530cb1d1..c06c3b6f 100644 --- a/utils/inews/clientlib.c +++ b/utils/inews/clientlib.c @@ -32,15 +32,9 @@ static char *sccsid = "@(#)clientlib.c 1.11 (Berkeley) 10/27/89"; #include <sys/socket.h> #ifndef EXCELAN # include <netdb.h> -#endif not EXCELAN +#endif /* !EXCELAN */ -#ifndef FOR_NN -#ifdef USG -# define index strchr -# define bcopy(a,b,c) memcpy(b,a,c) -# define bzero(a,b) memset(a,'\0',b) -#endif USG -#endif +#include <string.h> #ifdef EXCELAN # define IPPORT_NNTP 119 @@ -49,7 +43,7 @@ static char *sccsid = "@(#)clientlib.c 1.11 (Berkeley) 10/27/89"; #ifdef DECNET #include <netdnet/dn.h> #include <netdnet/dnetdb.h> -#endif DECNET +#endif /* DECNET */ #include "nntp.h" @@ -77,9 +71,7 @@ char *file; register FILE *fp; register char *cp; static char buf[256]; - char *index(); char *getenv(); - char *strcpy(); if (cp = getenv("NNTPSERVER")) { (void) strcpy(buf, cp); @@ -96,7 +88,7 @@ char *file; while (fgets(buf, sizeof (buf), fp) != NULL) { if (*buf == '\n' || *buf == '#') continue; - cp = index(buf, '\n'); + cp = strchr(buf, '\n'); if (cp) *cp = '\0'; (void) fclose(fp); @@ -126,11 +118,10 @@ char *machine; { int sockt_rd, sockt_wr; char line[256]; - char *index(); #ifdef DECNET char *cp; - cp = index(machine, ':'); + cp = strchr(machine, ':'); if (cp && cp[1] == ':') { *cp = '\0'; @@ -231,14 +222,14 @@ char *machine; return (-1); } - bzero((char *) &sin, sizeof(sin)); + memset((char *) &sin, '\0', sizeof(sin)); sin.sin_family = hp->h_addrtype; sin.sin_port = sp->s_port; -#else EXCELAN - bzero((char *) &sin, sizeof(sin)); +#else + memset((char *) &sin, '\0', sizeof(sin)); sin.sin_family = AF_INET; sin.sin_port = htons(IPPORT_NNTP); -#endif EXCELAN +#endif /* !EXCELAN */ /* * The following is kinda gross. The name server under 4.3 @@ -260,7 +251,7 @@ char *machine; perror("socket"); return (-1); } - bcopy(*cp, (char *)&sin.sin_addr, hp->h_length); + memcpy(*cp, (char *)&sin.sin_addr, hp->h_length); if (x < 0) fprintf(stderr, "trying %s\n", inet_ntoa(sin.sin_addr)); @@ -296,7 +287,7 @@ char *machine; (void) close(s); return (-1); } -#else not EXCELAN +#else if ((s = socket(AF_INET, SOCK_STREAM, 0)) < 0) { perror("socket"); return (-1); @@ -304,14 +295,14 @@ char *machine; /* And then connect */ - bcopy(hp->h_addr, (char *) &sin.sin_addr, hp->h_length); + memcpy(hp->h_addr, (char *) &sin.sin_addr, hp->h_length); if (connect(s, (struct sockaddr *) &sin, sizeof(sin)) < 0) { perror("connect"); (void) close(s); return (-1); } -#endif not EXCELAN +#endif /* !EXCELAN */ #endif return (s); @@ -338,7 +329,7 @@ char *machine; struct sockaddr_dn sdn; struct nodeent *getnodebyname(), *np; - bzero((char *) &sdn, sizeof(sdn)); + memset((char *) &sdn, '\0', sizeof(sdn)); switch (s = sscanf( machine, "%d%*[.]%d", &area, &node )) { case 1: @@ -357,7 +348,7 @@ char *machine; "%s: Unknown host.\n", machine); return (-1); } else { - bcopy(np->n_addr, + memcpy(np->n_addr, (char *) sdn.sdn_add.a_addr, np->n_length); sdn.sdn_add.a_len = np->n_length; @@ -368,7 +359,7 @@ char *machine; sdn.sdn_objnum = 0; sdn.sdn_flags = 0; sdn.sdn_objnamel = strlen("NNTP"); - bcopy("NNTP", &sdn.sdn_objname[0], sdn.sdn_objnamel); + memcpy("NNTP", &sdn.sdn_objname[0], sdn.sdn_objnamel); if ((s = socket(AF_DECnet, SOCK_STREAM, 0)) < 0) { nerror("socket"); @@ -488,14 +479,13 @@ char *string; int size; { register char *cp; - char *index(); if (fgets(string, size, ser_rd_fp) == NULL) return (-1); - if ((cp = index(string, '\r')) != NULL) + if ((cp = strchr(string, '\r')) != NULL) *cp = '\0'; - else if ((cp = index(string, '\n')) != NULL) + else if ((cp = strchr(string, '\n')) != NULL) *cp = '\0'; #ifdef DEBUG fprintf(stderr, "<<< %s\n", string); diff --git a/utils/inews/inews.c b/utils/inews/inews.c index 97c3a2d8..134dc460 100644 --- a/utils/inews/inews.c +++ b/utils/inews/inews.c @@ -20,13 +20,8 @@ static char *sccsid = "@(#)inews.c 1.16 (Berkeley) 8/27/89"; #include <ctype.h> #include "conf.h" #include "nntp.h" -#ifndef FOR_NN -#ifdef USG +#include "clientlib.h" #include <string.h> -#else not USG -#include <strings.h> -#endif not USG -#endif #define MAX_SIGNATURE 4 @@ -160,6 +155,7 @@ char *argv[]; close_server(); exit(0); + return(0); } /* @@ -174,7 +170,7 @@ append_signature() char *cp; struct passwd *passwd; FILE *fp; - char *index(), *getenv(); + char *getenv(); int count = 0; char *dotdir; @@ -221,7 +217,7 @@ append_signature() MAX_SIGNATURE); break; } - if (cp = index(line, '\n')) + if (cp = strchr(line, '\n')) *cp = '\0'; fprintf(ser_wr_fp, "%s\r\n", line); } @@ -247,14 +243,14 @@ gen_frompath() char *full_name; char *cp; struct passwd *passwd; - char *index(), *getenv(); + char *getenv(); passwd = getpwuid(getuid()); full_name = getenv("NAME"); if (full_name == NULL) { full_name = passwd->pw_gecos; - if ((cp = index(full_name, ','))) + if ((cp = strchr(full_name, ','))) *cp = '\0'; } @@ -267,7 +263,7 @@ gen_frompath() /* A heuristic to see if we should tack on a domain */ - cp = index(host_name, '.'); + cp = strchr(host_name, '.'); if (cp) fprintf(ser_wr_fp, "From: %s@%s (", passwd->pw_name, @@ -372,7 +368,6 @@ register char c; int valid_header(h) register char *h; { - char *index(); char *colon, *space; /* @@ -385,8 +380,8 @@ register char *h; * just check for initial letter, colon, and space to make * sure we discard only invalid headers */ - colon = index(h, ':'); - space = index(h, ' '); + colon = strchr(h, ':'); + space = strchr(h, ' '); if (isalpha(h[0]) && colon && space == colon + 1) return (1); |