diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 1997-04-04 14:13:10 -0500 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 1997-04-04 14:13:10 -0500 |
commit | 36a66292ee2ec3530d776892d22d6c5ace810ae0 (patch) | |
tree | ac50b496468f774172bdd3b76a6832ede18c44af | |
parent | 923c66ce35dd473a10713d8f44f30d9ad770a99b (diff) | |
download | lynx-snapshots-36a66292ee2ec3530d776892d22d6c5ace810ae0.tar.gz |
snapshot of project "lynx", label v2-7-1
38 files changed, 569 insertions, 279 deletions
diff --git a/00README b/00README deleted file mode 100644 index 476fd782..00000000 --- a/00README +++ /dev/null @@ -1,41 +0,0 @@ -Lynx2-6FM: -========== - - This archive contains the Lynx source set with bug fixes and -enhancements incorporated by Fote Macrides since the release of Lynx2-6 -on September 2, 1996. Read the CHANGES file for a description of the -modifications through the date of this archive. Thereafter, check the -CHANGES file in: - - http://www.wfbr.edu/dir/lynx -or: gopher://gopher.wfbr.edu/11/_fileserv/_lynx - -for any further bug fixes or enhancements. - - This distribution contains all the files for building Lynx with -all flavors of Unix and on VMS with VAXC, DECC or GNUC on VAXen or AXPen, -and the associated documentation and example files. - - Links to ftp mirrors, and to support materials for Lynx, are -maintained in the: - "Lynx links" - <URL:http://www.crl.com/~subir/lynx.html> - - Lynx is a hypertext browser with full World Wide Web capabilities. -It is distributed under the GNU General Public License without restrictions -on usage or redistribution, and is supported by the Lynx user community. -The Lynx copyright statement and GNU GPL are included in the about_lynx -subdirectory of the distribution. - - Report bugs and contribute patches to: - - lynx-dev@sig.net - - PLEASE use the lynx-dev list, NOT private email to the developers, -for questions or discussion about Lynx, or for contributions of patches. -Patches should use the context diff format (diff -c). - - Do NOT expect a reply if you use private email instead of the -lynx-dev@sig.net list. - - Fote diff --git a/CHANGES b/CHANGES index 16919c24..bd648e06 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,174 @@ +--- 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) --- ======================================================================= 1997-02-15 diff --git a/LYMessages_en.h b/LYMessages_en.h index a5ab46ed..1bcdbf4c 100644 --- a/LYMessages_en.h +++ b/LYMessages_en.h @@ -558,6 +558,8 @@ #define PROMTING_TO_ALLOW_COOKIES "'P'rompting to allow from domain '%s'." #define DELETE_ALL_COOKIES_IN_DOMAIN "Delete all cookies in this domain?" #define ALL_COOKIES_EATEN "All of the cookies in the jar have been eaten!" +#define PORT_NINETEEN_INVALID "Port 19 not permitted in URLs." +#define PORT_TWENTYFIVE_INVALID "Port 25 not permitted in URLs." #ifdef DIRED_SUPPORT #define DIRED_NOVICELINE \ diff --git a/Makefile b/Makefile index 87fd9fa1..79229408 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-7, not the full path) -lynxdir= lynx2-7 +##(e.g. lynx2-7-1, not the full path) +lynxdir= lynx2-7-1 ##this is the filename for .zip, .tar and .tar.Z archives. -lynxname= lynx2-7 +lynxname= lynx2-7-1 ##change the next line if you want lynx installed somewhere ##besides /usr/local/bin @@ -24,7 +24,7 @@ doc= /usr/local/man/man1 ##besides /usr/local/lib cfg= /usr/local/lib -installbin= install -c -s -m 555 +installbin= install -c -s -m 755 installdoc= install -c -m 444 ##set the relative location of the WWW library Implementation directory, @@ -189,6 +189,7 @@ all: @echo "apollo -- apollo systems (untested)" @echo "bsdi -- BSD Interactive" @echo "bsdi-ncurses -- BSD/OS(v2.0 or later) using ncurses(v1.9.4 or later) package." + @echo "bsdi-slang -- BSD/OS(v2.0 or later) using the slang package." @echo "clix -- for Intergraph CLIX" @echo "convex -- for Convex C-series" @echo "convex-ncurses -- for Convex C-series with ncurses package" @@ -226,6 +227,7 @@ all: @echo "sun4-slang -- for SUN 4 OS with color slang package" @echo "svr4 -- for SVR4" @echo "snake -- for HP-UX lt 9.01 (gcc)" + @echo "snake-slang -- for HP-UX lt 9.01 (gcc) with color slang" @echo "snake2 -- for HP-UX gte 9.01 (gcc)" @echo "snake2-slang -- for HP-UX gte 9.01 (gcc) with color slang" @echo "snake3 -- for HP-UX (purchased compiler)" @@ -473,6 +475,15 @@ snake: $(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \ WWWLIB="../WWW/Library/snake/libwww.a" +snake-slang: + cd WWW/Library/snake; $(MAKE) CC="gcc" LYFLAGS="$(SITE_LYDEFS)" + cd src; $(MAKE) all CC="gcc" MCFLAGS="-O -DUNIX \ + -DUSE_SLANG -DSNAKE -I../$(WWWINC) $(SITE_DEFS)" \ + LIBS="-lcurses -ltermcap \ + $(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \ + WWWLIB="../WWW/Library/snake/libwww.a" \ + SLANGLIB="$(SLANGLIB) -lslang" SLANGINC="$(SLANGINC)" + snake2: cd WWW/Library/snake; $(MAKE) CC="gcc" LYFLAGS="-D_INCLUDE_HPUX_SOURCE \ -D_INCLUDE_POSIX_SOURCE -D_INCLUDE_AES_SOURCE \ @@ -503,7 +514,8 @@ snake2-slang: # Note that initial releases of HP/UX 10.10 have a broken select() in # libcurses.a and will malfunction with Lynx. See the PROBLEMS file. snake3: - cd WWW/Library/snake; $(MAKE) CC="cc" LYFLAGS="-Ae $(SITE_LYDEFS)" + cd WWW/Library/snake; $(MAKE) CC="cc" LYFLAGS="-Ae -DUNIX \ + $(SITE_LYDEFS)" cd src; $(MAKE) all CC="cc" MCFLAGS="-O -Ae -DFANCY_CURSES -DUNIX \ -DSNAKE -I../$(WWWINC) $(SITE_DEFS)" \ LIBS="-lcurses -ltermcap \ @@ -511,7 +523,8 @@ snake3: WWWLIB="../WWW/Library/snake/libwww.a" snake3-slang: - cd WWW/Library/snake; $(MAKE) CC="cc" LYFLAGS="-Ae $(SITE_LYDEFS)" + cd WWW/Library/snake; $(MAKE) CC="cc" LYFLAGS="-Ae -DUNIX \ + $(SITE_LYDEFS)" cd src; $(MAKE) all CC="cc" MCFLAGS="-O -Ae -DUSE_SLANG -DUNIX \ -DSNAKE -I../$(WWWINC) $(SITE_DEFS)" \ LIBS="-lcurses -ltermcap \ @@ -651,6 +664,17 @@ bsdi-ncurses: $(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \ WWWLIB="../WWW/Library/svr4/libwww.a" +bsdi-slang: + cd WWW/Library/Implementation; $(MAKE) -f BSDI_Makefile \ + LYFLAGS="-DBSDI $(SITE_LYDEFS)" + cd src; $(MAKE) all CC="cc" MCFLAGS="-O -DNO_CUSERID -DUNIX \ + -DNO_FILIO_H -DUSE_SLANG \ + -I../$(WWWINC) -DNO_UTMP -DSVR4 -DNO_KEYPAD $(SITE_DEFS)" \ + LIBS="-lcurses -ltermcap \ + $(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \ + WWWLIB="../WWW/Library/svr4/libwww.a" \ + SLANGLIB="$(SLANGLIB) -lslang -lm" SLANGINC="$(SLANGINC)" + # define RESOLVLIB (above) for the "LIBS" entry if needed # Solaris2 doesn't have or need ranlib. (ignore the error message about that :) # (Solaris 2.5 and later actually have a ranlib program - but it does diff --git a/RELEASE_STATEMENT b/RELEASE_STATEMENT index 07a655e0..04b58854 100644 --- a/RELEASE_STATEMENT +++ b/RELEASE_STATEMENT @@ -1,5 +1,5 @@ -Lynx Ver. 2.7 is now available. +Lynx Ver. 2.7.1 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.7 is an official release of the Lynx2-6FM code set -through February 15, 1997. + Version 2.7.1 is an official release of the Lynx2-7 code set +plus bug fixes through April 4, 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/HTAccess.c b/WWW/Library/Implementation/HTAccess.c index 52a18870..1f00a089 100644 --- a/WWW/Library/Implementation/HTAccess.c +++ b/WWW/Library/Implementation/HTAccess.c @@ -200,7 +200,7 @@ GLOBALREF HTProtocol HTWAIS; ** Use "*" to override all proxy service: ** no_proxy="*" */ -PRIVATE BOOL override_proxy ARGS1( +PUBLIC BOOL override_proxy ARGS1( CONST char *, addr) { CONST char * no_proxy = getenv("no_proxy"); diff --git a/WWW/Library/Implementation/HTAccess.h b/WWW/Library/Implementation/HTAccess.h index f0c7e794..78685f8d 100644 --- a/WWW/Library/Implementation/HTAccess.h +++ b/WWW/Library/Implementation/HTAccess.h @@ -92,7 +92,23 @@ extern BOOL HTSecure; /* Disable security holes? */ extern HTStream* HTOutputStream; /* For non-interactive, set this */ extern HTFormat HTOutputFormat; /* To convert on load, set this */ - +/* Check for proxy override. override_proxy() +** +** Check the no_proxy environment variable to get the list +** of hosts for which proxy server is not consulted. +** +** no_proxy is a comma- or space-separated list of machine +** or domain names, with optional :port part. If no :port +** part is present, it applies to all ports on that domain. +** +** Example: +** no_proxy="cern.ch,some.domain:8001" +** +** Use "*" to override all proxy service: +** no_proxy="*" +*/ +extern BOOL override_proxy PARAMS(( + CONST char * addr)); /* diff --git a/WWW/Library/Implementation/HTGopher.c b/WWW/Library/Implementation/HTGopher.c index 84fc9e9a..c4f47b76 100644 --- a/WWW/Library/Implementation/HTGopher.c +++ b/WWW/Library/Implementation/HTGopher.c @@ -1550,7 +1550,7 @@ PUBLIC int HTLoadCSO ARGS4( status = parse_cso_fields(buf, sizeof(buf)); if (status) { NETCLOSE(s); - if (status = HT_INTERRUPTED) { + if (status == HT_INTERRUPTED) { _HTProgress ("Connection interrupted."); } else if (buf[0] != '\0') { HTAlert(buf); diff --git a/WWW/Library/Implementation/HTParse.c b/WWW/Library/Implementation/HTParse.c index 223bbf5b..16f39fc7 100644 --- a/WWW/Library/Implementation/HTParse.c +++ b/WWW/Library/Implementation/HTParse.c @@ -271,6 +271,8 @@ PUBLIC char * HTParse ARGS3( */ { char *p, *h; + if ((p = strchr(result, '@')) != NULL) + tail = (p + 1); p = strchr(tail, ':'); if (p != NULL && !isdigit((unsigned char)p[1])) /* @@ -281,15 +283,23 @@ PUBLIC char * HTParse ARGS3( /* ** Port specified. */ - if ((!strcmp(access, "http" ) && !strcmp(p, ":80" )) || - (!strcmp(access, "gopher") && !strcmp(p, ":70" )) || - (!strcmp(access, "ftp" ) && !strcmp(p, ":21" )) || - (!strcmp(access, "wais" ) && !strcmp(p, ":210")) || - (!strcmp(access, "nntp" ) && !strcmp(p, ":119")) || - (!strcmp(access, "news" ) && !strcmp(p, ":119")) || - (!strcmp(access, "snews" ) && !strcmp(p, ":563")) || - (!strcmp(access, "finger") && !strcmp(p, ":79" )) || - (!strcmp(access, "cso" ) && !strcmp(p, ":105"))) + if ((!strcmp(access, "http" ) && !strcmp(p, ":80" )) || + (!strcmp(access, "https" ) && !strcmp(p, ":443")) || + (!strcmp(access, "gopher" ) && !strcmp(p, ":70" )) || + (!strcmp(access, "ftp" ) && !strcmp(p, ":21" )) || + (!strcmp(access, "wais" ) && !strcmp(p, ":210")) || + (!strcmp(access, "nntp" ) && !strcmp(p, ":119")) || + (!strcmp(access, "news" ) && !strcmp(p, ":119")) || + (!strcmp(access, "newspost" ) && !strcmp(p, ":119")) || + (!strcmp(access, "newsreply" ) && !strcmp(p, ":119")) || + (!strcmp(access, "snews" ) && !strcmp(p, ":563")) || + (!strcmp(access, "snewspost" ) && !strcmp(p, ":563")) || + (!strcmp(access, "snewsreply") && !strcmp(p, ":563")) || + (!strcmp(access, "finger" ) && !strcmp(p, ":79" )) || + (!strcmp(access, "telnet" ) && !strcmp(p, ":23" )) || + (!strcmp(access, "tn3270" ) && !strcmp(p, ":23" )) || + (!strcmp(access, "rlogin" ) && !strcmp(p, ":513")) || + (!strcmp(access, "cso" ) && !strcmp(p, ":105"))) *p = '\0'; /* It is the default: ignore it */ } if (p == NULL) { diff --git a/WWW/Library/Implementation/HTTCP.c b/WWW/Library/Implementation/HTTCP.c index 2754803e..c8809dc4 100644 --- a/WWW/Library/Implementation/HTTCP.c +++ b/WWW/Library/Implementation/HTTCP.c @@ -462,6 +462,8 @@ PUBLIC int HTParseInet ARGS2( fprintf (stderr, "*** INTERRUPTED gethostbyname.\n"); kill(fpid , SIGKILL); FREE(host); + close(pfd[0]); + close(pfd[1]); return HT_INTERRUPTED; } /* @@ -479,6 +481,7 @@ PUBLIC int HTParseInet ARGS2( else cstat = read(pfd[0], (void *)&sin->sin_addr , cstat); close(pfd[0]); + close(pfd[1]); } if (sin->sin_addr.s_addr == 0) { diff --git a/WWW/Library/Implementation/SGML.c b/WWW/Library/Implementation/SGML.c index 32ba06b8..c20801f6 100644 --- a/WWW/Library/Implementation/SGML.c +++ b/WWW/Library/Implementation/SGML.c @@ -819,9 +819,16 @@ top: if (sscanf(string->data, "%d", &value) == 1) { if (value == 8482) { /* - ** trade Treat as reg. - FM + ** trade Handle as named entity. - FM */ - value = 174; + string->size = 0; + HTChunkPutc(string, 't'); + HTChunkPutc(string, 'r'); + HTChunkPutc(string, 'a'); + HTChunkPutc(string, 'd'); + HTChunkPutc(string, 'e'); + context->state = S_entity; + goto top; } /* ** Show the numeric entity if the value: @@ -847,27 +854,25 @@ top: ** ensp, emsp or thinsp. - FM */ PUTC(2); - break; - } - if (value == 8211 || value == 8212) { + } else if (value == 8211 || value == 8212) { /* ** ndash or mdash. - FM */ PUTC('-'); - break; + } else { + /* + ** Unhandled or llegal value. Recover the "&#" + ** and digit(s), and recycle the terminator. - FM + */ + PUTC('&'); + PUTC('#'); + string->size--; + for (i = 0; i < string->size; i++) /* recover */ + PUTC(string->data[i]); + string->size = 0; + context->state = S_text; + goto top; } - /* - ** Unhandled or llegal value. Recover the "&#" - ** and digit(s), and recycle the terminator. - FM - */ - PUTC('&'); - PUTC('#'); - string->size--; - for (i = 0; i < string->size; i++) /* recover */ - PUTC(string->data[i]); - string->size = 0; - context->state = S_text; - goto top; } else if (value == 160) { /* ** Use Lynx special character for 160 (nbsp). - FM diff --git a/WWW/Library/Implementation/tcp.h b/WWW/Library/Implementation/tcp.h index d4b00b38..99b63224 100644 --- a/WWW/Library/Implementation/tcp.h +++ b/WWW/Library/Implementation/tcp.h @@ -455,9 +455,9 @@ Regular BSD unix versions #include <sys/timeb.h> #include <time.h> #endif /* SCO */ -#ifdef AIX +#if defined(AIX) || defined(SVR4) #include <time.h> -#endif /* AIX */ +#endif /* AIX || SVR4 */ #include <sys/time.h> /* independent */ #include <sys/stat.h> #include <sys/param.h> diff --git a/lynx.cfg b/lynx.cfg index ffb31ee9..a5db76c9 100644 --- a/lynx.cfg +++ b/lynx.cfg @@ -406,10 +406,13 @@ CHARACTER_SET:ISO Latin 1 # Unix: # ===== -# TRUSTED_LYNXCGI defines where cgi scripts can live (if LYNXCGI_LINKS -# is defined in userdefs.h). Note that it must be given in order for -# cgi support to work (there is no default path). For example: +# TRUSTED_LYNXCGI rules define the permitted sources and/or paths for +# lynxcgi links (if LYNXCGI_LINKS is defined in userdefs.h). The format +# is the same as for TRUSTED_EXEC rules (see above), but no defaults are +# defined, i.e., if no TRUSTED_LYNXCGI rules are defined here, any source +# and path for lynxcgi links will be permitted. Example rules: # +# TRUSTED_LYNXCGI:file://localhost/ # TRUSTED_LYNXCGI:<tab>/usr/local/etc/httpd/cgi-bin/ # TRUSTED_LYNXCGI:file://localhost/<tab>/usr/local/www/cgi-bin/ # @@ -859,12 +862,14 @@ CHARACTER_SET:ISO Latin 1 # #NO_DOT_FILES:TRUE -# If NO_FROM_HEADER is TRUE, From headers never will be sent in transmissions -# to servers. Lynx normally sends the personal_mail_address as a From header, -# if that address has been defined via the 'o'ptions menu. If left FALSE -# here, it can be set TRUE at run time via the -nofrom switch. +# If NO_FROM_HEADER is set FALSE, From headers will be sent in transmissions +# to http or https servers if the personal_mail_address has been defined via +# the 'o'ptions menu. The compilation default is TRUE (no From header is +# sent) and the default can be changed here. The default can be toggled at +# run time via the -from switch. Note that transmissions of From headers +# have become widely considered to create an invasion of privacy risk. # -#NO_FROM_HEADER:FALSE +#NO_FROM_HEADER:TRUE # If NO_REFERER_HEADER is TRUE, Referer headers never will be sent in # transmissions to servers. Lynx normally sends the URL of the document @@ -1056,7 +1061,7 @@ MINIMAL_COMMENTS:TRUE # VMS: # ==== # XLOADIMAGE_COMMAND will be used as a default in src/HTInit.c -# for viewing image/* content types when the DECW$DISPLAY logical +# 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, @@ -1072,7 +1077,7 @@ MINIMAL_COMMENTS:TRUE # Unix: # ===== # XLOADIMAGE_COMMAND will be used as a default in src/HTInit.c for -# viewing image/* content types when the DISPLAY environment variable +# 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 diff --git a/lynx.hlp b/lynx.hlp index 5c8aa4d0..ae2a5795 100644 --- a/lynx.hlp +++ b/lynx.hlp @@ -103,6 +103,9 @@ -force_html forces the first document to be interpreted as HTML. + -from + toggle transmissions of From headers. + -ftp disable ftp access. @@ -159,9 +162,6 @@ -nofilereferer disable transmissions of Referer headers for file URLs. - -nofrom - disable transmissions of From headers. - -nolist disable the link list feature in dumps. @@ -362,7 +362,7 @@ o Type "k" for a complete list of the current key-stroke command mappings. 2 NOTES - This is the Lynx v2.7 Release for Unix/VMS + This is the Lynx v2.7.1 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 @@ -389,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.7, and to everyone on the net who has contributed to Lynx's + of v2.7.1, 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 9d20bb3a..69edc908 100644 --- a/lynx.man +++ b/lynx.man @@ -131,6 +131,9 @@ include all versions of files in local VMS directory listings. .B -force_html forces the first document to be interpreted as HTML. .TP +.B -from +toggle transmissions of From headers. +.TP .B -ftp disable ftp access. .TP @@ -187,9 +190,6 @@ disable local program execution. (DEFAULT) .B -nofilereferer disable transmissions of Referer headers for file URLs. .TP -.B -nofrom -disable transmissions of From headers. -.TP .B -nolist disable the link list feature in dumps. .TP @@ -430,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.7 Release for Unix/VMS +This is the Lynx v2.7.1 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 @@ -455,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.7, and to everyone +in the summer of 1994 through the current release of v2.7.1, 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 3486ebfe..1e897708 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.7</title> +<title>Lynx Users Guide v2.7.1</title> <link rev="made" href="mailto:lynx-dev@sig.net"> </head> <body> -<h1>Lynx Users Guide v2.7</h1> +<h1>Lynx Users Guide v2.7.1</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., @@ -552,9 +552,10 @@ return to Lynx or the '<em>></em>' command to save the options to a <dd>This mail address will be used to help you send files to yourself and will be included as the From: address in any mail or comments that you send. It will also be sent as the From: - field in all HTTP get requests if inclusion of that HTTP header - has not been disabled via the NO_FROM_HEADER definition in - lynx.cfg or via the <em>-nofrom</em> command line option. + field in HTTP or HTTPS requests if inclusion of that header + has been enabled via the NO_FROM_HEADER definition in lynx.cfg + (the compilation default is not to send the header), or via the + <em>-from</em> command line toggle. <dt>Searching type <dd>Searching type has two possible values: CASE INSENSITIVE @@ -669,7 +670,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.7</em> + changed temporarily to a string such as <em>L_y_n_x/2.7.1</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 @@ -1764,6 +1765,9 @@ where listings. <dt><code>-force_html</code> <dd>forces the first document to be interpreted as HTML. + <dt><code>-from</code> + <dd>toggles transmissions of From headers to HTTP or HTTPS + servers. <dt><code>-ftp</code> <dd>disable ftp access. <dt><code>-get_data</code> @@ -1810,8 +1814,6 @@ where <dd>disable local program execution. (DEFAULT) <dt><code>-nofilereferer</code> <dd>disable transmissions of Referer headers for file URLs. - <dt><code>-nofrom</code> - <dd>disable transmissions of From headers. <dt><code>-nolist</code> <dd>disable the link list feature in dumps. <dt><code>-nolog</code> @@ -2043,7 +2045,8 @@ 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. The Lynx2-6FM code set was released -as v2.7 in February 1997. +as v2.7 in February 1997, and v2.7.1 with bug fixes for v2.7 was +released in April 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 1c636fe8..b601b939 100644 --- a/lynx_help/keystroke_commands/option_help.html +++ b/lynx_help/keystroke_commands/option_help.html @@ -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.7 for + temporarily to a string such as L_y_n_x/2.7.1 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 diff --git a/lynx_help/lynx_help_main.html b/lynx_help/lynx_help_main.html index 7aa115aa..94af6f80 100644 --- a/lynx_help/lynx_help_main.html +++ b/lynx_help/lynx_help_main.html @@ -22,7 +22,7 @@ <li><a href="http://lynx.browser.org/">Lynx Information</a> | <a href="http://www.crl.com/~subir/lynx.html" >Lynx links</a> -| <a href="http://www.slcc.edu/lynx/" +| <a href="http://www.slcc.edu/lynx/faq.html" >Lynx FAQ</a> <li><a href="../about_lynx/about_lynx.html">About Lynx</a> | <a href="../about_lynx/about_lynx-dev.html">About Lynx-Dev</a> diff --git a/samples/lynx.cfg b/samples/lynx.cfg index ffb31ee9..a5db76c9 100644 --- a/samples/lynx.cfg +++ b/samples/lynx.cfg @@ -406,10 +406,13 @@ CHARACTER_SET:ISO Latin 1 # Unix: # ===== -# TRUSTED_LYNXCGI defines where cgi scripts can live (if LYNXCGI_LINKS -# is defined in userdefs.h). Note that it must be given in order for -# cgi support to work (there is no default path). For example: +# TRUSTED_LYNXCGI rules define the permitted sources and/or paths for +# lynxcgi links (if LYNXCGI_LINKS is defined in userdefs.h). The format +# is the same as for TRUSTED_EXEC rules (see above), but no defaults are +# defined, i.e., if no TRUSTED_LYNXCGI rules are defined here, any source +# and path for lynxcgi links will be permitted. Example rules: # +# TRUSTED_LYNXCGI:file://localhost/ # TRUSTED_LYNXCGI:<tab>/usr/local/etc/httpd/cgi-bin/ # TRUSTED_LYNXCGI:file://localhost/<tab>/usr/local/www/cgi-bin/ # @@ -859,12 +862,14 @@ CHARACTER_SET:ISO Latin 1 # #NO_DOT_FILES:TRUE -# If NO_FROM_HEADER is TRUE, From headers never will be sent in transmissions -# to servers. Lynx normally sends the personal_mail_address as a From header, -# if that address has been defined via the 'o'ptions menu. If left FALSE -# here, it can be set TRUE at run time via the -nofrom switch. +# If NO_FROM_HEADER is set FALSE, From headers will be sent in transmissions +# to http or https servers if the personal_mail_address has been defined via +# the 'o'ptions menu. The compilation default is TRUE (no From header is +# sent) and the default can be changed here. The default can be toggled at +# run time via the -from switch. Note that transmissions of From headers +# have become widely considered to create an invasion of privacy risk. # -#NO_FROM_HEADER:FALSE +#NO_FROM_HEADER:TRUE # If NO_REFERER_HEADER is TRUE, Referer headers never will be sent in # transmissions to servers. Lynx normally sends the URL of the document @@ -1056,7 +1061,7 @@ MINIMAL_COMMENTS:TRUE # VMS: # ==== # XLOADIMAGE_COMMAND will be used as a default in src/HTInit.c -# for viewing image/* content types when the DECW$DISPLAY logical +# 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, @@ -1072,7 +1077,7 @@ MINIMAL_COMMENTS:TRUE # Unix: # ===== # XLOADIMAGE_COMMAND will be used as a default in src/HTInit.c for -# viewing image/* content types when the DISPLAY environment variable +# 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 diff --git a/src/HTFWriter.c b/src/HTFWriter.c index fac0af78..58baaa9f 100644 --- a/src/HTFWriter.c +++ b/src/HTFWriter.c @@ -67,7 +67,8 @@ struct _HTStream { FILE * fp; /* The file we've opened */ char * end_command; /* What to do on _free. */ char * remove_command; /* What to do on _abort. */ - HTPresentation * pres; /* Original stream's pres. */ + HTFormat input_format; /* Original pres->rep */ + HTFormat output_format; /* Original pres->rep_out */ HTParentAnchor * anchor; /* Original stream's anchor. */ HTStream * sink; /* Original stream's sink. */ }; @@ -150,7 +151,7 @@ PRIVATE void HTFWriter_free ARGS1(HTStream *, me) } } else #endif /* VMS */ - if (me->pres->rep == HTAtom_for("www/compressed")) { + if (me->input_format == HTAtom_for("www/compressed")) { /* * It's a compressed file supposedly cached to * a temporary file for uncompression. - FM @@ -210,10 +211,10 @@ PRIVATE void HTFWriter_free ARGS1(HTStream *, me) FREE(me->anchor->content_encoding); status = HTLoadFile(addr, me->anchor, - me->pres->rep_out, + me->output_format, me->sink); if (dump_output_immediately && - me->pres->rep_out == HTAtom_for("www/present")) { + me->output_format == HTAtom_for("www/present")) { FREE(addr); remove(me->anchor->FileCache); FREE(me->anchor->FileCache); @@ -340,7 +341,6 @@ PUBLIC HTStream* HTFWriter_new ARGS1(FILE *, fp) me->fp = fp; me->end_command = NULL; me->remove_command = NULL; - me->pres = NULL; me->anchor = NULL; me->sink = NULL; @@ -421,7 +421,8 @@ PUBLIC HTStream* HTSaveAndExecute ARGS3( if (me == NULL) outofmem(__FILE__, "HTSaveAndExecute"); me->isa = &HTFWriter; - me->pres = pres; + me->input_format = pres->rep; + me->output_format = pres->rep_out; me->anchor = anchor; me->sink = sink; @@ -538,7 +539,8 @@ PUBLIC HTStream* HTSaveToFile ARGS3( ret_obj->isa = &HTFWriter; ret_obj->remove_command = NULL; ret_obj->end_command = NULL; - ret_obj->pres = pres; + ret_obj->input_format = pres->rep; + ret_obj->output_format = pres->rep_out; ret_obj->anchor = anchor; ret_obj->sink = sink; @@ -773,9 +775,7 @@ PUBLIC HTStream* HTCompressed ARGS3( * We have no idea what we're dealing with, * so treat it as a binary stream. - FM */ - StrAllocCopy(type, "application/octet-stream"); - format = HTAtom_for(type); - FREE(type) + format = HTAtom_for("application/octet-stream"); me = HTStreamStack(format, pres->rep_out, sink, anchor); return me; } @@ -841,7 +841,8 @@ PUBLIC HTStream* HTCompressed ARGS3( if (me == NULL) outofmem(__FILE__, "HTCompressed"); me->isa = &HTFWriter; - me->pres = pres; + me->input_format = pres->rep; + me->output_format = pres->rep_out; me->anchor = anchor; me->sink = sink; diff --git a/src/HTML.c b/src/HTML.c index 9ecfb095..b8aa4e0f 100644 --- a/src/HTML.c +++ b/src/HTML.c @@ -2115,7 +2115,7 @@ PRIVATE void HTML_start_element ARGS5( (present && present[HTML_A_TYPE] && value[HTML_A_TYPE]) ? - (HTLinkType*)HTAtom_for(value[HTML_A_TYPE]) : (void *)0); /* Type */ + (HTLinkType*)HTAtom_for(value[HTML_A_TYPE]) : (HTLinkType*)0); /* Type */ /* * Get rid of href since no longer needed. @@ -2309,7 +2309,8 @@ PRIVATE void HTML_start_element ARGS5( StrAllocCopy(alt_string, (title ? title : "[USEMAP]")); - } else if (dest_ismap || present && present[HTML_IMG_ISMAP]) { + } else if ((dest_ismap == TRUE) || + (me->inA && present && present[HTML_IMG_ISMAP])) { StrAllocCopy(alt_string, (title ? title : "[ISMAP]")); @@ -2335,8 +2336,9 @@ PRIVATE void HTML_start_element ARGS5( fprintf(stderr, "HTML IMG: USEMAP=%d ISMAP=%d ANCHOR=%d PARA=%d\n", map_href ? 1 : 0, - (dest_ismap || - (present && present[HTML_IMG_ISMAP])) ? 1 : 0, + ((dest_ismap == TRUE) || + (me->inA && present && present[HTML_IMG_ISMAP])) ? + 1 : 0, me->inA, me->inP); } diff --git a/src/LYCharSets.c b/src/LYCharSets.c index 7e3b57ae..5b243f35 100644 --- a/src/LYCharSets.c +++ b/src/LYCharSets.c @@ -142,7 +142,7 @@ PRIVATE char * ISO_Latin1[] = { "\002", /* thin space - not collapsed NEVER CHANGE THIS - thinsp */ "\376", /* small thorn, Icelandic - thorn */ "\327", /* multiplication sign (×) - times */ - "\256", /* circled R registered sign (®:) - trade */ + "(TM)", /* circled TM trade mark sign (™) - trade */ "\372", /* small u, acute accent - uacute */ "\373", /* small u, circumflex accent - ucirc */ "\371", /* small u, grave accent - ugrave */ @@ -261,7 +261,7 @@ PRIVATE char * ISO_Latin2[] = { "\002", /* thin space - not collapsed NEVER CHANGE THIS - thinsp */ "p", /* small thorn, Icelandic - thorn */ "\327", /* multiplication sign (×) - times */ - "(R)", /* circled R registered sign (®) - trade */ + "(TM)", /* circled TM trade mark sign (™) - trade */ "\372", /* small u, acute accent - uacute */ "u", /* small u, circumflex accent - ucirc */ "u", /* small u, grave accent - ugrave */ @@ -400,7 +400,7 @@ PRIVATE char * ISO_LatinN[] = { "\002", /* thin space - not collapsed NEVER CHANGE THIS - thinsp */ "p", /* small thorn, Icelandic - thorn */ "*", /* multiplication sign (×) - times */ - "(R)", /* circled R registered sign (®) - trade */ + "(TM)", /* circled TM trade mark sign (™) - trade */ "u", /* small u, acute accent - uacute */ "u", /* small u, circumflex accent - ucirc */ "u", /* small u, grave accent - ugrave */ @@ -523,7 +523,7 @@ PRIVATE char * DEC_Multinational[] = { "\002", /* thin space - not collapsed NEVER CHANGE THIS - thinsp */ "p", /* small thorn, Icelandic - thorn */ "*", /* multiplication sign (×) - times */ - "(R)", /* circled R registered sign (®) - trade */ + "(TM)", /* circled TM trade mark sign (™) - trade */ "\372", /* small u, acute accent - uacute */ "\373", /* small u, circumflex accent - ucirc */ "\371", /* small u, grave accent - ugrave */ @@ -645,7 +645,7 @@ PRIVATE char * PC_charset[] = { "\002", /* thin space - not collapsed NEVER CHANGE THIS - thinsp */ "\347", /* small thorn, Icelandic - thorn */ "*", /* multiplication sign (×) - times */ - "(R)", /* circled R registered sign (®) - trade */ + "(TM)", /* circled TM trade mark sign (™) - trade */ "\243", /* small u, acute accent - uacute */ "\226", /* small u, circumflex accent - ucirc */ "\227", /* small u, grave accent - ugrave */ @@ -767,7 +767,7 @@ PRIVATE char * PC_850_charset[] = { "\002", /* thin space - not collapsed NEVER CHANGE THIS - thinsp */ "\347", /* small thorn, Icelandic - thorn */ "\236", /* multiplication sign (×) - times */ - "\251", /* circled R registered sign (®) - trade */ + "(TM)", /* circled TM trade mark sign (™) - trade */ "\243", /* small u, acute accent - uacute */ "\226", /* small u, circumflex accent - ucirc */ "\227", /* small u, grave accent - ugrave */ @@ -888,7 +888,7 @@ PRIVATE char * Macintosh[] = { "\002", /* thin space - not collapsed NEVER CHANGE THIS - thinsp */ "p", /* small thorn, Icelandic - thorn */ "*", /* multiplication sign (×) - times */ - "\250", /* circled R registered sign (®) - trade */ + "\252", /* circled TM trade mark sign (™) - trade */ "\234", /* small u, acute accent - uacute */ "\236", /* small u, circumflex accent - ucirc */ "\235", /* small u, grave accent - ugrave*/ @@ -1007,7 +1007,7 @@ PRIVATE char * NeXT_Step[] = { "\002", /* thin space - not collapsed NEVER CHANGE THIS - thinsp */ "\374", /* small thorn, Icelandic - thorn */ "*", /* multiplication sign (×) - times */ - "(R)", /* circled R registered sign (®) - trade */ + "(TM)", /* circled TM trade mark sign (™) - trade */ "\363", /* small u, acute accent - uacute */ "\364", /* small u, circumflex accent - ucirc */ "\362", /* small u, grave accent - ugrave*/ @@ -1147,7 +1147,7 @@ PRIVATE char * KOI8_R[] = { "\002", /* thin space - not collapsed NEVER CHANGE THIS - thinsp */ "p", /* small thorn, Icelandic - thorn */ "*", /* multiplication sign (×) - times */ - "(R)", /* circled R registered sign (®) - trade */ + "(TM)", /* circled TM trade mark sign (™) - trade */ "u", /* small u, acute accent - uacute */ "u", /* small u, circumflex accent - ucirc */ "u", /* small u, grave accent - ugrave */ @@ -1290,7 +1290,7 @@ PRIVATE char * Chinese[] = { "\002", /* thin space - not collapsed NEVER CHANGE THIS - thinsp */ "p", /* small thorn, Icelandic - thorn */ "*", /* multiplication sign (×) - times */ - "(R)", /* circled R registered sign (®) - trade */ + "(TM)", /* circled TM trade mark sign (™) - trade */ "u", /* small u, acute accent - uacute */ "u", /* small u, circumflex accent - ucirc */ "u", /* small u, grave accent - ugrave */ @@ -1433,7 +1433,7 @@ PRIVATE char * EUC_JP[] = { "\002", /* thin space - not collapsed NEVER CHANGE THIS - thinsp */ "p", /* small thorn, Icelandic - thorn */ "*", /* multiplication sign (×) - times */ - "(R)", /* circled R registered sign (®) - trade */ + "(TM)", /* circled TM trade mark sign (™) - trade */ "u", /* small u, acute accent - uacute */ "u", /* small u, circumflex accent - ucirc */ "u", /* small u, grave accent - ugrave */ @@ -1576,7 +1576,7 @@ PRIVATE char * Shift_JIS[] = { "\002", /* thin space - not collapsed NEVER CHANGE THIS - thinsp */ "p", /* small thorn, Icelandic - thorn */ "*", /* multiplication sign (×) - times */ - "(R)", /* circled R registered sign (®) - trade */ + "(TM)", /* circled TM trade mark sign (™) - trade */ "u", /* small u, acute accent - uacute */ "u", /* small u, circumflex accent - ucirc */ "u", /* small u, grave accent - ugrave */ @@ -1719,7 +1719,7 @@ PRIVATE char * Korean[] = { "\002", /* thin space - not collapsed NEVER CHANGE THIS - thinsp */ "p", /* small thorn, Icelandic - thorn */ "*", /* multiplication sign (×) - times */ - "(R)", /* circled R registered sign (®) - trade */ + "(TM)", /* circled TM trade mark sign (™) - trade */ "u", /* small u, acute accent - uacute */ "u", /* small u, circumflex accent - ucirc */ "u", /* small u, grave accent - ugrave */ @@ -1862,7 +1862,7 @@ PRIVATE char * Taipei[] = { "\002", /* thin space - not collapsed NEVER CHANGE THIS - thinsp */ "p", /* small thorn, Icelandic - thorn */ "*", /* multiplication sign (×) - times */ - "(R)", /* circled R registered sign (®) - trade */ + "(TM)", /* circled TM trade mark sign (™) - trade */ "u", /* small u, acute accent - uacute */ "u", /* small u, circumflex accent - ucirc */ "u", /* small u, grave accent - ugrave */ @@ -2005,7 +2005,7 @@ PRIVATE char * SevenBitApproximations[] = { "\002", /* thin space - not collapsed NEVER CHANGE THIS - thinsp */ "p", /* small thorn, Icelandic - thorn */ "*", /* multiplication sign (×) - times */ - "(R)", /* circled R registered sign (®) - trade */ + "(TM)", /* circled TM trade mark sign (™) - trade */ "u", /* small u, acute accent - uacute */ "u", /* small u, circumflex accent - ucirc */ "u", /* small u, grave accent - ugrave */ diff --git a/src/LYCharUtils.c b/src/LYCharUtils.c index 22085ca5..26f33cc1 100644 --- a/src/LYCharUtils.c +++ b/src/LYCharUtils.c @@ -330,7 +330,7 @@ PUBLIC char * LYUnEscapeEntities ARGS3( continue; /* ** For 8482 (trade) use the character reference if it's - ** a hidden INPUT, otherwise use 174 (reg). - FM + ** a hidden INPUT, otherwise handle as named entify. - FM */ } else if (value == 8482) { if (hidden) { @@ -345,13 +345,14 @@ PUBLIC char * LYUnEscapeEntities ARGS3( p--; *p = cpe; } - cp = (p - 5); + cp = (p - 6); *cp++ = '&'; - *cp++ = '#'; - *cp++ = '1'; - *cp++ = '7'; - *cp++ = '4'; - p -= 5; + *cp++ = 't'; + *cp++ = 'r'; + *cp++ = 'a'; + *cp++ = 'd'; + *cp++ = 'e'; + p -= 6; continue; } /* @@ -857,7 +858,7 @@ PUBLIC void LYExpandString ARGS1( ** set. - FM */ if (((unsigned char)p[i]) == 160 && - HTPassHighCtrlRaw) { + !HTPassHighCtrlRaw) { p[i] = HT_NON_BREAK_SPACE; /* ** Substitute Lynx special character for @@ -865,7 +866,7 @@ PUBLIC void LYExpandString ARGS1( ** set. - FM */ } else if (((unsigned char)p[i]) == 173 && - HTPassHighCtrlRaw) { + !HTPassHighCtrlRaw) { p[i] = LY_SOFT_HYPHEN; /* ** Substitute other 8-bit characters based on diff --git a/src/LYCookie.c b/src/LYCookie.c index 88a4e6fc..14f2ecfc 100644 --- a/src/LYCookie.c +++ b/src/LYCookie.c @@ -616,7 +616,14 @@ PUBLIC void LYSetCookie ARGS2( attr_end = p; SKIP_SPACES; - if (*p == '=') { + /* + * Check for an '=' delimiter, or an 'expires' name followed + * by white, since Netscape's bogus parser doesn't require + * an '=' delimiter, and 'expires' attributes are being + * encountered without them. - FM + */ + if (*p == '=' || + !strncasecomp(attr_start, "Expires", 7)) { /* * Get the value string. */ @@ -751,10 +758,18 @@ PUBLIC void LYSetCookie ARGS2( } else if (len == 7 && !strncasecomp(attr_start, "expires", 7)) { /* * Convert an 'expires' attribute value for Version 0 - * cookies to the equivalent of a Version 1 (or greater) - * 'max-age' value added to 'time(NULL)'. - FM + * cookies, or for Version 1 if we haven't received a + * 'max-age', to the equivalent of a Version 1 (or greater) + * 'max-age' value added to 'time(NULL)'. Note that + * 'expires' should not be used in Version 1 cookies, + * but, as explained below, it might be used for "backward + * compatibility", and, in turn, ill-informed people + * surely would start using it instead of, rather than + * in addition to, 'max-age'. - FM */ - if (cur_cookie && cur_cookie->version < 1) { + if (((cur_cookie) && cur_cookie->version < 1) || + ((cur_cookie) && + !(cur_cookie->flags & COOKIE_FLAG_EXPIRES_SET))) { known_attr = YES; if (value) { cur_cookie->flags |= COOKIE_FLAG_EXPIRES_SET; @@ -770,17 +785,26 @@ PUBLIC void LYSetCookie ARGS2( } /* * If it's a version 1 (or greater) cookie, then you - * really can set a cookie named 'expires', so we don't - * set known_attr. + * really can set a cookie named 'expires', so we + * perhaps shouldn't set known_attr. However, an + * -06 draft, which hopefully will be shot down as + * bogus, suggests adding (invalidly) 'expires' + * headers for "backward compatibility". So, we'll + * set known-attr, to ignore it, and hope it works + * out. - FM */ + known_attr = YES; } /* - * If none of the above comparisions succeeded, then we have - * an unknown pair of the form 'foo=bar', which means it's - * time to create a new cookie. + * If none of the above comparisions succeeded, and we have + * a value, then we have an unknown pair of the form 'foo=bar', + * which means it's time to create a new cookie. If we don't + * have a non-zero-length value, assume it's an error or a + * new, unknown attribute which doesn't take a value, and + * ignore it. - FM */ - if (!known_attr) { + if (!known_attr && value_end > value_start) { store_cookie(cur_cookie, hostname, path); cur_cookie = newCookie(); length += len; diff --git a/src/LYGetFile.c b/src/LYGetFile.c index 45212601..59c9f0ab 100644 --- a/src/LYGetFile.c +++ b/src/LYGetFile.c @@ -116,6 +116,38 @@ Try_Redirected_URL: } /* + * Protect against denial of service attacks + * via the port 19 CHARGEN service, and block + * connections to the port 25 ESMTP service. - FM + */ + if ((temp = HTParse(doc->address, "", PARSE_HOST)) != NULL && + strlen(temp) > 3) { + char *cp1; + + if ((cp1 = strchr(temp, '@')) == NULL) + cp1 = temp; + if ((cp = strrchr(cp1, ':')) != NULL) { + int value; + + cp++; + if (sscanf(cp, "%d", &value) == 1) { + if (value == 19) { + HTAlert(PORT_NINETEEN_INVALID); + FREE(temp); + return(NULLFILE); + } + if (value == 25) { + HTAlert(PORT_TWENTYFIVE_INVALID); + FREE(temp); + return(NULLFILE); + } + } + } + } + cp = NULL; + FREE(temp); + + /* * Check to see if this is a universal document ID * that lib WWW wants to handle. * @@ -709,11 +741,13 @@ Try_Redirected_URL: StrAllocCopy(doc->address, fname); FREE(fname); WWWDoc.address = doc->address; - FREE(WWWDoc.post_data); - FREE(WWWDoc.post_content_type); - WWWDoc.bookmark = doc->bookmark; - WWWDoc.isHEAD = FALSE; - WWWDoc.safe = doc->safe; + FREE(doc->post_data); + WWWDoc.post_data = NULL; + FREE(doc->post_content_type); + WWWDoc.post_content_type = NULL; + WWWDoc.bookmark = doc->bookmark = FALSE; + WWWDoc.isHEAD = doc->isHEAD = FALSE; + WWWDoc.safe = doc->safe = FALSE; HTOutputFormat = WWW_PRESENT; if (!HTLoadAbsolute(&WWWDoc)) return(NOT_FOUND); @@ -1056,7 +1090,12 @@ PRIVATE int fix_http_urls ARGS1( */ if (!strncmp(doc->address, "ftp", 3) && doc->address[strlen(doc->address)-1] == '/') { + char * proxy; char *path = HTParse(doc->address, "", PARSE_PATH|PARSE_PUNCTUATION); + + /* + * If the path is a lone slash, we're done. - FM + */ if (path) { if (path[0] == '/' && path[1] == '\0') { FREE(path); @@ -1064,6 +1103,17 @@ PRIVATE int fix_http_urls ARGS1( } FREE(path); } + + /* + * If we're proxying ftp, don't trim anything. - KW + */ + if (((proxy = (char *)getenv("ftp_proxy")) != NULL) && + *proxy != '\0' && !override_proxy(doc->address)) + return 0; + + /* + * If we get to here, trim the trailing slash. - FM + */ if (TRACE) fprintf(stderr,"LYGetFile: URL %s\n", doc->address); doc->address[strlen(doc->address)-1] = '\0'; diff --git a/src/LYHistory.c b/src/LYHistory.c index eb57db8e..54969ef7 100644 --- a/src/LYHistory.c +++ b/src/LYHistory.c @@ -399,10 +399,10 @@ PUBLIC BOOLEAN historytarget ARGS1( LYoverride_no_cache == FALSE) || text == NULL) && HTConfirm(CONFIRM_POST_RESUBMISSION) == TRUE) { - LYforce_no_cache == TRUE; + LYforce_no_cache = TRUE; LYoverride_no_cache = FALSE; } else if (text != NULL) { - LYforce_no_cache == FALSE; + LYforce_no_cache = FALSE; LYoverride_no_cache = TRUE; } else { _statusline(CANCELLED); diff --git a/src/LYLocal.c b/src/LYLocal.c index 78c0233f..6ef0ad65 100644 --- a/src/LYLocal.c +++ b/src/LYLocal.c @@ -1583,7 +1583,10 @@ PUBLIC int dired_options ARGS2( *cp = '.'; } #endif /* NOTDEFINED */ - } else path[0] = '\0'; + } else { + path[0] = '\0'; + StrAllocCopy(path_url, path); + } /*escaped = (char *) HTEscape(path,(unsigned char) 4); path_url instead- kw*/ nothing_tagged = (HTList_isEmpty(tagged)); diff --git a/src/LYMail.c b/src/LYMail.c index 0a2cc1c6..639f0f46 100644 --- a/src/LYMail.c +++ b/src/LYMail.c @@ -384,6 +384,7 @@ PUBLIC void mailmsg ARGS4(int,cur, char *,owner_address, fprintf(fd, "Lynx ver. %s", LYNX_VERSION); if ((LynxSigFile != NULL) && (fp = fopen(LynxSigFile, "r")) != NULL) { + fputs("-- \n", fd); while (fgets(cmd, sizeof(cmd), fp) != NULL) fputs(cmd, fd); fclose(fp); @@ -657,7 +658,7 @@ PUBLIC void reply_by_mail ARGS3( cp = cp1; } if (address[(strlen(address) - 1)] == ',') - address[(strlen(address) - 1)] == '\0'; + address[(strlen(address) - 1)] = '\0'; if (*address == '\0') { FREE(address); FREE(body); @@ -1050,6 +1051,7 @@ PUBLIC void reply_by_mail ARGS3( c = LYgetch(); if (TOUPPER(c) == 'Y') { if ((fd = fopen(tmpfile, "a")) != NULL) { + fputs("-- \n", fd); while (fgets(user_input, sizeof(user_input), fp) != NULL) { fputs(user_input, fd); } diff --git a/src/LYMain.c b/src/LYMain.c index f621bf00..ae103c36 100644 --- a/src/LYMain.c +++ b/src/LYMain.c @@ -295,7 +295,7 @@ PUBLIC char *LYUserAgent = NULL; /* Lynx User-Agent header */ PUBLIC char *LYUserAgentDefault = NULL; /* Lynx default User-Agent header */ PUBLIC BOOLEAN LYNoRefererHeader=FALSE; /* Never send Referer header? */ PUBLIC BOOLEAN LYNoRefererForThis=FALSE;/* No Referer header for this URL? */ -PUBLIC BOOLEAN LYNoFromHeader=FALSE; /* Never send From header? */ +PUBLIC BOOLEAN LYNoFromHeader = TRUE; /* Never send From header? */ PUBLIC BOOLEAN LYListNewsNumbers = LIST_NEWS_NUMBERS; PUBLIC BOOLEAN LYListNewsDates = LIST_NEWS_DATES; PUBLIC BOOLEAN LYisConfiguredForX = FALSE; @@ -951,7 +951,7 @@ PUBLIC int main ARGS2( if (dump_output_immediately || LYMBMBlocked || no_multibook) { LYMultiBookmarks = FALSE; LYMBMBlocked = TRUE; - no_multibook == TRUE; + no_multibook = TRUE; } #ifdef VMS @@ -1459,6 +1459,12 @@ PRIVATE void parse_arg ARGS3( break;; #endif /* VMS */ + } else if (strncmp(argv[0], "-from", 5) == 0) { + if (LYNoFromHeader) + LYNoFromHeader = FALSE; + else + LYNoFromHeader = TRUE; + } else if (strncmp(argv[0], "-ftp", 4) == 0) { ftp_ok = FALSE; @@ -1640,9 +1646,6 @@ PRIVATE void parse_arg ARGS3( } else if (strncmp(argv[0], "-nofilereferer", 14) == 0) { no_filereferer = TRUE; - } else if (strncmp(argv[0], "-nofrom", 7) == 0) { - LYNoFromHeader = TRUE; - } else if (strncmp(argv[0], "-nolist", 7) == 0) { nolist = TRUE; @@ -1938,9 +1941,14 @@ PRIVATE void parse_arg ARGS3( parse_restrictions("all"); } else if (strncmp(argv[0], "-version", 8) == 0) { - printf("\n%s Version %s\n(c)1997 GNU General Public License\n\ -<URL:http://lynx.browser.org/>\n\n", - LYNX_NAME, LYNX_VERSION); + printf("\n%s Version %s (1997)\n", LYNX_NAME, LYNX_VERSION); + printf( + "Copyrights held by the University of Kansas, CERN, and other contributors.\n" + ); + printf("Distributed under the GNU General Public License.\n"); + printf( + "See http://lynx.browser.org/ and the online help for more information.\n\n" + ); exit(0); } else if (strncmp(argv[0], "-vikeys", 7) == 0) { @@ -2001,6 +2009,7 @@ Output_Help_List: printf(" -fileversions include all versions of files in local VMS directory\n"); printf(" listings\n"); printf(" -force_html forces the first document to be interpreted as HTML\n"); + printf(" -from toggle transmissions of From headers\n"); printf(" -ftp disable ftp access\n"); printf(" -get_data user data for get forms, read from stdin,\n"); printf(" terminated by '---' on a line\n"); @@ -2018,7 +2027,6 @@ Output_Help_List: printf(" -newsmaxchunk=NUMBER maximum news articles in listings before chunking\n"); printf(" -nobrowse disable directory browsing\n"); printf(" -nofilereferer disable transmissions of Referer headers for file URLs\n"); - printf(" -nofrom disable transmissions of From headers\n"); printf(" -nolist disable the link list feature in dumps\n"); printf(" -nolog disable mailing of error messages to document owners\n"); printf(" -nopause disable forced pauses for statusline messages\n"); diff --git a/src/LYMainLoop.c b/src/LYMainLoop.c index 72e0d96c..1801682f 100644 --- a/src/LYMainLoop.c +++ b/src/LYMainLoop.c @@ -516,10 +516,15 @@ try_again: if ((cp = (char *)calloc(1, (strlen((char *)&temp[len]) + 2))) == NULL) outofmem(__FILE__, "mainloop"); - if (temp[len] == '/') - sprintf(cp, ".%s", (char *)&temp[len]); - else - strcpy(cp, (char *)&temp[len]); + if (temp[len] == '/') { + if (strchr((char *)&temp[(len + 1)], '/')) { + sprintf(cp, ".%s", (char *)&temp[len]); + } else { + strcpy(cp, (char *)&temp[(len + 1)]); + } + } else { + strcpy(cp, (char *)&temp[len]); + } for (i = 0; i <= MBM_V_MAXFILES; i++) { if (MBM_A_subbookmark[i] && #ifdef VMS @@ -793,11 +798,22 @@ try_again: } } if (startfile) { + /* + * If homepage was not equated to startfile, + * make the homepage URL the first goto + * entry. - FM + */ if (homepage && strcmp(startfile, homepage)) HTAddGotoURL(homepage); - if (strcmp(startfile, newdoc.address) || - newdoc.post_data == NULL); - HTAddGotoURL(startfile); + /* + * If we are not starting up with startfile + * (e.g., had -book), or if we are using the + * startfile and it has no POST content, make + * the startfile URL a goto entry. - FM + */ + if (strcmp(startfile, newdoc.address) || + newdoc.post_data == NULL) + HTAddGotoURL(startfile); } if (TRACE) { refresh_screen = TRUE; @@ -851,8 +867,16 @@ try_again: arrowup = FALSE; } else { curdoc.link = newdoc.link; - if (curdoc.link >= nlinks) - curdoc.link = nlinks - 1; + if (curdoc.link >= nlinks) { + curdoc.link = nlinks - 1; + } else if (curdoc.link < 0 && nlinks > 0) { + /* + * We may have popped a doc (possibly in local_dired) + * which didn't have any links when it was pushed, but + * does have links now (e.g. a file was created) - KW + */ + curdoc.link = 0; + } } show_help = FALSE; /* reset */ @@ -3765,12 +3789,17 @@ check_add_bookmark_to_self: if (lynx_edit_mode && !no_dired_support) { LYUpload_options((char **)&newdoc.address, (char *)curdoc.address); - FREE(curdoc.address); FREE(newdoc.post_data); FREE(newdoc.post_content_type); FREE(newdoc.bookmark); newdoc.isHEAD = FALSE; newdoc.safe = FALSE; + /* + * Uncache the current listing so that it will + * be updated to included the uploaded file if + * placed in the current directory. - FM + */ + HTuncache_current_document(); } break; #endif /* DIRED_SUPPORT */ diff --git a/src/LYNews.c b/src/LYNews.c index 77ef81cc..79ae8e39 100644 --- a/src/LYNews.c +++ b/src/LYNews.c @@ -291,6 +291,7 @@ PUBLIC char *LYNewsPost ARGS2( c = LYgetch(); if (TOUPPER(c) == 'Y') { if ((fd = fopen(tmpfile, "a")) != NULL) { + fputs("-- \n", fd); while (fgets(user_input, sizeof(user_input), fp) != NULL) { fputs(user_input, fd); } diff --git a/src/LYPrint.c b/src/LYPrint.c index 3b3a5fe4..265747a4 100644 --- a/src/LYPrint.c +++ b/src/LYPrint.c @@ -3,6 +3,7 @@ #include "HTAccess.h" #include "HTList.h" #include "HTAlert.h" +#include "HTFile.h" #include "LYCurses.h" #include "GridText.h" #include "LYUtils.h" @@ -68,6 +69,8 @@ PUBLIC int printfile ARGS1(document *,newdoc) int FnameNum; BOOLEAN FirstRecall = TRUE; char *content_base = NULL, *content_location = NULL; + HTFormat format; + HTAtom *encoding; #ifdef VMS extern BOOLEAN HadVMSInterrupt; #endif /* VMS */ @@ -189,10 +192,11 @@ PUBLIC int printfile ARGS1(document *,newdoc) retry: strcpy(filename, sug_filename); /* add suggestion info */ /* make the sug_filename conform to system specs */ change_sug_filename(filename); - if (!(HTisDocumentSource()) && (len = strlen(filename)) > 4) { - len -= 5; - if (!strcasecomp((filename + len), ".html")) { - filename[len] = '\0'; + if (!(HTisDocumentSource()) && + (cp = strrchr(filename, '.')) != NULL) { + format = HTFileFormat(filename, &encoding); + if (!strcasecomp(format->name, "text/html")) { + *cp = '\0'; strcat(filename, ".txt"); } } @@ -436,16 +440,16 @@ PUBLIC int printfile ARGS1(document *,newdoc) if (HTisDocumentSource()) { if ((len = strlen(tempfile)) > 3) { len -= 4; - if (!strcasecomp((filename + len), ".txt")) { - filename[len] = '\0'; - strcat(filename, ".html"); + if (!strcasecomp((tempfile + len), ".txt")) { + tempfile[len] = '\0'; + strcat(tempfile, ".html"); } } } else if ((len = strlen(tempfile)) > 4) { len -= 5; - if (!strcasecomp((filename + len), ".html")) { - filename[len] = '\0'; - strcat(filename, ".txt"); + if (!strcasecomp((tempfile + len), ".html")) { + tempfile[len] = '\0'; + strcat(tempfile, ".txt"); } } if((outfile_fp = fopen(tempfile, "w")) == NULL) { @@ -716,10 +720,11 @@ PUBLIC int printfile ARGS1(document *,newdoc) _statusline(FILENAME_PROMPT); again: strcpy(filename, sug_filename); change_sug_filename(filename); - if ((len = strlen(filename)) > 4) { - len -= 5; - if (!strcasecomp((filename + len), ".html")) { - filename[len] = '\0'; + if (!(HTisDocumentSource()) && + (cp = strrchr(filename, '.')) != NULL) { + format = HTFileFormat(filename, &encoding); + if (!strcasecomp(format->name, "text/html")) { + *cp = '\0'; strcat(filename, ".txt"); } } diff --git a/src/LYReadCFG.c b/src/LYReadCFG.c index 4af58672..f76f08dd 100644 --- a/src/LYReadCFG.c +++ b/src/LYReadCFG.c @@ -1107,12 +1107,6 @@ 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 @@ -1128,6 +1122,12 @@ PUBLIC void read_cfg ARGS1( } break; + case 'X': + if (!strncasecomp(buffer, "XLOADIMAGE_COMMAND:", 19)) { + StrAllocCat(XLoadImageCommand, (char *)&buffer[19]); + } + break; + default: break; diff --git a/src/LYSearch.c b/src/LYSearch.c index 0aafaa79..52a3e110 100644 --- a/src/LYSearch.c +++ b/src/LYSearch.c @@ -251,7 +251,7 @@ check_recall: * link we are on, or the next page. */ if (nlinks == 0) - offset = display_lines+1; + offset = (display_lines - 1); else offset = links[cur_doc->link].ly; diff --git a/src/LYShowInfo.c b/src/LYShowInfo.c index d2ffc786..b02b3a05 100644 --- a/src/LYShowInfo.c +++ b/src/LYShowInfo.c @@ -261,9 +261,8 @@ PUBLIC int showinfo ARGS4( fprintf(fp0, "<dt><em>Last Mod:</em> %s\n", cp); if (doc->post_data) { - StrAllocCopy(Address, doc->post_data); - LYEntify(&Address, FALSE); - fprintf(fp0, "<dt><em>Post Data:</em> <xmp>%s</xmp>\n", Address); + fprintf(fp0, + "<dt><em>Post Data:</em> <xmp>%s</xmp>\n", doc->post_data); fprintf(fp0, "<dt><em>Post Content Type:</em> %s\n", doc->post_content_type); } diff --git a/src/LYUtils.c b/src/LYUtils.c index debb5c33..c45b99a0 100644 --- a/src/LYUtils.c +++ b/src/LYUtils.c @@ -2241,12 +2241,14 @@ have_VMS_URL: if ((stat(cp, &st) > -1) || (fptemp = fopen(cp, "r")) != NULL) { /* - * It is a subdirectory of file on the local system + * It is a subdirectory or file on the local system * with escaped characters and/or a fragment to be * appended to the URL. - FM */ - *fragment = '#'; - fragment = NULL; + if (fragment != NULL) { + *fragment = '#'; + fragment = NULL; + } StrAllocCat(*AllocatedString, temp); if (TRACE) { fprintf(stderr, "Converted '%s' to '%s'\n", diff --git a/userdefs.h b/userdefs.h index 5dd9570a..32fa89fe 100644 --- a/userdefs.h +++ b/userdefs.h @@ -95,7 +95,7 @@ /************************** * XLOADIMAGE_COMMAND will be used as a default in src/HTInit.c - * for viewing image/* content types when the DECW$DISPLAY logical + * 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, @@ -254,7 +254,7 @@ /************************** * XLOADIMAGE_COMMAND will be used as a default in src/HTInit.c for - * viewing image/* content types when the DISPLAY environment variable + * 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 @@ -948,8 +948,9 @@ * should be able to fire up your main page with lynxcgi:path and everything * should work as if you were talking to the http daemon. * - * Note that you must use a LYNXCGI_PATH directive in your lynx.cfg file as - * well in order for this to work. + * Note that TRUSTED_LYNXCGI directives must be defined in your lynx.cfg file + * if you wish to place restrictions on source documents and/or paths for + * lynxcgi links. * * The cgi scripts are called with a fork()/execve() sequence so you don't * have to worry about people trying to abuse the code. :-) @@ -958,8 +959,12 @@ * * VMS: * ==== - * Uncomment the following line to define LYNXCGI_LINK, and when - * running Lynx, enter lynxcgi:advice as a G)oto URL. + * The lynxcgi scheme, if enabled, yields an informational message regardless + * of the path, and use of the freeware OSU DECthreads server as a local + * script server is recommended instead of lynxcgi URLs. Uncomment the + * following line to define LYNXCGI_LINKS, and when running Lynx, enter + * lynxcgi:advice as a G)oto URL for more information and links to the + * OSU server distribution. */ /* #define LYNXCGI_LINKS */ @@ -1150,7 +1155,7 @@ */ #define LYNX_NAME "Lynx" -#define LYNX_VERSION "2.7" +#define LYNX_VERSION "2.7.1" /**************************************************************** * The LYMessages_en.h header defines default, English strings diff --git a/utils/lpansi/lpansi.txt b/utils/lpansi/lpansi.txt deleted file mode 100644 index 46738a2c..00000000 --- a/utils/lpansi/lpansi.txt +++ /dev/null @@ -1,45 +0,0 @@ -README for lpansi.c 12/2/1993 -File: lpansi.c Author: Gary Day - gday@comp.uark.edu - -The problem: UNIX supplies a printing program called lp <filename> which - allows the user to print a text (or any really) file to a - printer. Unfortunately, that printer is attached to the UNIX - server which is not where the user usually is. In my case, it is - about 230 miles away. I needed a similar program that would - allow me to print to my home printer. - -The solution: The VT100 standard defines a printer on and off escape - sequence. [FYI: esc[5i is printer on, esc[4i is printer off.] - Lpansi is a VERY simple program that issues a printer on - sequence, opens the file sent as an argument, reads it character - by character, echos it to stdout (now your local printer) and - ends by sending a form feed and printer off command. - -Usage: I had several purposes in mind when I wrote this. The first was to - find a way to replace lp in a gopher client I had with something that - would print at home. I also wanted to be able to print text - files to my home printer directly from the UNIX prompt. A - natural extension of this is to add it to LYNX, and other printing - clients as your printer command. - -Syntax: lpansi <filename> - This program only accepts one filename as an argument, and not - command line options. It could be easily modified to accept more - but that will be up to you to do. It serves my needs. - -Thanks: Thanks go to Michael Seibel on the PINE development team for - helping me find the correct ANSI codes to turn off the printer. - I found out later that PINE distributes a similar program called - ansiprt which is supposed to do the same thing. Here, the source - code is provided so you may incorporate the concept directly in your - program. - -Disclaimer: [Everyone has one so...] I make no promises whatsoever about - how this will work for you. If you have VT100 and/or ANSI, it - should work just fine. If it doesn't, quit using it. :) This - program is free to use and modify, but try to keep my name with - it. I don't do that much cool stuff, so I need all the credit - I can get. Thanks. - - *** End of README for lpansi.c *** |