aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>1997-02-15 10:50:52 -0500
committerThomas E. Dickey <dickey@invisible-island.net>1997-02-15 10:50:52 -0500
commit923c66ce35dd473a10713d8f44f30d9ad770a99b (patch)
tree055092b48fbae27a526fe2d104b6d646a9d422e7
parent6f66219647d92d2af2427d416e00e6f2a8f825dc (diff)
downloadlynx-snapshots-923c66ce35dd473a10713d8f44f30d9ad770a99b.tar.gz
snapshot of project "lynx", label v2_7
-rw-r--r--CHANGES40
-rw-r--r--LYMessages_en.h2
-rw-r--r--Makefile8
-rw-r--r--WWW/Library/Implementation/HTFinger.c28
-rw-r--r--WWW/Library/Implementation/HTGopher.c56
-rw-r--r--WWW/Library/Implementation/HTML.h1
-rw-r--r--WWW/Library/Implementation/HTNews.c199
-rw-r--r--WWW/Library/Implementation/tcp.h16
-rw-r--r--build-slang.com4
-rw-r--r--lynx.cfg10
-rw-r--r--lynx_help/Lynx_users_guide.html27
-rw-r--r--lynx_help/keystroke_commands/keystroke_help.html2
-rw-r--r--lynx_help/keystroke_commands/other_help.html5
-rw-r--r--samples/lynx.cfg10
-rw-r--r--src/HTML.c9
-rw-r--r--src/HTML.h1
-rw-r--r--src/LYKeymap.c3
-rw-r--r--src/LYKeymap.h91
-rw-r--r--src/LYMail.c48
-rw-r--r--src/LYMain.c2
-rw-r--r--src/LYMainLoop.c64
-rw-r--r--userdefs.h8
22 files changed, 453 insertions, 181 deletions
diff --git a/CHANGES b/CHANGES
index 50137901..16919c24 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,43 @@
+--- Release of Lynx2-6FM as Lynx v2.7 (February 15, 1997) ---
+=======================================================================
+1997-02-15
+* Release of Lynx2-6FM as Lynx v2.7. - FM
+* Included -Ae when compiling the Implementation modules for the snake3
+ target. - FM
+1997-02-14
+* Mods to issue an alert about a BASE tag not having an absolute URL only
+ once per document. - FM
+* Added code for appending LYNX_SIG_FILE to email messages as well as to
+ news posts or followups, and updated the Users Guide accordingly. - FM
+* Updated build-slang.com. - FM
+1997-02-12
+* Fixed some problems in the code for using a hookless Lynx image with
+ snew_proxy, snewspost_proxy, and snewsreply_proxy set to
+ "nntp://host:port/" so that it uses Tom Zerucha's (tz@execpc.com)
+ daemon which handles the SSL communications on behalf of the Lynx
+ image. Also polished up all of the news gateway code, and added
+ comments for the benefit of new developers. - FM
+* Added an ECGOTO command mapped by default to 'G', complementary to the
+ GOTO command (default 'g'), to edit the current document's URL and then
+ go to it. Using case-sensitive letters with different command definitions
+ ensures that both will appear with their brief explanations in the 'k'eymap
+ listing. For ECGOTO, Control-G, failure to modify the URL, or complete
+ deletion of it, all act as a cancel. If the current document has POST
+ content associated with it, a warning will be issued before offering the
+ URL to edit. The POST content is retained if the modification merely
+ involves a change in fragment for the URL. Otherwise, the modified URL
+ (if it has an http scheme) will be submitted with method GET and no POST
+ content. If the ECGOTO command is not cancelled, or not simply a fragment
+ change, the modified URL will be added to the 'g'oto buffer, and can be
+ re-accessed, to edit further, via the GOTO command. See the updated online
+ 'h'elp for more information. - FM
+1997-02-10
+* Amplified the comments concerning deletion of prototypes for MultiNet
+ socket library functions as they get added to MultiNet's own headers
+ in newer versions of it's socket library. - FM
+* Added a missing fclose() in post_article() of HTNews.c, and added code
+ to delete the temporary file there, so it's gone as soon as we're done
+ with it. - FM
02-09-97
* Enhanced the Set-Cookie header parser to handle values that contain
spaces but were not enclosed in double-quotes, and to use such
diff --git a/LYMessages_en.h b/LYMessages_en.h
index 5c5c042b..a5ab46ed 100644
--- a/LYMessages_en.h
+++ b/LYMessages_en.h
@@ -288,6 +288,8 @@
#define EDIT_CURRENT_GOTO "Edit the current Goto URL: "
#define EDIT_THE_PREV_GOTO "Edit the previous Goto URL: "
#define EDIT_A_PREV_GOTO "Edit a previous Goto URL: "
+#define CURRENT_DOC_HAS_POST_DATA "Current document has POST data."
+#define EDIT_CURDOC_URL "Edit this document's URL: "
#define ENTER_DATABASE_QUERY "Enter a database query: "
#define ENTER_WHEREIS_QUERY "Enter a whereis query: "
#define EDIT_CURRENT_QUERY "Edit the current query: "
diff --git a/Makefile b/Makefile
index d2b6ed27..87fd9fa1 100644
--- a/Makefile
+++ b/Makefile
@@ -500,10 +500,10 @@ snake2-slang:
# Lynx will compile with the purchased cc compiler added to HP-UX.
# contributed by Andy Finkenstadt (genie@panix.com)
-# Note that HP/UX 10.10 apparently has a broken select() in libcurses.a
-# and will malfunction with Lynx. See the PROBLEMS file.
+# 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="$(SITE_LYDEFS)"
+ cd WWW/Library/snake; $(MAKE) CC="cc" LYFLAGS="-Ae $(SITE_LYDEFS)"
cd src; $(MAKE) all CC="cc" MCFLAGS="-O -Ae -DFANCY_CURSES -DUNIX \
-DSNAKE -I../$(WWWINC) $(SITE_DEFS)" \
LIBS="-lcurses -ltermcap \
@@ -511,7 +511,7 @@ snake3:
WWWLIB="../WWW/Library/snake/libwww.a"
snake3-slang:
- cd WWW/Library/snake; $(MAKE) CC="cc" LYFLAGS="$(SITE_LYDEFS)"
+ cd WWW/Library/snake; $(MAKE) CC="cc" LYFLAGS="-Ae $(SITE_LYDEFS)"
cd src; $(MAKE) all CC="cc" MCFLAGS="-O -Ae -DUSE_SLANG -DUNIX \
-DSNAKE -I../$(WWWINC) $(SITE_DEFS)" \
LIBS="-lcurses -ltermcap \
diff --git a/WWW/Library/Implementation/HTFinger.c b/WWW/Library/Implementation/HTFinger.c
index db9dc3dc..d00b57cb 100644
--- a/WWW/Library/Implementation/HTFinger.c
+++ b/WWW/Library/Implementation/HTFinger.c
@@ -212,18 +212,22 @@ PRIVATE int response ARGS5(
*/
p = l = line;
while (*l) {
- if (strncmp (l, "news:", 5) &&
- strncmp (l, "snews://", 8) &&
- strncmp (l, "nntp://", 7) &&
- strncmp (l, "ftp://", 6) &&
- strncmp (l, "file:/", 6) &&
- strncmp (l, "finger://", 9) &&
- strncmp (l, "http://", 7) &&
- strncmp (l, "https://", 8) &&
- strncmp (l, "wais://", 7) &&
- strncmp (l, "mailto:", 7) &&
- strncmp (l, "cso://", 6) &&
- strncmp (l, "gopher://", 9))
+ if (strncmp(l, "news:", 5) &&
+ strncmp(l, "snews://", 8) &&
+ strncmp(l, "nntp://", 7) &&
+ strncmp(l, "snewspost:", 10) &&
+ strncmp(l, "snewsreply:", 11) &&
+ strncmp(l, "newspost:", 9) &&
+ strncmp(l, "newsreply:", 10) &&
+ strncmp(l, "ftp://", 6) &&
+ strncmp(l, "file:/", 6) &&
+ strncmp(l, "finger://", 9) &&
+ strncmp(l, "http://", 7) &&
+ strncmp(l, "https://", 8) &&
+ strncmp(l, "wais://", 7) &&
+ strncmp(l, "mailto:", 7) &&
+ strncmp(l, "cso://", 6) &&
+ strncmp(l, "gopher://", 9))
PUTC(*l++);
else {
StrAllocCopy(href, l);
diff --git a/WWW/Library/Implementation/HTGopher.c b/WWW/Library/Implementation/HTGopher.c
index 6eb93764..84fc9e9a 100644
--- a/WWW/Library/Implementation/HTGopher.c
+++ b/WWW/Library/Implementation/HTGopher.c
@@ -1365,18 +1365,22 @@ PRIVATE int generate_cso_report ARGS2(
l++;
i += 4;
buf[i] = '\0';
- } else if (strncmp (l, "news:", 5) &&
- strncmp (l, "snews://", 8) &&
- strncmp (l, "nntp://", 7) &&
- strncmp (l, "ftp://", 6) &&
- strncmp (l, "file:/", 6) &&
- strncmp (l, "finger://", 9) &&
- strncmp (l, "http://", 7) &&
- strncmp (l, "https://", 8) &&
- strncmp (l, "wais://", 7) &&
- strncmp (l, "mailto:", 7) &&
- strncmp (l, "cso://", 6) &&
- strncmp (l, "gopher://", 9)) {
+ } else if (strncmp(l, "news:", 5) &&
+ strncmp(l, "snews://", 8) &&
+ strncmp(l, "nntp://", 7) &&
+ strncmp(l, "snewspost:", 10) &&
+ strncmp(l, "snewsreply:", 11) &&
+ strncmp(l, "newspost:", 9) &&
+ strncmp(l, "newsreply:", 10) &&
+ strncmp(l, "ftp://", 6) &&
+ strncmp(l, "file:/", 6) &&
+ strncmp(l, "finger://", 9) &&
+ strncmp(l, "http://", 7) &&
+ strncmp(l, "https://", 8) &&
+ strncmp(l, "wais://", 7) &&
+ strncmp(l, "mailto:", 7) &&
+ strncmp(l, "cso://", 6) &&
+ strncmp(l, "gopher://", 9)) {
buf[i++] = *l++;
buf[i] = '\0';
} else {
@@ -1416,18 +1420,22 @@ PRIVATE int generate_cso_report ARGS2(
l++;
i += 4;
buf[i] = '\0';
- } else if (strncmp (l, "news:", 5) &&
- strncmp (l, "snews://", 8) &&
- strncmp (l, "nntp://", 7) &&
- strncmp (l, "ftp://", 6) &&
- strncmp (l, "file:/", 6) &&
- strncmp (l, "finger://", 9) &&
- strncmp (l, "http://", 7) &&
- strncmp (l, "https://", 8) &&
- strncmp (l, "wais://", 7) &&
- strncmp (l, "mailto:", 7) &&
- strncmp (l, "cso://", 6) &&
- strncmp (l, "gopher://", 9)) {
+ } else if (strncmp(l, "news:", 5) &&
+ strncmp(l, "snews://", 8) &&
+ strncmp(l, "nntp://", 7) &&
+ strncmp(l, "snewspost:", 10) &&
+ strncmp(l, "snewsreply:", 11) &&
+ strncmp(l, "newspost:", 9) &&
+ strncmp(l, "newsreply:", 10) &&
+ strncmp(l, "ftp://", 6) &&
+ strncmp(l, "file:/", 6) &&
+ strncmp(l, "finger://", 9) &&
+ strncmp(l, "http://", 7) &&
+ strncmp(l, "https://", 8) &&
+ strncmp(l, "wais://", 7) &&
+ strncmp(l, "mailto:", 7) &&
+ strncmp(l, "cso://", 6) &&
+ strncmp(l, "gopher://", 9)) {
buf[i++] = *l++;
buf[i] = '\0';
} else {
diff --git a/WWW/Library/Implementation/HTML.h b/WWW/Library/Implementation/HTML.h
index 23d89e17..c4bd3caf 100644
--- a/WWW/Library/Implementation/HTML.h
+++ b/WWW/Library/Implementation/HTML.h
@@ -113,6 +113,7 @@ struct _HTStructured {
BOOL inA;
BOOL inAPPLET;
BOOL inAPPLETwithP;
+ BOOL inBadBASE;
BOOL inBadHTML;
BOOL inBASE;
BOOL inBoldA;
diff --git a/WWW/Library/Implementation/HTNews.c b/WWW/Library/Implementation/HTNews.c
index 5a86151e..1281d2e4 100644
--- a/WWW/Library/Implementation/HTNews.c
+++ b/WWW/Library/Implementation/HTNews.c
@@ -22,9 +22,6 @@
/* this define should be in HTFont.h :( */
#define HT_NON_BREAK_SPACE ((char)1) /* For now */
-#define CR FROMASCII('\015') /* Must be converted to ^M for transmission */
-#define LF FROMASCII('\012') /* Must be converted to ^J for transmission */
-
#define NEWS_PORT 119 /* See rfc977 */
#define SNEWS_PORT 563 /* See Lou Montulli */
#define APPEND /* Use append methods */
@@ -65,6 +62,7 @@ extern BOOLEAN LYListNewsNumbers;
extern BOOLEAN LYListNewsDates;
extern HTCJKlang HTCJK;
extern int interrupted_in_htgetcharacter;
+extern BOOL using_proxy; /* Are we using an NNTP proxy? */
/*
** Module-wide variables.
@@ -86,6 +84,13 @@ PRIVATE int diagnostic; /* level: 0=none 2=source */
#define START(e) (*targetClass.start_element)(target, e, 0, 0, 0)
#define END(e) (*targetClass.end_element)(target, e, 0)
+PRIVATE void free_news_globals NOARGS
+{
+ FREE(HTNewsHost);
+ FREE(NewsHost);
+ FREE(NewsHREF);
+}
+
PUBLIC CONST char * HTGetNewsHost NOARGS
{
return HTNewsHost;
@@ -117,13 +122,21 @@ PUBLIC void HTSetNewsHost ARGS1(CONST char *, value)
PRIVATE BOOL initialized = NO;
PRIVATE BOOL initialize NOARGS
{
+ char *cp = NULL;
+
/*
** Get name of Host.
*/
#ifdef NeXTStep
- if ((HTNewsHost = NXGetDefaultValue("WorldWideWeb","NewsHost"))==0)
- if ((HTNewsHost = NXGetDefaultValue("News","NewsHost")) == 0)
- HTNewsHost = DEFAULT_NEWS_HOST;
+ if ((cp = NXGetDefaultValue("WorldWideWeb","NewsHost"))==0) {
+ if ((cp = NXGetDefaultValue("News","NewsHost")) == 0) {
+ StrAllocCopy(HTNewsHost, DEFAULT_NEWS_HOST);
+ }
+ }
+ if (cp) {
+ StrAllocCopy(HTNewsHost, cp);
+ cp = NULL;
+ }
#else
if (getenv("NNTPSERVER")) {
StrAllocCopy(HTNewsHost, (char *)getenv("NNTPSERVER"));
@@ -143,11 +156,11 @@ PRIVATE BOOL initialize NOARGS
}
}
if (!HTNewsHost)
- HTNewsHost = DEFAULT_NEWS_HOST;
+ StrAllocCopy(HTNewsHost, DEFAULT_NEWS_HOST);
#endif /* NeXTStep */
s = -1; /* Disconnected */
-
+ atexit(free_news_globals);
return YES;
}
@@ -291,7 +304,7 @@ PRIVATE char * author_name ARGS1 (char *,email)
**
** For example, returns "montulli@spaced.out.galaxy.net" if given any of
** " Lou Montulli <montulli@spaced.out.galaxy.net> "
-** or " montulli@spacedout.galaxy.net ( Lou "The Stud" Montulli ) "
+** or " montulli@spaced.out.galaxy.net ( Lou "The Stud" Montulli ) "
*/
PRIVATE char * author_address ARGS1(char *,email)
{
@@ -407,7 +420,7 @@ PRIVATE void start_list ARGS1(int, seqnum)
** On entry,
** HT has a selection of zero length at the end.
** text points to the text to be put into the file, 0 terminated.
-** addr points to the hypertext refernce address,
+** addr points to the hypertext reference address,
** terminated by white space, comma, NULL or '>'
*/
PRIVATE void write_anchor ARGS2(CONST char *,text, CONST char *,addr)
@@ -609,6 +622,13 @@ PRIVATE void post_article ARGS1(
blen = llen;
}
}
+ fclose(fd);
+#ifdef VMS
+ while (remove(postfile) == 0)
+ ; /* loop through all versions */
+#else
+ remove(postfile);
+#endif /* VMS */
/*
** Send the nntp EOF and get the server's response. - FM
@@ -983,18 +1003,22 @@ PRIVATE int read_article NOARGS
p += 7;
*p = 0;
while (*l) {
- if (strncmp (l, "news:", 5) &&
- strncmp (l, "snews://", 8) &&
- strncmp (l, "nntp://", 7) &&
- strncmp (l, "ftp://", 6) &&
- strncmp (l, "file:/", 6) &&
- strncmp (l, "finger://", 9) &&
- strncmp (l, "http://", 7) &&
- strncmp (l, "https://", 8) &&
- strncmp (l, "wais://", 7) &&
- strncmp (l, "mailto:", 7) &&
- strncmp (l, "cso://", 6) &&
- strncmp (l, "gopher://", 9))
+ if (strncmp(l, "news:", 5) &&
+ strncmp(l, "snews://", 8) &&
+ strncmp(l, "nntp://", 7) &&
+ strncmp(l, "snewspost:", 10) &&
+ strncmp(l, "snewsreply:", 11) &&
+ strncmp(l, "newspost:", 9) &&
+ strncmp(l, "newsreply:", 10) &&
+ strncmp(l, "ftp://", 6) &&
+ strncmp(l, "file:/", 6) &&
+ strncmp(l, "finger://", 9) &&
+ strncmp(l, "http://", 7) &&
+ strncmp(l, "https://", 8) &&
+ strncmp(l, "wais://", 7) &&
+ strncmp(l, "mailto:", 7) &&
+ strncmp(l, "cso://", 6) &&
+ strncmp(l, "gopher://", 9))
PUTC (*l++);
else {
StrAllocCopy(href, l);
@@ -1018,18 +1042,22 @@ PRIVATE int read_article NOARGS
}
}
while (*l) { /* Last bit of the line */
- if (strncmp (l, "news:", 5) &&
- strncmp (l, "snews://", 8) &&
- strncmp (l, "nntp://", 7) &&
- strncmp (l, "ftp://", 6) &&
- strncmp (l, "file:/", 6) &&
- strncmp (l, "finger://", 9) &&
- strncmp (l, "http://", 7) &&
- strncmp (l, "https://", 8) &&
- strncmp (l, "wais://", 7) &&
- strncmp (l, "mailto:", 7) &&
- strncmp (l, "cso://", 6) &&
- strncmp (l, "gopher://", 9))
+ if (strncmp(l, "news:", 5) &&
+ strncmp(l, "snews://", 8) &&
+ strncmp(l, "nntp://", 7) &&
+ strncmp(l, "snewspost:", 10) &&
+ strncmp(l, "snewsreply:", 11) &&
+ strncmp(l, "newspost:", 9) &&
+ strncmp(l, "newsreply:", 10) &&
+ strncmp(l, "ftp://", 6) &&
+ strncmp(l, "file:/", 6) &&
+ strncmp(l, "finger://", 9) &&
+ strncmp(l, "http://", 7) &&
+ strncmp(l, "https://", 8) &&
+ strncmp(l, "wais://", 7) &&
+ strncmp(l, "mailto:", 7) &&
+ strncmp(l, "cso://", 6) &&
+ strncmp(l, "gopher://", 9))
PUTC (*l++);
else {
StrAllocCopy(href, l);
@@ -1091,10 +1119,10 @@ PRIVATE int read_list ARGS1(char *, arg)
}
/*
- ** Read in the HEADer of the article.
+ ** Read the server's reply.
**
- ** The header fields are either ignored,
- ** or formatted and put into the text.
+ ** The lines are scanned for newsgroup
+ ** names and descriptions.
*/
START(HTML_HEAD);
PUTC('\n');
@@ -1140,6 +1168,9 @@ PRIVATE int read_list ARGS1(char *, arg)
START(HTML_DT);
PUTS(&line[1]);
}
+ } else if (line[0] == '#') { /* Comment? */
+ p = line; /* Restart at beginning */
+ continue;
} else {
/*
** Normal lines are scanned for references to newsgroups.
@@ -1613,6 +1644,8 @@ PUBLIC int HTLoadNews ARGS4(
int first, last; /* First and last articles asked for */
char *cp;
char *ListArg = NULL;
+ char *ProxyHost = NULL;
+ char *ProxyHREF = NULL;
char *postfile = NULL;
diagnostic = (format_out == WWW_SOURCE || /* set global flag */
@@ -1644,18 +1677,20 @@ PUBLIC int HTLoadNews ARGS4(
** xxxxx News group (no "@")
** group/n1-n2 Articles n1 to n2 in group
*/
- post_wanted = (strstr(arg, "newspost:") != NULL);
- reply_wanted = ((!post_wanted) &&
+ spost_wanted = (strstr(arg, "snewspost:") != NULL);
+ sreply_wanted = (!(spost_wanted) &&
+ strstr(arg, "snewsreply:") != NULL);
+ post_wanted = (!(spost_wanted || sreply_wanted) &&
+ strstr(arg, "newspost:") != NULL);
+ reply_wanted = (!(spost_wanted || sreply_wanted ||
+ post_wanted) &&
strstr(arg, "newsreply:") != NULL);
- spost_wanted = (!(post_wanted || reply_wanted) &&
- strstr(arg, "snewspost:") != NULL);
- sreply_wanted = (!(post_wanted || reply_wanted ||
- spost_wanted) &&
- strstr(arg, "newsreply:") != NULL);
- group_wanted = (!(post_wanted || reply_wanted ||
- spost_wanted || sreply_wanted) &&
+ group_wanted = (!(spost_wanted || sreply_wanted ||
+ post_wanted || reply_wanted) &&
strchr(arg, '@') == NULL) && (strchr(arg, '*') == NULL);
- list_wanted = (!(post_wanted || reply_wanted) &&
+ list_wanted = (!(spost_wanted || sreply_wanted ||
+ post_wanted || reply_wanted ||
+ group_wanted) &&
strchr(arg, '@') == NULL) && (strchr(arg, '*') != NULL);
if (!strncasecomp(arg, "snewspost:", 10) ||
@@ -1806,12 +1841,15 @@ PUBLIC int HTLoadNews ARGS4(
** or followups. - TZ & FM
*/
if (!strncasecomp(p1, "snews:", 6) ||
- !strncasecomp(p1, "snewpost:", 10) ||
+ !strncasecomp(p1, "snewspost:", 10) ||
!strncasecomp(p1, "snewsreply:", 11)) {
- if ((cp = HTParse(p1, "", PARSE_HOST)) != NULL && *cp != '\0')
+ StrAllocCopy(ProxyHost, NewsHost);
+ if ((cp = HTParse(p1, "", PARSE_HOST)) != NULL && *cp != '\0') {
sprintf(command, "snews://%.250s", cp);
- else
+ StrAllocCopy(NewsHost, cp);
+ } else {
sprintf(command, "snews://%.250s", NewsHost);
+ }
command[258] = '\0';
FREE(cp);
sprintf(proxycmd, "GET %.251s%c%c%c%c", command, CR, LF, CR, LF);
@@ -1820,6 +1858,7 @@ PUBLIC int HTLoadNews ARGS4(
"HTNews: Proxy command is '%.*s'\n",
(strlen(proxycmd) - 4), proxycmd);
strcat(command, "/");
+ StrAllocCopy(ProxyHREF, NewsHREF);
StrAllocCopy(NewsHREF, command);
if (spost_wanted || sreply_wanted) {
/*
@@ -1890,7 +1929,7 @@ PUBLIC int HTLoadNews ARGS4(
{
char * p = command + strlen(command);
/*
- ** Teminate command with CRLF, as in RFC 977.
+ ** Terminate command with CRLF, as in RFC 977.
*/
*p++ = CR; /* Macros to be correct on Mac */
*p++ = LF;
@@ -1901,6 +1940,8 @@ PUBLIC int HTLoadNews ARGS4(
if (!*arg) {
FREE(NewsHREF);
+ FREE(ProxyHost);
+ FREE(ProxyHREF);
FREE(ListArg);
return NO; /* Ignore if no name */
}
@@ -1921,10 +1962,13 @@ PUBLIC int HTLoadNews ARGS4(
if (s < 0) {
/* CONNECTING to news host */
char url[260];
- if (!strcmp(NewsHREF, "news:"))
+ if (!strcmp(NewsHREF, "news:")) {
sprintf (url, "lose://%.251s/", NewsHost);
- else
+ } else if (ProxyHREF) {
+ sprintf (url, "%.259s", ProxyHREF);
+ } else {
sprintf (url, "%.259s", NewsHREF);
+ }
if (TRACE)
fprintf (stderr, "News: doing HTDoConnect on '%s'\n", url);
@@ -1944,6 +1988,8 @@ PUBLIC int HTLoadNews ARGS4(
(*targetClass._abort)(target, NULL);
FREE(NewsHost);
FREE(NewsHREF);
+ FREE(ProxyHost);
+ FREE(ProxyHREF);
FREE(ListArg);
if (postfile) {
#ifdef VMS
@@ -1968,6 +2014,8 @@ PUBLIC int HTLoadNews ARGS4(
sprintf(message, "Could not access %s.", NewsHost);
FREE(NewsHost);
FREE(NewsHREF);
+ FREE(ProxyHost);
+ FREE(ProxyHREF);
FREE(ListArg);
if (postfile) {
#ifdef VMS
@@ -2002,6 +2050,8 @@ PUBLIC int HTLoadNews ARGS4(
(*targetClass._abort)(target, NULL);
FREE(NewsHost);
FREE(NewsHREF);
+ FREE(ProxyHost);
+ FREE(ProxyHREF);
FREE(ListArg);
if (postfile) {
#ifdef VMS
@@ -2029,6 +2079,11 @@ PUBLIC int HTLoadNews ARGS4(
spost_wanted || sreply_wanted) {
HTAlert("Cannot POST to this host.");
FREE(NewsHREF);
+ if (ProxyHREF) {
+ StrAllocCopy(NewsHost, ProxyHost);
+ FREE(ProxyHost);
+ FREE(ProxyHREF);
+ }
FREE(ListArg);
if (postfile) {
#ifdef VMS
@@ -2050,6 +2105,11 @@ PUBLIC int HTLoadNews ARGS4(
if (!HTCanPost) {
HTAlert("Cannot POST to this host.");
FREE(NewsHREF);
+ if (ProxyHREF) {
+ StrAllocCopy(NewsHost, ProxyHost);
+ FREE(ProxyHost);
+ FREE(ProxyHREF);
+ }
FREE(ListArg);
if (postfile) {
#ifdef VMS
@@ -2070,6 +2130,11 @@ PUBLIC int HTLoadNews ARGS4(
if (postfile == NULL) {
HTProgress("Cancelled!");
FREE(NewsHREF);
+ if (ProxyHREF) {
+ StrAllocCopy(NewsHost, ProxyHost);
+ FREE(ProxyHost);
+ FREE(ProxyHREF);
+ }
FREE(ListArg);
return(HT_NOT_LOADED);
}
@@ -2077,9 +2142,9 @@ PUBLIC int HTLoadNews ARGS4(
/*
** Ensure reader mode, but don't bother checking the
** status for anything but HT_INERRUPTED, because if
- ** if the reader mode command is not needed, the server
- ** probably return a 500, which is irrelevant at this
- ** point. - FM
+ ** the reader mode command is not needed, the server
+ ** probably return a 500, which is irrelevant at
+ ** this point. - FM
*/
char buffer[20];
@@ -2112,7 +2177,8 @@ Send_NNTP_command:
s = -1;
/*
** Message might be a leftover "Timeout-disconnected",
- ** so try again if retries is not exhausted.
+ ** so try again if the retries maximum has not been
+ ** reached.
*/
continue;
}
@@ -2123,9 +2189,18 @@ Send_NNTP_command:
if (post_wanted || reply_wanted || spost_wanted || sreply_wanted) {
if (status != 340) {
HTAlert("Cannot POST to this host.");
+ if (postfile) {
+#ifdef VMS
+ while (remove(postfile) == 0)
+ ; /* loop through all versions */
+#else
+ remove(postfile);
+#endif /* VMS */
+ }
} else {
post_article(postfile);
}
+ FREE(postfile);
status = HT_NOT_LOADED;
} else if (list_wanted) {
_HTProgress("Reading list of available newsgroups.");
@@ -2159,6 +2234,11 @@ Send_NNTP_command:
spost_wanted || sreply_wanted))
(*targetClass._free)(target);
FREE(NewsHREF);
+ if (ProxyHREF) {
+ StrAllocCopy(NewsHost, ProxyHost);
+ FREE(ProxyHost);
+ FREE(ProxyHREF);
+ }
FREE(ListArg);
if (postfile) {
#ifdef VMS
@@ -2181,6 +2261,11 @@ Send_NNTP_command:
spost_wanted || sreply_wanted))
(*targetClass._abort)(target, NULL);
FREE(NewsHREF);
+ if (ProxyHREF) {
+ StrAllocCopy(NewsHost, ProxyHost);
+ FREE(ProxyHost);
+ FREE(ProxyHREF);
+ }
FREE(ListArg);
if (postfile) {
#ifdef VMS
diff --git a/WWW/Library/Implementation/tcp.h b/WWW/Library/Implementation/tcp.h
index b67a1510..d4b00b38 100644
--- a/WWW/Library/Implementation/tcp.h
+++ b/WWW/Library/Implementation/tcp.h
@@ -127,7 +127,7 @@ VAX/VMS
CMU_TCP Available via FTP from sacusr.mp.usbr.gov
SOCKETSHR Eckhart Meyer's interface to NETLIB
WIN_TCP From Wollongong, now GEC software.
- MULTINET From SRI, now from TGV Inv.
+ MULTINET From SRI, became TGV, then Cisco.
DECNET Cern's TCP socket emulation over DECnet
The last three do not interfere with the
@@ -175,8 +175,10 @@ VAX/VMS
#undef IOCTL
#undef SOCKET_ERRNO
/*
-** Remove these socket_foo() prototypes if
-** MultiNet someday actually does this. - FM
+** Delete these socket_foo() prototypes as MultiNet adds them
+** to it's socket library headers. Compiler warnings due to
+** the absence of arguments in the generic prototypes here will
+** include the names of those which can be deleted. - FM
*/
extern int socket_read();
extern int socket_write();
@@ -224,8 +226,12 @@ extern int socket_ioctl();
#ifdef MULTINET /* Include from standard Multinet directories */
/*
-** Remove these multinet_foo() and associated prototypes
-** if MultiNet someday actually does this. - FM
+** Delete any of these multinet_foo() and associated prototypes
+** as MultiNet adds them to its socket library headers. You'll
+** get compiler warnings about them, due the absence of arguments
+** in the generic prototyping here, and the warnings will include
+** the names of the functions whose prototype entries can be
+** deleted here. - FM
*/
extern int multinet_accept();
extern int multinet_bind();
diff --git a/build-slang.com b/build-slang.com
index ae7d0fdf..63b38d66 100644
--- a/build-slang.com
+++ b/build-slang.com
@@ -9,7 +9,7 @@ $! object library does not already exist.
$!=========================================================================
$! NOTE: Set SLANGINC to the location of your slang.h and slcurses.h,
$! ==== and SLANGLIB to the location of your slang.olb (can be relative
-$! to the lynx2-6.src subdirectory of this distribution):
+$! to the lynx2-7.src subdirectory of this distribution):
$!
$! SLANGINC = "[-.slang.src]"
$! SLANGLIB = "[-.slang.src]"
@@ -194,6 +194,7 @@ $ cc LYCgi
$ cc LYCharSets
$ cc LYCharUtils
$ cc LYClean
+$ cc LYCookie
$ cc LYCurses
$ cc LYDownload
$ cc LYEdit
@@ -236,6 +237,7 @@ LYCgi.obj, -
LYCharSets.obj, -
LYCharUtils.obj, -
LYClean.obj, -
+LYCookie.obj, -
LYCurses.obj, -
LYDownload.obj, -
LYEdit.obj, -
diff --git a/lynx.cfg b/lynx.cfg
index 90b4cff6..ffb31ee9 100644
--- a/lynx.cfg
+++ b/lynx.cfg
@@ -515,10 +515,11 @@ CHARACTER_SET:ISO Latin 1
#NEWS_POSTING:TRUE
# LYNX_SIG_FILE defines the name of a file containing a signature which
-# can be appended to news postings or followups. The user will be prompted
-# whether to append it. It is sought in the home directory. If it is in
-# a subdirectory, begin it with a dot-slash (e.g., ./lynx/.lynxsig). The
-# definition is set in userdefs.h and can be changed here.
+# can be appended to email messages and news postings or followups. The
+# user will be prompted whether to append it. It is sought in the home
+# directory. If it is in a subdirectory, begin it with a dot-slash
+# (e.g., ./lynx/.lynxsig). The definition is set in userdefs.h and can
+# be changed here.
#
#LYNX_SIG_FILE:.lynxsig
@@ -1209,6 +1210,7 @@ MINIMAL_COMMENTS:TRUE
#KEYMAP:0x102:ACTIVATE # Select the current link
#KEYMAP:0x109:ACTIVATE # Function key Do - Select the current link
#KEYMAP:g:GOTO # Goto a random URL
+#KEYMAP:G:ECGOTO # Edit the current document's URL and go to it
#KEYMAP:H:HELP # Show default help screen
#KEYMAP:0x108:HELP # Function key Help - Show default help screen
#KEYMAP:i:INDEX # Show default index
diff --git a/lynx_help/Lynx_users_guide.html b/lynx_help/Lynx_users_guide.html
index 0c9dd4b6..3486ebfe 100644
--- a/lynx_help/Lynx_users_guide.html
+++ b/lynx_help/Lynx_users_guide.html
@@ -732,14 +732,17 @@ address will be filled in automatically. After entering the above
information, if you have an editor defined in the <em>Options Menu</em>
and you are not an anonymous user then your specified editor will be
spawned for you so that you can enter your message. If you do not have
-an editor defined or you are an anonymous user, a simple line mode input
+an editor defined or you are an anonymous user, a simple line mode input
scheme will allow you to enter your message.
<p>To finish sending the message, exit your spawned editor or, if you are
using the simple line mode input scheme, type a '<em>.</em>' (period) on
a line by itself. You will be asked a final time whether to send the
-message. If you press '<em>y</em>' then the message will be sent, if you
-press '<em>n</em>' the message will be deleted. [<A HREF="#TOC">ToC</A>]
+message. If you press '<em>y</em>', you will be prompted whether to
+append your signature file if one was defined in lynx.cfg and is accessible,
+and then the message will be sent, whereas if you press '<em>n</em>' the
+message will be deleted. Entering Control-G in response to any prompts
+also will cancel the mailing.[<A HREF="#TOC">ToC</A>]
<h2><A NAME="14"><em>USENET News posting</em></A></h2>
@@ -934,9 +937,25 @@ commands.
<dd>The '<em>g</em>' command allows any URL to be viewed. Pressing
the '<em>g</em>' command will bring up a prompt asking for a URL.
Type in the URL that you wish to view. All previously entered
- Goto URLs are saved in a circular buffer, and be accessed at
+ goto URLs are saved in a circular buffer, and can be accessed at
the prompt by pressing the <em>up-arrow</em> or
<em>down-arrow</em> keys.
+ <dt><em>G</em>
+ <dd>The '<em>G</em>' command allows you to edit the URL of the
+ current document and then use that as a goto URL. Pressing
+ the '<em>G</em>' command will bring up a prompt asking you
+ to edit the current document's URL. If you do not modify
+ it, or completely delete it, or enter Control-G, the command
+ will be cancelled. If the current document has POST content
+ associated with it, an Alert will be issued. If you do edit
+ that URL, and it does not simply involve a fragment change
+ (for seeking a position in the current document), the modified
+ URL will be submitted with method GET and no POST content. If
+ a modification of the current document's URL results in a
+ submission, that modified URL will be entered into the circular
+ buffer for goto URLs, and can be accessed for further
+ modification via the '<em>g</em>' command.
+
<dt><em>=</em>
<dd>The '<em>=</em>' command shows information about the current
document and the currently selected link if there is one. The
diff --git a/lynx_help/keystroke_commands/keystroke_help.html b/lynx_help/keystroke_commands/keystroke_help.html
index a94d1c96..8e04b767 100644
--- a/lynx_help/keystroke_commands/keystroke_help.html
+++ b/lynx_help/keystroke_commands/keystroke_help.html
@@ -45,6 +45,8 @@
e - Edit the current file
g - Goto a user specified <a
href="../lynx_url_support.html">URL</a> or file
+ G - Edit the current document's URL and use that
+ as a goto URL.
i - Show an index of documents
j - Execute a jump operation
k - Show a list of key mappings
diff --git a/lynx_help/keystroke_commands/other_help.html b/lynx_help/keystroke_commands/other_help.html
index 9891650a..ab18bffb 100644
--- a/lynx_help/keystroke_commands/other_help.html
+++ b/lynx_help/keystroke_commands/other_help.html
@@ -22,7 +22,10 @@
button to download the reply to a form submission.
g - Allows you to enter any <a href="http://www.ncsa.uiuc.edu/demoweb/url-primer.html">URL</a> or filename that
- you wish to view.
+ you wish to view, and then <em>goto</em> it.
+
+ G - Allows you to edit the current document's URL and use that
+ as a <em>goto</em> URL.
? or H - Hypertext help to explain how to navigate in
Lynx and use its features.
diff --git a/samples/lynx.cfg b/samples/lynx.cfg
index 90b4cff6..ffb31ee9 100644
--- a/samples/lynx.cfg
+++ b/samples/lynx.cfg
@@ -515,10 +515,11 @@ CHARACTER_SET:ISO Latin 1
#NEWS_POSTING:TRUE
# LYNX_SIG_FILE defines the name of a file containing a signature which
-# can be appended to news postings or followups. The user will be prompted
-# whether to append it. It is sought in the home directory. If it is in
-# a subdirectory, begin it with a dot-slash (e.g., ./lynx/.lynxsig). The
-# definition is set in userdefs.h and can be changed here.
+# can be appended to email messages and news postings or followups. The
+# user will be prompted whether to append it. It is sought in the home
+# directory. If it is in a subdirectory, begin it with a dot-slash
+# (e.g., ./lynx/.lynxsig). The definition is set in userdefs.h and can
+# be changed here.
#
#LYNX_SIG_FILE:.lynxsig
@@ -1209,6 +1210,7 @@ MINIMAL_COMMENTS:TRUE
#KEYMAP:0x102:ACTIVATE # Select the current link
#KEYMAP:0x109:ACTIVATE # Function key Do - Select the current link
#KEYMAP:g:GOTO # Goto a random URL
+#KEYMAP:G:ECGOTO # Edit the current document's URL and go to it
#KEYMAP:H:HELP # Show default help screen
#KEYMAP:0x108:HELP # Function key Help - Show default help screen
#KEYMAP:i:INDEX # Show default index
diff --git a/src/HTML.c b/src/HTML.c
index dcdb5fbe..9ecfb095 100644
--- a/src/HTML.c
+++ b/src/HTML.c
@@ -498,7 +498,13 @@ PRIVATE void HTML_start_element ARGS5(
StrAllocCopy(base, (char *)value[HTML_BASE_HREF]);
if (!(url_type = LYLegitimizeHREF(me, (char**)&base, TRUE))) {
- HTAlert(BASE_NOT_ABSOLUTE);
+ if (TRACE)
+ fprintf(stderr,
+ "HTML: BASE '%s' is not an absolute URL.\n",
+ (base ? base : ""));
+ if (me->inBadBASE == FALSE)
+ HTAlert(BASE_NOT_ABSOLUTE);
+ me->inBadBASE = TRUE;
}
/*
@@ -5647,6 +5653,7 @@ PUBLIC HTStructured* HTML_new ARGS3(
me->inA = FALSE;
me->inAPPLET = FALSE;
me->inAPPLETwithP = FALSE;
+ me->inBadBASE = FALSE;
me->inBadHTML = FALSE;
me->inBASE = FALSE;
me->inBoldA = FALSE;
diff --git a/src/HTML.h b/src/HTML.h
index 23d89e17..c4bd3caf 100644
--- a/src/HTML.h
+++ b/src/HTML.h
@@ -113,6 +113,7 @@ struct _HTStructured {
BOOL inA;
BOOL inAPPLET;
BOOL inAPPLETwithP;
+ BOOL inBadBASE;
BOOL inBadHTML;
BOOL inBASE;
BOOL inBoldA;
diff --git a/src/LYKeymap.c b/src/LYKeymap.c
index 62382e44..af1e19de 100644
--- a/src/LYKeymap.c
+++ b/src/LYKeymap.c
@@ -89,7 +89,7 @@ LYK_DIRED_MENU,
#endif /* DIRED_SUPPORT || VMS */
/* F */
-LYK_GOTO,
+LYK_ECGOTO,
/* G */
LYK_HELP, LYK_INDEX, LYK_JUMP, LYK_KEYMAP,
@@ -420,6 +420,7 @@ PRIVATE struct rmap revmap[] = {
{ "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" },
+{ "ECGOTO", "edit the current document's URL and go to it" },
{ "HELP", "display help on using the browser" },
{ "INDEX", "display an index of potentially useful documents" },
{ "NOCACHE", "force submission of form or link with no-cache" },
diff --git a/src/LYKeymap.h b/src/LYKeymap.h
index 1ed08cf2..a06b7942 100644
--- a/src/LYKeymap.h
+++ b/src/LYKeymap.h
@@ -55,57 +55,58 @@ extern char override[];
#define LYK_PREV_DOC 31
#define LYK_ACTIVATE 32
#define LYK_GOTO 33
-#define LYK_HELP 34
-#define LYK_INDEX 35
-#define LYK_NOCACHE 36
-#define LYK_INTERRUPT 37
-#define LYK_MAIN_MENU 38
-#define LYK_OPTIONS 39
-#define LYK_INDEX_SEARCH 40
-#define LYK_WHEREIS 41
-#define LYK_NEXT 42
-#define LYK_COMMENT 43
-#define LYK_EDIT 44
-#define LYK_INFO 45
-#define LYK_PRINT 46
-#define LYK_ADD_BOOKMARK 47
-#define LYK_DEL_BOOKMARK 48
-#define LYK_VIEW_BOOKMARK 49
-#define LYK_VLINKS 50
-#define LYK_SHELL 51
-#define LYK_DOWNLOAD 52
-#define LYK_TRACE_TOGGLE 53
-#define LYK_IMAGE_TOGGLE 54
-#define LYK_INLINE_TOGGLE 55
-#define LYK_HEAD 56
-#define LYK_DO_NOTHING 57
-#define LYK_TOGGLE_HELP 58
-#define LYK_JUMP 59
-#define LYK_KEYMAP 60
-#define LYK_LIST 61
-#define LYK_TOOLBAR 62
-#define LYK_HISTORICAL 63
-#define LYK_MINIMAL 64
-#define LYK_SOFT_DQUOTES 65
-#define LYK_RAW_TOGGLE 66
-#define LYK_COOKIE_JAR 67
+#define LYK_ECGOTO 34
+#define LYK_HELP 35
+#define LYK_INDEX 36
+#define LYK_NOCACHE 37
+#define LYK_INTERRUPT 38
+#define LYK_MAIN_MENU 39
+#define LYK_OPTIONS 40
+#define LYK_INDEX_SEARCH 41
+#define LYK_WHEREIS 42
+#define LYK_NEXT 43
+#define LYK_COMMENT 44
+#define LYK_EDIT 45
+#define LYK_INFO 46
+#define LYK_PRINT 47
+#define LYK_ADD_BOOKMARK 48
+#define LYK_DEL_BOOKMARK 49
+#define LYK_VIEW_BOOKMARK 50
+#define LYK_VLINKS 51
+#define LYK_SHELL 52
+#define LYK_DOWNLOAD 53
+#define LYK_TRACE_TOGGLE 54
+#define LYK_IMAGE_TOGGLE 55
+#define LYK_INLINE_TOGGLE 56
+#define LYK_HEAD 57
+#define LYK_DO_NOTHING 58
+#define LYK_TOGGLE_HELP 59
+#define LYK_JUMP 60
+#define LYK_KEYMAP 61
+#define LYK_LIST 62
+#define LYK_TOOLBAR 63
+#define LYK_HISTORICAL 64
+#define LYK_MINIMAL 65
+#define LYK_SOFT_DQUOTES 66
+#define LYK_RAW_TOGGLE 67
+#define LYK_COOKIE_JAR 68
#ifdef VMS
-#define LYK_DIRED_MENU 68
+#define LYK_DIRED_MENU 69
#endif /* VMS */
#ifdef DIRED_SUPPORT
-#define LYK_DIRED_MENU 68
-#define LYK_CREATE 69
-#define LYK_REMOVE 70
-#define LYK_MODIFY 71
-#define LYK_TAG_LINK 72
-#define LYK_UPLOAD 73
-#define LYK_INSTALL 74
+#define LYK_DIRED_MENU 69
+#define LYK_CREATE 70
+#define LYK_REMOVE 71
+#define LYK_MODIFY 72
+#define LYK_TAG_LINK 73
+#define LYK_UPLOAD 74
+#define LYK_INSTALL 75
#endif /* DIRED_SUPPORT */
#ifdef NOT_USED
-#define LYK_VERSION 75
-#define LYK_FORM_UP 76
-#define LYK_FORM_DOWN 77
+#define LYK_VERSION 76
+#define LYK_FORM_UP 77
+#define LYK_FORM_DOWN 78
#endif /* NOT_USED */
#endif /* LYKEYMAP_H */
diff --git a/src/LYMail.c b/src/LYMail.c
index a0855064..0a2cc1c6 100644
--- a/src/LYMail.c
+++ b/src/LYMail.c
@@ -308,7 +308,7 @@ PUBLIC void mailform ARGS4(
PUBLIC void mailmsg ARGS4(int,cur, char *,owner_address,
char *,filename, char *,linkname)
{
- FILE *fd;
+ FILE *fd, *fp;
char *address = NULL;
char cmd[512], *cp, *cp0, *cp1;
int i;
@@ -349,7 +349,7 @@ PUBLIC void mailmsg ARGS4(int,cur, char *,owner_address,
#ifdef UNIX
#ifdef MMDF
- sprintf(cmd, "%s -mlruxto,cc\\*",system_mail);
+ sprintf(cmd, "%s -mlruxto,cc\\*", system_mail);
#else
sprintf(cmd, "%s -t -oi", system_mail);
#endif /* MMDF */
@@ -362,27 +362,32 @@ PUBLIC void mailmsg ARGS4(int,cur, char *,owner_address,
fprintf(fd,"To: %s\n", address);
fprintf(fd,"Subject: Lynx Error in %s\n", filename);
fprintf(fd,"X-URL: %s\n", filename);
- fprintf(fd,"X-Mailer: Lynx, Version %s\n\n",LYNX_VERSION);
+ fprintf(fd,"X-Mailer: Lynx, Version %s\n\n", LYNX_VERSION);
#endif /* UNIX */
#ifdef VMS
- sprintf(tmpfile,"%s%s",lynx_temp_space, "temp_mail.txt");
+ sprintf(tmpfile, "%s%s", lynx_temp_space, "temp_mail.txt");
if ((fd = fopen(tmpfile,"w")) == NULL) {
FREE(address);
return;
}
-
#endif /* VMS */
fprintf(fd, "The link %s :?: %s \n",
links[cur].lname, links[cur].target);
- fprintf(fd, "called \"%s\"\n",links[cur].hightext);
+ fprintf(fd, "called \"%s\"\n", links[cur].hightext);
fprintf(fd, "in the file \"%s\" called \"%s\"", filename, linkname);
fputs("\nwas requested but was not available.",fd);
fputs("\n\nThought you might want to know.",fd);
- fputs("\n\nThis message was automatically generated by\n",fd);
- fprintf(fd,"Lynx ver. %s",LYNX_VERSION);
+ fputs("\n\nThis message was automatically generated by\n", fd);
+ fprintf(fd, "Lynx ver. %s", LYNX_VERSION);
+ if ((LynxSigFile != NULL) &&
+ (fp = fopen(LynxSigFile, "r")) != NULL) {
+ while (fgets(cmd, sizeof(cmd), fp) != NULL)
+ fputs(cmd, fd);
+ fclose(fp);
+ }
#ifdef UNIX
pclose(fd);
#endif /* UNIX */
@@ -451,7 +456,7 @@ PUBLIC void reply_by_mail ARGS3(
char *, title)
{
char user_input[1000];
- FILE *fd;
+ FILE *fd, *fp;
char *address = NULL;
char *searchpart = NULL;
char *body = NULL;
@@ -468,7 +473,6 @@ PUBLIC void reply_by_mail ARGS3(
#else
char buf[512];
char *header = NULL;
- FILE *fp;
int n;
#endif /* VMS */
@@ -1031,12 +1035,30 @@ PUBLIC void reply_by_mail ARGS3(
while (TOUPPER(c) != 'Y' && TOUPPER(c) != 'N' &&
!term_letter && c != 7 && c != 3)
c = LYgetch();
-
- clear(); /* Clear the screen. */
-
if (TOUPPER(c) != 'Y') {
+ clear(); /* clear the screen */
goto cleanup;
}
+ if ((body == NULL && LynxSigFile != NULL) &&
+ (fp = fopen(LynxSigFile, "r")) != NULL) {
+ LYStatusLine = (LYlines - 1);
+ _user_message(APPEND_SIG_FILE, LynxSigFile);
+ c = 0;
+ LYStatusLine = -1;
+ while (TOUPPER(c) != 'Y' && TOUPPER(c) != 'N' &&
+ !term_letter && c != 7 && c != 3)
+ c = LYgetch();
+ if (TOUPPER(c) == 'Y') {
+ if ((fd = fopen(tmpfile, "a")) != NULL) {
+ while (fgets(user_input, sizeof(user_input), fp) != NULL) {
+ fputs(user_input, fd);
+ }
+ fclose(fd);
+ }
+ }
+ fclose(fp);
+ }
+ clear(); /* Clear the screen. */
/*
* Send the message.
diff --git a/src/LYMain.c b/src/LYMain.c
index 22d299a7..f621bf00 100644
--- a/src/LYMain.c
+++ b/src/LYMain.c
@@ -2047,7 +2047,7 @@ Output_Help_List:
printf(" with the PREV_DOC command or from the History List\n");
printf(" -rlogin disable rlogins\n");
printf(" -selective require .www_browsable files to browse directories\n");
- printf(" -show_cursor toggles hiding of the curser in the lower right corner\n");
+ printf(" -show_cursor toggles hiding of the cursor in the lower right corner\n");
printf(" -soft_dquotes toggles emulation of the old Netscape and Mosaic bug which\n");
printf(" treated '>' as a co-terminator for double-quotes and tags\n");
printf(" -source dump the source of the first file to stdout and exit\n");
diff --git a/src/LYMainLoop.c b/src/LYMainLoop.c
index da7c818f..72e0d96c 100644
--- a/src/LYMainLoop.c
+++ b/src/LYMainLoop.c
@@ -2146,6 +2146,69 @@ new_cmd: /*
}
break;
+ case LYK_ECGOTO: /* edit current URL and go to to it */
+ if (no_goto && !LYValidate) {
+ if (old_c != real_c) {
+ old_c = real_c;
+ _statusline(GOTO_DISALLOWED);
+ sleep(MessageSecs);
+ }
+ break;
+ }
+
+ /*
+ * Save the current user_input_buffer string,
+ * and load the current document's address.
+ */
+ StrAllocCopy(temp, user_input_buffer);
+ LYstrncpy(user_input_buffer,
+ curdoc.address,
+ (sizeof(user_input_buffer) - 1));
+
+ /*
+ * Warn the user if the current document has POST
+ * data associated with it. - FM
+ */
+ if (curdoc.post_data)
+ HTAlert(CURRENT_DOC_HAS_POST_DATA);
+
+ /*
+ * Offer the current document's URL for editing. - FM
+ */
+ _statusline(EDIT_CURDOC_URL);
+ if (((ch = LYgetstr(user_input_buffer, VISIBLE,
+ sizeof(user_input_buffer), RECALL)) >= 0) &&
+ user_input_buffer[0] != '\0' &&
+ strcmp(user_input_buffer, curdoc.address)) {
+ LYTrimHead(user_input_buffer);
+ if (!strncasecomp(user_input_buffer, "lynxexec:", 9) ||
+ !strncasecomp(user_input_buffer, "lynxprog:", 9)) {
+ /*
+ * The original implementations 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] != '\0') {
+ goto check_goto_URL;
+ }
+ }
+ /*
+ * User cancelled via ^G, a full deletion,
+ * or not modifying the URL. - FM
+ */
+ _statusline(CANCELLED);
+ sleep(InfoSecs);
+ strcpy(user_input_buffer, temp);
+ FREE(temp);
+ break;
+
case LYK_GOTO: /* 'g' to goto a random URL */
if (no_goto && !LYValidate) {
if (old_c != real_c) {
@@ -2307,6 +2370,7 @@ check_recall:
}
}
+check_goto_URL:
/*
* If its not a URL then make it one.
*/
diff --git a/userdefs.h b/userdefs.h
index 11ca6bdc..5dd9570a 100644
--- a/userdefs.h
+++ b/userdefs.h
@@ -654,10 +654,10 @@
/*************************
* Define LYNX_SIG_FILE to the name of a file containing a signature which
- * can be appended to news postings or followups. The user will be prompted
- * whether to append it. It is sought in the home directory. If it is in
- * a subdirectory, begin it with a dot-slash (e.g., ./lynx/.lynxsig). The
- * definition here can be changed in lynx.cfg.
+ * can be appended to email messages and news postings or followups. The
+ * user will be prompted whether to append it. It is sought in the home
+ * directory. If it is in a subdirectory, begin it with a dot-slash
+ * (e.g., ./lynx/.lynxsig). The definition here can be changed in lynx.cfg.
*/
#define LYNX_SIG_FILE ".lynxsig"