aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>1998-10-17 21:26:25 -0400
committerThomas E. Dickey <dickey@invisible-island.net>1998-10-17 21:26:25 -0400
commit227916a0760fb81d8dd539790a76bf76eceb8e4e (patch)
tree897052dba6f5691874e9beaa49c96760fe834476
parent64c4d93e6c1d2751c8517e10192e585db0cbce82 (diff)
downloadlynx-snapshots-227916a0760fb81d8dd539790a76bf76eceb8e4e.tar.gz
snapshot of project "lynx", label v2-8-1pre_11
-rw-r--r--CHANGES22
-rw-r--r--INSTALLATION9
-rw-r--r--WWW/Library/Implementation/HTTCP.c18
-rw-r--r--lynx.cfg6
-rw-r--r--lynx_help/keystrokes/cookie_help.html13
-rw-r--r--lynx_help/keystrokes/option_help.html31
-rw-r--r--src/HTML.c2
-rw-r--r--src/LYCookie.c45
-rw-r--r--src/LYExtern.c7
-rw-r--r--src/LYMap.c2
-rw-r--r--src/LYOptions.c40
-rw-r--r--src/LYReadCFG.c13
-rw-r--r--src/LYShowInfo.c2
-rw-r--r--src/LYrcFile.c4
-rw-r--r--src/chrtrans/makeuctb.c46
-rw-r--r--src/makefile.in1
-rw-r--r--userdefs.h10
17 files changed, 169 insertions, 102 deletions
diff --git a/CHANGES b/CHANGES
index 6cbb7e1c..5c652221 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,8 +1,28 @@
Changes since Lynx 2.8 release
================================================================================
+1998-10-17 (2.8.1pre.11)
+* add dependency on cfg_defs.h to src/makefile.in for LYShowInfo.o
+ (pg@sweng.stortek.com)
+* modify add_item_to_list() so that if the restriction flag is omitted from
+ a download/upload/extern line in lynx.cfg, it is assumed true. Also check
+ for null command string in LYExtern.c (bug report by HN) - TD
+* modify logic in forms-options menu so that assume_char_set now works
+ correctly for any LYRawMode value by synchronizing gen_options() and
+ postoptions() via rawmode memory - LP
+* correct ifdef'ing in LYShowInfo.c for non-Unix platforms - LP
+* modify waitpid logic in nsl-fork support to handle a case where the child
+ process exits without reporting anything (reported by Serge Munhoven) - BL
+* small updates to lynx_help files and other documentation (BJP, PW, LV).
+* add #define's for later work to simplify configuring the maximum number
+ of cookies (suggested by BJP) - TD
+* flush output in makeuctb, to fix build problems on systems that do not
+ implement POSIX 'exit()' call -- including Digital Unix 4.0 (reported by
+ Serge Munhoven <munhoven@mema.ucl.ac.be>) - TD
+* put GOTOBUFFER, JUMPBUFFER and QUIT_DEFAULT_YES back the way they used to be
+ (majority decision) - TD
1998-10-14 (2.8.1pre.10)
-+ add/use HTSYS_purge and HTSYS_remove functions (based on report by Tony
+* add/use HTSYS_purge and HTSYS_remove functions (based on report by Tony
Bolton and patch by BJP dealing with removing older versions of cookie files)
- TD
* add --disable-config-info option - TD
diff --git a/INSTALLATION b/INSTALLATION
index 608cd5ba..7a10328e 100644
--- a/INSTALLATION
+++ b/INSTALLATION
@@ -223,7 +223,7 @@ II. Compile instructions -- UNIX
(2.7.1/2.7.2) behavior, but is not well-tested.
--disable-forms-options (define NO_OPTION_FORMS)
- Disable the forms-based options screen. (See --disable-menu-options).
+ Disable the forms-based options screen. (See --disable-menu-options).
Please note that a few users with broken curses may have problems with
popup forms fields. The default behaviour is to compile both forms and
menu options code with FORMS_OPTIONS switch in lynx.cfg, or
@@ -237,7 +237,7 @@ II. Compile instructions -- UNIX
Use this option to disable long "ls -l" directory listings.
--disable-menu-options (define NO_OPTION_MENU)
- Disable the menu-style options screen. (See --disable-forms-options).
+ Disable the menu-style options screen. (See --disable-forms-options).
Please note that a few users with broken curses may have problems with
popup forms fields. The default behaviour is to compile both styles
options menu code with FORMS_OPTIONS switch in lynx.cfg, or
@@ -294,8 +294,9 @@ II. Compile instructions -- UNIX
--enable-persistent-cookies (define EXP_PERSISTENT_COOKIES)
Use this option to compile-in support for saving cookies to a file,
- for subsequent reuse. This creates a file named 'cookies' in the
- current directory. (Currently there is no protection against conflict
+ for subsequent reuse. This creates the file specified by the
+ 'COOKIE_FILE' option, or defaults to ".lynx_cookies" in the home
+ directory. (Currently there is no protection against conflict
if several lynx copies active from the same account).
--enable-syslog (define SYSLOG_REQUESTED_URLS)
diff --git a/WWW/Library/Implementation/HTTCP.c b/WWW/Library/Implementation/HTTCP.c
index f83334c7..e94f4f2f 100644
--- a/WWW/Library/Implementation/HTTCP.c
+++ b/WWW/Library/Implementation/HTTCP.c
@@ -453,6 +453,9 @@ PUBLIC int HTParseInet ARGS2(
fd_set readfds;
struct timeval timeout;
int dns_patience = 30; /* how many seconds will we wait for DNS? */
+#ifdef WNOWAIT
+ int child_exited = 0;
+#endif
/*
** Reap any children that have terminated since last time
@@ -574,11 +577,26 @@ PUBLIC int HTParseInet ARGS2(
break;
}
+#ifdef WNOWAIT
+ /*
+ ** Clean up if child exited before & no data received. -BL
+ */
+ if (child_exited) {
+ waitret = waitpid(fpid, &cst1, WNOHANG);
+ break;
+ }
+ /*
+ ** If child exited, loop once more looking for data. -BL
+ */
+ if ((waitret = waitpid(fpid, &cst1, WNOHANG | WNOWAIT)) > 0)
+ child_exited = 1;
+#else
/*
** End loop if child exited.
*/
if ((waitret = waitpid(fpid, &cst1, WNOHANG)) > 0)
break;
+#endif
/*
** Abort if interrupt key pressed.
diff --git a/lynx.cfg b/lynx.cfg
index 5de81cb1..8bd2287c 100644
--- a/lynx.cfg
+++ b/lynx.cfg
@@ -69,7 +69,7 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html
# buffer of previously entered goto URLs can still be invoked via the
# Up-Arrow or Down-Arrow keys after entering the 'g'oto command.
#
-#GOTOBUFFER:TRUE
+#GOTOBUFFER:FALSE
# JUMP_PROMPT is the default statusline prompt for jumps files (see below).
# You can change the prompt here from that defined in userdefs.h. Any
@@ -118,7 +118,7 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html
# ':' can be used as a target to invoke the goto URL buffer (as if 'g'oto
# followed by Up-Arrow had been entered).
#
-#JUMPBUFFER:TRUE
+#JUMPBUFFER:FALSE
# If SAVE_SPACE is defined, it will be used as a path prefix for the
# suggested filename in "Save to Disk" operations from the 'p'rint or
@@ -1206,7 +1206,7 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html
# prefer the more conservative action of requiring an explicit Y or y to
# confirm. The default defined here will override that in userdefs.h.
#
-#QUIT_DEFAULT_YES:FALSE
+#QUIT_DEFAULT_YES:TRUE
# If HISTORICAL_COMMENTS is TRUE, Lynx will revert to the "Historical"
# behavior of treating any '>' as a terminator for comments, instead of
diff --git a/lynx_help/keystrokes/cookie_help.html b/lynx_help/keystrokes/cookie_help.html
index 6a22b394..081bb3e5 100644
--- a/lynx_help/keystrokes/cookie_help.html
+++ b/lynx_help/keystrokes/cookie_help.html
@@ -29,13 +29,10 @@ for the request which caused the cookie to be sent, and whether the
<em>secure</em> flag is set for the cookie, in which case it will be
sent only via secure connections (presently, only SSL). The
<em>Maximum Gobble Date</em>, i.e., when the cookie is intended to
-expire, also is indicated. Note, however, that Lynx presently gobbles
-all of it's accumulated cookies on exit from the current session, even
-if the server indicated an expiration in the distant future. Also, a
-server may change the expiration date, or cause the cookie to be deleted,
-in its replies to subsequent requests from Lynx. If the server included
-any explanatory comments in its <em>Set-Cookie</em> MIME headers, those
-also are displayed in the listing.
+expire, also is indicated. Also, a server may change the expiration date,
+or cause the cookie to be deleted, in its replies to subsequent requests
+from Lynx. If the server included any explanatory comments in its
+<em>Set-Cookie</em> MIME headers, those also are displayed in the listing.
<p>The <em>domain</em>=value pairs, and each cookie's name=value, are
links in the listing. Activating a <em>domain</em>=value link will
@@ -44,7 +41,7 @@ should be <em>Gobbled</em> (deleted from the <em>Cookie Jar</em>),
and/or whether the <em>domain</em> entry should be <em>Gobbled</em>
if all of its cookies have been <em>Gobbled</em>, or whether to change
the 'allow' setting for that <em>domain</em>. Activating a cookie's
-name=value link will cause that particular cookie to be <em>Gobbled</em>.
+name=value link will cause that particular cookie to be <em>Gobbled</em>.
You will be prompted for confirmations of deletions, to avoid any
accidental <em>Gobbling</em>.
</BODY>
diff --git a/lynx_help/keystrokes/option_help.html b/lynx_help/keystrokes/option_help.html
index 63862ca2..c2efc919 100644
--- a/lynx_help/keystrokes/option_help.html
+++ b/lynx_help/keystrokes/option_help.html
@@ -14,9 +14,10 @@ compiled in or chosen in `lynx.cfg':<P>
<UL>
<LI>Personal Preferences
<UL>
-<LI>-- Cookies : no help given --
+<LI><A HREF="#CK">Cookies</A>
<LI><A HREF="#ED">Editor</A>
<LI><A HREF="#EM">Emacs keys</A>
+<LI><A HREF="#LL">Execution links</A>
<LI><A HREF="#KM">Keypad mode</A>
<LI><A HREF="#PM">Personal Mail Address</A>
<LI><A HREF="#PU">Pop-ups for select fields</A>
@@ -40,20 +41,22 @@ compiled in or chosen in `lynx.cfg':<P>
<UL>
<LI><A HREF="#FT">FTP sort criteria</A>
<LI><A HREF="#LD">Local directory sort criteria</A>
-<LI><A HREF="#DF">Show dot files</A>
-</UL>
+<LI><A HREF="#DF">Show dot files</A></UL>
<LI>Headers transferred to remote server
<UL>
<LI><A HREF="#PC">Preferred Document Charset</A>
<LI><A HREF="#PL">Preferred Document Language</A>
-<LI><A HREF="#UA">User Agent</A>
-</UL>
-<LI>-- not in Options Form --
+<LI><A HREF="#UA">User Agent</A></UL>
+<LI> -- not in Options Form --
<UL>
-<LI><A HREF="#LE">Line edit style</A>
-<LI><A HREF="#LL">Local execution links</A></UL>
+<LI><A HREF="#LE">Line edit style</A></UL>
</UL>
+<H1><A NAME="CK">Cookies</A></H1>
+
+This can be set to accept or reject all cookies or to ask each time.
+See the Users Guide (under `h'elp) for details of cookie usage.
+
<H1><A NAME="ED">Editor</A></H1>
If non-empty, it defines the editor to spawn when editing a local file
@@ -66,6 +69,12 @@ to up-arrow, down-arrow, right-arrow and left-arrow respectively. Otherwise,
they remain mapped to their configured bindings (normally UP_TWO lines,
DOWN_TWO lines, NEXT_PAGE and PREV_PAGE respectively).
+<H1><A NAME="LL">Execution links</A></H1>
+
+If set to 'ALWAYS ON', Lynx will locally execute commands contained
+inside any links. This can be HIGHLY DANGEROUS, so it is recommended
+that they remain 'ALWAYS OFF' or 'FOR LOCAL FILES ONLY'.
+
<H1><A NAME="KM">Keypad mode</A></H1>
This gives the choice between navigating with the keypad (as arrows;
@@ -304,12 +313,6 @@ This allows you to set alternate key bindings for the built-in line editor,
if your system administrator has installed alternates.
Otherwise, Lynx uses the <A HREF="edit_help.html">Default Binding</A>.
-<H1><A NAME="LL">Local execution links</A></H1>
-
-If set to 'ALWAYS ON', Lynx will locally execute commands contained
-inside any links. This can be HIGHLY DANGEROUS, so it is recommended
-that they remain 'ALWAYS OFF' or 'FOR LOCAL FILES ONLY'.
-
</BODY>
</HTML>
diff --git a/src/HTML.c b/src/HTML.c
index 881e1a67..dd1c9020 100644
--- a/src/HTML.c
+++ b/src/HTML.c
@@ -4458,7 +4458,7 @@ PRIVATE void HTML_start_element ARGS6(
if (I.type && !strcasecomp(I.type, "hidden")) {
me->HiddenValue = TRUE;
- current_char_set = 0; /* Default ISO-Latin1 */
+ current_char_set = LATIN1; /* Default ISO-Latin1 */
LYUseDefaultRawMode = TRUE;
HTMLSetCharacterHandling(current_char_set);
}
diff --git a/src/LYCookie.c b/src/LYCookie.c
index 2e0b40a2..d3e26c25 100644
--- a/src/LYCookie.c
+++ b/src/LYCookie.c
@@ -60,6 +60,10 @@
#include <LYLeaks.h>
+#define max_cookies_domain 50
+#define max_cookies_global 500
+#define max_cookies_buffer 4096
+
/*
** The first level of the cookie list is a list indexed by the domain
** string; cookies with the same domain will be placed in the same
@@ -474,7 +478,7 @@ PRIVATE void store_cookie ARGS3(
/*
* Don't add the cookie if we're over the domain's limit. - FM
*/
- } else if (HTList_count(cookie_list) > 50) {
+ } else if (HTList_count(cookie_list) > max_cookies_domain) {
CTRACE(tfp, "store_cookie: Domain's cookie limit exceeded! Rejecting cookie.\n");
freeCookie(co);
co = NULL;
@@ -482,7 +486,7 @@ PRIVATE void store_cookie ARGS3(
/*
* Don't add the cookie if we're over the total cookie limit. - FM
*/
- } else if (total_cookies > 500) {
+ } else if (total_cookies > max_cookies_global) {
CTRACE(tfp, "store_cookie: Total cookie limit exceeded! Rejecting cookie.\n");
freeCookie(co);
co = NULL;
@@ -749,7 +753,7 @@ PRIVATE void LYProcessSetCookies ARGS6(
if (SetCookie && *p) {
CTRACE(tfp, "LYProcessSetCookies: Using Set-Cookie2 header.\n");
}
- while (NumCookies <= 50 && *p) {
+ while (NumCookies <= max_cookies_domain && *p) {
attr_start = attr_end = value_start = value_end = NULL;
p = LYSkipCBlanks(p);
/*
@@ -926,8 +930,8 @@ PRIVATE void LYProcessSetCookies ARGS6(
if (value_end > value_start) {
int value_len = (value_end - value_start);
- if (value_len > 4096) {
- value_len = 4096;
+ if (value_len > max_cookies_buffer) {
+ value_len = max_cookies_buffer;
}
value = (char *)calloc(1, value_len + 1);
if (value == NULL)
@@ -1152,7 +1156,7 @@ PRIVATE void LYProcessSetCookies ARGS6(
* If we've started a cookie, and it's not too big,
* save it in the CombinedCookies list. - FM
*/
- if (length <= 4096 && cur_cookie != NULL) {
+ if (length <= max_cookies_buffer && cur_cookie != NULL) {
/*
* Assume version 1 if not set to that or higher. - FM
*/
@@ -1198,7 +1202,9 @@ PRIVATE void LYProcessSetCookies ARGS6(
* Add any final SetCookie2 cookie to the CombinedCookie list
* if we are within the length limit. - FM
*/
- if (NumCookies <= 50 && length <= 4096 && cur_cookie != NULL) {
+ if (NumCookies <= max_cookies_domain
+ && length <= max_cookies_buffer
+ && cur_cookie != NULL) {
if (cur_cookie->version < 1) {
cur_cookie->version = 1;
}
@@ -1208,9 +1214,12 @@ PRIVATE void LYProcessSetCookies ARGS6(
(cur_cookie->name ? cur_cookie->name : "[no name]"),
(cur_cookie->value ? cur_cookie->value : "[no value]"));
CTRACE(tfp, " due to excessive %s%s%s\n",
- (length > 4096 ? "length" : ""),
- (length > 4096 && NumCookies > 50 ? " and " : ""),
- (NumCookies > 50 ? "number!\n" : "!\n"));
+ (length > max_cookies_buffer ? "length" : ""),
+ (length > max_cookies_buffer &&
+ NumCookies > max_cookies_domain
+ ? " and "
+ : ""),
+ (NumCookies > max_cookies_domain ? "number!\n" : "!\n"));
freeCookie(cur_cookie);
cur_cookie = NULL;
}
@@ -1226,7 +1235,7 @@ PRIVATE void LYProcessSetCookies ARGS6(
if (SetCookie2 && *p) {
CTRACE(tfp, "LYProcessSetCookies: Using Set-Cookie header.\n");
}
- while (NumCookies <= 50 && *p) {
+ while (NumCookies <= max_cookies_domain && *p) {
attr_start = attr_end = value_start = value_end = NULL;
p = LYSkipCBlanks(p);
/*
@@ -1400,8 +1409,8 @@ PRIVATE void LYProcessSetCookies ARGS6(
if (value_end > value_start) {
int value_len = (value_end - value_start);
- if (value_len > 4096) {
- value_len = 4096;
+ if (value_len > max_cookies_buffer) {
+ value_len = max_cookies_buffer;
}
value = (char *)calloc(1, value_len + 1);
if (value == NULL)
@@ -1613,7 +1622,7 @@ PRIVATE void LYProcessSetCookies ARGS6(
* If we've started a cookie, and it's not too big,
* save it in the CombinedCookies list. - FM
*/
- if (length <= 4096 && cur_cookie != NULL) {
+ if (length <= max_cookies_buffer && cur_cookie != NULL) {
/*
* If we had a Set-Cookie2 header, make sure
* the version is at least 1, and mark it for
@@ -1661,7 +1670,7 @@ PRIVATE void LYProcessSetCookies ARGS6(
/*
* Handle the final Set-Cookie cookie if within length limit. - FM
*/
- if (NumCookies <= 50 && length <= 4096 && cur_cookie != NULL) {
+ if (NumCookies <= max_cookies_domain && length <= max_cookies_buffer && cur_cookie != NULL) {
if (SetCookie2 != NULL) {
if (cur_cookie->version < 1) {
cur_cookie->version = 1;
@@ -1674,9 +1683,9 @@ PRIVATE void LYProcessSetCookies ARGS6(
(cur_cookie->name ? cur_cookie->name : "[no name]"),
(cur_cookie->value ? cur_cookie->value : "[no value]"));
CTRACE(tfp, " due to excessive %s%s%s\n",
- (length > 4096 ? "length" : ""),
- (length > 4096 && NumCookies > 50 ? " and " : ""),
- (NumCookies > 50 ? "number!\n" : "!\n"));
+ (length > max_cookies_buffer ? "length" : ""),
+ (length > max_cookies_buffer && NumCookies > max_cookies_domain ? " and " : ""),
+ (NumCookies > max_cookies_domain ? "number!\n" : "!\n"));
freeCookie(cur_cookie);
cur_cookie = NULL;
}
diff --git a/src/LYExtern.c b/src/LYExtern.c
index 329fe103..652fb3e2 100644
--- a/src/LYExtern.c
+++ b/src/LYExtern.c
@@ -35,11 +35,8 @@ void run_external ARGS1(char *, c)
externals2=externals2->next)
{
-#ifdef _WINDOWS
- if (!strnicmp(externals2->name,c,strlen(externals2->name)))
-#else
- if (!strncasecomp(externals2->name,c,strlen(externals2->name)))
-#endif
+ if (externals2->command != 0
+ && !strncasecomp(externals2->name,c,strlen(externals2->name)))
{
char *cp;
diff --git a/src/LYMap.c b/src/LYMap.c
index 75527572..0d63a36e 100644
--- a/src/LYMap.c
+++ b/src/LYMap.c
@@ -168,6 +168,8 @@ PUBLIC BOOL LYAddImageMap ARGS3(
if (theList) {
cur = theList;
while (NULL != (old = (LYImageMap *)HTList_nextObject(cur))) {
+ if (old->address == 0) /* shouldn't happen */
+ continue;
if (!strcmp(old->address, address)) {
FREE(old->address);
FREE(old->title);
diff --git a/src/LYOptions.c b/src/LYOptions.c
index f86fad24..5ee3c02c 100644
--- a/src/LYOptions.c
+++ b/src/LYOptions.c
@@ -3422,8 +3422,8 @@ PUBLIC int postoptions ARGS1(
PostPair *data = 0;
int i;
BOOLEAN save_all = FALSE;
- BOOLEAN display_char_set_changed = FALSE;
- BOOLEAN raw_mode_changed = FALSE;
+ int display_char_set_old = current_char_set;
+ BOOLEAN raw_mode_old = LYRawMode;
BOOLEAN assume_char_set_changed = FALSE;
BOOLEAN need_reload = FALSE;
#if defined(USE_SLANG) || defined(COLOR_CURSES)
@@ -3599,7 +3599,11 @@ PUBLIC int postoptions ARGS1(
int newval;
newval = UCGetLYhndl_byMIME(data[i].value);
- if (newval != UCLYhndl_for_unspec) {
+ if ((raw_mode_old &&
+ newval != safeUCGetLYhndl_byMIME(UCAssume_MIMEcharset))
+ || (!raw_mode_old &&
+ newval != UCLYhndl_for_unspec)) {
+
UCLYhndl_for_unspec = newval;
StrAllocCopy(UCAssume_MIMEcharset, data[i].value);
assume_char_set_changed = TRUE;
@@ -3613,7 +3617,6 @@ PUBLIC int postoptions ARGS1(
newval = atoi(data[i].value);
if (newval != current_char_set) {
current_char_set = newval;
- display_char_set_changed = TRUE;
}
}
@@ -3623,7 +3626,6 @@ PUBLIC int postoptions ARGS1(
if (newmode != LYRawMode) {
LYRawMode = newmode;
- raw_mode_changed = TRUE;
}
}
@@ -3677,11 +3679,13 @@ PUBLIC int postoptions ARGS1(
/*
* Process the flags:
*/
- if ( display_char_set_changed || raw_mode_changed || assume_char_set_changed ) {
+ if ( display_char_set_old != current_char_set ||
+ raw_mode_old != LYRawMode ||
+ assume_char_set_changed ) {
/*
* charset settings: the order is essential here.
*/
- if (display_char_set_changed) {
+ if (display_char_set_old != current_char_set) {
/*
* Set the LYUseDefaultRawMode value and character
* handling if LYRawMode was changed. - FM
@@ -3692,7 +3696,7 @@ PUBLIC int postoptions ARGS1(
if (assume_char_set_changed) {
LYRawMode = (UCLYhndl_for_unspec == current_char_set);
}
- if (raw_mode_changed || assume_char_set_changed) {
+ if (raw_mode_old != LYRawMode || assume_char_set_changed) {
/*
* Set the raw 8-bit or CJK mode defaults and
* character set if changed. - FM
@@ -3990,20 +3994,18 @@ PUBLIC int gen_options ARGS1(
/* Assume Character Set: SELECT */
/* if (user_mode==ADVANCED_MODE) */
- {
+ {
int curval;
curval = UCLYhndl_for_unspec;
- /*
- * FIXME: If bogus value in lynx.cfg, then in old way, that is the
- * string that was displayed. Now, user will never see that. Good
- * or bad? I don't know. MRC
- */
- if (curval == current_char_set && UCAssume_MIMEcharset) {
- curval = UCGetLYhndl_byMIME(UCAssume_MIMEcharset);
- }
- if (curval < 0) {
- curval = LYRawMode ? current_char_set : 0;
+ /*
+ * FIXME: If bogus value in lynx.cfg, then in old way, that is the
+ * string that was displayed. Now, user will never see that. Good
+ * or bad? I don't know. MRC
+ */
+ if (curval == current_char_set) {
+ /* ok, LYRawMode, so use UCAssume_MIMEcharset */
+ curval = safeUCGetLYhndl_byMIME(UCAssume_MIMEcharset);
}
PutLabel(fp0, "Assumed document character set");
BeginSelect(fp0, assume_char_set_string);
diff --git a/src/LYReadCFG.c b/src/LYReadCFG.c
index 8b823e84..aef1c7af 100644
--- a/src/LYReadCFG.c
+++ b/src/LYReadCFG.c
@@ -167,15 +167,22 @@ PRIVATE void add_item_to_list ARGS2(
remove_backslashes(cur_item->name);
/*
- * Process TRUE/FALSE field
+ * Process TRUE/FALSE field. If we do not find one, assume it is
+ * true. In any case, we want the command string.
*/
- if ((next_colon = find_colon(colon+1)) != NULL) {
+ if ((next_colon = find_colon(colon+1)) == NULL) {
+ next_colon = colon + strlen(colon);
+ }
+ if (next_colon - (colon+1) > 0) {
cur_item->command = (char *)calloc(next_colon-colon, sizeof(char));
if (cur_item->command == NULL)
outofmem(__FILE__, "read_cfg");
LYstrncpy(cur_item->command, colon+1, (int)(next_colon-(colon+1)));
remove_backslashes(cur_item->command);
- cur_item->always_enabled = is_true(next_colon+1);
+ cur_item->always_enabled = TRUE;
+ }
+ if (*next_colon++) {
+ cur_item->always_enabled = is_true(next_colon);
}
}
}
diff --git a/src/LYShowInfo.c b/src/LYShowInfo.c
index f5439ed7..ec2002c9 100644
--- a/src/LYShowInfo.c
+++ b/src/LYShowInfo.c
@@ -23,7 +23,7 @@
#include <LYLocal.h>
#endif /* DIRED_SUPPORT */
-#ifndef NO_CONFIG_INFO
+#if defined(HAVE_CONFIG_H) && !defined(NO_CONFIG_INFO)
#define HAVE_CFG_DEFS_H
#define PutDefs(table, N) fprintf(fp0, "%-35s %s\n", table[N].name, table[N].value)
diff --git a/src/LYrcFile.c b/src/LYrcFile.c
index f2b4a2a7..1c63fff1 100644
--- a/src/LYrcFile.c
+++ b/src/LYrcFile.c
@@ -813,7 +813,7 @@ PUBLIC int save_rc NOPARAMS
# current link in documents, or current option in select popup windows.\n\
# Positioning the cursor to the left of the current link or option is\n\
# helpful for speech or braille interfaces, and when the terminal is\n\
-# one which does not distingish the current link based on highlighting\n\
+# one which does not distinguish the current link based on highlighting\n\
# or color. A value of \"on\" will set positioning to the left as the\n\
# default while a value of \"off\" will set 'hiding' of the cursor.\n\
# The default can be overridden via the -show_cursor command line toggle.\n");
@@ -961,7 +961,7 @@ PUBLIC int save_rc NOPARAMS
* Local execution mode - all links.
*/
fprintf(fp, "\
-# If run_all_execution_links is set \"on\" then all local exection links\n\
+# If run_all_execution_links is set \"on\" then all local execution links\n\
# will be executed when they are selected.\n\
#\n\
# WARNING - This is potentially VERY dangerous. Since you may view\n\
diff --git a/src/chrtrans/makeuctb.c b/src/chrtrans/makeuctb.c
index 4c191d77..ff66ad6c 100644
--- a/src/chrtrans/makeuctb.c
+++ b/src/chrtrans/makeuctb.c
@@ -40,6 +40,16 @@
*/
typedef u16 unicode;
+/*
+ * Since we're writing the formatted file to stdout, ensure that we flush
+ * everything before leaving, since some old (and a few not-so-old) platforms
+ * that do not implement POSIX 'exit()'.
+ */
+#define done(code) \
+ fflush(stdout); \
+ fflush(stderr); \
+ exit(code)
+
PRIVATE void usage ARGS1(
char *, argv0)
{
@@ -49,7 +59,7 @@ PRIVATE void usage ARGS1(
argv0);
fprintf(stderr,
"Utility to convert .tbl into .h files for Lynx compilation.\n");
- exit(EX_USAGE);
+ done(EX_USAGE);
}
/* copied from HTString.c, not everybody has strncasecmp */
@@ -122,7 +132,7 @@ PRIVATE void addpair_str ARGS2(
if (!themap_str.entries) {
fprintf(stderr,
"%s: Out of memory\n", tblname);
- exit(EX_DATAERR);
+ done(EX_DATAERR);
}
} else {
/*
@@ -142,7 +152,7 @@ PRIVATE void addpair_str ARGS2(
if (themap_str.entry_ct > 1999) {
fprintf(stderr,
"ERROR: Only 2000 unicode replacement strings permitted!\n");
- exit(EX_DATAERR);
+ done(EX_DATAERR);
}
themap_str.entries[themap_str.entry_ct].unicode = un;
themap_str.entries[themap_str.entry_ct].replace_str = str;
@@ -188,7 +198,7 @@ PRIVATE void addpair ARGS2(
*/
if (unicount[fp] > 254) {
fprintf(stderr, "ERROR: Only 255 unicodes/glyph permitted!\n");
- exit(EX_DATAERR);
+ done(EX_DATAERR);
}
unitable[fp][unicount[fp]] = un;
unicount[fp]++;
@@ -226,7 +236,7 @@ PUBLIC int main ARGS2(
ctbl = fopen(tblname = argv[1], "r");
if (!ctbl) {
perror(tblname);
- exit(EX_NOINPUT);
+ done(EX_NOINPUT);
}
}
@@ -376,11 +386,11 @@ PUBLIC int main ARGS2(
un0 = getunicode(&p);
if (un0 < 0) {
fprintf(stderr, "Bad input line: %s\n", buffer);
- exit(EX_DATAERR);
+ done(EX_DATAERR);
fprintf(stderr,
"%s: Bad Unicode range corresponding to font position range 0x%x-0x%x\n",
tblname, fp0, fp1);
- exit(EX_DATAERR);
+ done(EX_DATAERR);
}
un1 = un0;
while (*p == ' ' || *p == '\t') {
@@ -397,7 +407,7 @@ PUBLIC int main ARGS2(
"%s: Bad Unicode range U+%x-U+%x\n",
tblname, un0, un1);
fprintf(stderr, "Bad input line: %s\n", buffer);
- exit(EX_DATAERR);
+ done(EX_DATAERR);
}
while (*p == ' ' || *p == '\t') {
p++;
@@ -414,7 +424,7 @@ PUBLIC int main ARGS2(
if (!(p1 = tbuf)) {
fprintf(stderr, "%s: Out of memory\n", tblname);
- exit(EX_DATAERR);
+ done(EX_DATAERR);
}
if (*p == '"') {
/*
@@ -474,7 +484,7 @@ PUBLIC int main ARGS2(
fp0 = strtol(p, &p1, 0);
if (p1 == p) {
fprintf(stderr, "Bad input line: %s\n", buffer);
- exit(EX_DATAERR);
+ done(EX_DATAERR);
}
p = p1;
@@ -486,7 +496,7 @@ PUBLIC int main ARGS2(
fp1 = strtol(p, &p1, 0);
if (p1 == p) {
fprintf(stderr, "Bad input line: %s\n", buffer);
- exit(EX_DATAERR);
+ done(EX_DATAERR);
}
p = p1;
} else {
@@ -497,13 +507,13 @@ PUBLIC int main ARGS2(
fprintf(stderr,
"%s: Glyph number (0x%x) larger than font length\n",
tblname, fp0);
- exit(EX_DATAERR);
+ done(EX_DATAERR);
}
if (fp1 && (fp1 < fp0 || fp1 >= fontlen)) {
fprintf(stderr,
"%s: Bad end of range (0x%x)\n",
tblname, fp1);
- exit(EX_DATAERR);
+ done(EX_DATAERR);
}
if (fp1) {
@@ -530,7 +540,7 @@ PUBLIC int main ARGS2(
tblname);
fprintf(stderr,
" there should be a Unicode range.\n");
- exit(EX_DATAERR);
+ done(EX_DATAERR);
}
p++;
un1 = getunicode(&p);
@@ -538,7 +548,7 @@ PUBLIC int main ARGS2(
fprintf(stderr,
"%s: Bad Unicode range corresponding to font position range 0x%x-0x%x\n",
tblname, fp0, fp1);
- exit(EX_DATAERR);
+ done(EX_DATAERR);
}
if (un1 - un0 != fp1 - fp0) {
fprintf(stderr,
@@ -547,7 +557,7 @@ PUBLIC int main ARGS2(
fprintf(stderr,
" as font position range 0x%x-0x%x\n",
fp0, fp1);
- exit(EX_DATAERR);
+ done(EX_DATAERR);
}
for (i = fp0; i <= fp1; i++) {
addpair(i,un0-fp0+i);
@@ -578,7 +588,7 @@ PUBLIC int main ARGS2(
fprintf(stderr,
"%s: Bad Unicode range 0x%x-0x%x\n",
tblname, un0, un1);
- exit(EX_DATAERR);
+ done(EX_DATAERR);
}
for (un0++; un0 <= un1; un0++) {
addpair(fp0, un0);
@@ -755,5 +765,5 @@ dfont_replacedesc%s,%d,%d)\n",
id_append, this_MIMEcharset, this_LYNXcharset,
id_append, id_append, nuni, id_append, lowest_eight, RawOrEnc);
- exit(EX_OK);
+ done(EX_OK);
}
diff --git a/src/makefile.in b/src/makefile.in
index 3e6786d9..e14fa843 100644
--- a/src/makefile.in
+++ b/src/makefile.in
@@ -112,6 +112,7 @@ HTInit.o: ../userdefs.h
LYTraversal.o: ../userdefs.h
LYMail.o: ../userdefs.h
LYCharSets.o: ../userdefs.h
+LYShowInfo.o: ../cfg_defs.h
CHRTR= chrtrans/
diff --git a/userdefs.h b/userdefs.h
index 859b1bfb..a6fae93e 100644
--- a/userdefs.h
+++ b/userdefs.h
@@ -476,7 +476,7 @@
* with the Up-Arrow or Down-Arrow keys after entering the 'g'oto
* command, whether or not a default is offered.
*/
-#define GOTOBUFFER TRUE
+#define GOTOBUFFER FALSE
/*****************************
* JUMPFILE is the default local file checked for shortcut URLs when
@@ -514,7 +514,7 @@
* jumps files and corresponding key mappings, each will have its own
* circular buffer.
*/
-#define JUMPBUFFER TRUE
+#define JUMPBUFFER FALSE
/********************************
* If PERMIT_GOTO_FROM_JUMP is defined, then a : or / in a jump target
@@ -1184,7 +1184,7 @@
* explicit Y or y to confirm. The default defined here can be changed
* in lynx.cfg.
*/
-#define QUIT_DEFAULT_YES FALSE
+#define QUIT_DEFAULT_YES TRUE
/********************************
* These definitions specify files created or used in conjunction
@@ -1216,12 +1216,12 @@
* the version definition with the Project Version on checkout. Just
* ignore it. - kw */
/* $Format: "#define LYNX_VERSION \"$ProjectVersion$\""$ */
-#define LYNX_VERSION "2.8.1pre.10"
+#define LYNX_VERSION "2.8.1pre.11"
#define LYNX_WWW_HOME "http://lynx.browser.org/"
#define LYNX_WWW_DIST "http://www.slcc.edu/lynx/current/"
#define LYNX_RELEASE FALSE
/* $Format: "#define LYNX_DATE \"$ProjectDate$\""$ */
-#define LYNX_DATE "Wed, 14 Oct 1998 06:23:56 -0600"
+#define LYNX_DATE "Sat, 17 Oct 1998 15:20:41 -0600"
#define LYNX_DATE_OFF 5 /* truncate the automatically-generated date */
#define LYNX_DATE_LEN 11 /* truncate the automatically-generated date */
#define LYNX_RELEASE_DATE "1998"