aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGES107
-rw-r--r--LYMessages_en.h5
-rw-r--r--PROBLEMS26
-rw-r--r--README38
-rw-r--r--WWW/Library/Implementation/HTFTP.c44
-rw-r--r--WWW/Library/Implementation/HTFile.c43
-rw-r--r--WWW/Library/Implementation/HTFinger.c102
-rw-r--r--WWW/Library/Implementation/HTFormat.c12
-rw-r--r--WWW/Library/Implementation/HTFormat.h2
-rw-r--r--WWW/Library/Implementation/HTGopher.c32
-rw-r--r--WWW/Library/Implementation/HTNews.c40
-rw-r--r--WWW/Library/Implementation/HTString.c9
-rw-r--r--docs/djgpp.key11
-rw-r--r--docs/pdcurses.key9
-rw-r--r--docs/slang.key2
-rw-r--r--lynx.cfg62
-rw-r--r--lynx_help/keystrokes/alt_edit_help.html6
-rw-r--r--lynx_help/keystrokes/edit_help.html6
-rw-r--r--lynx_help/keystrokes/option_help.html15
-rw-r--r--makefile.in35
-rw-r--r--po/lynx.pot537
-rw-r--r--samples/lynx-keymaps19
-rw-r--r--src/GridText.c525
-rw-r--r--src/GridText.h6
-rw-r--r--src/HTAlert.c31
-rw-r--r--src/HTForms.h6
-rw-r--r--src/HTML.c10
-rw-r--r--src/LYBookmark.c6
-rw-r--r--src/LYCookie.c462
-rw-r--r--src/LYCookie.h10
-rw-r--r--src/LYEdit.c2
-rw-r--r--src/LYEdit.h2
-rw-r--r--src/LYEditmap.c270
-rw-r--r--src/LYForms.c10
-rw-r--r--src/LYGetFile.c6
-rw-r--r--src/LYGlobalDefs.h5
-rw-r--r--src/LYJump.c2
-rw-r--r--src/LYKeymap.c220
-rw-r--r--src/LYKeymap.h108
-rw-r--r--src/LYLocal.c39
-rw-r--r--src/LYMail.c39
-rw-r--r--src/LYMain.c11
-rw-r--r--src/LYMainLoop.c177
-rw-r--r--src/LYNews.c36
-rw-r--r--src/LYPrint.c6
-rw-r--r--src/LYReadCFG.c47
-rw-r--r--src/LYShowInfo.c4
-rw-r--r--src/LYStrings.c83
-rw-r--r--src/LYStrings.h22
-rw-r--r--src/LYUpload.c2
-rw-r--r--src/LYUtils.c48
-rw-r--r--src/LYrcFile.c42
-rw-r--r--src/UCAuto.c4
-rw-r--r--src/chrtrans/cp866u_uni.tbl8
-rw-r--r--src/chrtrans/iso9945_uni.tbl2
-rw-r--r--src/chrtrans/koi8u_uni.tbl14
-rw-r--r--src/makefile.in2
-rw-r--r--src/structdump.h28
-rw-r--r--userdefs.h8
59 files changed, 2341 insertions, 1124 deletions
diff --git a/CHANGES b/CHANGES
index 883554a1..386d2da8 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,103 @@
Changes since Lynx 2.8 release
================================================================================
+1999-02-16 (2.8.2dev.17)
+* modify LYReadCFG.c to avoid duplicating data for cookies - BJP
+* modify HTConfirm to use gettext values for yes/no. Use HTConfirm in a few
+ more places, though completing this will require more work - TD
+* add note about resolv library to PROBLEMS - PW
+* minor clarification about DOS/Windows binaries in README - PW
+* modify ./makefile.in so that portions which are commented-out will be done
+ without a leading tab, since that confuses the make program on Digital Unix
+ 3.2 - TD
+* Unix: Don't accept HOME variable with valid if it does not begin with
+ a slash - KW
+* changed HTGetCharacter to be 8-bit clean, it could not distinguish between a
+ character value 255 and EOF. Changes affect several protocols: nntp,
+ gopher, finger, ftp. Most notably, news articles containing byte value 255
+ could not be completely read - KW
+* removed a memory leak in HTFTP.c for some directory data, added a few gettext
+ calls - KW
+* added ability to show file type description in local Unix directory listings:
+ new format codes for use in LIST_FORMAT %t, %T, they are not used by default
+ - KW
+* modify "clean" makefile rule to allow for FreeBSD, which generates core
+ files such as lynx.core - KED, TD
+* correct sign-extension when converting characters after edit of TEXTAREA
+ (upper-128 characters were being translated to dots, reported by IC) - KED
+* worked with some pathological/boundary-case pages, and fixed some some edges
+ that could fail (eg, last line of document is also last line of a TEXTAREA,
+ and lines are being added; page containing *only* a one-line TEXTAREA field;
+ etc). While it was unlikely one would run into such beasts in real life,
+ they all work correctly now. Thanks to Greg Marr and Serge Munhov for
+ providing some very basic pages that I was able to easily modify for various
+ test cases - KED
+* added a few flags to the TextAnchor and HTLine struct's, to indicate an
+ expansion line. These were added to allow for line deletion when a TEXTAREA
+ is "reset" or shrinks (when we get around to tackling those tasks) - KED
+* the editor's cursor is now positioned on the same line in the edit file, as
+ it was on when the editor was invoked (relative to the beginning of the
+ TEXTAREA). At least for those editors that lynx knows support initial
+ positioning (emacs, vi, pico, jove, and jed for non-VMS platforms; sedt for
+ VMS) - KED
+* cleaned up and corrected a few comments; simplified a few small bits of
+ code - KED
+* added cookie_domain_flags enum to LYCookie.h, usage should be apparent with
+ patch applied - BJP
+* updated free_lynx_globals() for cookie variables - BJP
+* replaced cookie_add_acceptlist, cookie_add_rejectlist and
+ cookie_set_invcheck functions with cookie_domain_flag_set - BJP
+* saved a bit of memory by dropping useless pointer memory initialization
+ (exactly WHAT was I thinking?) - BJP
+* changed LYrcFile.c, LYReadCFG.c to call cookie_domain_flag_set - BJP
+* new lynxkeycode BACKTAB_KEY with value 0x10F. DO_NOTHING is and shall remain
+ 0x10E, as documented in lynx.cfg. Moved MOUSE_KEY out of the way - does it
+ need to be in the tables at all? BACKTAB_KEY will be recognized if the
+ (n)curses keypad() input handling returns KEY_BTAB, which happens if the
+ terminal description has the right kB or kcbt capability string and the
+ terminal actually generates that string (often "^[[Z", generated for
+ shift+tab). May also work with lynx-keymaps mechanism. Not tested with
+ slang, maybe this has to be added to some more of the various tables in
+ LYStrings.c - KW
+* new user-visible key commands FASTFORW_LINK and FASTBACKW_LINK, with
+ lynxactionscodes LYK_FASTFORW_LINK and LYK_FASTBACKW_LINK. By default mapped
+ from <tab> key (^I) and new BACKTAB_KEY, respectively. Previously <tab> was
+ mapped from NEXT_LINK, which has some special handling if the invoking key
+ was <tab> (and if FASTTAB was defined in LYMainLoop.c, which was the case by
+ default). The old behavior of <tab> is still available if it is mapped with
+ KEYMAP to NEXT_LINK in lynx.cfg - KW
+* these commands always go to a previous (or next) link if there is one,
+ and skip multiple lines that are part of the same textarea - KW
+* recognize the new key actions also during partial file display, for some
+ roughly corresponding movement - KW
+* new lynxeditactioncode LYE_FORM_PASS, to allow any lynxkeycode to end the
+ editing of a form field and be passed up to the caller - it will then
+ normally be mapped to a lynxactioncode. LYE_FORM_PASS keys are generally
+ ignored in non-forms line editing. This is used for BACKTAB_KEY, as well as
+ several other keys that were previously handled specially in form_getstr - KW
+* extended the maps in LYEditmap.c to cover the same range of lynxkeycodes as
+ the LYKeymap.c tables. Yes, this uses more space, but the tables need to be
+ consistent - KW
+* map lynxkeycode 0x00 to LYK_DO_NOTHING, as lynx.cfg said all the time - KW
+* some tweaks of displayed strings in 'K'ey Map page. Don't show CHANGE_LINK
+ binding if mouse not enabled (it may not be useful even when -use_mouse is
+ on) - KW
+* function expand_substring used with NCURSES for user-defined mapping keysyms
+ to byte sequences was parsing the "^(...)" construct wrong - KW
+* other small tweaks in key handling code - KW
+* changes to lynx.cfg to better reflect reality. - KW
+* terminology note: lynxkeycode = what's between the colons in lynx.cfg
+ KEYMAP:...:..., lynxactioncode = LYK_* code for what's right of the second
+ colon, lynxeditactioncode = what's assigned in LYEditmap.c (and which may
+ differ between lineedit_mode Default Binding and alternative bindings) - KW
+* formatting tweak in HTML.c for <DD> not preceded by <DT>: Don't use wrong
+ indentation in that case - KW
+* changes from DK for DOS up to 1999-02-14 - KW
+* minor documentation tweaks - LP
+* replace most uses of free with FREE (John Bley).
+* correct HTEndParam so that if fewer command-parameters are given than
+ expected, we still terminate the command properly (reported by
+ Michael Warner) - TD
1999-02-08 (2.8.2dev.16)
* minor documentation tweaks for EDITTEXTAREA - LP
* correct uninitalized buffer variable in send_file_to_mail() which caused
@@ -43,19 +140,19 @@ Changes since Lynx 2.8 release
* Don't compile in the rules implementation code if NO_RULES is defined
(suggested by BL) - KW
* fix special case of EDITTEXTAREA where the returned file is empty - BJP
-* write to .lynxrc values for COOKIE_ACCEPT_DOMAINS and COOKIE_REJECT_DOMAINS
- if they are set on the options screen - BJP
+* write to .lynxrc values for COOKIE_ACCEPT_DOMAINS and COOKIE_REJECT_DOMAIN
+ when options screen is used - BJP
* add lynx.cfg and .lynxrc support for a few new options:
COOKIE_STRICT_INVALID_DOMAINS,
COOKIE_LOOSE_INVALID_DOMAINS,
COOKIE_QUERY_INVALID_DOMAINS
They're the same sort as COOKIE_ACCEPT_DOMAINS, comma-delimited lists - BJP
* modify LYOpenTemp() to report unusual errors, i.e., other than if the
- temporary file could not be created because it already exists - BJP
+ temporary file could not be created because it already exists - PG
* more fixes to CF_INET_ADDR - TD
* modify README to indicate where win32 binaries are found - JS
-* add chrtrans tables for Ukranian Cyrillic (patch by Serhii Hlodin
- <hlodin@lutsk.bank.gov.ua<)
+* add chrtrans tables for Ukrainian Cyrillic: koi8-u, cp866u, iso-9945-2
+ (patch by Serhii Hlodin <hlodin@lutsk.bank.gov.ua>)
* patch for TEXTAREA edit feature - KED
1. Handles the renumbering of link number tags [nnn], when the tag itself is
split across two lines (see below).
diff --git a/LYMessages_en.h b/LYMessages_en.h
index 49cdbd8b..9474b9b9 100644
--- a/LYMessages_en.h
+++ b/LYMessages_en.h
@@ -183,7 +183,7 @@
#else
#ifdef DOSPATH
#define SPAWNING_MSG \
- gettext("Type EXIT to return to Lynx.\r\n")
+ gettext("Type EXIT to return to Lynx.\n")
#else /* UNIX */
#define SPAWNING_MSG \
gettext("Spawning your default shell. Use 'exit' to return to Lynx.\n")
@@ -662,6 +662,8 @@
gettext("%s cookie: %.*s=%.*s Allow? (Y/N/Always/neVer)")
#define INVALID_COOKIE_DOMAIN_CONFIRMATION \
gettext("Accept invalid cookie domain=%s for '%s'?")
+#define INVALID_COOKIE_PATH_CONFIRMATION \
+ gettext("Accept invalid cookie path=%s as a prefix of '%s'?")
#define ALLOWING_COOKIE gettext("Allowing this cookie.")
#define REJECTING_COOKIE gettext("Rejecting this cookie.")
#define COOKIE_JAR_IS_EMPTY gettext("The Cookie Jar is empty.")
@@ -709,6 +711,7 @@
gettext("Modified tail combined with head of form field value.")
/* HTFile.c */
+#define ENTRY_IS_DIRECTORY gettext("Directory")
#define DISALLOWED_DIR_SCAN gettext("Directory browsing is not allowed.")
#define DISALLOWED_SELECTIVE_ACCESS gettext("Selective access is not enabled for this directory")
#define FAILED_DIR_SCAN gettext("Multiformat: directory scan failed.")
diff --git a/PROBLEMS b/PROBLEMS
index 049f593f..e9eabd28 100644
--- a/PROBLEMS
+++ b/PROBLEMS
@@ -10,8 +10,8 @@ they will be outlined in this file.
with no attempt to suspend the Lynx process only temporarily).
Control-Z on Unix often works better with slang.
- Screen resizing can be a bit funny. If you resize the screen,
- documents that have been cached will be out of whack. Any further
+ Screen resizing can be a bit funny. If you resize the screen,
+ documents that have been cached will be out of whack. Any further
documents will look fine. You can reload documents to the current
window size with CTRL-R
@@ -28,21 +28,31 @@ they will be outlined in this file.
you have upgraded to the bind-8.1 or later library, you should try
changing -lresolv to -lbind.
- The Sun `shelltool' and `cmdtool' terminals are stupid by default.
- In order to get bold text to appear differently than inverse video,
+ On Sun systems when accessing sites that use multiple IPs for one URL,
+ you may experience a core dump. It's a bug in the resolver library,
+ which can be fixed by downloading & installing Sun's jumbo patch:
+ search Sun support information, e.g., Solaris newsgroups,
+ or see the following Lynx Archive items:
+
+ http://www.flora.org/lynx-dev/lynx-dev/9606/0422.html
+ http://www.flora.org/lynx-dev/html/month0497/msg01018.html
+ http://www.flora.org/lynx-dev/html/month0497/msg01064.html
+
+ The Sun `shelltool' and `cmdtool' terminals are stupid by default.
+ In order to get bold text to appear differently than inverse video,
the user should put this line in ~/.Xdefaults:
Term*boldStyle: Offset_X
- From the `shelltool' man page, it seems that an analogous line
+ From the `shelltool' man page, it seems that an analogous line
in ~/.defaults
/Tty/Bold_style "Offset_X"
ought to work just as well, but you may not get the desired
behavior until you modify your .Xdefaults file (and run `xrdb
- ~/.Xdefaults'). Note also that there are other supported values
- for the boldStyle resource/Bold_style default, all of which begin
+ ~/.Xdefaults'). Note also that there are other supported values
+ for the boldStyle resource/Bold_style default, all of which begin
with "Offset_". (helpful hint from kevin@traffic.den.mmc.com)
Directory browsing has been implemented for VMS, but there are no
@@ -91,7 +101,7 @@ they will be outlined in this file.
Updated NOTE (1996-09-02): A patch reportedly is available from HP to
fix the select() problem, so that "-lc" is no longer needed, but
the curses glitch is not yet fixed, and you should still include
- "-lHcurses".
+ "-lHcurses".
Updated NOTE (1997-02-03): The problems reportedly are fixed with
patches PHCO_8086 and PHCO_8947 from HP.
Updated NOTE (1997-12-15): PHCO_8086 & PHCO_8947 are very old and are
diff --git a/README b/README
index cf32cab5..bd5cd811 100644
--- a/README
+++ b/README
@@ -1,10 +1,17 @@
Lynx README file
-Lynx version 2.8.1 is the latest stable release. The version in this
-directory is the "current" version and includes changes and bug fixes as
-documented in the CHANGES file. New releases are announced on the lynx-dev
-mailing list (see below).
+Lynx Version 2.8.1 is the latest release (October 1998).
+See the CHANGES file for a complete record of all changes and bug fixes.
+New releases are announced on the lynx-dev mailing list (see below).
+
+FOR REAL NOVICES
+
+To use this package, you need a compiler & a bit of experience
+at very simple programming. If you just want something which will work
+`out-of-the-box', you can get pre-compiled versions of Lynx
+by following the links from http://lynx.browser.org/ ;
+for DOS or Windows, goto http://www.fdisk.com/doslynx/lynxport.htm .
WHAT IS LYNX?
@@ -23,14 +30,14 @@ WHAT IS LYNX?
used to build several Campus Wide Information Systems (CWIS). Lynx can
also be used to build systems isolated within a single LAN.
- Links to the current sources and support materials for Lynx are
- maintained at:
- "Lynx links"
- <URL:http://www.crl.com/~subir/lynx.html>
- and at the Lynx homepage:
- "Lynx Information"
- <URL:http://lynx.browser.org/>.
- View these pages for information about Lynx, including new updates.
+HOW TO GET LYNX
+
+ For the latest release of Lynx goto: http://www.slcc.edu/lynx/release ;
+ the latest development version is at: http://sol.slcc.edu/lynx/current .
+ The Lynx homepage is http://lynx.browser.org/ .
+ The on-line help page (enter `h') has links to many useful things.
+
+LICENCE
Lynx is distributed under the GNU General Public License (GPL) without
restrictions on usage or redistribution. The Lynx copyright statement,
@@ -51,6 +58,11 @@ YEAR 2000 COMPLIANCE
particular, if Lynx receives a date with a 2-digit year, it assumes that
values less than 70 are in the range 2000-2069.
+INSTALLING LYNX
+
+ To install Lynx, follow the steps in the INSTALLATION file, which is
+ located in the top directory of the source distribution.
+
DOCUMENTATION
A users guide is included in this distribution along with a man page
@@ -68,6 +80,8 @@ DOCUMENTATION
allow you to customize the help menu system for your site and greatly
speed up access for those using Lynx over a slow connection.
+INSTALLING THE DOCUMENTATION
+
For Unix and related systems which support the autoconf configure script,
the help menu system is installed by the "make install-help" command.
diff --git a/WWW/Library/Implementation/HTFTP.c b/WWW/Library/Implementation/HTFTP.c
index 2392c439..923d7a0e 100644
--- a/WWW/Library/Implementation/HTFTP.c
+++ b/WWW/Library/Implementation/HTFTP.c
@@ -303,7 +303,7 @@ PUBLIC char * HTMake_VMS_name ARGS2(
/* Procedure: Read a character from the data connection
** ----------------------------------------------------
*/
-PRIVATE char next_data_char NOARGS
+PRIVATE int next_data_char NOARGS
{
int status;
if (data_read_pointer >= data_write_pointer) {
@@ -311,7 +311,7 @@ PRIVATE char next_data_char NOARGS
if (status == HT_INTERRUPTED)
interrupted_in_next_data_char = 1;
if (status <= 0)
- return (char)-1;
+ return -1;
data_write_pointer = data_buffer + status;
data_read_pointer = data_buffer;
}
@@ -321,7 +321,7 @@ PRIVATE char next_data_char NOARGS
return FROMASCII(c);
}
#else
- return *data_read_pointer++;
+ return (unsigned char)(*data_read_pointer++);
#endif /* NOT_ASCII */
}
@@ -439,7 +439,8 @@ PRIVATE int response ARGS1(
do {
char *p = response_text;
for (;;) {
- if (((*p++ = NEXT_CHAR) == LF)
+ int ich = NEXT_CHAR;
+ if (((*p++ = ich) == LF)
|| (p == &response_text[LINE_LENGTH])) {
char continuation;
@@ -479,7 +480,7 @@ PRIVATE int response ARGS1(
return HT_INTERRUPTED;
}
- if (*(p-1) == (char) EOF) {
+ if (ich == EOF) {
CTRACE(tfp, "Error on rx: closing socket %d\n",
control->socket);
strcpy(response_text, "000 *** TCP read error on response\n");
@@ -1349,7 +1350,7 @@ PRIVATE void parse_eplf_line ARGS2(
StrAllocCopy(info->date, ct);
break;
case '/':
- StrAllocCopy(info->type, "Directory");
+ StrAllocCopy(info->type, ENTRY_IS_DIRECTORY);
default:
while (*cp) {
if (*cp++ == ',')
@@ -1579,7 +1580,7 @@ PRIVATE void parse_ms_windows_dir_entry ARGS2(
if (isdigit(*cps)) {
entry_info->size = atoi(cps);
} else {
- StrAllocCopy(entry_info->type, "Directory");
+ StrAllocCopy(entry_info->type, ENTRY_IS_DIRECTORY);
}
} else {
StrAllocCopy(entry_info->type, "");
@@ -1715,7 +1716,7 @@ PRIVATE void parse_windows_nt_dir_entry ARGS2(
if (isdigit(*cps)) {
entry_info->size = atoi(cps);
} else {
- StrAllocCopy(entry_info->type, "Directory");
+ StrAllocCopy(entry_info->type, ENTRY_IS_DIRECTORY);
}
} else {
StrAllocCopy(entry_info->type, "");
@@ -1772,7 +1773,7 @@ PRIVATE void parse_cms_dir_entry ARGS2(
*cps++ ='\0';
if ((0 == strcasecomp(cp, "DIR")) && (cp - line) > 17) {
/** It's an SFS directory. **/
- StrAllocCopy(entry_info->type, "Directory");
+ StrAllocCopy(entry_info->type, ENTRY_IS_DIRECTORY);
entry_info->size = 0;
} else {
/** It's a file. **/
@@ -1945,7 +1946,7 @@ PRIVATE EntryInfo * parse_dir_entry ARGS2(
/*
** It's a directory.
*/
- StrAllocCopy(entry_info->type, "Directory");
+ StrAllocCopy(entry_info->type, ENTRY_IS_DIRECTORY);
remove_size=TRUE; /* size is not useful */
} else if (entry[0] == 'l') {
/*
@@ -1953,7 +1954,7 @@ PRIVATE EntryInfo * parse_dir_entry ARGS2(
** knowing if it is symbolic? I think so since
** it might be a directory.
*/
- StrAllocCopy(entry_info->type, "Symbolic Link");
+ StrAllocCopy(entry_info->type, gettext("Symbolic Link"));
remove_size=TRUE; /* size is not useful */
/*
@@ -2000,7 +2001,7 @@ PRIVATE EntryInfo * parse_dir_entry ARGS2(
len = strlen(entry_info->filename);
if ((len > 4) && !strcmp(&entry_info->filename[len-4], ".dir")) {
entry_info->filename[len-4] = '\0';
- StrAllocCopy(entry_info->type, "Directory");
+ StrAllocCopy(entry_info->type, ENTRY_IS_DIRECTORY);
remove_size=TRUE; /* size is not useful */
}
/*
@@ -2087,7 +2088,7 @@ PRIVATE EntryInfo * parse_dir_entry ARGS2(
** It's a dir, remove / and mark it as such.
*/
entry[len-1] = '\0';
- StrAllocCopy(entry_info->type, "Directory");
+ StrAllocCopy(entry_info->type, ENTRY_IS_DIRECTORY);
remove_size=TRUE; /* size is not useful */
}
/*
@@ -2353,13 +2354,13 @@ PRIVATE int read_directory ARGS4(
{
HTBTree * bt = HTBTree_new((HTComparer)compare_EntryInfo_structs);
- char c;
+ int ic;
HTChunk * chunk = HTChunkCreate(128);
int BytesReceived = 0;
int BytesReported = 0;
char NumBytes[64];
PUTS("\n"); /* prettier LJM */
- for (c = 0; c != (char)EOF;) { /* For each entry in the directory */
+ for (ic = 0; ic != EOF;) { /* For each entry in the directory */
HTChunkClear(chunk);
if (HTCheckForInterrupt()) {
@@ -2376,7 +2377,7 @@ PRIVATE int read_directory ARGS4(
/* read directory entry
*/
for (;;) { /* Read in one line as filename */
- c = NEXT_DATA_CHAR;
+ ic = NEXT_DATA_CHAR;
AgainForMultiNet:
if (interrupted_in_next_data_char) {
WasInterrupted = TRUE;
@@ -2387,7 +2388,7 @@ AgainForMultiNet:
HTBTreeAndObject_free(bt);
return HT_INTERRUPTED;
}
- } else if (c == CR || c == LF) { /* Terminator? */
+ } else if ((char)ic == CR || (char)ic == LF) { /* Terminator? */
if (chunk->size != 0) { /* got some text */
/* Deal with MultiNet's wrapping of long lines */
if (server_type == VMS_SERVER) {
@@ -2403,7 +2404,7 @@ AgainForMultiNet:
goto AgainForMultiNet;
}
if (status <= 0) {
- c = (char)EOF;
+ ic = EOF;
break;
}
data_write_pointer = data_buffer + status;
@@ -2419,10 +2420,10 @@ AgainForMultiNet:
else
break; /* finish getting one entry */
}
- } else if (c == (char)EOF) {
+ } else if (ic == EOF) {
break; /* End of file */
} else {
- HTChunkPutc(chunk, c);
+ HTChunkPutc(chunk, (char)ic);
}
}
HTChunkTerminate(chunk);
@@ -2434,7 +2435,7 @@ AgainForMultiNet:
BytesReported = BytesReceived;
}
- if (c == (char) EOF && chunk->size == 1)
+ if (ic == EOF && chunk->size == 1)
/* 1 means empty: includes terminating 0 */
break;
CTRACE(tfp, "HTFTP: Line in %s is %s\n",
@@ -2446,6 +2447,7 @@ AgainForMultiNet:
entry_info->filename);
HTBTree_add(bt, (EntryInfo *)entry_info);
} else {
+ free_entryinfo_struct_contents(entry_info);
FREE(entry_info);
}
diff --git a/WWW/Library/Implementation/HTFile.c b/WWW/Library/Implementation/HTFile.c
index 1c419daa..5991ca7d 100644
--- a/WWW/Library/Implementation/HTFile.c
+++ b/WWW/Library/Implementation/HTFile.c
@@ -154,7 +154,7 @@ PRIVATE void free_suffixes NOPARAMS;
PRIVATE char *FormatStr ARGS3(
char **, bufp,
char *, start,
- char *, entry)
+ CONST char *, entry)
{
char fmt[512];
if (*start) {
@@ -218,7 +218,7 @@ PRIVATE void LYListFmtParse ARGS5(
#endif
if (lstat(file, &st) < 0)
- fmtstr = "%a"; /* can't stat so just do anchor */
+ fmtstr = " %a"; /* can't stat so just do anchor */
StrAllocCopy(str, fmtstr);
s = str;
@@ -251,7 +251,7 @@ PRIVATE void LYListFmtParse ARGS5(
switch (c) {
case '\0':
- PUTS(start);
+ PUTS(start);
continue;
case 'A':
@@ -271,6 +271,37 @@ PRIVATE void LYListFmtParse ARGS5(
#endif
break;
+ case 'T': /* MIME type */
+ case 't': /* MIME type description */
+ if (S_ISDIR(st.st_mode)) {
+ if (c != 'T') {
+ FormatStr(&buf, start, ENTRY_IS_DIRECTORY);
+ } else {
+ FormatStr(&buf, start, "");
+ }
+ } else {
+ CONST char *cp2;
+ HTFormat format;
+ format = HTFileFormat(file, NULL, &cp2);
+
+ if (c != 'T') {
+ if (cp2 == NULL) {
+ if (!strncmp(HTAtom_name(format),
+ "application",11)) {
+ cp2 = HTAtom_name(format) + 12;
+ if (!strncmp(cp2,"x-",2))
+ cp2 += 2;
+ } else {
+ cp2 = HTAtom_name(format);
+ }
+ }
+ FormatStr(&buf, start, cp2);
+ } else {
+ FormatStr(&buf, start, HTAtom_name(format));
+ }
+ }
+ break;
+
case 'd': /* date */
now = time(0);
datestr = ctime(&st.st_mtime);
@@ -593,7 +624,7 @@ PUBLIC char * HTnameOfFile_WWW ARGS3(
char * result = NULL;
if (expand_all)
- HTUnEscape(path); /* Interpret all % signs */
+ HTUnEscape(path); /* Interpret all % signs */
else
HTUnEscapeSome(path, "/"); /* Interpret % signs for path delims */
@@ -2139,7 +2170,7 @@ PUBLIC int HTLoadFile ARGS4(
if (dir_list_style != MIXED_STYLE) {
START(HTML_EM);
PUTS(state == 'D'
- ? LABEL_SUBDIRECTORIES
+ ? LABEL_SUBDIRECTORIES
: LABEL_FILES);
END(HTML_EM);
}
@@ -2161,7 +2192,7 @@ PUBLIC int HTLoadFile ARGS4(
START(HTML_H2);
START(HTML_EM);
PUTS(state == 'D'
- ? LABEL_SUBDIRECTORIES
+ ? LABEL_SUBDIRECTORIES
: LABEL_FILES);
END(HTML_EM);
END(HTML_H2);
diff --git a/WWW/Library/Implementation/HTFinger.c b/WWW/Library/Implementation/HTFinger.c
index c99563cc..4d1aeeca 100644
--- a/WWW/Library/Implementation/HTFinger.c
+++ b/WWW/Library/Implementation/HTFinger.c
@@ -45,7 +45,7 @@
#define START(e) (*targetClass.start_element)(target, e, 0, 0, -1, 0)
#define END(e) (*targetClass.end_element)(target, e, 0)
#define FREE_TARGET (*targetClass._free)(target)
-#define NEXT_CHAR HTGetCharacter()
+#define NEXT_CHAR HTGetCharacter()
/* Module-wide variables
@@ -79,15 +79,15 @@ PRIVATE void start_anchor ARGS1(CONST char *, href)
{
BOOL present[HTML_A_ATTRIBUTES];
CONST char* value[HTML_A_ATTRIBUTES];
-
+
{
- int i;
- for(i=0; i<HTML_A_ATTRIBUTES; i++)
+ int i;
+ for(i=0; i<HTML_A_ATTRIBUTES; i++)
present[i] = (i==HTML_A_HREF);
}
((CONST char **)value)[HTML_A_HREF] = href;
(*targetClass.start_element)(target, HTML_A, present,
- (CONST char **)value, -1, 0);
+ (CONST char **)value, -1, 0);
}
@@ -117,7 +117,7 @@ PRIVATE int response ARGS5(
char *p = line, *href=NULL;
if (length == 0)
- return(-1);
+ return(-1);
/* Set up buffering.
*/
@@ -129,11 +129,11 @@ PRIVATE int response ARGS5(
status = NETWRITE(s, (char *)command, length);
if (status < 0) {
CTRACE(tfp, "HTFinger: Unable to send command. Disconnecting.\n");
- NETCLOSE(s);
- s = -1;
- return status;
+ NETCLOSE(s);
+ s = -1;
+ return status;
} /* if bad status */
-
+
/* Make a hypertext object with an anchor list.
*/
target = HTML_new(anAnchor, format_out, sink);
@@ -162,12 +162,12 @@ PRIVATE int response ARGS5(
END(HTML_EM);
PUTS(": ");
if (command) {
- StrAllocCopy(cmd, command);
+ StrAllocCopy(cmd, command);
} else {
- StrAllocCopy(cmd, "");
+ StrAllocCopy(cmd, "");
}
for (i = (strlen(cmd) - 1); i >= 0; i--) {
- if (cmd[i] == LF || cmd[i] == CR) {
+ if (cmd[i] == LF || cmd[i] == CR) {
cmd[i] = '\0';
} else {
break;
@@ -179,18 +179,18 @@ PRIVATE int response ARGS5(
PUTS("\n");
START(HTML_PRE);
- while ((ch=NEXT_CHAR) != (char)EOF) {
+ while ((ch=NEXT_CHAR) != EOF) {
if (interrupted_in_htgetcharacter) {
CTRACE(tfp, "HTFinger: Interrupted in HTGetCharacter, apparently.\n");
_HTProgress (CONNECTION_INTERRUPTED);
goto end_html;
- }
+ }
if (ch != LF) {
*p = ch; /* Put character in line */
if (p < &line[BIG-1]) {
- p++;
+ p++;
}
} else {
*p = '\0'; /* Terminate line */
@@ -215,13 +215,13 @@ PRIVATE int response ARGS5(
strncmp(l, "wais://", 7) &&
strncmp(l, "mailto:", 7) &&
strncmp(l, "cso://", 6) &&
- strncmp(l, "gopher://", 9))
+ strncmp(l, "gopher://", 9))
PUTC(*l++);
else {
StrAllocCopy(href, l);
start_anchor(strtok(href, " \r\n\t,>)\""));
while (*l && !strchr(" \r\n\t,>)\"", *l))
- PUTC(*l++);
+ PUTC(*l++);
END(HTML_A);
FREE(href);
}
@@ -258,68 +258,68 @@ PUBLIC int HTLoadFinger ARGS4(
char *command, *str; /* Buffers */
int port; /* Port number from URL */
int status; /* tcp return */
-
+
CTRACE(tfp, "HTFinger: Looking for %s\n", (arg ? arg : "NULL"));
-
+
if (!(arg && *arg)) {
- HTAlert(COULD_NOT_LOAD_DATA);
+ HTAlert(COULD_NOT_LOAD_DATA);
return HT_NOT_LOADED; /* Ignore if no name */
}
-
- if (!initialized)
- initialized = initialize();
+
+ if (!initialized)
+ initialized = initialize();
if (!initialized) {
- HTAlert (gettext("Could not set up finger connection."));
+ HTAlert (gettext("Could not set up finger connection."));
return HT_NOT_LOADED; /* FAIL */
}
-
+
{
CONST char * p1=arg;
BOOL IsGopherURL = FALSE;
-
+
/* Set up the host and command fields.
- */
+ */
if (!strncasecomp(arg, "finger://", 9)) {
- p1 = arg + 9; /* Skip "finger://" prefix */
+ p1 = arg + 9; /* Skip "finger://" prefix */
} else if (!strncasecomp(arg, "gopher://", 9)) {
- p1 = arg + 9; /* Skip "gopher://" prefix */
+ p1 = arg + 9; /* Skip "gopher://" prefix */
IsGopherURL = TRUE;
}
sitename = (char *)p1;
if ((slash = strchr(sitename, '/')) != NULL) {
- *slash++ = '\0';
+ *slash++ = '\0';
HTUnEscape(slash);
if (IsGopherURL) {
if (*slash != '0') {
- HTAlert(COULD_NOT_LOAD_DATA);
+ HTAlert(COULD_NOT_LOAD_DATA);
return HT_NOT_LOADED; /* FAIL */
}
*slash++ = '\0';
}
}
if ((at_sign = strchr(sitename, '@')) != NULL) {
- if (IsGopherURL) {
- HTAlert(COULD_NOT_LOAD_DATA);
+ if (IsGopherURL) {
+ HTAlert(COULD_NOT_LOAD_DATA);
return HT_NOT_LOADED; /* FAIL */
}
- *at_sign++ = '\0';
- username = sitename;
+ *at_sign++ = '\0';
+ username = sitename;
sitename = at_sign;
HTUnEscape(username);
} else if (slash) {
- username = slash;
+ username = slash;
} else {
- username = "";
+ username = "";
}
-
+
if (*sitename == '\0') {
- HTAlert(gettext("Could not load data (no sitename in finger URL)"));
+ HTAlert(gettext("Could not load data (no sitename in finger URL)"));
return HT_NOT_LOADED; /* Ignore if no name */
}
if ((colon = strchr(sitename, ':')) != NULL) {
- *colon++ = '\0';
+ *colon++ = '\0';
port = atoi(colon);
if (port != 79) {
HTAlert(gettext("Invalid port number - will only use port 79!"));
@@ -331,12 +331,12 @@ PUBLIC int HTLoadFinger ARGS4(
*/
str = 0;
HTSprintf0(&str, "lose://%s/", sitename);
-
+
/* Load the command for the finger server.
*/
command = 0;
if (at_sign && slash) {
- if (*slash == 'w' || *slash == 'W') {
+ if (*slash == 'w' || *slash == 'W') {
HTSprintf0(&command, "/w %s%c%c", username, CR, LF);
} else {
HTSprintf0(&command, "%s%c%c", username, CR, LF);
@@ -344,12 +344,12 @@ PUBLIC int HTLoadFinger ARGS4(
} else if (at_sign) {
HTSprintf0(&command, "%s%c%c", username, CR, LF);
} else if (*username == '/') {
- if ((slash = strchr((username+1), '/')) != NULL) {
+ if ((slash = strchr((username+1), '/')) != NULL) {
*slash = ' ';
}
HTSprintf0(&command, "%s%c%c", username, CR, LF);
} else if ((*username == 'w' || *username == 'W') &&
- *(username+1) == '/') {
+ *(username+1) == '/') {
if (*username+2 != '\0') {
*(username+1) = ' ';
} else {
@@ -357,7 +357,7 @@ PUBLIC int HTLoadFinger ARGS4(
}
HTSprintf0(&command, "/%s%c%c", username, CR, LF);
} else if ((*username == 'w' || *username == 'W') &&
- *(username+1) == '\0') {
+ *(username+1) == '\0') {
HTSprintf0(&command, "/%s%c%c", username, CR, LF);
} else if ((slash = strchr(username, '/')) != NULL) {
*slash++ = '\0';
@@ -370,7 +370,7 @@ PUBLIC int HTLoadFinger ARGS4(
HTSprintf0(&command, "%s%c%c", username, CR, LF);
}
} /* scope of p1 */
-
+
/* Now, let's get a stream setup up from the FingerHost:
** CONNECTING to finger host
*/
@@ -379,7 +379,7 @@ PUBLIC int HTLoadFinger ARGS4(
CTRACE(tfp, "HTFinger: Done DoConnect; status %d\n", status);
if (status == HT_INTERRUPTED) {
- /* Interrupt cleanly */
+ /* Interrupt cleanly */
CTRACE(tfp, "HTFinger: Interrupted on connect; recovering cleanly.\n");
HTProgress (CONNECTION_INTERRUPTED);
FREE(str);
@@ -387,10 +387,10 @@ PUBLIC int HTLoadFinger ARGS4(
return HT_NOT_LOADED;
}
if (status < 0) {
- NETCLOSE(s);
+ NETCLOSE(s);
s = -1;
CTRACE(tfp, "HTFinger: Unable to connect to finger host.\n");
- HTAlert(gettext("Could not access finger host."));
+ HTAlert(gettext("Could not access finger host."));
FREE(str);
FREE(command);
return HT_NOT_LOADED; /* FAIL */
@@ -401,7 +401,7 @@ PUBLIC int HTLoadFinger ARGS4(
/* Send the command, and process response if successful.
*/
if (response(command, sitename, anAnchor, format_out, stream) != 0) {
- HTAlert(gettext("No response from finger server."));
+ HTAlert(gettext("No response from finger server."));
FREE(command);
return HT_NOT_LOADED;
}
diff --git a/WWW/Library/Implementation/HTFormat.c b/WWW/Library/Implementation/HTFormat.c
index ca065016..33c6e344 100644
--- a/WWW/Library/Implementation/HTFormat.c
+++ b/WWW/Library/Implementation/HTFormat.c
@@ -218,7 +218,7 @@ PUBLIC void HTInitInput ARGS1 (int,file_number)
}
PUBLIC int interrupted_in_htgetcharacter = 0;
-PUBLIC char HTGetCharacter NOARGS
+PUBLIC int HTGetCharacter NOARGS
{
char ch;
interrupted_in_htgetcharacter = 0;
@@ -228,15 +228,15 @@ PUBLIC char HTGetCharacter NOARGS
input_buffer, INPUT_BUFFER_SIZE);
if (status <= 0) {
if (status == 0)
- return (char)EOF;
+ return EOF;
if (status == HT_INTERRUPTED) {
CTRACE(tfp, "HTFormat: Interrupted in HTGetCharacter\n");
interrupted_in_htgetcharacter = 1;
- return (char)EOF;
+ return EOF;
}
CTRACE(tfp, "HTFormat: File read error %d\n", status);
- return (char)EOF; /* -1 is returned by UCX
- at end of HTTP link */
+ return EOF; /* -1 is returned by UCX
+ at end of HTTP link */
}
input_pointer = input_buffer;
input_limit = input_buffer + status;
@@ -244,7 +244,7 @@ PUBLIC char HTGetCharacter NOARGS
ch = *input_pointer++;
} while (ch == (char) 13); /* Ignore ASCII carriage return */
- return FROMASCII(ch);
+ return FROMASCII((unsigned char)ch);
}
/* Match maintype to any MIME type starting with maintype,
diff --git a/WWW/Library/Implementation/HTFormat.h b/WWW/Library/Implementation/HTFormat.h
index c9b6392e..f4b3caf5 100644
--- a/WWW/Library/Implementation/HTFormat.h
+++ b/WWW/Library/Implementation/HTFormat.h
@@ -348,7 +348,7 @@ Get next character from buffer
*/
extern int interrupted_in_htgetcharacter;
-extern char HTGetCharacter NOPARAMS;
+extern int HTGetCharacter NOPARAMS;
/*
diff --git a/WWW/Library/Implementation/HTGopher.c b/WWW/Library/Implementation/HTGopher.c
index e2ec7b0f..276569b5 100644
--- a/WWW/Library/Implementation/HTGopher.c
+++ b/WWW/Library/Implementation/HTGopher.c
@@ -209,7 +209,7 @@ PRIVATE void parse_menu ARGS2(
HTParentAnchor *, anAnchor)
{
char gtype;
- char ch;
+ int ich;
char line[BIG];
char *name = NULL, *selector = NULL; /* Gopher menu fields */
char *host = NULL;
@@ -248,15 +248,15 @@ PRIVATE void parse_menu ARGS2(
END(HTML_H1);
PUTS("\n");
START(HTML_PRE);
- while ((ch=NEXT_CHAR) != (char)EOF) {
+ while ((ich=NEXT_CHAR) != EOF) {
if (interrupted_in_htgetcharacter) {
CTRACE(tfp, "HTGopher: Interrupted in HTGetCharacter, apparently.\n");
goto end_html;
}
- if (ch != LF) {
- *p = ch; /* Put character in line */
+ if ((char)ich != LF) {
+ *p = ich; /* Put character in line */
if (p< &line[BIG-1]) p++;
} else {
@@ -462,7 +462,7 @@ PRIVATE void parse_cso ARGS2(
CONST char *, arg,
HTParentAnchor *, anAnchor)
{
- char ch;
+ int ich;
char line[BIG];
char *p = line;
char *second_colon, last_char='\0';
@@ -493,11 +493,11 @@ PRIVATE void parse_cso ARGS2(
/*
** Start grabbing chars from the network.
*/
- while ((ch=NEXT_CHAR) != (char)EOF)
+ while ((ich=NEXT_CHAR) != EOF)
{
- if (ch != LF)
+ if ((char)ich != LF)
{
- *p = ch; /* Put character in line */
+ *p = ich; /* Put character in line */
if (p< &line[BIG-1]) p++;
}
else
@@ -924,7 +924,7 @@ PRIVATE int parse_cso_fields ARGS2(
char *, buf,
int, size)
{
- char ch;
+ int ich;
char *p = buf;
int i, code = 0, prev_code;
size_t alen;
@@ -938,7 +938,7 @@ PRIVATE int parse_cso_fields ARGS2(
/*
** Start grabbing chars from the network.
*/
- while ((ch = NEXT_CHAR) != (char)EOF) {
+ while ((ich = NEXT_CHAR) != EOF) {
if (interrupted_in_htgetcharacter) {
CTRACE(tfp, "HTLoadCSO: Interrupted in HTGetCharacter, apparently.\n");
free_CSOfields();
@@ -946,8 +946,8 @@ PRIVATE int parse_cso_fields ARGS2(
return HT_INTERRUPTED;
}
- if (ch != LF) {
- *p = ch; /* Put character in buffer */
+ if ((char)ich != LF) {
+ *p = ich; /* Put character in buffer */
if (p < &buf[size-1]) {
p++;
}
@@ -1219,7 +1219,7 @@ PRIVATE int generate_cso_form ARGS4(
PRIVATE int generate_cso_report ARGS1(
HTStream *, Target)
{
- char ch;
+ int ich;
char line[BIG];
char *buf = 0;
char *p = line, *href = NULL;
@@ -1235,15 +1235,15 @@ PRIVATE int generate_cso_report ARGS1(
/*
** Start grabbing chars from the network.
*/
- while (!stop && (ch = NEXT_CHAR) != (char)EOF) {
+ while (!stop && (ich = NEXT_CHAR) != EOF) {
if (interrupted_in_htgetcharacter) {
CTRACE(tfp, "HTLoadCSO: Interrupted in HTGetCharacter, apparently.\n");
_HTProgress (CONNECTION_INTERRUPTED);
goto end_CSOreport;
}
- if (ch != LF) {
- *p = ch; /* Put character in line */
+ if ((char)ich != LF) {
+ *p = ich; /* Put character in line */
if (p < &line[BIG-1]) {
p++;
}
diff --git a/WWW/Library/Implementation/HTNews.c b/WWW/Library/Implementation/HTNews.c
index 4640f106..8669db3e 100644
--- a/WWW/Library/Implementation/HTNews.c
+++ b/WWW/Library/Implementation/HTNews.c
@@ -227,7 +227,7 @@ PRIVATE int response ARGS1(CONST char *,command)
{
int result;
char * p = response_text;
- char ch;
+ int ich;
if (command) {
int status;
@@ -255,7 +255,8 @@ PRIVATE int response ARGS1(CONST char *,command)
} /* if command to be sent */
for (;;) {
- if (((*p++ = NEXT_CHAR) == LF) ||
+ ich = NEXT_CHAR;
+ if (((*p++ = ich) == LF) ||
(p == &response_text[LINE_LENGTH])) {
*--p = '\0'; /* Terminate the string */
CTRACE(tfp, "NNTP Response: %s\n", response_text);
@@ -263,7 +264,7 @@ PRIVATE int response ARGS1(CONST char *,command)
return result;
} /* if end of line */
- if ((ch = *(p-1)) == (char)EOF) {
+ if (ich == EOF) {
*(p-1) = '\0';
if (interrupted_in_htgetcharacter) {
CTRACE(tfp, "HTNews: Interrupted on read, closing socket %d\n",
@@ -965,8 +966,9 @@ PRIVATE int read_article ARGS1(
*/
if (!diagnostic && !rawtext) {
while (!done) {
- char ch = *p++ = NEXT_CHAR;
- if (ch == (char)EOF) {
+ int ich = NEXT_CHAR;
+ *p++ = ich;
+ if (ich == EOF) {
if (interrupted_in_htgetcharacter) {
interrupted_in_htgetcharacter = 0;
CTRACE(tfp, "HTNews: Interrupted on read, closing socket %d\n",
@@ -978,7 +980,7 @@ PRIVATE int read_article ARGS1(
abort_socket(); /* End of file, close socket */
return(HT_LOADED); /* End of file on response */
}
- if ((ch == LF) || (p == &line[LINE_LENGTH])) {
+ if (((char)ich == LF) || (p == &line[LINE_LENGTH])) {
*--p = '\0'; /* Terminate the string */
CTRACE(tfp, "H %s\n", line);
@@ -1309,8 +1311,9 @@ PRIVATE int read_article ARGS1(
p = line;
while (!done) {
- char ch = *p++ = NEXT_CHAR;
- if (ch == (char)EOF) {
+ int ich = NEXT_CHAR;
+ *p++ = ich;
+ if (ich == EOF) {
if (interrupted_in_htgetcharacter) {
interrupted_in_htgetcharacter = 0;
CTRACE(tfp, "HTNews: Interrupted on read, closing socket %d\n",
@@ -1322,7 +1325,7 @@ PRIVATE int read_article ARGS1(
abort_socket(); /* End of file, close socket */
return(HT_LOADED); /* End of file on response */
}
- if ((ch == LF) || (p == &line[LINE_LENGTH])) {
+ if (((char)ich == LF) || (p == &line[LINE_LENGTH])) {
*p++ = '\0'; /* Terminate the string */
CTRACE(tfp, "B %s", line);
if (line[0] == '.') {
@@ -1513,8 +1516,9 @@ PRIVATE int read_list ARGS1(char *, arg)
START(HTML_DLC);
PUTC('\n');
while (!done) {
- char ch = NEXT_CHAR;
- if (ch == (char)EOF) {
+ int ich = NEXT_CHAR;
+ char ch = ich;
+ if (ich == EOF) {
if (interrupted_in_htgetcharacter) {
interrupted_in_htgetcharacter = 0;
CTRACE(tfp, "HTNews: Interrupted on read, closing socket %d\n",
@@ -1738,8 +1742,9 @@ PRIVATE int read_group ARGS3(
if (status == 221) {
p = line;
while (!done) {
- char ch = *p++ = NEXT_CHAR;
- if (ch == (char)EOF) {
+ int ich = NEXT_CHAR;
+ *p++ = ich;
+ if (ich == EOF) {
if (interrupted_in_htgetcharacter) {
interrupted_in_htgetcharacter = 0;
CTRACE(tfp, "HTNews: Interrupted on read, closing socket %d\n",
@@ -1751,7 +1756,7 @@ PRIVATE int read_group ARGS3(
abort_socket(); /* End of file, close socket */
return(HT_LOADED); /* End of file on response */
}
- if ((ch == '\n') || (p == &line[LINE_LENGTH])) {
+ if (((char)ich == '\n') || (p == &line[LINE_LENGTH])) {
*p = '\0'; /* Terminate the string */
CTRACE(tfp, "X %s", line);
if (line[0] == '.') {
@@ -1841,8 +1846,9 @@ PRIVATE int read_group ARGS3(
p = line; /* Write pointer */
done = NO;
while( !done ) {
- char ch = *p++ = NEXT_CHAR;
- if (ch == (char)EOF) {
+ int ich = NEXT_CHAR;
+ *p++ = ich;
+ if (ich == EOF) {
if (interrupted_in_htgetcharacter) {
interrupted_in_htgetcharacter = 0;
CTRACE(tfp, "HTNews: Interrupted on read, closing socket %d\n",
@@ -1854,7 +1860,7 @@ PRIVATE int read_group ARGS3(
abort_socket(); /* End of file, close socket */
return(HT_LOADED); /* End of file on response */
}
- if ((ch == LF) ||
+ if (((char)ich == LF) ||
(p == &line[LINE_LENGTH])) {
*--p = '\0'; /* Terminate & chop LF*/
diff --git a/WWW/Library/Implementation/HTString.c b/WWW/Library/Implementation/HTString.c
index 9a89afdf..6beb2f44 100644
--- a/WWW/Library/Implementation/HTString.c
+++ b/WWW/Library/Implementation/HTString.c
@@ -813,14 +813,19 @@ PUBLIC void HTAddParam ARGS4(
/*
* Append the remaining command-string to a system command (compare with
- * HTAddParam). Any remaining "%s" tokens are copied as-is.
+ * HTAddParam). Any remaining "%s" tokens are copied as empty strings.
*/
PUBLIC void HTEndParam ARGS3(
char **, result,
CONST char *, command,
int, number)
{
- CONST char *last = HTAfterCommandArg(command, number);
+ CONST char *last;
+ int count;
+ count = HTCountCommandArgs (command);
+ if (count < number)
+ number = count;
+ last = HTAfterCommandArg(command, number);
if (last[0] != 0) {
HTSACat(result, last);
}
diff --git a/docs/djgpp.key b/docs/djgpp.key
index 18463347..0ce8631a 100644
--- a/docs/djgpp.key
+++ b/docs/djgpp.key
@@ -70,9 +70,6 @@ Pipe 0x07c
RBrace 0x07d
Tilde 0x07e
Control_Backspace 0x07f
-Alt_Escape 0x101
-Control_At 0x103
-Alt_Backspace 0x10e
BackTab 0x10f
Alt_Q 0x110
Alt_W 0x111
@@ -111,7 +108,6 @@ Alt_Comma 0x133
Alt_Period 0x134
Alt_Slash 0x135
Alt_KPStar 0x137
-F1 0x13b
F2 0x13c
F3 0x13d
F4 0x13e
@@ -124,8 +120,6 @@ F10 0x144
Alt_KPMinus 0x14a
Center 0x14c
Alt_KPPlus 0x14e
-Insert 0x152
-Delete 0x153
Shift_F1 0x154
Shift_F2 0x155
Shift_F3 0x156
@@ -205,8 +199,9 @@ Alt_EDelete 0x1a3
Alt_KPSlash 0x1a4
Alt_Tab 0x1a5
Alt_Enter 0x1a6
-EInsert 0x252
-EDelete 0x253
+Alt_Escape 0x1a7
+Control_At 0x1a8
+Alt_Backspace 0x1a9
Control_ELeft 0x273
Control_ERight 0x274
Control_EEnd 0x275
diff --git a/docs/pdcurses.key b/docs/pdcurses.key
index 927e8b31..84021afb 100644
--- a/docs/pdcurses.key
+++ b/docs/pdcurses.key
@@ -1,7 +1,12 @@
PDCurses Keymaps
-KEY_F0 0x108 /* function keys. space for */
-KEY_F(n) (KEY_F0+(n))/* 64 keys are reserved. */
+KEY_F2 0x213 /* F2 */
+KEY_F3 0x214 /* F3 */
+KEY_F4 0x215 /* F4 */
+KEY_F5 0x216 /* F5 */
+KEY_F6 0x217 /* F6 */
+KEY_F7 0x218 /* F7 */
+KEY_F(n) (0x108+(n)) /* If n>7 (9 keys are reserved) */
ALT_0 0x197 /* Alt-0 */
ALT_1 0x198 /* Alt-1 */
ALT_2 0x199 /* Alt-2 */
diff --git a/docs/slang.key b/docs/slang.key
index 3d7ef381..73108802 100644
--- a/docs/slang.key
+++ b/docs/slang.key
@@ -1,4 +1,4 @@
S-Lang Keymaps for DOS
F0 0x200
-F(X) (SL_KEY_F0 + X)
+F(X) (SL_KEY_F0 + X) /* If X>1 */
diff --git a/lynx.cfg b/lynx.cfg
index 70414051..48f73be7 100644
--- a/lynx.cfg
+++ b/lynx.cfg
@@ -227,6 +227,7 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html
# DEC Multinational dec-mcs
# Macintosh (8 bit) macintosh
# NeXT character set next
+# HP Roman8 hp-roman8
# Chinese euc-cn
# Japanese (EUC-JP) euc-jp
# Japanese (Shift_JIS) shift_jis
@@ -256,6 +257,9 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html
# Hebrew (windows-1255) windows-1255
# Turkish (ISO-8859-9) iso-8859-9
# ISO-8859-10 iso-8859-10
+# Ukrainian Cyrillic (ISO-9945-2) iso-9945-2
+# Ukrainian Cyrillic (cp866u) cp866u
+# Ukrainian Cyrillic (KOI8-U) koi8-u
# UNICODE (UTF-8) utf-8
# RFC 1345 w/o Intro mnemonic+ascii+0
# RFC 1345 Mnemonic mnemonic
@@ -1126,6 +1130,11 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html
# but may conflict with very strong security or permissions restrictions:
#DOWNLOADER:Use Zmodem to download to the local terminal:set %s %s;td=/tmp/Lsz$$;mkdir $td;ln -s $1 $td/"$2";sz $td/"$2";rm -r $td:TRUE
+# Note for OS/390: The following is strongly recommended /* S/390 -- gil -- 1464 */
+# to undo ASCII->EBCDIC conversion.
+#
+#DOWNLOADER:Save OS/390 binary file: iconv -f IBM-1047 -t ISO8859-1 %s >%s:FALSE
+
# Unix ONLY:
#===========
# Uploader definitions (implemented only with Unix DIRED_SUPPORT;
@@ -1513,7 +1522,7 @@ MINIMAL_COMMENTS:TRUE
#
# A representative list of functions mapped to their default keys is
# provided below. All of the mappings are commented out by default
-# since they just map to the default mappings, except for TOGGLE_HELP
+# since they just repeat the default mappings, except for TOGGLE_HELP
# (see below). See LYKeymap.c for the complete key mapping. Use the
# 'K'eymap command when running Lynx for a list of the _current_ keymappings.
#
@@ -1524,7 +1533,7 @@ MINIMAL_COMMENTS:TRUE
# when you are changing any KEYMAP below).
#
#
-# Special keys map to:
+# Keystrokes for special keys are represented by the following codes:
# Up Arrow: 0x100
# Down Arrow: 0x101
# Right Arrow: 0x102
@@ -1538,14 +1547,15 @@ MINIMAL_COMMENTS:TRUE
# vt100 Do Key: 0x109
# vt100 Find Key: 0x10A
# vt100 Select Key: 0x10B
-# vt100 Insert Key: 0x10C
-# vt100 Remove Key: 0x10D
-# (0x00) NULL KEY: 0x10E (DO_NOTHING)
+# Insert Key: 0x10C
+# Remove (Del) Key: 0x10D
+# ignored key 0x10E (reserved for internal use, DO_NOTHING)
+# Back (Shift) Tab: 0x10F
+# reserved code 0x11D (reserved for internal use with -use_mouse)
+# reserved code 0x290 (reserved for internal use with -use_mouse)
#
-# Note for OS/390: The following is strongly recommended /* S/390 -- gil -- 1464 */
-# to undo ASCII->EBCDIC conversion.
-#
-# DOWNLOADER:Save OS/390 binary file: iconv -f IBM-1047 -t ISO8859-1 %s >%s:FALSE
+# Other codes not listed above may be available for additional keys,
+# depending on operating system and libraries used to compile Lynx.
#KEYMAP:0x2F:SOURCE # Toggle source viewing mode (show HTML source)
#KEYMAP:^R:RELOAD # Reload the current document and redisplay
@@ -1566,15 +1576,15 @@ MINIMAL_COMMENTS:TRUE
#KEYMAP:^E:END # Go to bottom of current document
#KEYMAP:0x107:END # Keypad End - Go to bottom of current document
#KEYMAP:0x10B:END # Function key Select - Go to bottom of current document
-#KEYMAP:0x100:PREV_LINK # Move to the previous link
-#KEYMAP:0x101:NEXT_LINK # Move to the next link
+#KEYMAP:0x100:PREV_LINK # Move to the previous link or page
+#KEYMAP:0x101:NEXT_LINK # Move to the next link or page
+#KEYMAP:0x10F:FASTBACKW_LINK # Move always to previous link or text area
+#KEYMAP:^I:FASTFORW_LINK # Move always to next link or text area
#KEYMAP:<:UP_LINK # Move to the link above
#KEYMAP:>:DOWN_LINK # Move to the link below
-#KEYMAP:0x00:RIGHT_LINK # Move to the link to the right
-#KEYMAP:0x00:LEFT_LINK # Move to the link to the left
-#KEYMAP:0x7F:HISTORY # Display stack of currently-suspended documents
-#KEYMAP:0x08:HISTORY # Display stack of currently-suspended documents
-#KEYMAP:0x103:PREV_DOC # Return to the previous document
+#KEYMAP:0x7F:HISTORY # Show the history list
+#KEYMAP:0x08:HISTORY # Show the history list
+#KEYMAP:0x103:PREV_DOC # Return to the previous document in history stack
#KEYMAP:0x102:ACTIVATE # Select the current link
#KEYMAP:0x109:ACTIVATE # Function key Do - Select the current link
#KEYMAP:g:GOTO # Goto a random URL
@@ -1605,12 +1615,22 @@ MINIMAL_COMMENTS:TRUE
#KEYMAP:k:KEYMAP # Display the current key map
#KEYMAP:l:LIST # List the references (links) in the current document
#KEYMAP:#:TOOLBAR # Go to the Toolbar or Banner in the current document
-#KEYMAP:^T:TRACE_TOGGLE # Toggle tracing of browser operations
+#KEYMAP:^T:TRACE_TOGGLE # Toggle detailed tracing for debugging
+#KEYMAP:;:TRACE_LOG # View trace log if available for the current session
#KEYMAP:*:IMAGE_TOGGLE # Toggle inclusion of links for all images
#KEYMAP:[:INLINE_TOGGLE # Toggle pseudo-ALTs for inlines with no ALT string
+#KEYMAP:]:HEAD # Send a HEAD request for current document or link
#*** Must be compiled with USE_EXTERNALS to enable EXTERN ***
#KEYMAP:.:EXTERN # Run external program with url
+#*** Escaping from text input fields with ^V is independent from this: ***
+#KEYMAP:^V:SWITCH_DTD # Toggle between SortaSGML and TagSoup HTML parsing
#KEYMAP:0x00:DO_NOTHING # Does nothing (ignore this key)
+#KEYMAP:0x10E:DO_NOTHING # Does nothing (ignore this key)
+#
+# In addition, the following functions are not mapped to any keys by default:
+#
+#KEYMAP:???:RIGHT_LINK # Move to the link to the right
+#KEYMAP:???:LEFT_LINK # Move to the link to the left
# If TOGGLE_HELP is mapped, in novice mode the second help menu line
# can be toggled among NOVICE_LINE_TWO_A, _B, and _C, as defined in
@@ -1671,6 +1691,8 @@ MINIMAL_COMMENTS:TRUE
# %d date of last modification
# %a anchor pointing to file or directory
# %A as above but don't show symbolic links
+# %t type of file (description derived from MIME type)
+# %T MIME type as known by Lynx (from mime.types or default)
# %k size of file in Kilobytes
# %K as above but omit size for directories
# %s size of file in bytes
@@ -1875,7 +1897,7 @@ MINIMAL_COMMENTS:TRUE
#
# EXTERNAL:ftp:wget %s &:TRUE
-# CERN-style rules, *EXPERIMENTAL* - URL-specific rules
+# CERN-style rules, EXPERIMENTAL - URL-specific rules
#
# A CERN-style rules file can be given with RULESFILE. Use the system's
# native format for filenames, on Unix '~' is also recognized. If a filename
@@ -1884,11 +1906,11 @@ MINIMAL_COMMENTS:TRUE
# Single CERN-style rules can be specified with RULES.
#
# Both options can be repeated, rules accumulate in the order
-# given, they will be applied in first-to-last order.
+# given, they will be applied in first-to-last order. See cernrules.txt
+# in the samples subdirectory for further explanation.
#
# Examples:
# RULESFILE:/etc/lynx/cernrules
-# RULE:Fail file://localhost/etc/passwd* # Don't rely on it!
# RULE:Fail gopher:* # reject by scheme
# RULE:Pass finger://*@localhost/ # allow this,
# RULE:Fail finger:* # but not others
diff --git a/lynx_help/keystrokes/alt_edit_help.html b/lynx_help/keystrokes/alt_edit_help.html
index 2090145a..bd79c6e8 100644
--- a/lynx_help/keystrokes/alt_edit_help.html
+++ b/lynx_help/keystrokes/alt_edit_help.html
@@ -41,14 +41,14 @@ the '.lynxrc' file.
UPPER Upper case the line - Ctrl-^
LOWER Lower case the line - Ctrl-_
- LKCMD Invoke cmd prompt - Ctrl-V (in form input fields, only) [2]
+ LKCMD Invoke cmd prompt - Ctrl-V (in form text fields, only) [2]
[1] "next" means the character "under" a box or underline style cursor; it
means "to the immediate right of" an I-beam (between characters) type
cursor.
-[2] Follow Ctrl-V with the key "e" bound to the EDIT function,
- to edit the form's textarea field using an external editor.
+[2] Follow Ctrl-V with the key "e" bound to the EDIT function,
+ to edit the form's textarea field using an external editor.
</pre>
</body>
</html>
diff --git a/lynx_help/keystrokes/edit_help.html b/lynx_help/keystrokes/edit_help.html
index a72e5a99..92008a63 100644
--- a/lynx_help/keystrokes/edit_help.html
+++ b/lynx_help/keystrokes/edit_help.html
@@ -43,15 +43,15 @@ is the <A HREF="alt_edit_help.html">Alternate Bindings</A> keymap.
UPPER Upper case the line - Ctrl-T
LOWER Lower case the line - Ctrl-K
- LKCMD Invoke cmd prompt - Ctrl-V (in form input fields, only) [2]
+ LKCMD Invoke cmd prompt - Ctrl-V (in form text fields, only) [2]
SWMAP Switch input keymap - Ctrl-^
[1] "next" means the character "under" a box or underline style cursor; it
means "to the immediate right of" an I-beam (between characters) type
cursor.
-[2] Follow Ctrl-V with the key "e" bound to the EDIT function,
- to edit the form's textarea field using an external editor.
+[2] Follow Ctrl-V with the key "e" bound to the EDIT function,
+ to edit the form's textarea field using an external editor.
</pre>
</body>
</html>
diff --git a/lynx_help/keystrokes/option_help.html b/lynx_help/keystrokes/option_help.html
index 6d9ae0f6..27ce6bb5 100644
--- a/lynx_help/keystrokes/option_help.html
+++ b/lynx_help/keystrokes/option_help.html
@@ -55,12 +55,16 @@ compiled in or chosen in `lynx.cfg':<P>
<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.
+See the Users Guide for details of <A HREF="../Lynx_users_guide.html#Cookies"
+>cookie usage</A>.
<H1><A NAME="ED">Editor</A></H1>
-If non-empty, it defines the editor to spawn when editing a local file
-or sending mail. Any valid text editor may be entered here.
+This is the editor to be invoked when editing browsable files,
+sending mail or comments, or filling form's textarea (multiline input field).
+The full pathname of the editor command should be specified when possible.
+It is assumed the text editor supports the same character set
+you have for "display character set" in Lynx.
<H1><A NAME="EM">Emacs keys</A></H1>
@@ -286,8 +290,9 @@ and windows-xxxx within native MS-Windows applications.
<H1><A NAME="DV">X DISPLAY variable</A></H1>
-If non-empty, it specifies your <A HREF="xterm_help.html">X terminal</A>
-display address.
+This option is only relevant to X Window users. It specifies
+the DISPLAY (Unix) or DECW$DISPLAY (VMS) variable. It is picked up
+automatically from the environment if it has been previously set.
<H1><A NAME="MB">Multi-bookmarks</A></H1>
diff --git a/makefile.in b/makefile.in
index 1a0c5e12..915d25e1 100644
--- a/makefile.in
+++ b/makefile.in
@@ -175,9 +175,9 @@ SITE_DEFS = # Your defines here
# TESTED: Linux FreeBSD SunOS Solaris IRIX CLIX HP-UX AIX SCO
all lynx$x: cfg_defs.h LYHelp.h
- @MSG_DIR_MAKE@$(SHELL) $(srcdir)/fixtext.sh $(srcdir)/LYMessages_en.h >LYMessages.c
- @INTLDIR_MAKE@cd intl && $(MAKE) CC="$(CC)"
- @MSG_DIR_MAKE@cd po && $(MAKE) CC="$(CC)"
+@MSG_DIR_MAKE@ $(SHELL) $(srcdir)/fixtext.sh $(srcdir)/LYMessages_en.h >LYMessages.c
+@INTLDIR_MAKE@ cd intl && $(MAKE) CC="$(CC)"
+@MSG_DIR_MAKE@ cd po && $(MAKE) CC="$(CC)"
cd WWW/Library/unix && $(MAKE) CC="$(CC)" \
LY_CFLAGS="$(CFLAGS)" \
CPPFLAGS="$(CPPFLAGS)" \
@@ -219,10 +219,11 @@ clean:
rm -f WWW/Library/*/*.[aob]
rm -f WWW/Library/*/.created
cd src && $(MAKE) clean
- @MSG_DIR_MAKE@rm -f LYMessages.c
- @INTLDIR_MAKE@cd intl && $(MAKE) $@
- @MSG_DIR_MAKE@cd po && $(MAKE) $@
- rm -f *.b src/lynx$x core Lynx.leaks cfg_defs.h LYHelp.h lint.*
+@MSG_DIR_MAKE@ rm -f LYMessages.c
+@INTLDIR_MAKE@ cd intl && $(MAKE) $@
+@MSG_DIR_MAKE@ cd po && $(MAKE) $@
+ rm -f *.b src/lynx$x *.leaks cfg_defs.h LYHelp.h lint.*
+ rm -f core *.core
depend: cfg_defs.h LYHelp.h
cd WWW/Library/unix && $(MAKE) $@
@@ -234,16 +235,16 @@ distclean: clean
-rm -rf src/obsolete
-cd src && $(MAKE) $@
-cd src/chrtrans && $(MAKE) $@
- @INTLDIR_MAKE@cd intl && $(MAKE) $@
- @MSG_DIR_MAKE@-rmdir intl
- @MSG_DIR_MAKE@cd po && $(MAKE) $@
- @MSG_DIR_MAKE@-rmdir po
+@INTLDIR_MAKE@ cd intl && $(MAKE) $@
+@MSG_DIR_MAKE@ -rmdir intl
+@MSG_DIR_MAKE@ cd po && $(MAKE) $@
+@MSG_DIR_MAKE@ -rmdir po
-rm -f *~ *.bak *.sav
-rm -f WWW/Library/unix/makefile src/makefile src/chrtrans/makefile
- @SRCDIR_CLEAN@-find . -type f -name '*.rej' -exec rm -f {} \;
- @SRCDIR_CLEAN@-find . -type f -name '*.orig' -exec rm -f {} \;
- @SRCDIR_CLEAN@-rmdir WWW/Library/unix && rmdir WWW/Library && rmdir WWW
- @SRCDIR_CLEAN@-rmdir src/chrtrans && rmdir src
+@SRCDIR_CLEAN@ -find . -type f -name '*.rej' -exec rm -f {} \;
+@SRCDIR_CLEAN@ -find . -type f -name '*.orig' -exec rm -f {} \;
+@SRCDIR_CLEAN@ -rmdir WWW/Library/unix && rmdir WWW/Library && rmdir WWW
+@SRCDIR_CLEAN@ -rmdir src/chrtrans && rmdir src
-rm -f makefile lynx_cfg.h config.status config.log config.cache
-rm -f lynx$x install-*
@@ -284,7 +285,7 @@ install-full: install install-help install-doc
@echo Full installation complete.
install-bin: $(bindir)
- @MSG_DIR_MAKE@cd po && $(MAKE) CC="$(CC)" install
+@MSG_DIR_MAKE@ cd po && $(MAKE) CC="$(CC)" install
-mv -f $(bindir)/lynx$x $(bindir)/lynx.old
$(INSTALL_PROGRAM) lynx$x $(bindir)/
@@ -383,7 +384,7 @@ install-lss : $(libdir)
$(INSTALL_DATA) $(srcdir)/samples/lynx.lss $(libdir)/lynx.lss
uninstall:
- @MSG_DIR_MAKE@cd po && $(MAKE) CC="$(CC)" uninstall
+@MSG_DIR_MAKE@ cd po && $(MAKE) CC="$(CC)" uninstall
-rm -f $(bindir)/lynx$x
-rm -f $(mandir)/lynx.1
-rm -f $(libdir)/lynx.cfg
diff --git a/po/lynx.pot b/po/lynx.pot
index a23b61ff..2a631c78 100644
--- a/po/lynx.pot
+++ b/po/lynx.pot
@@ -1,6 +1,6 @@
msgid ""
msgstr ""
-"Date: 1999-02-07 21:48:54-0500\n"
+"Date: 1999-02-17 07:13:29-0500\n"
"From: Thomas Dickey,,, <tom@dickey-ppp>\n"
"Content-Type: text/plain; charset=\n"
"Xgettext-Options: --default-domain=lynx --directory=.. --add-comments --keyword=_ --keyword=N_ --files-from=./POTFILES.in\n"
@@ -453,7 +453,7 @@ msgstr ""
#. #define SPAWNING_MSG
#: LYMessages.c:186
-msgid "Type EXIT to return to Lynx.\r\n"
+msgid "Type EXIT to return to Lynx.\n"
msgstr ""
#. UNIX
@@ -2018,14 +2018,14 @@ msgid ""
msgstr ""
#. #define ENTER_PERIOD_WHEN_DONE_A
-#: LYMessages.c:656 src/LYNews.c:329
+#: LYMessages.c:656 src/LYNews.c:327
msgid ""
"\n"
" When you are done, press enter and put a single period (.)"
msgstr ""
#. #define ENTER_PERIOD_WHEN_DONE_B
-#: LYMessages.c:658 src/LYNews.c:330
+#: LYMessages.c:658 src/LYNews.c:328
msgid ""
"\n"
" on a line and press enter again."
@@ -2042,455 +2042,464 @@ msgstr ""
msgid "Accept invalid cookie domain=%s for '%s'?"
msgstr ""
-#: LYMessages.c:665
+#. #define INVALID_COOKIE_PATH_CONFIRMATION
+#: LYMessages.c:666
+msgid "Accept invalid cookie path=%s as a prefix of '%s'?"
+msgstr ""
+
+#: LYMessages.c:667
msgid "Allowing this cookie."
msgstr ""
-#: LYMessages.c:666
+#: LYMessages.c:668
msgid "Rejecting this cookie."
msgstr ""
-#: LYMessages.c:667
+#: LYMessages.c:669
msgid "The Cookie Jar is empty."
msgstr ""
#. #define ACTIVATE_TO_GOBBLE
-#: LYMessages.c:669
+#: LYMessages.c:671
msgid "Activate links to gobble up cookies or entire domains,"
msgstr ""
-#: LYMessages.c:670
+#: LYMessages.c:672
msgid "or to change a domain's 'allow' setting."
msgstr ""
-#: LYMessages.c:671
+#: LYMessages.c:673
msgid "(Cookies never allowed.)"
msgstr ""
-#: LYMessages.c:672
+#: LYMessages.c:674
msgid "(Cookies always allowed.)"
msgstr ""
-#: LYMessages.c:673
+#: LYMessages.c:675
msgid "(Cookies allowed via prompt.)"
msgstr ""
-#: LYMessages.c:674
+#: LYMessages.c:676
msgid "(Persistent Cookies.)"
msgstr ""
-#: LYMessages.c:675
+#: LYMessages.c:677
msgid "(No title.)"
msgstr ""
-#: LYMessages.c:676
+#: LYMessages.c:678
msgid "(No name.)"
msgstr ""
-#: LYMessages.c:677
+#: LYMessages.c:679
msgid "(No value.)"
msgstr ""
-#: LYMessages.c:678
+#: LYMessages.c:680
msgid "None"
msgstr ""
-#: LYMessages.c:679
+#: LYMessages.c:681
msgid "(End of session.)"
msgstr ""
-#: LYMessages.c:680
+#: LYMessages.c:682
msgid "Delete this cookie?"
msgstr ""
-#: LYMessages.c:681
+#: LYMessages.c:683
msgid "The cookie has been eaten!"
msgstr ""
-#: LYMessages.c:682
+#: LYMessages.c:684
msgid "Delete this empty domain?"
msgstr ""
-#: LYMessages.c:683
+#: LYMessages.c:685
msgid "The domain has been eaten!"
msgstr ""
#. #define DELETE_COOKIES_SET_ALLOW_OR_CANCEL
-#: LYMessages.c:685
+#: LYMessages.c:687
msgid "D)elete domain's cookies, set allow A)lways/P)rompt/neV)er, or C)ancel? "
msgstr ""
#. #define DELETE_DOMAIN_SET_ALLOW_OR_CANCEL
-#: LYMessages.c:687
+#: LYMessages.c:689
msgid "D)elete domain, set allow A)lways/P)rompt/neV)er, or C)ancel? "
msgstr ""
-#: LYMessages.c:688
+#: LYMessages.c:690
msgid "All cookies in the domain have been eaten!"
msgstr ""
-#: LYMessages.c:689
+#: LYMessages.c:691
msgid "'A'lways allowing from domain '%s'."
msgstr ""
-#: LYMessages.c:690
+#: LYMessages.c:692
msgid "ne'V'er allowing from domain '%s'."
msgstr ""
-#: LYMessages.c:691
+#: LYMessages.c:693
msgid "'P'rompting to allow from domain '%s'."
msgstr ""
-#: LYMessages.c:692
+#: LYMessages.c:694
msgid "Delete all cookies in this domain?"
msgstr ""
-#: LYMessages.c:693
+#: LYMessages.c:695
msgid "All of the cookies in the jar have been eaten!"
msgstr ""
-#: LYMessages.c:695
+#: LYMessages.c:697
msgid "Port 19 not permitted in URLs."
msgstr ""
-#: LYMessages.c:696
+#: LYMessages.c:698
msgid "Port 25 not permitted in URLs."
msgstr ""
-#: LYMessages.c:697
+#: LYMessages.c:699
msgid "Port %lu not permitted in URLs."
msgstr ""
-#: LYMessages.c:698
+#: LYMessages.c:700
msgid "URL has a bad port field."
msgstr ""
-#: LYMessages.c:699
+#: LYMessages.c:701
msgid "Maximum nesting of HTML elements exceeded."
msgstr ""
-#: LYMessages.c:700
+#: LYMessages.c:702
msgid "Bad partial reference! Stripping lead dots."
msgstr ""
-#: LYMessages.c:701
+#: LYMessages.c:703
msgid "Trace Log open failed. Trace off!."
msgstr ""
-#: LYMessages.c:702
+#: LYMessages.c:704
msgid "Lynx Trace Log"
msgstr ""
-#: LYMessages.c:703
+#: LYMessages.c:705
msgid "No trace log has been started for this session."
msgstr ""
#. #define MAX_TEMPCOUNT_REACHED
-#: LYMessages.c:705
+#: LYMessages.c:707
msgid "The maximum temporary file count has been reached!"
msgstr ""
#. #define FORM_VALUE_TOO_LONG
-#: LYMessages.c:707
+#: LYMessages.c:709
msgid "Form field value exceeds buffer length! Trim the tail."
msgstr ""
#. #define FORM_TAIL_COMBINED_WITH_HEAD
-#: LYMessages.c:709
+#: LYMessages.c:711
msgid "Modified tail combined with head of form field value."
msgstr ""
-#: LYMessages.c:712
+#. HTFile.c
+#: LYMessages.c:714
+msgid "Directory"
+msgstr ""
+
+#: LYMessages.c:715
msgid "Directory browsing is not allowed."
msgstr ""
-#: LYMessages.c:713
+#: LYMessages.c:716
msgid "Selective access is not enabled for this directory"
msgstr ""
-#: LYMessages.c:714
+#: LYMessages.c:717
msgid "Multiformat: directory scan failed."
msgstr ""
-#: LYMessages.c:715
+#: LYMessages.c:718
msgid "This directory is not readable."
msgstr ""
-#: LYMessages.c:716
+#: LYMessages.c:719
msgid "Can't access requested file."
msgstr ""
-#: LYMessages.c:717
+#: LYMessages.c:720
msgid "Could not find suitable representation for transmission."
msgstr ""
-#: LYMessages.c:718
+#: LYMessages.c:721
msgid "Could not open file for decompression!"
msgstr ""
-#: LYMessages.c:719
+#: LYMessages.c:722
msgid "Files:"
msgstr ""
-#: LYMessages.c:720
+#: LYMessages.c:723
msgid "Subdirectories:"
msgstr ""
-#: LYMessages.c:721
+#: LYMessages.c:724
msgid " directory"
msgstr ""
-#: LYMessages.c:722
+#: LYMessages.c:725
msgid "Up to "
msgstr ""
-#: LYMessages.c:723
+#: LYMessages.c:726
msgid "Current directory is "
msgstr ""
#. HTGopher.c
-#: LYMessages.c:726
+#: LYMessages.c:729
msgid "No response from server!"
msgstr ""
-#: LYMessages.c:727
+#: LYMessages.c:730
msgid "CSO index"
msgstr ""
-#: LYMessages.c:728
+#: LYMessages.c:731
msgid ""
"\n"
"This is a searchable index of a CSO database.\n"
msgstr ""
-#: LYMessages.c:729
+#: LYMessages.c:732
msgid "CSO Search Results"
msgstr ""
-#: LYMessages.c:730
+#: LYMessages.c:733
msgid "Seek fail on %s\n"
msgstr ""
-#: LYMessages.c:731
+#: LYMessages.c:734
msgid ""
"\n"
"Press the 's' key and enter search keywords.\n"
msgstr ""
-#: LYMessages.c:732
+#: LYMessages.c:735
msgid ""
"\n"
"This is a searchable Gopher index.\n"
msgstr ""
-#: LYMessages.c:733
+#: LYMessages.c:736
msgid "Gopher index"
msgstr ""
-#: LYMessages.c:734
+#: LYMessages.c:737
msgid "Gopher Menu"
msgstr ""
-#: LYMessages.c:735
+#: LYMessages.c:738
msgid " Search Results"
msgstr ""
-#: LYMessages.c:736
+#: LYMessages.c:739
msgid "Sending CSO/PH request."
msgstr ""
-#: LYMessages.c:737
+#: LYMessages.c:740
msgid "Sending Gopher request."
msgstr ""
-#: LYMessages.c:738
+#: LYMessages.c:741
msgid "CSO/PH request sent; waiting for response."
msgstr ""
-#: LYMessages.c:739
+#: LYMessages.c:742
msgid "Gopher request sent; waiting for response."
msgstr ""
-#: LYMessages.c:740
+#: LYMessages.c:743
msgid ""
"\n"
"Please enter search keywords.\n"
msgstr ""
-#: LYMessages.c:741
+#: LYMessages.c:744
msgid ""
"\n"
"The keywords that you enter will allow you to search on a"
msgstr ""
-#: LYMessages.c:742
+#: LYMessages.c:745
msgid " person's name in the database.\n"
msgstr ""
-#: LYMessages.c:745
+#. HTNews.c
+#: LYMessages.c:748
msgid "Connection closed ???"
msgstr ""
-#: LYMessages.c:746
+#: LYMessages.c:749
msgid "Cannot open temporary file for news POST."
msgstr ""
-#: LYMessages.c:747
+#: LYMessages.c:750
msgid "This client does not contain support for posting to news with SSL."
msgstr ""
#. HTStyle.c
-#: LYMessages.c:750
+#: LYMessages.c:753
msgid "Style %d `%s' SGML:%s. Font %s %.1f point.\n"
msgstr ""
-#: LYMessages.c:751
+#: LYMessages.c:754
msgid "\tIndents: first=%.0f others=%.0f, Height=%.1f Desc=%.1f\n"
msgstr ""
-#: LYMessages.c:752
+#: LYMessages.c:755
msgid "\tAlign=%d, %d tabs. (%.0f before, %.0f after)\n"
msgstr ""
-#: LYMessages.c:753
+#: LYMessages.c:756
msgid "\t\tTab kind=%d at %.0f\n"
msgstr ""
-#. HTTP.c
-#: LYMessages.c:756
+#: LYMessages.c:759
msgid "Can't proceed without a username and password."
msgstr ""
-#: LYMessages.c:757
+#: LYMessages.c:760
msgid "Can't retry with authorization! Contact the server's WebMaster."
msgstr ""
-#: LYMessages.c:758
+#: LYMessages.c:761
msgid "Can't retry with proxy authorization! Contact the server's WebMaster."
msgstr ""
-#: LYMessages.c:759
+#: LYMessages.c:762
msgid "Retrying with proxy authorization information."
msgstr ""
-#. HTWAIS.c
-#: LYMessages.c:762
+#: LYMessages.c:765
msgid "HTWAIS: Return message too large."
msgstr ""
-#: LYMessages.c:763
+#: LYMessages.c:766
msgid "Enter WAIS query: "
msgstr ""
#. Miscellaneous status
-#: LYMessages.c:766
+#: LYMessages.c:769
msgid "Retrying as HTTP0 request."
msgstr ""
-#: LYMessages.c:767
+#: LYMessages.c:770
msgid "Transferred %d bytes"
msgstr ""
-#: LYMessages.c:768
+#: LYMessages.c:771
msgid "Data transfer complete"
msgstr ""
-#: LYMessages.c:769
+#: LYMessages.c:772
msgid "Error processing line %d of %s\n"
msgstr ""
#. Lynx internal page titles
-#: LYMessages.c:772
+#: LYMessages.c:775
msgid "Configuration Definitions"
msgstr ""
-#: LYMessages.c:773
+#: LYMessages.c:776
msgid "Cookie Jar"
msgstr ""
-#: LYMessages.c:774
+#: LYMessages.c:777
msgid "Current Key Map"
msgstr ""
-#: LYMessages.c:775
+#: LYMessages.c:778
msgid "File Management Options"
msgstr ""
-#: LYMessages.c:776
+#: LYMessages.c:779
msgid "Download Options"
msgstr ""
-#: LYMessages.c:777
+#: LYMessages.c:780
msgid "History Page"
msgstr ""
-#: LYMessages.c:778
+#: LYMessages.c:781
msgid "List Page"
msgstr ""
-#: LYMessages.c:779
+#: LYMessages.c:782
msgid "Lynx.cfg Information"
msgstr ""
-#: LYMessages.c:780
+#: LYMessages.c:783
msgid "Options Menu"
msgstr ""
-#: LYMessages.c:781
+#: LYMessages.c:784
msgid "File Permission Options"
msgstr ""
-#: LYMessages.c:782
+#: LYMessages.c:785
msgid "Printing Options"
msgstr ""
-#: LYMessages.c:783
+#: LYMessages.c:786
msgid "Information about the current document"
msgstr ""
-#: LYMessages.c:784
+#: LYMessages.c:787
msgid "Upload Options"
msgstr ""
-#: LYMessages.c:785
+#: LYMessages.c:788
msgid "Visited Links Page"
msgstr ""
-#: LYMessages.c:786
+#: LYMessages.c:789
msgid "Bookmark file"
msgstr ""
-#: LYMessages.c:787
+#: LYMessages.c:790
msgid "Converted Mosaic Hotlist"
msgstr ""
#. CONFIG_DEF_TITLE subtitles
-#: LYMessages.c:790
+#: LYMessages.c:793
msgid "See also"
msgstr ""
-#: LYMessages.c:791
+#: LYMessages.c:794
msgid "your"
msgstr ""
-#: LYMessages.c:792
+#: LYMessages.c:795
msgid "for runtime options"
msgstr ""
-#: LYMessages.c:793
+#: LYMessages.c:796
msgid "compile time options"
msgstr ""
-#: LYMessages.c:794
+#: LYMessages.c:797
msgid "latest release"
msgstr ""
-#: LYMessages.c:795
+#: LYMessages.c:798
msgid "development version"
msgstr ""
#. #define AUTOCONF_CONFIG_CACHE
-#: LYMessages.c:797
+#: LYMessages.c:800
msgid ""
"The following data were derived during the automatic configuration/build\n"
"process of this copy of Lynx. When reporting a bug, please include a copy\n"
@@ -2498,28 +2507,27 @@ msgid ""
msgstr ""
#. #define AUTOCONF_LYNXCFG_H
-#: LYMessages.c:801
+#: LYMessages.c:804
msgid ""
"The following data were used as automatically-configured compile-time\n"
"definitions when this copy of Lynx was built."
msgstr ""
#. #define DIRED_NOVICELINE
-#: LYMessages.c:806
+#: LYMessages.c:809
msgid " C)reate D)ownload E)dit F)ull menu M)odify R)emove T)ag U)pload \n"
msgstr ""
-#: LYMessages.c:807
+#: LYMessages.c:810
msgid "Failed to obtain status of current link!"
msgstr ""
#. #define INVALID_PERMIT_URL
-#: LYMessages.c:810
+#: LYMessages.c:813
msgid "Special URL only valid from current File Permission menu!"
msgstr ""
-#. DIRED_SUPPORT
-#: LYMessages.c:814
+#: LYMessages.c:817
msgid "External support is currently disabled."
msgstr ""
@@ -2575,31 +2583,40 @@ msgstr ""
msgid "Unable to access document."
msgstr ""
-#: WWW/Library/Implementation/HTFTP.c:702
+#: WWW/Library/Implementation/HTFTP.c:703
msgid "Enter password for user %s@%s:"
msgstr ""
-#: WWW/Library/Implementation/HTFTP.c:730
+#: WWW/Library/Implementation/HTFTP.c:731
msgid "Unable to connect to FTP host."
msgstr ""
-#: WWW/Library/Implementation/HTFTP.c:989
+#: WWW/Library/Implementation/HTFTP.c:990
msgid "close master socket"
msgstr ""
-#: WWW/Library/Implementation/HTFTP.c:1029
+#: WWW/Library/Implementation/HTFTP.c:1030
msgid "socket for master socket"
msgstr ""
-#: WWW/Library/Implementation/HTFTP.c:2309
+#.
+#. ** It's a symbolic link, does the user care about
+#. ** knowing if it is symbolic? I think so since
+#. ** it might be a directory.
+#.
+#: WWW/Library/Implementation/HTFTP.c:1957
+msgid "Symbolic Link"
+msgstr ""
+
+#: WWW/Library/Implementation/HTFTP.c:2310
msgid "Receiving FTP directory."
msgstr ""
-#: WWW/Library/Implementation/HTFTP.c:2656
+#: WWW/Library/Implementation/HTFTP.c:2658
msgid "connect for data"
msgstr ""
-#: WWW/Library/Implementation/HTFTP.c:3232
+#: WWW/Library/Implementation/HTFTP.c:3234
msgid "Receiving FTP file."
msgstr ""
@@ -2623,107 +2640,104 @@ msgstr ""
msgid "No response from finger server."
msgstr ""
-#: WWW/Library/Implementation/HTNews.c:355
+#: WWW/Library/Implementation/HTNews.c:356
msgid "Username for news host '%s':"
msgstr ""
-#: WWW/Library/Implementation/HTNews.c:408
+#: WWW/Library/Implementation/HTNews.c:409
msgid "Change username?"
msgstr ""
-#: WWW/Library/Implementation/HTNews.c:412
+#: WWW/Library/Implementation/HTNews.c:413
msgid "Username:"
msgstr ""
-#: WWW/Library/Implementation/HTNews.c:439
+#: WWW/Library/Implementation/HTNews.c:440
msgid "Password for news host '%s':"
msgstr ""
-#: WWW/Library/Implementation/HTNews.c:522
+#: WWW/Library/Implementation/HTNews.c:523
msgid "Change password?"
msgstr ""
-#: WWW/Library/Implementation/HTNews.c:1622
+#: WWW/Library/Implementation/HTNews.c:1626
msgid "No matches for: %s"
msgstr ""
-#: WWW/Library/Implementation/HTNews.c:1673
+#: WWW/Library/Implementation/HTNews.c:1677
msgid ""
"\n"
"No articles in this group.\n"
msgstr ""
-#: WWW/Library/Implementation/HTNews.c:1686
+#: WWW/Library/Implementation/HTNews.c:1690
msgid ""
"\n"
"No articles in this range.\n"
msgstr ""
-#.
-#. ** Set window title.
-#.
-#: WWW/Library/Implementation/HTNews.c:1699
+#: WWW/Library/Implementation/HTNews.c:1703
msgid "%s, Articles %d-%d"
msgstr ""
-#: WWW/Library/Implementation/HTNews.c:1720
+#: WWW/Library/Implementation/HTNews.c:1724
msgid "Earlier articles"
msgstr ""
-#: WWW/Library/Implementation/HTNews.c:1733
+#: WWW/Library/Implementation/HTNews.c:1737
msgid ""
"\n"
"There are about %d articles currently available in %s, IDs as follows:\n"
"\n"
msgstr ""
-#: WWW/Library/Implementation/HTNews.c:1791
+#: WWW/Library/Implementation/HTNews.c:1796
msgid "All available articles in "
msgstr ""
-#: WWW/Library/Implementation/HTNews.c:2001
+#: WWW/Library/Implementation/HTNews.c:2007
msgid "Later articles"
msgstr ""
-#: WWW/Library/Implementation/HTNews.c:2025
+#: WWW/Library/Implementation/HTNews.c:2031
msgid "Post to "
msgstr ""
-#: WWW/Library/Implementation/HTNews.c:2202
+#: WWW/Library/Implementation/HTNews.c:2208
msgid "This client does not contain support for SNEWS URLs."
msgstr ""
-#: WWW/Library/Implementation/HTNews.c:2383
+#: WWW/Library/Implementation/HTNews.c:2389
msgid "No target for raw text!"
msgstr ""
-#: WWW/Library/Implementation/HTNews.c:2413
+#: WWW/Library/Implementation/HTNews.c:2419
msgid "Connecting to NewsHost ..."
msgstr ""
-#: WWW/Library/Implementation/HTNews.c:2447
+#: WWW/Library/Implementation/HTNews.c:2453
msgid "Could not access %s."
msgstr ""
-#: WWW/Library/Implementation/HTNews.c:2494
+#: WWW/Library/Implementation/HTNews.c:2500
msgid "Can't read news info. News host %.20s responded: %.200s"
msgstr ""
#.
#. ** List available newsgroups. - FM
#.
-#: WWW/Library/Implementation/HTNews.c:2690
+#: WWW/Library/Implementation/HTNews.c:2696
msgid "Reading list of available newsgroups."
msgstr ""
-#: WWW/Library/Implementation/HTNews.c:2712
+#: WWW/Library/Implementation/HTNews.c:2718
msgid "Reading list of articles in newsgroup."
msgstr ""
#.
#. ** Get an article from a news group. - FM
#.
-#: WWW/Library/Implementation/HTNews.c:2718
+#: WWW/Library/Implementation/HTNews.c:2724
msgid "Reading news article."
msgstr ""
@@ -3026,83 +3040,83 @@ msgstr ""
msgid "Host"
msgstr ""
-#: src/GridText.c:350
+#: src/GridText.c:353
msgid "Memory exhausted, display interrupted!"
msgstr ""
-#: src/GridText.c:355
+#: src/GridText.c:358
msgid "Memory exhausted, will interrupt transfer!"
msgstr ""
-#: src/GridText.c:2398
+#: src/GridText.c:2401
msgid " *** MEMORY EXHAUSTED ***"
msgstr ""
-#: src/GridText.c:3884 src/GridText.c:3891 src/LYList.c:244
+#: src/GridText.c:3887 src/GridText.c:3894 src/LYList.c:244
msgid "unknown field or link"
msgstr ""
-#: src/GridText.c:3900
+#: src/GridText.c:3903
msgid "text entry field"
msgstr ""
-#: src/GridText.c:3903
+#: src/GridText.c:3906
msgid "password entry field"
msgstr ""
-#: src/GridText.c:3906
+#: src/GridText.c:3909
msgid "checkbox"
msgstr ""
-#: src/GridText.c:3909
+#: src/GridText.c:3912
msgid "radio button"
msgstr ""
-#: src/GridText.c:3912
+#: src/GridText.c:3915
msgid "submit button"
msgstr ""
-#: src/GridText.c:3915
+#: src/GridText.c:3918
msgid "reset button"
msgstr ""
-#: src/GridText.c:3918
+#: src/GridText.c:3921
msgid "popup menu"
msgstr ""
-#: src/GridText.c:3921
+#: src/GridText.c:3924
msgid "hidden form field"
msgstr ""
-#: src/GridText.c:3924
+#: src/GridText.c:3927
msgid "text entry area"
msgstr ""
-#: src/GridText.c:3927
+#: src/GridText.c:3930
msgid "range entry field"
msgstr ""
-#: src/GridText.c:3930
+#: src/GridText.c:3933
msgid "file entry field"
msgstr ""
-#: src/GridText.c:3933
+#: src/GridText.c:3936
msgid "text-submit field"
msgstr ""
-#: src/GridText.c:3936
+#: src/GridText.c:3939
msgid "image-submit button"
msgstr ""
-#: src/GridText.c:3939
+#: src/GridText.c:3942
msgid "keygen field"
msgstr ""
-#: src/GridText.c:3942
+#: src/GridText.c:3945
msgid "unknown form field"
msgstr ""
-#: src/GridText.c:8240
+#: src/GridText.c:8500
msgid "Submitting %s"
msgstr ""
@@ -3130,27 +3144,31 @@ msgstr ""
msgid " (Press 'z' to abort)"
msgstr ""
-#: src/HTAlert.c:206
-msgid "%s (y/n) "
+#: src/HTAlert.c:200
+msgid "yes"
+msgstr ""
+
+#: src/HTAlert.c:201
+msgid "no"
msgstr ""
-#: src/HTML.c:5490
+#: src/HTML.c:5492
msgid "Description:"
msgstr ""
-#: src/HTML.c:5495
+#: src/HTML.c:5497
msgid "(none)"
msgstr ""
-#: src/HTML.c:5499
+#: src/HTML.c:5501
msgid "Filepath:"
msgstr ""
-#: src/HTML.c:5504
+#: src/HTML.c:5506
msgid "(unknown)"
msgstr ""
-#: src/HTML.c:6774
+#: src/HTML.c:6776
msgid "Document has only hidden links. Use the 'l'ist command."
msgstr ""
@@ -3210,15 +3228,15 @@ msgid "Exiting via interrupt:"
msgstr ""
#. not used any more - kw
-#: src/LYCookie.c:2100
+#: src/LYCookie.c:2144
msgid "(From Cookie Jar)"
msgstr ""
-#: src/LYCookie.c:2516
+#: src/LYCookie.c:2560
msgid "(from a previous session)"
msgstr ""
-#: src/LYCookie.c:2576
+#: src/LYCookie.c:2620
msgid "Maximum Gobble Date:"
msgstr ""
@@ -3495,136 +3513,136 @@ msgstr ""
msgid "Create file or directory (f or d): "
msgstr ""
-#: src/LYLocal.c:922
-msgid "Remove '%s' and all of its contents (y or n): "
+#: src/LYLocal.c:921
+msgid "Remove '%s' and all of its contents: "
msgstr ""
-#: src/LYLocal.c:925
-msgid "Remove directory and all of its contents (y or n): "
+#: src/LYLocal.c:924
+msgid "Remove directory and all of its contents: "
msgstr ""
-#: src/LYLocal.c:929
-msgid "Remove file '%s' (y or n): "
+#: src/LYLocal.c:928
+msgid "Remove file '%s': "
msgstr ""
-#: src/LYLocal.c:931
-msgid "Remove file (y or n): "
+#: src/LYLocal.c:930
+msgid "Remove file: "
msgstr ""
-#: src/LYLocal.c:936
-msgid "Remove symbolic link '%s' (y or n): "
+#: src/LYLocal.c:935
+msgid "Remove symbolic link '%s': "
msgstr ""
-#: src/LYLocal.c:938
-msgid "Remove symbolic link (y or n): "
+#: src/LYLocal.c:937
+msgid "Remove symbolic link: "
msgstr ""
-#: src/LYLocal.c:1032
+#: src/LYLocal.c:1029
msgid "Sorry, don't know how to permit non-UNIX files yet."
msgstr ""
-#: src/LYLocal.c:1065
+#: src/LYLocal.c:1062
msgid "Unable to open permit options file"
msgstr ""
-#: src/LYLocal.c:1092
+#: src/LYLocal.c:1089
msgid "Specify permissions below:"
msgstr ""
-#: src/LYLocal.c:1093 src/LYShowInfo.c:222
+#: src/LYLocal.c:1090 src/LYShowInfo.c:222
msgid "Owner:"
msgstr ""
-#: src/LYLocal.c:1109
+#: src/LYLocal.c:1106
msgid "Group"
msgstr ""
-#: src/LYLocal.c:1125
+#: src/LYLocal.c:1122
msgid "Others:"
msgstr ""
-#: src/LYLocal.c:1143
+#: src/LYLocal.c:1140
msgid "form to permit"
msgstr ""
-#: src/LYLocal.c:1241
+#: src/LYLocal.c:1238
msgid "Invalid mode format."
msgstr ""
-#: src/LYLocal.c:1245
+#: src/LYLocal.c:1242
msgid "Invalid syntax format."
msgstr ""
-#: src/LYLocal.c:1364
+#: src/LYLocal.c:1361
msgid "NULL URL pointer"
msgstr ""
-#: src/LYLocal.c:1448
+#: src/LYLocal.c:1445
msgid "Warning! UUDecoded file will exist in the directory you started Lynx."
msgstr ""
-#: src/LYLocal.c:1560
+#: src/LYLocal.c:1557
msgid "Executing %s "
msgstr ""
-#: src/LYLocal.c:1563
+#: src/LYLocal.c:1560
msgid "Executing system command. This might take a while."
msgstr ""
-#: src/LYLocal.c:1607
+#: src/LYLocal.c:1604
msgid "Unable to open file management menu file."
msgstr ""
-#: src/LYLocal.c:1640
+#: src/LYLocal.c:1637
msgid "Current directory:"
msgstr ""
-#: src/LYLocal.c:1643 src/LYLocal.c:1661
+#: src/LYLocal.c:1640 src/LYLocal.c:1658
msgid "Current selection:"
msgstr ""
-#: src/LYLocal.c:1647
+#: src/LYLocal.c:1644
msgid "Nothing currently selected."
msgstr ""
-#: src/LYLocal.c:1662
+#: src/LYLocal.c:1659
msgid "tagged item:"
msgstr ""
-#: src/LYLocal.c:1662
+#: src/LYLocal.c:1659
msgid "tagged items:"
msgstr ""
-#: src/LYLocal.c:1759 src/LYLocal.c:1770
+#: src/LYLocal.c:1756 src/LYLocal.c:1767
msgid "Illegal filename; request ignored."
msgstr ""
-#: src/LYLocal.c:1812
+#: src/LYLocal.c:1809
msgid "The selected item is not a directory! Request ignored."
msgstr ""
#. directory not writable
-#: src/LYLocal.c:1815
+#: src/LYLocal.c:1812
msgid "Install in the selected directory not permitted."
msgstr ""
-#: src/LYLocal.c:1819
+#: src/LYLocal.c:1816
msgid "Just a moment, ..."
msgstr ""
-#: src/LYLocal.c:1849
+#: src/LYLocal.c:1846
msgid "Installation complete"
msgstr ""
-#: src/LYLocal.c:2017
+#: src/LYLocal.c:2014
msgid "Temporary URL or list would be too long."
msgstr ""
-#: src/LYLocal.c:2059
+#: src/LYLocal.c:2056
msgid "Unable to %s due to system error!"
msgstr ""
-#: src/LYLocal.c:2084
+#: src/LYLocal.c:2081
msgid "Probable failure to %s due to system error!"
msgstr ""
@@ -3669,122 +3687,128 @@ msgstr ""
msgid "Personal Name: "
msgstr ""
-#: src/LYMain.c:617
+#: src/LYMain.c:628
msgid "No Winsock found, sorry."
msgstr ""
-#: src/LYMain.c:783
+#: src/LYMain.c:794
msgid "You MUST define a valid TMP or TEMP area!\n"
msgstr ""
-#: src/LYMain.c:1181
+#.
+#. * If the configuration file is not available,
+#. * inform the user and exit.
+#.
+#: src/LYMain.c:1192
msgid ""
"\n"
"Configuration file %s is not available.\n"
"\n"
msgstr ""
-#.
-#. * Make sure we have the character sets declared.
-#. * This will initialize the CHARTRANS handling. - KW
-#.
-#: src/LYMain.c:1197
+#: src/LYMain.c:1208
msgid ""
"\n"
"Lynx character sets not declared.\n"
"\n"
msgstr ""
-#: src/LYMain.c:1256
+#: src/LYMain.c:1267
msgid ""
"\n"
"Lynx file %s is not available.\n"
"\n"
msgstr ""
-#: src/LYMain.c:1270
+#.
+#. * Make sure we have the edit map declared. - FM
+#.
+#: src/LYMain.c:1281
msgid ""
"\n"
"Lynx edit map not declared.\n"
"\n"
msgstr ""
-#: src/LYMain.c:2490
+#: src/LYMain.c:2501
msgid ""
"\n"
"%s Version %s (%.*s)\n"
msgstr ""
-#: src/LYMain.c:2497
+#: src/LYMain.c:2508
msgid "Copyrights held by the University of Kansas, CERN, and other contributors.\n"
msgstr ""
-#: src/LYMain.c:2499
+#: src/LYMain.c:2510
msgid "Distributed under the GNU General Public License.\n"
msgstr ""
-#: src/LYMain.c:2501
+#: src/LYMain.c:2512
msgid ""
"See http://lynx.browser.org/ and the online help for more information.\n"
"\n"
msgstr ""
-#: src/LYMain.c:3023
+#: src/LYMain.c:3034
msgid "USAGE: %s [options] [file]\n"
msgstr ""
-#: src/LYMain.c:3024
+#: src/LYMain.c:3035
msgid "Options are:\n"
msgstr ""
-#: src/LYMain.c:3223
+#: src/LYMain.c:3234
msgid "%s: Invalid Option: %s\n"
msgstr ""
-#: src/LYMainLoop.c:316 src/LYMainLoop.c:3659
+#: src/LYMainLoop.c:315 src/LYMainLoop.c:3828
msgid "Entry into main screen"
msgstr ""
-#: src/LYMainLoop.c:670 src/LYMainLoop.c:677
+#: src/LYMainLoop.c:669 src/LYMainLoop.c:676
msgid ""
"\n"
"lynx: Can't access startfile %s\n"
msgstr ""
-#: src/LYMainLoop.c:762
+#: src/LYMainLoop.c:761
msgid ""
"\n"
"lynx: Start file could not be found or is not text/html or text/plain\n"
msgstr ""
-#: src/LYMainLoop.c:763
+#: src/LYMainLoop.c:762
msgid " Exiting...\n"
msgstr ""
-#: src/LYMainLoop.c:1555 src/LYMainLoop.c:1559
+#: src/LYMainLoop.c:1554 src/LYMainLoop.c:1558
msgid "Fatal error - could not open output file %s\n"
msgstr ""
-#: src/LYMainLoop.c:2853
+#: src/LYMainLoop.c:3022
msgid "Enctype multipart/form-data not yet supported! Cannot submit."
msgstr ""
-#: src/LYMainLoop.c:3588
+#.
+#. * Make a name for this new URL.
+#.
+#: src/LYMainLoop.c:3757
msgid "A URL specified by the user"
msgstr ""
#.
#. * Make a name for this help file.
#.
-#: src/LYMainLoop.c:3614
+#: src/LYMainLoop.c:3783
msgid "Help Screen"
msgstr ""
-#: src/LYMainLoop.c:3638
+#: src/LYMainLoop.c:3807
msgid "System Index"
msgstr ""
-#: src/LYMainLoop.c:5174
+#: src/LYMainLoop.c:5343
msgid "charset for this document specified explicitely, sorry..."
msgstr ""
@@ -3813,17 +3837,14 @@ msgid ""
" Please provide or edit the Organization: header\n"
msgstr ""
-#.
-#. * Use the built in line editior.
-#.
-#: src/LYNews.c:328
+#: src/LYNews.c:326
msgid ""
"\n"
"\n"
" Please enter your message below."
msgstr ""
-#: src/LYNews.c:362
+#: src/LYNews.c:360
msgid "Message has no original text!"
msgstr ""
@@ -4104,25 +4125,23 @@ msgstr ""
msgid "included from '%s'.\n"
msgstr ""
-#: src/LYReadCFG.c:1339
+#: src/LYReadCFG.c:1364
msgid "This is read from your lynx.cfg file,"
msgstr ""
-#. for lynx.cfg on DOS/Win32
-#. HAVE_CONFIG_H
-#: src/LYReadCFG.c:1347
+#: src/LYReadCFG.c:1372
msgid "please \"read\" distribution's"
msgstr ""
-#: src/LYReadCFG.c:1349
+#: src/LYReadCFG.c:1374
msgid "for more comments."
msgstr ""
-#: src/LYReadCFG.c:1351
+#: src/LYReadCFG.c:1376
msgid "Your primary configuration"
msgstr ""
-#: src/LYReadCFG.c:1354
+#: src/LYReadCFG.c:1379
msgid "This is read from your lynx.cfg file:"
msgstr ""
diff --git a/samples/lynx-keymaps b/samples/lynx-keymaps
index 311aa8bc..ee6039af 100644
--- a/samples/lynx-keymaps
+++ b/samples/lynx-keymaps
@@ -1,7 +1,11 @@
-# This is a sample key sequence definition file. It is used by Lynx when built
-# with ncurses or slang, to augment the definitions from your terminal's
+# This is a sample key sequence definition file. It is used by Lynx when
+# built with ncurses or slang, to augment the definitions from your terminal's
# termcap or terminfo description.
+# (Lynx implements this mechanism only if USE_KEYMAPS is defined during
+# compilation, which has nothing to do with the KEYMAP directives in lynx.cfg,
+# see source file LYCurses.h.)
+
# Lines that start with a '#' are comment lines. Blank lines are ignored.
# The 'setkey' function may be used in two ways:
@@ -9,7 +13,7 @@
# 1. setkey ESC-SEQUENCE KEYSYM
# 2. setkey ESC-SEQUENCE KEYSYM_NAME
#
-# where KEYSYM is an integer. A keysym is essentually with the lynx.rc
+# where KEYSYM is an integer. A keysym is essentially with the lynx.cfg
# file calls a 'keystroke', but I think that keysym is a more appropriate
# name. The keysym is an integer and may be expressed in various ways:
#
@@ -84,6 +88,15 @@ setkey "^[[K" END
setkey "^[<" HOME
setkey "^[>" END
#
+# Note that it may be impossible to map several sequences to the same
+# keysym (NCURSES only?), in that case the mapping occurring last wins.
+#
+# The following maps a sequence commonly used for Shift+Tab to the
+# corresponding code. It should not be needed if the terminfo file
+# has the correct info for kcbt.
+#
+setkey "^[[Z" 0x10F
+#
# Other special escapes:
# \a bell
# \b backspace
diff --git a/src/GridText.c b/src/GridText.c
index b30102c5..8ddc702e 100644
--- a/src/GridText.c
+++ b/src/GridText.c
@@ -35,6 +35,7 @@
#include <LYCharSets.h>
#include <LYCharUtils.h> /* LYUCTranslateBack... */
#include <UCMap.h>
+#include <LYEdit.h>
#ifdef EXP_CHARTRANS_AUTOSWITCH
#include <UCAuto.h>
#endif /* EXP_CHARTRANS_AUTOSWITCH */
@@ -130,6 +131,7 @@ typedef struct _line {
unsigned size; /* Number of characters */
BOOL split_after; /* Can we split after? */
BOOL bullet; /* Do we bullet? */
+ BOOL expansion_line; /* TEXTAREA edit new line flag */
#if defined(USE_COLOR_STYLE)
HTStyleChange styles[MAX_STYLES_ON_LINE];
int numstyles;
@@ -153,6 +155,7 @@ typedef struct _TextAnchor {
FormInfo * input_field; /* Info for form links */
BOOL show_anchor; /* Show the anchor? */
BOOL inUnderline; /* context is underlined */
+ BOOL expansion_anch; /* TEXTAREA edit new anchor */
HTChildAnchor * anchor;
} TextAnchor;
@@ -3947,10 +3950,10 @@ PUBLIC void HText_FormDescNumber ARGS2(
/*
* HTGetLinkInfo returns some link info based on the number.
*
- * If want_go is not NULL, caller requests to know a line number for
+ * If want_go is not 0, caller requests to know a line number for
* the link indicated by number. It will be returned in *go_line, and
* *linknum will be set to an index into the links[] array, to use after
- * the line in *line has been made the new top screen line.
+ * the line in *go_line has been made the new top screen line.
* *hightext and *lname are unchanged. - KW
*
* If want_go is 0 and the number doesn't represent an input field, info
@@ -4112,6 +4115,263 @@ PUBLIC int HTGetLinkInfo ARGS6(
return(NO);
}
+PRIVATE BOOLEAN same_anchor_or_field ARGS5(
+ int, numberA,
+ FormInfo *, formA,
+ int, numberB,
+ FormInfo *, formB,
+ BOOLEAN, ta_same)
+{
+ if (numberA > 0 || numberB > 0) {
+ if (numberA == numberB)
+ return(YES);
+ else if (!ta_same)
+ return(NO);
+ }
+ if (formA || formB) {
+ if (formA == formB) {
+ return(YES);
+ } else if (!ta_same) {
+ return(NO);
+ } else if (!(formA && formB)) {
+ return(NO);
+ }
+ } else {
+ return(NO);
+ }
+ if (formA->type != formB->type ||
+ formA->type != F_TEXTAREA_TYPE || formB->type != F_TEXTAREA_TYPE) {
+ return(NO);
+ }
+ if (formA->number != formB->number)
+ return(NO);
+ if (!formA->name || !formB->name)
+ return(YES);
+ return(strcmp(formA->name, formB->name) == 0);
+}
+
+#define same_anchor_as_link(i,a) (i >= 0 && a &&\
+ same_anchor_or_field(links[i].anchor_number,\
+ (links[i].type == WWW_FORM_LINK_TYPE) ? links[i].form : NULL,\
+ a->number,\
+ (a->link_type == INPUT_ANCHOR) ? a->input_field : NULL,\
+ ta_skip))
+#define same_anchors(a1,a2) (a1 && a2 &&\
+ same_anchor_or_field(a1->number,\
+ (a1->link_type == INPUT_ANCHOR) ? a1->input_field : NULL,\
+ a2->number,\
+ (a2->link_type == INPUT_ANCHOR) ? a2->input_field : NULL,\
+ ta_skip))
+
+/*
+ * HTGetLinkOrFieldStart - moving to previous or next link or form field.
+ *
+ * On input,
+ * curlink: current link, as index in links[] array (-1 if none)
+ * direction: whether to move up or down (or stay where we are)
+ * ta_skip: if FALSE, input fields belonging to the same textarea are
+ * are treated as different fields, as usual;
+ * if TRUE, fields of the same textarea are treated as a
+ * group for skipping.
+ * The caller wants a information for positioning on the new link to be
+ * deposited in *go_line and (if linknum is not NULL) *linknum.
+ *
+ * On failure (no more links in the requested direction) returns NO
+ * and doesn't change *go_line or *linknum. Otherwise, LINK_DO_ARROWUP
+ * may be returned, and *go_line and *linknum not changed, to indicate that
+ * the caller should use a normal PREV_LINK or PREV_PAGE mechanism.
+ * Otherwise:
+ * The number (0-based counting) for the new top screen line will be returned
+ * in *go_line, and *linknum will be set to an index into the links[] array,
+ * to use after the line in *go_line has been made the new top screen
+ * line. - kw
+ */
+PUBLIC int HTGetLinkOrFieldStart ARGS5(
+ int, curlink,
+ int *, go_line,
+ int *, linknum,
+ int, direction,
+ BOOLEAN, ta_skip)
+{
+ TextAnchor *a;
+ int anchors_this_line = 0;
+ int prev_anchor_line = -1, prev_prev_anchor_line = -1;
+
+ struct agroup {
+ TextAnchor *anc;
+ int prev_anchor_line;
+ int anchors_this_line;
+ int anchors_this_group;
+ } previous, current;
+ struct agroup *group_to_go = NULL;
+
+ if (!HTMainText)
+ return(NO);
+
+ previous.anc = current.anc = NULL;
+ previous.prev_anchor_line = current.prev_anchor_line = -1;
+ previous.anchors_this_line = current.anchors_this_line = 0;
+ previous.anchors_this_group = current.anchors_this_group = 0;
+
+ for (a = HTMainText->first_anchor; a; a = a->next) {
+ /*
+ * Count anchors, first on current line if there is more
+ * than one. We have to count all links, including form
+ * field anchors and others with a->number == 0, because
+ * they are or will be included in the links[] array.
+ * The exceptions are hidden form fields and anchors with
+ * show_anchor not set, because they won't appear in links[]
+ * and don't count towards nlinks. - KW
+ */
+ if ((a->show_anchor) &&
+ (a->link_type != INPUT_ANCHOR ||
+ a->input_field->type != F_HIDDEN_TYPE)) {
+ if (a->line_num == prev_anchor_line) {
+ anchors_this_line++;
+ } else {
+ /*
+ * This anchor is on a different line than the previous one.
+ * Remember which was the line number of the previous anchor,
+ * for use in screen positioning later. - KW
+ */
+ anchors_this_line = 1;
+ prev_prev_anchor_line = prev_anchor_line;
+ prev_anchor_line = a->line_num;
+ }
+
+ if (!same_anchors(current.anc, a)) {
+ previous.anc = current.anc;
+ previous.prev_anchor_line = current.prev_anchor_line;
+ previous.anchors_this_line = current.anchors_this_line;
+ previous.anchors_this_group = current.anchors_this_group;
+ current.anc = a;
+ current.prev_anchor_line = prev_prev_anchor_line;
+ current.anchors_this_line = anchors_this_line;
+ current.anchors_this_group = 1;
+ } else {
+ current.anchors_this_group++;
+ }
+ if (curlink >= 0) {
+ if (same_anchor_as_link(curlink,a)) {
+ if (direction == -1) {
+ group_to_go = &previous;
+ break;
+ } else if (direction == 0) {
+ group_to_go = &current;
+ break;
+ }
+ } else if (direction > 0 &&
+ same_anchor_as_link(curlink,previous.anc)) {
+ group_to_go = &current;
+ break;
+ }
+ } else {
+ if (a->line_num >= HTMainText->top_of_screen) {
+ if (direction < 0) {
+ group_to_go = &previous;
+ break;
+ } else if (direction == 0) {
+ if (previous.anc) {
+ group_to_go = &previous;
+ break;
+ } else {
+ group_to_go = &current;
+ break;
+ }
+ } else {
+ group_to_go = &current;
+ break;
+ }
+ }
+ }
+ }
+ }
+ if (!group_to_go && curlink < 0 && direction <= 0) {
+ group_to_go = &current;
+ }
+ if (group_to_go) {
+ a = group_to_go->anc;
+ if (a) {
+ int max_offset;
+ /*
+ * We know where to go; most of the stuff below is just
+ * tweaks to try to position the new screen in a specific
+ * way.
+ *
+ * In some cases going to a previous link can be done
+ * via the normal LYK_PREV_LINK action, which may give
+ * better positioning of the new screen. - kw
+ */
+ if (a->line_num < HTMainText->top_of_screen &&
+ a->line_num >= HTMainText->top_of_screen-(display_lines)) {
+ if ((curlink < 0 &&
+ group_to_go->anchors_this_group == 1) ||
+ (direction < 0 &&
+ group_to_go != &current &&
+ current.anc &&
+ current.anc->line_num >= HTMainText->top_of_screen &&
+ group_to_go->anchors_this_group == 1) ||
+ (a->next &&
+ a->next->line_num >= HTMainText->top_of_screen)) {
+ return(LINK_DO_ARROWUP);
+ }
+ }
+ /*
+ * The fundamental limitation of the current anchors_this_line
+ * counter method is that we only can set *linknum to the right
+ * index into the future links[] array if the line with our link
+ * ends up being the first line with any links (that count) on
+ * the new screen. Subject to that restriction we still have
+ * some vertical liberty (sometimes), and try to make the best
+ * of it. It may be a question of taste though. - kw
+ */
+ if (a->line_num <= (display_lines)) {
+ max_offset = 0;
+ } else if (a->line_num < HTMainText->top_of_screen) {
+ int screensback =
+ (HTMainText->top_of_screen - a->line_num + (display_lines) - 1)
+ / (display_lines);
+ max_offset = a->line_num - (HTMainText->top_of_screen -
+ screensback * (display_lines));
+ } else if (HTMainText->Lines - a->line_num <= (display_lines)) {
+ max_offset = a->line_num - (HTMainText->Lines - (display_lines));
+ } else if (a->line_num >=
+ HTMainText->top_of_screen+(display_lines)) {
+ int screensahead =
+ (a->line_num - HTMainText->top_of_screen) / (display_lines);
+ max_offset = a->line_num - HTMainText->top_of_screen -
+ screensahead * (display_lines);
+ } else {
+ max_offset = SEARCH_GOAL_LINE - 1;
+ }
+
+ /* Stuff below should remain unchanged if line positioning
+ is tweaked. - kw */
+ if (max_offset < 0)
+ max_offset = 0;
+ else if (max_offset >= display_lines)
+ max_offset = display_lines - 1;
+ *go_line = a->line_num - max_offset;
+ if (*go_line <= group_to_go->prev_anchor_line)
+ *go_line = group_to_go->prev_anchor_line + 1;
+
+#if 0
+ if (*go_line > HTMainText->top_of_screen &&
+ *go_line < HTMainText->top_of_screen+(display_lines) &&
+ HTMainText->top_of_screen+(display_lines) <= a->line_num &&
+ HTMainText->top_of_screen+2*(display_lines) <= HTMainText->Lines)
+ *go_line = HTMainText->top_of_screen+(display_lines);
+#endif
+ if (*go_line < 0)
+ *go_line = 0;
+ if (linknum)
+ *linknum = group_to_go->anchors_this_line - 1;
+ return(LINK_LINE_FOUND);
+ }
+ }
+ return(NO);
+}
+
/*
* This function finds the line indicated by line_num in the
* HText structure indicated by text, and searches that line
@@ -8705,11 +8965,11 @@ PUBLIC BOOL HText_AreDifferent ARGS2(
* be allowed to expand in the event of a tag width change (eg, 99 -> 100)
* as controlled by arg6 (CHOP or NOCHOP). Arg4 is either (the address
* of) a value which must match, in order for the tag to be incremented,
- * or (the address of) a 0-value, which matches any value, and will cause
+ * or (the address of) a 0-value, which will match any value, and cause
* any valid tag to be incremented. Arg2 is a pointer to the first/only
- * Anchor that exists on the line (if any); we may need to adjust their
- * position(s) on the line. Arg3 when non-0 indicates the number of new
- * digits that were added to the 2nd line in a line crossing pair.
+ * Anchor that exists on the line; we may need to adjust their position(s)
+ * on the line. Arg3 when non-0 indicates the number of new digits that
+ * were added to the 2nd line in a line crossing pair.
*
* All tags fields in a line which individually match an expected new value,
* are incremented. Line crossing [tags] are handled (PITA).
@@ -8747,9 +9007,10 @@ PRIVATE int increment_tagged_htline ARGS6(
int pre_n;
int fixup = 0;
+
/*
* Cleanup for the 2nd half of a line crosser, whose number of tag
- * digits grew by some number of places (usually 1, when it does
+ * digits grew by some number of places (usually 1 when it does
* happen, though it *could* be more). The tag chars were already
* rendered into the 2nd line of the pair, but the positioning and
* other effects haven't been rippled through any other anchors on
@@ -8767,22 +9028,23 @@ PRIVATE int increment_tagged_htline ARGS6(
}
fixup = *lx_val;
*lx_val = 0;
- st_anchor = st_anchor->next;
+ if (st_anchor) st_anchor = st_anchor->next;
}
+
/*
* Walk thru the line looking for tags (ie, "[nnn]" strings).
*/
- while (*p != '\0') {
- if (*p != '[') {
- *s++ = *p++;
- continue;
+ while (*p != '\0') {
+ if (*p != '[') {
+ *s++ = *p++;
+ continue;
} else {
*s++ = *p++;
t = p;
n = 0;
- valid = TRUE; /* p = t = byte after ']' */
+ valid = TRUE; /* p = t = byte after '[' */
/*
* Make sure there are only digits between "[" and "]".
@@ -8817,12 +9079,12 @@ PRIVATE int increment_tagged_htline ARGS6(
* string are probably not possible, since little of the actual
* anchor-associated-text is retained in the TextAnchor or the
* FormInfo structs. Fortunately, I think the current method is
- * more than adequate to weed out 99.99% of any possible false
+ * more than adequate to weed out 99.999% of any possible false
* matches, just as it stands. Caveat emptor.]
*/
if ((valid) && (n > 0)) {
val = atoi (p);
- if ((val == *old_val) || (*old_val == 0)) {
+ if ((val == *old_val) || (*old_val == 0)) { /* 0 matches all */
if (*old_val != 0)
(*old_val)++;
val += incr;
@@ -8854,12 +9116,12 @@ PRIVATE int increment_tagged_htline ARGS6(
*/
if (new_n -= n) {
nxt_anchor = st_anchor;
- while ((nxt_anchor) &&
+ while ((nxt_anchor) &&
(nxt_anchor->line_num == a->line_num)) {
nxt_anchor->line_pos += new_n;
nxt_anchor = nxt_anchor->next;
}
- st_anchor = st_anchor->next;
+ if (st_anchor) st_anchor = st_anchor->next;
}
}
}
@@ -8929,8 +9191,8 @@ PRIVATE int increment_tagged_htline ARGS6(
*lx_val = new_n - n;
}
}
- break; /* had an lx'er, so we're done with this line */
- }
+ break; /* had an lx'er, so we're done with this line */
+ }
}
}
@@ -8958,7 +9220,7 @@ PRIVATE int increment_tagged_htline ARGS6(
* --KED 02/01/99
*/
PUBLIC int HText_ExtEditForm ARGS1(
- struct link *, form_link)
+ struct link *, form_link)
{
struct stat stat_info;
@@ -8966,13 +9228,16 @@ PUBLIC int HText_ExtEditForm ARGS1(
FILE *fp;
TextAnchor *anchor_ptr;
- TextAnchor *start_anchor = NULL;
- TextAnchor *end_anchor = NULL;
- BOOLEAN firstanchor = TRUE;
- int entry_line = form_link->anchor_line_num;
- int exit_line = 0;
- int orig_cnt = 0;
- int line_cnt = 1;
+ TextAnchor *start_anchor = NULL;
+ TextAnchor *end_anchor = NULL;
+ BOOLEAN firstanchor = TRUE;
+
+ char ed_offset[10] = "\0";
+ int start_line = 0;
+ int entry_line = form_link->anchor_line_num;
+ int exit_line = 0;
+ int orig_cnt = 0;
+ int line_cnt = 1;
FormInfo *form = form_link->form;
char *areaname = form->name;
@@ -8991,9 +9256,10 @@ PUBLIC int HText_ExtEditForm ARGS1(
char *cp;
char *p;
char *s;
- int curr_tag;
- int line_adj = 0;
- int tag_adj = 0;
+ int curr_tag;
+ int line_adj = 0;
+ int tag_adj = 0;
+ int newlines = 0;
int len;
int i;
int n;
@@ -9035,8 +9301,9 @@ PUBLIC int HText_ExtEditForm ARGS1(
!strcmp (anchor_ptr->input_field->name, areaname)) {
if (firstanchor) {
- firstanchor = FALSE;
+ firstanchor = FALSE;
start_anchor = anchor_ptr;
+ start_line = anchor_ptr->line_num;
}
orig_cnt++;
@@ -9056,13 +9323,23 @@ PUBLIC int HText_ExtEditForm ARGS1(
fclose (fp);
CTRACE(tfp, "GridText: TEXTAREA name=|%s| dumped to tempfile\n", areaname);
+ CTRACE(tfp, "GridText: invoking editor (%s) on tempfile\n", editor);
/*
- * Go edit the TEXTAREA temp file.
+ * Go edit the TEXTAREA temp file, with the initial editor line
+ * corresponding to the TEXTAREA line the cursor is on (if such
+ * positioning is supported by the editor [as lynx knows it]).
*/
- HTSprintf0 (&tbuf, "%s %s", editor, ed_temp);
+ if (((entry_line - start_line) > 0) && editor_can_position())
+#ifdef VMS
+ sprintf (ed_offset, "-%d", ((entry_line - start_line) + 1));
+ HTSprintf0 (&tbuf, "%s %s %s", editor, ed_temp, ed_offset);
+#else
+ sprintf (ed_offset, "+%d", ((entry_line - start_line) + 1));
+ HTSprintf0 (&tbuf, "%s %s %s", editor, ed_offset, ed_temp);
+#endif
- LYSystem (tbuf);
+ LYSystem (tbuf); /* finally the editor is called */
#ifdef UNIX
/*
@@ -9072,15 +9349,15 @@ PUBLIC int HText_ExtEditForm ARGS1(
if (stat (tbuf, &stat_info) == 0)
remove (tbuf);
#endif
- free (tbuf);
+ FREE (tbuf);
CTRACE(tfp, "GridText: returned from editor (%s)\n", editor);
/*
- * Read back the edited temp file.
+ * Read back the edited temp file into our buffer.
*/
if ((stat (ed_temp, &stat_info) < 0) ||
- !S_ISREG(stat_info.st_mode) ||
+ !S_ISREG(stat_info.st_mode) ||
((size = stat_info.st_size) == 0)) {
size = 0;
ebuf = (char *) calloc (1, 1);
@@ -9100,9 +9377,6 @@ PUBLIC int HText_ExtEditForm ARGS1(
while ((size != 0) && (isspace (ebuf[size-1]) || (ebuf[size-1] == '\0')))
ebuf[--size] = '\0';
- if (size == 0)
- ebuf[0] = '\0';
-
/*
* Copy each line from the temp file into the corresponding anchor
* struct, removing any trailing whitespace, expanding any embedded
@@ -9133,7 +9407,7 @@ PUBLIC int HText_ExtEditForm ARGS1(
* Whack off trailing whitespace from the line.
*/
for (i = len, p = line + (len - 1); i != 0; p--, i--) {
- if (isspace(*p))
+ if (isspace (*p))
*p = '\0';
else
break;
@@ -9171,9 +9445,23 @@ PUBLIC int HText_ExtEditForm ARGS1(
* we leave any chars above 0x7f alone (ie, no translation is
* performed ... the assumption being that the charset used in
* the editor is compatible with the charset rendered by lynx).
+ *
+ * [At some point in time, when/if lynx ever supports multibyte
+ * characters internally (eg, UCS-2, UCS-4, UTF-16, etc), this
+ * kind of thing may well cause problems. But then, supporting
+ * such char sets will require massive changes in (most) all
+ * parts of the lynx code, so until then, we do the rational
+ * thing with chars that would otherwise foul the display, if
+ * left alone. If you're implementing multibyte character set
+ * support, consider yourself to have been warned.]
*/
for (p = line, s = tbuf; *s != '\0'; p++, s++)
- *p = (*s < ' ') ? SPLAT : *s;
+#ifndef EBCDIC
+ *p = (((unsigned char)*s < ' ') ||
+ ((unsigned char)*s == '\177')) ? SPLAT : *s;
+#else
+ *p = ((unsigned char)*s < ' ') ? SPLAT : *s;
+#endif
*p = '\0';
}
@@ -9198,26 +9486,30 @@ PUBLIC int HText_ExtEditForm ARGS1(
* floating around in here, as it is. IMNSHO.]
*/
for (htline = HTMainText->last_line->next, i = 0;
- i != end_anchor->line_num;
- htline = htline->next, i++);
+ end_anchor->line_num != i; i++) {
+ htline = htline->next;
+ if (htline == HTMainText->last_line)
+ break;
+ }
/*
* Clone and initialize the structs needed to add a new
* TEXTAREA anchor.
*/
- if (((a = (TextAnchor *) calloc (1, sizeof(*a))) == 0) ||
+ if (((a = (TextAnchor *) calloc (1, sizeof(*a))) == 0) ||
((f = (FormInfo *) calloc (1, sizeof(*f))) == 0) ||
((l = (HTLine *) calloc (1, LINE_SIZE(MAX_LINE))) == 0))
outofmem(__FILE__, "HText_ExtEditForm");
- /* Init all the fields in the new TextAnchor. */
- a->next = end_anchor->next;
- a->number = end_anchor->number;
- a->start = end_anchor->start +
- end_anchor->input_field->size + 1;
- a->line_pos = end_anchor->line_pos;
- a->extent = end_anchor->extent;
- a->line_num = end_anchor->line_num + 1;
+ /* Init all the fields in the new TextAnchor. */
+ /* [anything "special" needed based on ->show_anchor value ?] */
+ a->next = end_anchor->next;
+ a->number = end_anchor->number;
+ a->start = end_anchor->start +
+ end_anchor->input_field->size + 1;
+ a->line_pos = end_anchor->line_pos;
+ a->extent = end_anchor->extent;
+ a->line_num = end_anchor->line_num + 1;
StrAllocCopy (a->hightext, end_anchor->hightext);
StrAllocCopy (a->hightext2, end_anchor->hightext2);
a->hightext2offset = end_anchor->hightext2offset;
@@ -9225,26 +9517,30 @@ PUBLIC int HText_ExtEditForm ARGS1(
a->input_field = f;
a->show_anchor = end_anchor->show_anchor;
a->inUnderline = end_anchor->inUnderline;
- a->anchor = end_anchor->anchor;
+ a->expansion_anch = TRUE;
+ a->anchor = NULL;
/* Just the (seemingly) relevant fields in the new FormInfo. */
+ /* [do we need to do anything "special" based on ->disabled] */
StrAllocCopy (f->name, end_anchor->input_field->name);
- f->number = end_anchor->input_field->number;
- f->type = end_anchor->input_field->type;
+ f->number = end_anchor->input_field->number;
+ f->type = end_anchor->input_field->type;
StrAllocCopy (f->orig_value, "");
- f->size = end_anchor->input_field->size;
- f->maxlength = end_anchor->input_field->maxlength;
- f->no_cache = end_anchor->input_field->no_cache;
+ f->size = end_anchor->input_field->size;
+ f->maxlength = end_anchor->input_field->maxlength;
+ f->no_cache = end_anchor->input_field->no_cache;
+ f->disabled = end_anchor->input_field->disabled;
/* Init all the fields in the new HTLine (but see the #if). */
- l->next = htline->next;
- l->prev = htline;
- l->offset = htline->offset;
- l->size = htline->size;
+ l->next = htline->next;
+ l->prev = htline;
+ l->offset = htline->offset;
+ l->size = htline->size;
l->split_after = htline->split_after;
- l->bullet = htline->bullet;
+ l->bullet = htline->bullet;
+ l->expansion_line = TRUE;
#if defined(USE_COLOR_STYLE)
- /* dup styles[] if needed [no need in TEXTAREA (?); leave 0's] */
+ /* dup styles[] if needed [no need in TEXTAREA (?); leave 0's] */
l->numstyles = htline->numstyles;
#endif
strcpy (l->data, htline->data);
@@ -9256,6 +9552,15 @@ PUBLIC int HText_ExtEditForm ARGS1(
}
/*
+ * If we're at the tail end of the TextAnchor or HTLine list(s),
+ * the new node becomes the last node.
+ */
+ if (end_anchor == HTMainText->last_anchor)
+ HTMainText->last_anchor = a;
+ if (htline == HTMainText->last_line)
+ HTMainText->last_line = l;
+
+ /*
* Link in the new TextAnchor and make it current; link in
* the new HTLine.
*/
@@ -9264,9 +9569,12 @@ PUBLIC int HText_ExtEditForm ARGS1(
htline->next->prev = l;
htline->next = l;
- htline = l;
+ htline = l->next;
+
+ newlines++;
}
+
/*
* Finally copy the new line from the edit buffer into the anchor.
*/
@@ -9274,22 +9582,25 @@ PUBLIC int HText_ExtEditForm ARGS1(
/*
- * And do the next line, for the next anchor ...
+ * Keep track of 1st blank line in any trailing blank lines, for
+ * later cursor repositioning.
*/
- lp += len;
- if (*lp) lp++;
-
if (len > 0)
exit_line = 0;
else if (exit_line == 0)
exit_line = anchor_ptr->line_num;
+ /*
+ * And do the next line of edited text, for the next anchor ...
+ */
+ lp += len;
+ if (*lp) lp++;
+
end_anchor = anchor_ptr;
anchor_ptr = anchor_ptr->next;
- curr_tag = anchor_ptr->number;
- if (htline != NULL)
- htline = htline->next;
+ if (anchor_ptr)
+ curr_tag = anchor_ptr->number;
line_cnt++;
}
@@ -9306,15 +9617,23 @@ PUBLIC int HText_ExtEditForm ARGS1(
* [dunno if the char counts really need to be done, or if we're using
* the exactly proper values ... seems to be OK though ...]
*/
- if ((n = (line_cnt - 1) - orig_cnt) > 0) {
- i = (end_anchor->input_field->size + 1) * n;
+ if (newlines > 0) {
+
+ CTRACE(tfp, "GridText: adjusting struct's to add %d new lines\n",
+ newlines);
+ i = (end_anchor->input_field->size + 1) * newlines;
+
+ /*
+ * [*may* need to bypass bumping ->number if ->input_field->type
+ * is of F_HIDDEN_TYPE ... need to investigate further]
+ */
while (anchor_ptr) {
if (keypad_mode == LINKS_AND_FORM_FIELDS_ARE_NUMBERED)
- anchor_ptr->number += n;
- anchor_ptr->line_num += n;
+ anchor_ptr->number += newlines;
+ anchor_ptr->line_num += newlines;
anchor_ptr->start += i;
- anchor_ptr = anchor_ptr->next;
+ anchor_ptr = anchor_ptr->next;
}
anchor_ptr = end_anchor;
@@ -9340,39 +9659,61 @@ PUBLIC int HText_ExtEditForm ARGS1(
*
* Yes, it *can* happen, but in real life, it probably won't be
* seen very much ...
+ *
+ * [This may also be an artifact of bumping into the right hand
+ * screen edge (or RHS margin), since we don't even *think* about
+ * relocating an anchor to the following line, when [tag] digits
+ * expansion pushes things too far in that direction.]
*/
if (keypad_mode == LINKS_AND_FORM_FIELDS_ARE_NUMBERED) {
lx = 0;
while (htline != HTMainText->last_line->next) {
+
while (anchor_ptr) {
- if ((anchor_ptr->number - n) == curr_tag)
+ if ((anchor_ptr->number - newlines) == curr_tag)
break;
else
anchor_ptr = anchor_ptr->next;
}
- line_adj = increment_tagged_htline (htline, anchor_ptr, &lx,
- &curr_tag, n, NOCHOP);
- htline->size += line_adj;
- tag_adj += line_adj;
+
+ if (anchor_ptr) {
+ line_adj = increment_tagged_htline (htline, anchor_ptr,
+ &lx, &curr_tag,
+ newlines, NOCHOP);
+ htline->size += line_adj;
+ tag_adj += line_adj;
+
+ } else {
+
+ break; /* out of anchors ... we're done */
+ }
+
htline = htline->next;
- }
+ }
}
- nlinks += n;
- HTMainText->Lines += n;
- HTMainText->last_anchor_number += n;
+ /*
+ * Fixup various global variables.
+ */
+ nlinks += newlines;
+ HTMainText->Lines += newlines;
+ HTMainText->last_anchor_number += newlines;
HTMainText->chars += (i + tag_adj);
- if (n) more = TRUE;
+ more = TRUE;
+
+ CTRACE(tfp, "GridText: TextAnchor and HTLine struct's adjusted\n");
}
CTRACE(tfp, "GridText: struct's adjusted - exiting HText_ExtEditForm()\n");
- free (line);
- free (ebuf);
- free (tbuf);
+ FREE (line);
+ FREE (ebuf);
+ FREE (tbuf);
LYRemoveTemp (ed_temp);
- free (ed_temp);
+ FREE (ed_temp);
+
+ CTRACE(tfp, "GridText: exiting HText_ExtEditForm()\n");
/*
* Return the offset needed to move the cursor from its current
diff --git a/src/GridText.h b/src/GridText.h
index 006c577c..16cca89c 100644
--- a/src/GridText.h
+++ b/src/GridText.h
@@ -149,6 +149,12 @@ extern int HTGetLinkInfo PARAMS((
int * linknum,
char ** hightext,
char ** lname));
+extern int HTGetLinkOrFieldStart PARAMS((
+ int curlink,
+ int * go_line,
+ int * linknum,
+ int direction,
+ BOOLEAN ta_skip));
extern BOOL HText_getFirstTargetInLine PARAMS((
HText * text,
int line_num,
diff --git a/src/HTAlert.c b/src/HTAlert.c
index dc5626a2..8c041f40 100644
--- a/src/HTAlert.c
+++ b/src/HTAlert.c
@@ -197,30 +197,39 @@ PUBLIC BOOL HTLastConfirmCancelled NOARGS
*/
PUBLIC BOOL HTConfirm ARGS1(CONST char *, Msg)
{
+ char *msg_yes = gettext("yes");
+ char *msg_no = gettext("no");
+ int result = -1;
+
conf_cancelled = NO;
if (dump_output_immediately) { /* Non-interactive, can't respond */
- return(NO);
+ result = NO;
} else {
- int c;
+ char *msg = NULL;
- _user_message(gettext("%s (y/n) "), Msg);
+ HTSprintf0(&msg, "%s (%c/%c) ", Msg, *msg_yes, *msg_no);
+ _statusline(msg);
+ FREE(msg);
- while (1) {
- c = LYgetch();
+ while (result < 0) {
+ int c = LYgetch();
#ifdef VMS
if (HadVMSInterrupt) {
HadVMSInterrupt = FALSE;
- c = 'N';
+ c = *msg_no;
}
#endif /* VMS */
- if (TOUPPER(c) == 'Y')
- return(YES);
- if (c == 7 || c == 3) /* remember we had ^G or ^C */
+ if (c == 7 || c == 3) { /* remember we had ^G or ^C */
conf_cancelled = YES;
- if (TOUPPER(c) == 'N' || c == 7 || c == 3) /* ^G or ^C cancels */
+ result = NO;
+ } else if (TOUPPER(c) == TOUPPER(*msg_yes)) {
+ result = YES;
+ } else if (TOUPPER(c) == TOUPPER(*msg_no)) {
return(NO);
+ }
}
}
+ return (result);
}
/* Prompt for answer and get text back. HTPrompt()
@@ -504,7 +513,7 @@ PUBLIC BOOL HTConfirmCookie ARGS4(
HTSprintf(&message, ADVANCED_COOKIE_CONFIRMATION,
server, namelen, name, valuelen, value);
_statusline(message);
- free(message);
+ FREE(message);
}
while (1) {
if(!LYAcceptAllCookies) {
diff --git a/src/HTForms.h b/src/HTForms.h
index eb0784f2..ff7bc962 100644
--- a/src/HTForms.h
+++ b/src/HTForms.h
@@ -1,4 +1,3 @@
-
#ifndef HTFORMS_H
#define HTFORMS_H
@@ -92,7 +91,7 @@ typedef struct _FormInfo {
typedef struct _PerFormInfo
{
int number; /* form number, see GridText.c */
- /* except for the last two, the followign fields aren't actually used.. */
+ /* except for the last two, the followign fields aren't actually used.. */
int disabled; /* If YES, can't change values */
struct _PerFormInfo * next; /* pointer to next form in doc */
int nfields; /* number of fields */
@@ -124,7 +123,8 @@ typedef struct _PerFormInfo
#define WWW_FORM_LINK_TYPE 1
#define WWW_LINK_TYPE 2
#define WWW_INTERN_LINK_TYPE 6 /* can be used as a bitflag... - kw */
-#define LINK_LINE_FOUND 8 /* used in follow_link_number - kw */
+#define LINK_LINE_FOUND 8 /* used in follow_link_number, others - kw */
+#define LINK_DO_ARROWUP 16 /* returned by HTGetLinkOrFieldStart - kw */
/* #define different lynx modes */
#define NORMAL_LYNX_MODE 1
diff --git a/src/HTML.c b/src/HTML.c
index 377f5ed6..567dd804 100644
--- a/src/HTML.c
+++ b/src/HTML.c
@@ -609,7 +609,7 @@ char class_string[TEMPSTRINGSIZE];
#endif
#ifdef USE_COLOR_STYLE
-static char *Style_className;
+static char *Style_className = NULL;
static char myHash[128];
static int hcode;
#endif
@@ -2033,6 +2033,8 @@ PRIVATE void HTML_start_element ARGS6(
if (!me->style_change) {
if (HText_LastLineSize(me->text, FALSE)) {
HText_appendCharacter(me->text, '\r');
+ } else {
+ HText_NegateLineOne(me->text);
}
} else {
UPDATE_STYLE;
@@ -6839,6 +6841,9 @@ PRIVATE void HTML_free ARGS1(HTStructured *, me)
}
styles[HTML_PRE]->alignment = HT_LEFT;
}
+#ifdef USE_COLOR_STYLE
+ FREE(Style_className);
+#endif
FREE(me->base_href);
FREE(me->map_address);
FREE(me->LastOptionValue);
@@ -6925,6 +6930,9 @@ PRIVATE void HTML_abort ARGS2(HTStructured *, me, HTError, e)
}
styles[HTML_PRE]->alignment = HT_LEFT;
}
+#ifdef USE_COLOR_STYLE
+ FREE(Style_className);
+#endif
FREE(me->base_href);
FREE(me->map_address);
FREE(me->textarea_name);
diff --git a/src/LYBookmark.c b/src/LYBookmark.c
index 612e5984..8c2b9932 100644
--- a/src/LYBookmark.c
+++ b/src/LYBookmark.c
@@ -34,7 +34,7 @@ show_bookmark_not_defined NOARGS
BOOKMARK_FILE_NOT_DEFINED,
key_for_func(LYK_OPTIONS));
LYMBM_statusline(string_buffer);
- free(string_buffer);
+ FREE(string_buffer);
}
/*
@@ -521,7 +521,7 @@ PUBLIC void remove_bookmark_link ARGS2(
* it is writable by the current process.
* Changed to copy 1998-04-26 -- gil
*/
- if (LYCopyFile(newfile, filename_buffer) == 0)
+ if (LYCopyFile(newfile, filename_buffer) == 0)
return;
HTAlert(BOOKTEMP_COPY_FAIL);
#else /* !UNIX */
@@ -731,7 +731,7 @@ draw_bookmark_choices:
HTSprintf0(&shead_buffer,
MULTIBOOKMARKS_SHEAD_MASK, MBM_current, MBM_screens);
addstr(shead_buffer);
- free(shead_buffer);
+ FREE(shead_buffer);
} else {
addstr(MULTIBOOKMARKS_SHEAD);
}
diff --git a/src/LYCookie.c b/src/LYCookie.c
index 12c9f260..9020d594 100644
--- a/src/LYCookie.c
+++ b/src/LYCookie.c
@@ -276,99 +276,6 @@ PRIVATE void store_cookie ARGS3(
if (co == NULL)
return;
- if (co->version != 0 || !LYAcceptAllCookies) {
- /*
- * Apply sanity checks.
- *
- * Section 4.3.2, condition 1: The value for the Path attribute is
- * not a prefix of the request-URI.
- */
- if (strncmp(co->path, path, co->pathlen) != 0) {
- CTRACE(tfp, "store_cookie: Rejecting because '%s' is not a prefix of '%s'.\n",
- co->path, path);
- freeCookie(co);
- co = NULL;
- return;
- }
- /*
- * The next 4 conditions do NOT apply if the domain is still
- * the default of request-host.
- */
- if (strcmp(co->domain, hostname) != 0) {
- /*
- * The hostname does not contain a dot.
- */
- if (strchr(hostname, '.') == NULL) {
- CTRACE(tfp, "store_cookie: Rejecting because '%s' has no dot.\n",
- hostname);
- freeCookie(co);
- co = NULL;
- return;
- }
-
- /*
- * Section 4.3.2, condition 2: The value for the Domain attribute
- * contains no embedded dots or does not start with a dot.
- * (A dot is embedded if it's neither the first nor last character.)
- * Note that we added a lead dot ourselves if a domain attribute
- * value otherwise qualified. - FM
- */
- if (co->domain[0] != '.' || co->domain[1] == '\0') {
- CTRACE(tfp, "store_cookie: Rejecting domain '%s'.\n",
- co->domain);
- freeCookie(co);
- co = NULL;
- return;
- }
- ptr = strchr((co->domain + 1), '.');
- if (ptr == NULL || ptr[1] == '\0') {
- CTRACE(tfp, "store_cookie: Rejecting domain '%s'.\n",
- co->domain);
- freeCookie(co);
- co = NULL;
- return;
- }
-
- /*
- * Section 4.3.2, condition 3: The value for the request-host does
- * not domain-match the Domain attribute.
- */
- if (!host_matches(hostname, co->domain)) {
- CTRACE(tfp, "store_cookie: Rejecting domain '%s' for host '%s'.\n",
- co->domain, hostname);
- freeCookie(co);
- co = NULL;
- return;
- }
-
- /*
- * Section 4.3.2, condition 4: The request-host is an HDN (not IP
- * address) and has the form HD, where D is the value of the Domain
- * attribute, and H is a string that contains one or more dots.
- */
- ptr = ((hostname + strlen(hostname)) - strlen(co->domain));
- if (strchr(hostname, '.') < ptr) {
- if (!LYAcceptAllCookies) {
- char *msg = 0;
- HTSprintf0(&msg,
- INVALID_COOKIE_DOMAIN_CONFIRMATION,
- co->domain,
- hostname);
- if (!HTConfirm(msg)) {
- CTRACE(tfp, "store_cookie: Rejecting domain '%s' for host '%s'.\n",
- co->domain,
- hostname);
- freeCookie(co);
- co = NULL;
- FREE(msg);
- return;
- }
- FREE(msg);
- }
- }
- }
- }
-
/*
* Ensure that the domain list exists.
*/
@@ -387,10 +294,147 @@ PRIVATE void store_cookie ARGS3(
de = (domain_entry *)hl->object;
if ((de != NULL && de->domain != NULL) &&
!strcmp(co->domain, de->domain)) {
- cookie_list = de->cookie_list;
- break;
+ cookie_list = de->cookie_list;
+ break;
+ }
+ }
+
+ if(hl == NULL) {
+ de = NULL;
+ cookie_list = NULL;
+ }
+
+ /*
+ * Apply sanity checks.
+ *
+ * Section 4.3.2, condition 1: The value for the Path attribute is
+ * not a prefix of the request-URI.
+ *
+ * If cookie checking for this domain is set to INVCHECK_LOOSE,
+ * then we want to bypass this check. The user should be queried
+ * if set to INVCHECK_QUERY.
+ */
+ if (strncmp(co->path, path, co->pathlen) != 0) {
+ if((de != NULL && de->invcheck_bv != INVCHECK_LOOSE)
+ || de == NULL) {
+ if(de != NULL && de->invcheck_bv == INVCHECK_STRICT) {
+ CTRACE(tfp, "store_cookie: Rejecting because '%s' is not a prefix of '%s'.\n",
+ co->path, path);
+ freeCookie(co);
+ co = NULL;
+ return;
+ } else if ((de != NULL
+ && de->invcheck_bv == INVCHECK_QUERY)
+ || de == NULL) {
+ char *msg = 0;
+ HTSprintf0(&msg,
+ INVALID_COOKIE_PATH_CONFIRMATION,
+ co->path, path);
+ if (!HTConfirm(msg)) {
+ CTRACE(tfp, "store_cookie: Rejecting because '%s' is not a prefix of '%s'.\n",
+ co->path, path);
+ freeCookie(co);
+ co = NULL;
+ FREE(msg);
+ return;
+ }
+ }
+ }
+ }
+ /*
+ * The next 4 conditions do NOT apply if the domain is still
+ * the default of request-host.
+ */
+ if (strcmp(co->domain, hostname) != 0) {
+ /*
+ * The hostname does not contain a dot.
+ */
+ if (strchr(hostname, '.') == NULL) {
+ CTRACE(tfp, "store_cookie: Rejecting because '%s' has no dot.\n",
+ hostname);
+ freeCookie(co);
+ co = NULL;
+ return;
+ }
+
+ /*
+ * Section 4.3.2, condition 2: The value for the Domain attribute
+ * contains no embedded dots or does not start with a dot.
+ * (A dot is embedded if it's neither the first nor last character.)
+ * Note that we added a lead dot ourselves if a domain attribute
+ * value otherwise qualified. - FM
+ */
+ if (co->domain[0] != '.' || co->domain[1] == '\0') {
+ CTRACE(tfp, "store_cookie: Rejecting domain '%s'.\n",
+ co->domain);
+ freeCookie(co);
+ co = NULL;
+ return;
+ }
+ ptr = strchr((co->domain + 1), '.');
+ if (ptr == NULL || ptr[1] == '\0') {
+ CTRACE(tfp, "store_cookie: Rejecting domain '%s'.\n",
+ co->domain);
+ freeCookie(co);
+ co = NULL;
+ return;
+ }
+
+ /*
+ * Section 4.3.2, condition 3: The value for the request-host does
+ * not domain-match the Domain attribute.
+ */
+ if (!host_matches(hostname, co->domain)) {
+ CTRACE(tfp, "store_cookie: Rejecting domain '%s' for host '%s'.\n",
+ co->domain, hostname);
+ freeCookie(co);
+ co = NULL;
+ return;
+ }
+
+ /*
+ * Section 4.3.2, condition 4: The request-host is an HDN (not IP
+ * address) and has the form HD, where D is the value of the Domain
+ * attribute, and H is a string that contains one or more dots.
+ *
+ * If cookie checking for this domain is set to INVCHECK_LOOSE,
+ * then we want to bypass this check. The user should be queried
+ * if set to INVCHECK_QUERY.
+ */
+ ptr = ((hostname + strlen(hostname)) - strlen(co->domain));
+ if (strchr(hostname, '.') < ptr) {
+ if((de != NULL && de->invcheck_bv != INVCHECK_LOOSE)
+ || de == NULL) {
+ if(de != NULL && de->invcheck_bv == INVCHECK_STRICT) {
+ CTRACE(tfp, "store_cookie: Rejecting domain '%s' for host '%s'.\n",
+ co->domain,
+ hostname);
+ freeCookie(co);
+ co = NULL;
+ return;
+ } else if ((de != NULL
+ && de->invcheck_bv == INVCHECK_QUERY)
+ || de == NULL) {
+ char *msg = 0;
+ HTSprintf0(&msg,
+ INVALID_COOKIE_DOMAIN_CONFIRMATION,
+ co->domain,
+ hostname);
+ if (!HTConfirm(msg)) {
+ CTRACE(tfp, "store_cookie: Rejecting domain '%s' for host '%s'.\n",
+ co->domain,
+ hostname);
+ freeCookie(co);
+ co = NULL;
+ FREE(msg);
+ return;
+ }
+ FREE(msg);
+ }
+ }
}
}
+
if (hl == NULL) {
/*
* Domain not found; add a new entry for this domain.
@@ -414,7 +458,7 @@ PRIVATE void store_cookie ARGS3(
else
#endif
de->bv = QUERY_USER;
- de->invcheck_bv = QUERY_USER; /* should this go here? */
+ de->invcheck_bv = INVCHECK_QUERY; /* should this go here? */
cookie_list = de->cookie_list = HTList_new();
StrAllocCopy(de->domain, co->domain);
HTList_addObject(domain_list, de);
@@ -2598,29 +2642,24 @@ Delete_all_cookies_in_domain:
}
-/* cookie_add_acceptlist
-** ---------------------
-**
-** Is passed a comma-delimited string of domains to add to the
-** "always accept" list for cookies. The domains need to be identical
-** to the form from which the cookie is received, with or without a
-** leading ".". - BJP
+/* cookie_domain_flag_set
+** ----------------------
+** All purpose function to handle setting domain flags for a
+** comma-delimited list of domains. cookie_domain_flags handles
+** invcheck behavior, as well as accept/reject behavior. - BJP
*/
-PUBLIC void cookie_add_acceptlist ARGS1(
- char *, acceptstr)
+PUBLIC void cookie_domain_flag_set ARGS2(
+ char *, domainstr,
+ int, flag)
{
domain_entry *de = NULL;
domain_entry *de2 = NULL;
HTList *hl = NULL;
- char **str = (char **)calloc(1, sizeof(acceptstr));
- char *astr = NULL;
+ char *dstr = NULL;
char *strsmall = NULL;
int isexisting = FALSE;
- if (str == NULL)
- outofmem(__FILE__, "cookie_add_acceptlist");
-
/*
* Is this the first domain we're handling? If so, initialize
* domain_list.
@@ -2632,11 +2671,9 @@ PUBLIC void cookie_add_acceptlist ARGS1(
total_cookies = 0;
}
- StrAllocCopy(astr, acceptstr);
+ StrAllocCopy(dstr, domainstr);
- *str = astr;
-
- while ((strsmall = LYstrsep(str, ",")) != 0) {
+ while ((strsmall = LYstrsep(&dstr, ",")) != 0) {
/*
* Check the list of existing domains to see if this is a
@@ -2659,174 +2696,55 @@ PUBLIC void cookie_add_acceptlist ARGS1(
de = (domain_entry *)calloc(1, sizeof(domain_entry));
if (de == NULL)
- outofmem(__FILE__, "cookie_add_acceptlist");
-
- de->bv = ACCEPT_ALWAYS;
-
- StrAllocCopy(de->domain, strsmall);
- de->cookie_list = HTList_new();
- HTList_addObject(domain_list, de);
- } else {
- de2->bv = ACCEPT_ALWAYS;
- }
- }
-
- FREE(str);
- FREE(strsmall);
- FREE(astr);
-}
-
-
-/* cookie_add_rejectlist
-** ---------------------
-**
-** Is passed a comma-delimited string of domains to add to the
-** "always reject" list for cookies. The domains need to be identical
-** to the form from which the cookie is received, with or without a
-** leading ".". - BJP
-*/
-
-PUBLIC void cookie_add_rejectlist ARGS1(
- char *, rejectstr)
-{
- domain_entry *de = NULL;
- domain_entry *de2 = NULL;
- HTList *hl = NULL;
- char **str = (char **)calloc(1, sizeof(rejectstr));
- char *rstr = NULL;
- char *strsmall = NULL;
- int isexisting = FALSE;
-
- if (str == NULL)
- outofmem(__FILE__, "cookie_add_rejectlist");
-
- /*
- * Is this the first domain we're handling? If so, initialize
- * domain_list.
- */
-
- if (domain_list == NULL) {
- atexit(LYCookieJar_free);
- domain_list = HTList_new();
- total_cookies = 0;
- }
-
- StrAllocCopy(rstr, rejectstr);
-
- *str = rstr;
-
- while ((strsmall = LYstrsep(str, ",")) != 0) {
-
- /*
- * Check the list of existing domains to see if this is a
- * re-setting of an already existing domains -- if so, just
- * change the behavior, if not, create a new domain entry.
- */
-
- for (hl = domain_list; hl != NULL; hl = hl->next) {
- de2 = (domain_entry *)hl->object;
- if ((de2 != NULL && de2->domain != NULL) &&
- !strcmp(strsmall, de2->domain)) {
- isexisting = TRUE;
- break;
- } else {
- isexisting = FALSE;
+ outofmem(__FILE__, "cookie_domain_flag_set");
+
+ switch(flag) {
+ case (FLAG_ACCEPT_ALWAYS): de->bv = ACCEPT_ALWAYS;
+ de->invcheck_bv = INVCHECK_QUERY;
+ break;
+ case (FLAG_REJECT_ALWAYS): de->bv = REJECT_ALWAYS;
+ de->invcheck_bv = INVCHECK_QUERY;
+ break;
+ case (FLAG_QUERY_USER): de->bv = QUERY_USER;
+ de->invcheck_bv = INVCHECK_QUERY;
+ break;
+ case (FLAG_FROM_FILE): de->bv = FROM_FILE;
+ de->invcheck_bv = INVCHECK_QUERY;
+ break;
+ case (FLAG_INVCHECK_QUERY): de->invcheck_bv = INVCHECK_QUERY;
+ de->bv = QUERY_USER;
+ break;
+ case (FLAG_INVCHECK_STRICT): de->invcheck_bv = INVCHECK_STRICT;
+ de->bv = QUERY_USER;
+ break;
+ case (FLAG_INVCHECK_LOOSE): de->invcheck_bv = INVCHECK_LOOSE;
+ de->bv = QUERY_USER;
+ break;
}
- }
-
- if(!isexisting) {
- de = (domain_entry *)calloc(1, sizeof(domain_entry));
-
- if (de == NULL)
- outofmem(__FILE__, "cookie_add_rejectlist");
-
- de->bv = REJECT_ALWAYS;
StrAllocCopy(de->domain, strsmall);
de->cookie_list = HTList_new();
HTList_addObject(domain_list, de);
} else {
- de2->bv = REJECT_ALWAYS;
- }
- }
-
- FREE(str);
- FREE(strsmall);
- FREE(rstr);
-}
-
-/* cookie_set_invcheck
-** -------------------
-**
-** Is passed a comma-delimited string of domains and a particular
-** behaviour to set their invcheck_bv to. - BJP
-*/
-
-PUBLIC void cookie_set_invcheck ARGS2(
- char *, domains,
- invcheck_behaviour, setting)
-{
- domain_entry *de = NULL;
- domain_entry *de2 = NULL;
- HTList *hl = NULL;
- char **str = (char **)calloc(1, sizeof(domains));
- char *dstr = NULL;
- char *strsmall = NULL;
- int isexisting = FALSE;
-
- if (str == NULL)
- outofmem(__FILE__, "cookie_set_invcheck");
-
- /*
- * Is this the first cookie we're handling? If so, initialize
- * domain_list.
- */
-
- if (domain_list == NULL) {
- atexit(LYCookieJar_free);
- domain_list = HTList_new();
- total_cookies = 0;
- }
-
- StrAllocCopy(dstr, domains);
-
- *str = dstr;
-
- while ((strsmall = LYstrsep(str, ",")) != 0) {
-
- /*
- * Check the list of existing cookies to see if this is a
- * re-setting of an already existing cookie -- if so, just
- * change the behavior, if not, create a new domain entry.
- */
- for (hl = domain_list; hl != NULL; hl = hl->next) {
- de2 = (domain_entry *)hl->object;
- if ((de2 != NULL && de2->domain != NULL)
- && !strcmp(strsmall, de2->domain)) {
- isexisting = TRUE;
- break;
- } else {
- isexisting = FALSE;
+ switch(flag) {
+ case (FLAG_ACCEPT_ALWAYS): de2->bv = ACCEPT_ALWAYS;
+ break;
+ case (FLAG_REJECT_ALWAYS): de2->bv = REJECT_ALWAYS;
+ break;
+ case (FLAG_QUERY_USER): de2->bv = QUERY_USER;
+ break;
+ case (FLAG_FROM_FILE): de2->bv = FROM_FILE;
+ break;
+ case (FLAG_INVCHECK_QUERY): de2->invcheck_bv = INVCHECK_QUERY;
+ break;
+ case (FLAG_INVCHECK_STRICT): de2->invcheck_bv = INVCHECK_STRICT;
+ break;
+ case (FLAG_INVCHECK_LOOSE): de2->invcheck_bv = INVCHECK_LOOSE;
+ break;
}
}
-
- if (!isexisting) {
- de = (domain_entry *)calloc(1, sizeof(domain_entry));
-
- if (de == NULL)
- outofmem(__FILE__, "cookie_set_invcheck");
-
- de->invcheck_bv = setting;
-
- StrAllocCopy(de->domain, strsmall);
- de->cookie_list = HTList_new();
- HTList_addObject(domain_list, de);
- } else {
- de2->invcheck_bv = setting;
- }
}
- FREE(str);
FREE(strsmall);
FREE(dstr);
}
diff --git a/src/LYCookie.h b/src/LYCookie.h
index 6f406287..104e44cc 100644
--- a/src/LYCookie.h
+++ b/src/LYCookie.h
@@ -8,6 +8,13 @@ typedef enum {ACCEPT_ALWAYS, REJECT_ALWAYS, QUERY_USER, FROM_FILE} behaviour;
typedef enum {INVCHECK_QUERY,
INVCHECK_STRICT,
INVCHECK_LOOSE} invcheck_behaviour;
+typedef enum {FLAG_ACCEPT_ALWAYS,
+ FLAG_REJECT_ALWAYS,
+ FLAG_QUERY_USER,
+ FLAG_FROM_FILE,
+ FLAG_INVCHECK_QUERY,
+ FLAG_INVCHECK_STRICT,
+ FLAG_INVCHECK_LOOSE} cookie_domain_flags;
struct _domain_entry {
char * domain; /* Domain for which these cookies are valid */
@@ -37,5 +44,8 @@ extern void cookie_add_rejectlist PARAMS((
extern void cookie_set_invcheck PARAMS((
char * domains,
invcheck_behaviour setting));
+extern void cookie_domain_flag_set PARAMS((
+ char * domainstr,
+ int flag));
#endif /* LYCOOKIES_H */
diff --git a/src/LYEdit.c b/src/LYEdit.c
index acd3cffb..c05156f4 100644
--- a/src/LYEdit.c
+++ b/src/LYEdit.c
@@ -15,7 +15,7 @@
#include <LYLeaks.h>
-PRIVATE BOOLEAN editor_can_position NOARGS
+PUBLIC BOOLEAN editor_can_position NOARGS
{
#ifdef VMS
return (strstr(editor, "sedt") || strstr(editor, "SEDT"));
diff --git a/src/LYEdit.h b/src/LYEdit.h
index f8ee515d..3eaa0e73 100644
--- a/src/LYEdit.h
+++ b/src/LYEdit.h
@@ -5,4 +5,6 @@
extern int edit_current_file PARAMS((char *newfile, int cur, int lineno));
+extern BOOLEAN editor_can_position NOPARAMS;
+
#endif /* LYEDIT_H */
diff --git a/src/LYEditmap.c b/src/LYEditmap.c
index e9912a06..d7ebebb7 100644
--- a/src/LYEditmap.c
+++ b/src/LYEditmap.c
@@ -4,13 +4,14 @@
#include <HTUtils.h>
#include <LYStrings.h>
+#include <LYKeymap.h> /* only for KEYMAP_SIZE - kw */
PUBLIC int current_lineedit = 0; /* Index into LYLineEditors[] */
/*
* See LYStrings.h for the LYE definitions.
*/
-PRIVATE char DefaultEditBinding[]={
+PRIVATE char DefaultEditBinding[KEYMAP_SIZE-1]={
LYE_NOP, LYE_BOL, LYE_DELPW, LYE_ABORT,
/* nul ^A ^B ^C */
@@ -100,17 +101,141 @@ LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR,
LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR,
/* 100..10F function key definitions in LYStrings.h */
-LYE_NOP, LYE_NOP, LYE_FORW, LYE_BACK,
+LYE_FORM_PASS, LYE_FORM_PASS, LYE_FORW, LYE_BACK,
/* UPARROW DNARROW RTARROW LTARROW */
-LYE_NOP, LYE_NOP, LYE_BOL, LYE_EOL,
+LYE_FORM_PASS, LYE_FORM_PASS, LYE_BOL, LYE_EOL,
/* PGDOWN PGUP HOME END */
+#if (defined(_WINDOWS) || defined(__DJGPP__))
+
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+/* F1 */
+
+#else
+
LYE_NOP, LYE_TAB, LYE_BOL, LYE_EOL,
/* F1 Do key Find key Select key */
-LYE_NOP, LYE_DELP, LYE_NOP, LYE_NOP,
-/* Insert key Remove key MOUSE_KEY DO_NOTHING */
+#endif /* _WINDOWS || __DJGPP__ */
+
+LYE_NOP, LYE_DELP, LYE_NOP, LYE_FORM_PASS,
+/* Insert key Remove key DO_NOTHING Back tab */
+
+/* 110..18F */
+#if (defined(_WINDOWS) || defined(__DJGPP__)) && defined(USE_SLANG) && !defined(DJGPP_KEYHANDLER)
+
+LYE_DELP, LYE_ENTER, LYE_NOP, LYE_NOP,
+/* Backspace Enter */
+
+#else
+
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+
+#endif /* USE_SLANG &&(_WINDOWS || __DJGPP) && !DJGPP_KEYHANDLER */
+
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+/* MOUSE_KEY */
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+/* 190..20F */
+
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+/* 210..28F */
+
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+/* 290..293 */
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
};
/*
@@ -121,9 +246,10 @@ LYE_NOP, LYE_DELP, LYE_NOP, LYE_NOP,
/* ^K=delete-to-EOL, ^X=delete-to-BOL, */
/* ^R=delete-prev-word, ^T=delete-next-word, */
/* ^^=upper-case-line, ^_=lower-case-line */
+/* Why the difference for tab? - kw */
#ifdef EXP_ALT_BINDINGS
-PRIVATE char BetterEditBinding[]={
+PRIVATE char BetterEditBinding[KEYMAP_SIZE-1]={
LYE_NOP, LYE_BOL, LYE_BACK, LYE_ABORT,
/* nul ^A ^B ^C */
@@ -213,17 +339,141 @@ LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR,
LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR,
/* 100..10E function key definitions in LYStrings.h */
-LYE_NOP, LYE_NOP, LYE_FORW, LYE_BACK,
+LYE_FORM_PASS, LYE_FORM_PASS, LYE_FORW, LYE_BACK,
/* UPARROW DNARROW RTARROW LTARROW */
-LYE_NOP, LYE_NOP, LYE_BOL, LYE_EOL,
+LYE_FORM_PASS, LYE_FORM_PASS, LYE_BOL, LYE_EOL,
/* PGDOWN PGUP HOME END */
+#if (defined(_WINDOWS) || defined(__DJGPP__))
+
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+/* F1 */
+
+#else
+
LYE_NOP, LYE_TAB, LYE_BOL, LYE_EOL,
/* F1 Do key Find key Select key */
-LYE_NOP, LYE_DELP, LYE_NOP, LYE_NOP,
-/* Insert key Remove key MOUSE_KEY DO_NOTHING */
+#endif /* _WINDOWS || __DJGPP__ */
+
+LYE_NOP, LYE_DELP, LYE_NOP, LYE_FORM_PASS,
+/* Insert key Remove key DO_NOTHING Back tab */
+
+/* 110..18F */
+#if (defined(_WINDOWS) || defined(__DJGPP__)) && defined(USE_SLANG) && !defined(DJGPP_KEYHANDLER)
+
+LYE_DELP, LYE_ENTER, LYE_NOP, LYE_NOP,
+/* Backspace Enter */
+
+#else
+
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+
+#endif /* USE_SLANG &&(_WINDOWS || __DJGPP) && !DJGPP_KEYHANDLER */
+
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+/* MOUSE_KEY */
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+/* 190..20F */
+
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+/* 210..28F */
+
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+/* 290..293 */
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
};
#endif
diff --git a/src/LYForms.c b/src/LYForms.c
index 4ba50547..e2addfef 100644
--- a/src/LYForms.c
+++ b/src/LYForms.c
@@ -375,6 +375,8 @@ again:
action = EditBinding(ch);
if (action == LYE_ENTER)
break;
+ if (action == LYE_FORM_PASS)
+ break;
if (action == LYE_LKCMD) {
_statusline(ENTER_LYNX_COMMAND);
ch = LYgetch();
@@ -399,17 +401,17 @@ again:
if (keymap[ch + 1] == LYK_REFRESH)
break;
switch (ch) {
+#ifdef NOTDEFINED /* The first four are mapped to LYE_FORM_PASS now */
case DNARROW:
case UPARROW:
case PGUP:
case PGDOWN:
-#ifdef NOTDEFINED
case HOME:
case END_KEY:
case FIND_KEY:
case SELECT_KEY:
-#endif /* NOTDEFINED */
goto breakfor;
+#endif /* NOTDEFINED */
/*
* Left arrrow in column 0 deserves special treatment here,
@@ -456,7 +458,9 @@ again:
LYRefreshEdit(&MyEdit);
}
}
+#ifdef NOTDEFINED
breakfor:
+#endif /* NOTDEFINED */
if (Edited) {
char *p;
@@ -998,7 +1002,7 @@ redraw:
char *msg = 0;
HTSprintf0(&msg, OPTION_ALREADY_CURRENT, (number + 1));
HTUserMsg(msg);
- free(msg);
+ FREE(msg);
if (disabled) {
_statusline(FORM_LINK_OPTION_LIST_UNM_MSG);
} else {
diff --git a/src/LYGetFile.c b/src/LYGetFile.c
index 0f55b9b3..a87371ff 100644
--- a/src/LYGetFile.c
+++ b/src/LYGetFile.c
@@ -119,7 +119,7 @@ Try_Redirected_URL:
char *msg = 0;
HTSprintf0(&msg, PORT_INVALID, (unsigned long)value);
HTAlert(msg);
- free(msg);
+ FREE(msg);
FREE(temp);
return(NULLFILE);
}
@@ -407,7 +407,7 @@ Try_Redirected_URL:
EXECUTION_DISABLED_FOR_FILE,
key_for_func(LYK_OPTIONS));
HTAlert(buf);
- free(buf);
+ FREE(buf);
}
#else /* no exec_links */
HTUserMsg(EXECUTION_NOT_COMPILED);
@@ -1212,7 +1212,7 @@ PUBLIC BOOLEAN exec_ok ARGS3(
BADCHAR_IN_EXEC_LINK,
*cp);
HTAlert(buf);
- free(buf);
+ FREE(buf);
return FALSE;
}
}
diff --git a/src/LYGlobalDefs.h b/src/LYGlobalDefs.h
index 613b5045..9b788aaa 100644
--- a/src/LYGlobalDefs.h
+++ b/src/LYGlobalDefs.h
@@ -317,6 +317,11 @@ extern char *LYCookieRejectDomains; /* domains to reject all cookies */
extern char *LYCookieStrictCheckDomains; /* domains to check strictly */
extern char *LYCookieLooseCheckDomains; /* domains to check loosely */
extern char *LYCookieQueryCheckDomains; /* domains to check w/a query */
+extern char *LYCookieSAcceptDomains; /* domains to accept all cookies */
+extern char *LYCookieSRejectDomains; /* domains to reject all cookies */
+extern char *LYCookieSStrictCheckDomains;/* domains to check strictly */
+extern char *LYCookieSLooseCheckDomains;/* domains to check loosely */
+extern char *LYCookieSQueryCheckDomains;/* domains to check w/a query */
#ifdef EXP_PERSISTENT_COOKIES
extern BOOLEAN persistent_cookies;
extern char *LYCookieFile; /* file to store cookies in */
diff --git a/src/LYJump.c b/src/LYJump.c
index 5cce7529..e1a4e0c9 100644
--- a/src/LYJump.c
+++ b/src/LYJump.c
@@ -192,7 +192,7 @@ PUBLIC char *LYJump ARGS1(int, key)
char *msg = 0;
HTSprintf0(&msg, KEY_NOT_MAPPED_TO_JUMP_FILE, key);
HTAlert(msg);
- free(msg);
+ FREE(msg);
return NULL;
}
if (!jtp->table)
diff --git a/src/LYKeymap.c b/src/LYKeymap.c
index 3800a879..0663a95d 100644
--- a/src/LYKeymap.c
+++ b/src/LYKeymap.c
@@ -46,13 +46,13 @@ unsigned short keymap[KEYMAP_SIZE] = {
0,
/* EOF */
-0, LYK_HOME, LYK_PREV_PAGE, 0,
+LYK_DO_NOTHING, LYK_HOME, LYK_PREV_PAGE, 0,
/* nul */ /* ^A */ /* ^B */ /* ^C */
LYK_ABORT, LYK_END, LYK_NEXT_PAGE, 0,
/* ^D */ /* ^E */ /* ^F */ /* ^G */
-LYK_HISTORY, LYK_NEXT_LINK, LYK_ACTIVATE, LYK_COOKIE_JAR,
+LYK_HISTORY, LYK_FASTFORW_LINK, LYK_ACTIVATE, LYK_COOKIE_JAR,
/* bs */ /* ht */ /* nl */ /* ^K */
LYK_REFRESH, LYK_ACTIVATE, LYK_DOWN_TWO, 0,
@@ -164,9 +164,18 @@ LYK_TAG_LINK, LYK_PREV_DOC, LYK_VIEW_BOOKMARK, 0,
LYK_NOCACHE, 0, LYK_INTERRUPT, 0,
/* x */ /* y */ /* z */ /* { */
+#if (defined(_WINDOWS) || defined(__DJGPP__))
+
+LYK_PIPE, 0, 0, 0,
+/* | */ /* } */ /* ~ */
+
+#else
+
LYK_PIPE, 0, 0, LYK_HISTORY,
/* | */ /* } */ /* ~ */ /* del */
+#endif /* _WINDOWS || __DJGPP__ */
+
/* 80..9F (illegal ISO-8859-1) 8-bit characters. */
0, 0, 0, 0,
0, 0, 0, 0,
@@ -203,49 +212,38 @@ LYK_PIPE, 0, 0, LYK_HISTORY,
0, 0, 0, 0,
0, 0, 0, 0,
-/* 100..10E function key definitions in LYStrings.h */
+/* 100..10F function key definitions in LYStrings.h */
LYK_PREV_LINK, LYK_NEXT_LINK, LYK_ACTIVATE, LYK_PREV_DOC,
/* UPARROW */ /* DNARROW */ /* RTARROW */ /* LTARROW */
LYK_NEXT_PAGE, LYK_PREV_PAGE, LYK_HOME, LYK_END,
/* PGDOWN */ /* PGUP */ /* HOME */ /* END */
-#if defined(__DJGPP__) || defined(_WINDOWS)
-#ifdef USE_SLANG
-LYK_END, LYK_HOME, LYK_PREV_PAGE, 0,
-/* END */ /* HOME */ /* PGUP */ /* B2 Key */
-
-LYK_END, LYK_NEXT_PAGE, 0,
-/* END */ /* PGDOWN */
+#if (defined(_WINDOWS) || defined(__DJGPP__))
+LYK_HELP, 0, 0, 0,
+/* F1*/
#else
- 0, LYK_HELP, 0, 0,
-/* F0 */ /* F1 */ /* F2 */ /* F3 */
- 0, 0, 0,
-
-#endif /* USE_SLANG */
-#else
LYK_HELP, LYK_ACTIVATE, LYK_HOME, LYK_END,
/* F1*/ /* Do key */ /* Find key */ /* Select key */
-LYK_UP_TWO, LYK_DOWN_TWO,
-/* Insert key */ /* Remove key */
+#endif /* _WINDOWS || __DJGPP__ */
-LYK_DO_NOTHING,
-/* DO_NOTHING*/
-#endif /* __DJGPP__ || _WINDOWS */
-/* 10F..18F */
+LYK_UP_TWO, LYK_DOWN_TWO, LYK_DO_NOTHING, LYK_FASTBACKW_LINK,
+/* Insert key */ /* Remove key */ /* DO_NOTHING*/ /* Back tab */
- 0,
-#if defined(USE_SLANG) && !defined(DJGPP_KEYHANDLER)
+/* 110..18F */
+
+#if (defined(_WINDOWS) || defined(__DJGPP__)) && defined(USE_SLANG) && !defined(DJGPP_KEYHANDLER)
LYK_HISTORY, LYK_ACTIVATE, 0, 0,
/* Backspace */ /* Enter */
#else
0, 0, 0, 0,
-#endif /* USE_SLANG */
- 0, 0, 0, 0,
+#endif /* USE_SLANG &&(_WINDOWS || __DJGPP) && !DJGPP_KEYHANDLER */
0, 0, 0, 0,
+ 0, LYK_DO_NOTHING, 0, 0,
+ /* 0x11d: MOUSE_KEY */
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
@@ -253,16 +251,12 @@ LYK_DO_NOTHING,
#ifdef DJGPP_KEYHANDLER
0, LYK_ABORT, 0, 0,
/* ALT_X */
- 0, 0, 0, 0,
- 0, 0, 0, 0,
- 0, 0, 0, LYK_HELP,
- /* F1 */
#else
0, 0, 0, 0,
+#endif /* DJGPP_KEYHANDLER */
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
-#endif /* DJGPP_KEYHANDLER */
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
@@ -296,17 +290,27 @@ LYK_DO_NOTHING,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
+#if (defined(_WINDOWS) || defined(__DJGPP__)) && !defined(USE_SLANG) /* PDCurses */
LYK_ABORT, 0, 0, 0,
/* ALT_X */
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
- 0, 0, 0, LYK_ACTIVATE,
- /* KP_ENTER */
+ 0, 0, LYK_WHEREIS, LYK_ACTIVATE,
+ /* KP_SLASH KP_ENTER */
0, 0, 0, LYK_IMAGE_TOGGLE,
/* KP_* */
LYK_PREV_PAGE, LYK_NEXT_PAGE, 0, 0,
/* KP_- */ /* KP_+ */
+#else
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+#endif /* (_WINDOWS || __DJGPP__) && !USE_SLANG */
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
@@ -318,12 +322,7 @@ LYK_DO_NOTHING,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
-#if defined(USE_SLANG) && !defined(DJGPP_KEYHANDLER)
- 0, LYK_HELP, 0, 0,
- /* F1 */
-#else
0, 0, 0, 0,
-#endif /* USE_SLANG */
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
@@ -509,7 +508,7 @@ LYK_TAG_LINK, LYK_UPLOAD, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
-/* 100..10E function key definitions in LYStrings.h */
+/* 100..10F function key definitions in LYStrings.h */
0, 0, 0, 0,
/* UPARROW */ /* DNARROW */ /* RTARROW */ /* LTARROW */
@@ -519,11 +518,113 @@ LYK_TAG_LINK, LYK_UPLOAD, 0, 0,
0, 0, 0, 0,
/* F1*/ /* Do key */ /* Find key */ /* Select key */
- 0, 0,
-/* Insert key */ /* Remove key */
+ 0, 0, LYK_DO_NOTHING, 0,
+/* Insert key */ /* Remove key */ /* DO_NOTHING */ /* Back tab */
+
+/* 110..18F */
+
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+/* 190..20F */
+
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+/* 210..28F */
-LYK_DO_NOTHING,
-/* DO_NOTHING*/
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ /* 290...293 */
+ 0, 0, 0, 0,
};
#endif /* DIRED_SUPPORT && OK_OVERRIDE */
@@ -558,6 +659,8 @@ PRIVATE struct rmap revmap[] = {
{ "END", "go to the end of the current document" },
{ "PREV_LINK", "make the previous link current" },
{ "NEXT_LINK", "make the next link current" },
+{ "FASTBACKW_LINK", "previous link or text area, only stops on links" },
+{ "FASTFORW_LINK", "next link or text area, only stops on links" },
{ "UP_LINK", "move up the page to a previous link" },
{ "DOWN_LINK", "move down the page to another link" },
{ "RIGHT_LINK", "move right to another link" },
@@ -570,7 +673,7 @@ PRIVATE struct rmap revmap[] = {
{ "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" },
-{ "INTERRUPT", "interrupt network transmission" },
+{ "INTERRUPT", "interrupt network connection or transmission" },
{ "MAIN_MENU", "return to the first screen (home page)" },
{ "OPTIONS", "display and change option settings" },
{ "INDEX_SEARCH", "allow searching of an index" },
@@ -641,7 +744,12 @@ PRIVATE CONST char *funckey[] = {
"Find key",
"Select key",
"Insert key",
- "Remove key"
+ "Remove key",
+ "(DO_NOTHING)", /* should normally not appear in list */
+ "Back Tab",
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0,
+ "mouse pseudo key", /* normally not mapped to keymap[] action? */
};
PRIVATE char *pretty ARGS1 (int, c)
@@ -649,22 +757,23 @@ PRIVATE char *pretty ARGS1 (int, c)
static char buf[30];
if (c == '\t')
- sprintf(buf, "&lt;tab&gt; ");
+ sprintf(buf, "&lt;tab&gt; ");
else if (c == '\r')
- sprintf(buf, "&lt;return&gt; ");
+ sprintf(buf, "&lt;return&gt; ");
else if (c == ' ')
- sprintf(buf, "&lt;space&gt; ");
+ sprintf(buf, "&lt;space&gt; ");
else if (c == '<')
- sprintf(buf, "&lt; ");
+ sprintf(buf, "&lt; ");
else if (c == '>')
- sprintf(buf, "&gt; ");
+ sprintf(buf, "&gt; ");
else if (c == 0177)
- sprintf(buf, "&lt;delete&gt; ");
+ sprintf(buf, "&lt;delete&gt; ");
else if (c > ' ' && c <= 0377)
sprintf(buf, "%c", c);
else if (c < ' ')
sprintf(buf, "^%c", c|0100);
- else if (c >= 0400 && (c - 0400) < (int) TABLESIZE(funckey))
+ else if (c >= 0400 && (c - 0400) < (int) TABLESIZE(funckey)
+ && funckey[c-0400])
sprintf(buf, "%s", funckey[c-0400]);
else if (c >= 0400)
sprintf(buf, "%#x", c);
@@ -687,7 +796,7 @@ PRIVATE char * format_binding ARGS2(
&& revmap[the_key].name != 0
&& revmap[the_key].doc != 0
&& (formatted = pretty(i-1)) != 0) {
- HTSprintf0(&buf, "%-12s%-14s%s\n", formatted,
+ HTSprintf0(&buf, "%-11s %-13s %s\n", formatted,
revmap[the_key].name,
revmap[the_key].doc);
return buf;
@@ -755,9 +864,12 @@ PRIVATE int LYLoadKeymap ARGS4 (
for (i = 1; i < KEYMAP_SIZE; i++) {
/*
* LYK_PIPE not implemented yet.
+ *
+ * Don't show CHANGE_LINK if mouse not enabled.
*/
if ((i >= 0400 || i <= ' ' || !isalpha(i-1)) &&
- strcmp(revmap[keymap[i]].name, "PIPE")) {
+ strcmp(revmap[keymap[i]].name, "PIPE") &&
+ (LYUseMouse || strcmp(revmap[keymap[i]].name, "CHANGE_LINK"))) {
print_binding(target, i);
}
}
diff --git a/src/LYKeymap.h b/src/LYKeymap.h
index 12736985..044de878 100644
--- a/src/LYKeymap.h
+++ b/src/LYKeymap.h
@@ -56,65 +56,67 @@ extern unsigned short key_override[];
#define LYK_END 23
#define LYK_PREV_LINK 24
#define LYK_NEXT_LINK 25
-#define LYK_UP_LINK 26
-#define LYK_DOWN_LINK 27
-#define LYK_RIGHT_LINK 28
-#define LYK_LEFT_LINK 29
-#define LYK_HISTORY 30
-#define LYK_PREV_DOC 31
-#define LYK_ACTIVATE 32
-#define LYK_GOTO 33
-#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_TRACE_LOG 55
-#define LYK_IMAGE_TOGGLE 56
-#define LYK_INLINE_TOGGLE 57
-#define LYK_HEAD 58
-#define LYK_DO_NOTHING 59
-#define LYK_TOGGLE_HELP 60
-#define LYK_JUMP 61
-#define LYK_KEYMAP 62
-#define LYK_LIST 63
-#define LYK_TOOLBAR 64
-#define LYK_HISTORICAL 65
-#define LYK_MINIMAL 66
-#define LYK_SOFT_DQUOTES 67
-#define LYK_RAW_TOGGLE 68
-#define LYK_COOKIE_JAR 69
-#define LYK_F_LINK_NUM 70
-#define LYK_CLEAR_AUTH 71
-#define LYK_SWITCH_DTD 72
-#define LYK_ELGOTO 73
-#define LYK_CHANGE_LINK 74
-#define LYK_EDIT_TEXTAREA 75
+#define LYK_FASTBACKW_LINK 26
+#define LYK_FASTFORW_LINK 27
+#define LYK_UP_LINK 28
+#define LYK_DOWN_LINK 29
+#define LYK_RIGHT_LINK 30
+#define LYK_LEFT_LINK 31
+#define LYK_HISTORY 32
+#define LYK_PREV_DOC 33
+#define LYK_ACTIVATE 34
+#define LYK_GOTO 35
+#define LYK_ECGOTO 36
+#define LYK_HELP 37
+#define LYK_INDEX 38
+#define LYK_NOCACHE 39
+#define LYK_INTERRUPT 40
+#define LYK_MAIN_MENU 41
+#define LYK_OPTIONS 42
+#define LYK_INDEX_SEARCH 43
+#define LYK_WHEREIS 44
+#define LYK_NEXT 45
+#define LYK_COMMENT 46
+#define LYK_EDIT 47
+#define LYK_INFO 48
+#define LYK_PRINT 49
+#define LYK_ADD_BOOKMARK 50
+#define LYK_DEL_BOOKMARK 51
+#define LYK_VIEW_BOOKMARK 52
+#define LYK_VLINKS 53
+#define LYK_SHELL 54
+#define LYK_DOWNLOAD 55
+#define LYK_TRACE_TOGGLE 56
+#define LYK_TRACE_LOG 57
+#define LYK_IMAGE_TOGGLE 58
+#define LYK_INLINE_TOGGLE 59
+#define LYK_HEAD 60
+#define LYK_DO_NOTHING 61
+#define LYK_TOGGLE_HELP 62
+#define LYK_JUMP 63
+#define LYK_KEYMAP 64
+#define LYK_LIST 65
+#define LYK_TOOLBAR 66
+#define LYK_HISTORICAL 67
+#define LYK_MINIMAL 68
+#define LYK_SOFT_DQUOTES 69
+#define LYK_RAW_TOGGLE 70
+#define LYK_COOKIE_JAR 71
+#define LYK_F_LINK_NUM 72
+#define LYK_CLEAR_AUTH 73
+#define LYK_SWITCH_DTD 74
+#define LYK_ELGOTO 75
+#define LYK_CHANGE_LINK 76
+#define LYK_EDIT_TEXTAREA 77
#ifdef USE_EXTERNALS
-#define LYK_EXTERN 76
+#define LYK_EXTERN 78
#if defined(VMS) || defined(DIRED_SUPPORT)
-#define LYK_DIRED_MENU 77
+#define LYK_DIRED_MENU 79
#endif /* VMS || DIRED_SUPPORT */
#else /* USE_EXTERNALS */
#if defined(VMS) || defined(DIRED_SUPPORT)
-#define LYK_DIRED_MENU 76
+#define LYK_DIRED_MENU 78
#endif /* VMS || DIRED_SUPPORT */
#endif /* !defined(USE_EXTERNALS) */
diff --git a/src/LYLocal.c b/src/LYLocal.c
index 8d0c2aba..5bc34d36 100644
--- a/src/LYLocal.c
+++ b/src/LYLocal.c
@@ -285,11 +285,11 @@ PRIVATE BOOLEAN ok_localname ARGS2(char*, dst, char*, src)
if (!ok_stat(s, &dir_info)
|| !ok_file_or_dir(&dir_info)) {
- free(s);
+ FREE(s);
return FALSE;
}
strcpy(dst, s);
- free(s);
+ FREE(s);
return TRUE;
}
@@ -465,7 +465,7 @@ PRIVATE BOOLEAN modify_tagged ARGS1(
cp = HTfullURL_toFile(cp);
StrAllocCopy(savepath, cp);
}
- free(cp);
+ FREE(cp);
if (!ok_stat(savepath, &dir_info)) {
FREE(savepath);
@@ -713,7 +713,7 @@ PUBLIC BOOLEAN local_modify ARGS2(
if (!HTList_isEmpty(tagged)) {
cp = HTpartURL_toFile(doc->address);
strcpy(testpath, cp);
- free(cp);
+ FREE(cp);
count = modify_tagged(testpath);
@@ -745,7 +745,7 @@ PUBLIC BOOLEAN local_modify ARGS2(
if (strchr("NLP", ans) != NULL) {
cp = HTfullURL_toFile(links[doc->link].lname);
strcpy(testpath, cp);
- free(cp);
+ FREE(cp);
if (ans == 'N') {
return(modify_name(testpath));
@@ -878,7 +878,7 @@ PUBLIC BOOLEAN local_create ARGS1(
cp = HTfullURL_toFile(doc->address);
strcpy(testpath,cp);
- free(cp);
+ FREE(cp);
if (ans == 'F') {
return(create_file(testpath));
@@ -895,7 +895,6 @@ PUBLIC BOOLEAN local_create ARGS1(
PRIVATE BOOLEAN remove_single ARGS1(
char *, testpath)
{
- int c;
int code = 0;
char *cp;
char *tmpbuf = 0;
@@ -919,23 +918,23 @@ PRIVATE BOOLEAN remove_single ARGS1(
/*** Course, it's probably broken for screen sizes other 80, too ***/
if (strlen(cp) < 37) {
HTSprintf0(&tmpbuf,
- gettext("Remove '%s' and all of its contents (y or n): "), cp);
+ gettext("Remove '%s' and all of its contents: "), cp);
} else {
HTSprintf0(&tmpbuf,
- gettext("Remove directory and all of its contents (y or n): "));
+ gettext("Remove directory and all of its contents: "));
}
} else if (S_ISREG(dir_info.st_mode)) {
if (strlen(cp) < 60) {
- HTSprintf0(&tmpbuf, gettext("Remove file '%s' (y or n): "), cp);
+ HTSprintf0(&tmpbuf, gettext("Remove file '%s': "), cp);
} else {
- HTSprintf0(&tmpbuf, gettext("Remove file (y or n): "));
+ HTSprintf0(&tmpbuf, gettext("Remove file: "));
}
#ifdef S_IFLNK
} else if (S_ISLNK(dir_info.st_mode)) {
if (strlen(cp) < 50) {
- HTSprintf0(&tmpbuf, gettext("Remove symbolic link '%s' (y or n): "), cp);
+ HTSprintf0(&tmpbuf, gettext("Remove symbolic link '%s': "), cp);
} else {
- HTSprintf0(&tmpbuf, gettext("Remove symbolic link (y or n): "));
+ HTSprintf0(&tmpbuf, gettext("Remove symbolic link: "));
}
#endif
} else {
@@ -943,10 +942,8 @@ PRIVATE BOOLEAN remove_single ARGS1(
FREE(tmpbuf);
return 0;
}
- _statusline(tmpbuf);
- c = LYgetch();
- if (TOUPPER(c) == 'Y') {
+ if (HTConfirm(tmpbuf) == YES) {
HTSprintf0(&tmpbuf,"remove %s",testpath);
args[0] = "rm";
args[1] = "-rf";
@@ -982,7 +979,7 @@ PUBLIC BOOLEAN local_remove ARGS1(
if (is_url(cp) == FILE_URL_TYPE) {
tp = HTfullURL_toFile(cp);
strcpy(testpath, tp);
- free(tp);
+ FREE(tp);
if ((i = strlen(testpath)) && testpath[i - 1] == '/')
testpath[(i - 1)] = '\0';
@@ -1049,7 +1046,7 @@ PRIVATE BOOLEAN permit_location ARGS3(
cp = HTfullURL_toFile(strip_trailing_slash(srcpath));
strcpy(local_src, cp);
- free(cp);
+ FREE(cp);
/*
* A couple of sanity tests.
@@ -1183,7 +1180,7 @@ PRIVATE BOOLEAN permit_location ARGS3(
return(0);
strcpy(tmpdst, destpath); /* operate only on filename */
- free(destpath);
+ FREE(destpath);
destpath = tmpdst;
/*
@@ -1622,7 +1619,7 @@ PUBLIC int dired_options ARGS2(
cp = HTfullURL_toFile(links[doc->link].lname);
strcpy(path, cp);
LYTrimPathSep(path);
- free(cp);
+ FREE(cp);
if (!ok_lstat(path, &dir_info)) {
LYCloseTempFP(fp0);
@@ -1838,7 +1835,7 @@ PUBLIC BOOLEAN local_install ARGS3(
int err;
args[src] = HTfullURL_toFile(name);
err = (LYExecv(INSTALL_PATH, args, tmpbuf) <= 0);
- free(args[src]);
+ FREE(args[src]);
if (err)
return ((count == 0) ? -1 : count);
count++;
diff --git a/src/LYMail.c b/src/LYMail.c
index af4b2a6d..c2b13b49 100644
--- a/src/LYMail.c
+++ b/src/LYMail.c
@@ -1552,15 +1552,9 @@ PUBLIC void reply_by_mail ARGS4(
*/
BOOLEAN is_preparsed = (LYPreparsedSource &&
HTisDocumentSource());
- if (is_preparsed)
- _statusline(INC_PREPARSED_MSG_PROMPT);
- else
- _statusline(INC_ORIG_MSG_PROMPT);
- c = 0;
- while (TOUPPER(c) != 'Y' && TOUPPER(c) != 'N' &&
- !term_letter && c != 7 && c != 3)
- c = LYgetch();
- if (TOUPPER(c) == 'Y') {
+ if (HTConfirm(is_preparsed
+ ? INC_PREPARSED_MSG_PROMPT
+ : INC_ORIG_MSG_PROMPT) == YES) {
/*
* The 1 will add the reply "> " in front of every line.
*/
@@ -1676,29 +1670,26 @@ PUBLIC void reply_by_mail ARGS4(
signal(SIGINT, SIG_IGN);
#endif /* !VMS */
LYStatusLine = (LYlines - 1);
- if (body)
- _statusline(SEND_MESSAGE_PROMPT);
- else
- _statusline(SEND_COMMENT_PROMPT);
+ c = HTConfirm (body ? SEND_MESSAGE_PROMPT : SEND_COMMENT_PROMPT);
LYStatusLine = -1;
- c = 0;
- while (TOUPPER(c) != 'Y' && TOUPPER(c) != 'N' &&
- !term_letter && c != 7 && c != 3)
- c = LYgetch();
- if (TOUPPER(c) != 'Y') {
+ if (c != YES) {
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;
+ if (term_letter) {
+ _user_message(APPEND_SIG_FILE, LynxSigFile);
+ c = 0;
+ } else {
+ char *msg = NULL;
+ HTSprintf0(&msg, APPEND_SIG_FILE, LynxSigFile);
+ c = HTConfirm(msg);
+ FREE(msg);
+ }
LYStatusLine = -1;
- while (TOUPPER(c) != 'Y' && TOUPPER(c) != 'N' &&
- !term_letter && c != 7 && c != 3)
- c = LYgetch();
- if (TOUPPER(c) == 'Y') {
+ if (c == YES) {
if ((fd = fopen(my_tmpfile, "a")) != NULL) {
fputs("-- \n", fd);
while (fgets(user_input, sizeof(user_input), fp) != NULL) {
diff --git a/src/LYMain.c b/src/LYMain.c
index 4bed8652..6db448a7 100644
--- a/src/LYMain.c
+++ b/src/LYMain.c
@@ -344,6 +344,11 @@ PUBLIC char *LYCookieRejectDomains = NULL; /* domains to reject all cookies */
PUBLIC char *LYCookieStrictCheckDomains = NULL; /* check strictly */
PUBLIC char *LYCookieLooseCheckDomains = NULL; /* check loosely */
PUBLIC char *LYCookieQueryCheckDomains = NULL; /* check w/a query */
+PUBLIC char *LYCookieSAcceptDomains = NULL; /* domains to accept all cookies */
+PUBLIC char *LYCookieSRejectDomains = NULL; /* domains to reject all cookies */
+PUBLIC char *LYCookieSStrictCheckDomains = NULL; /* check strictly */
+PUBLIC char *LYCookieSLooseCheckDomains = NULL; /* check loosely */
+PUBLIC char *LYCookieSQueryCheckDomains = NULL; /* check w/a query */
#ifdef EXP_PERSISTENT_COOKIES
BOOLEAN persistent_cookies = TRUE;
PUBLIC char *LYCookieFile = NULL; /* default cookie file */
@@ -466,6 +471,11 @@ PRIVATE void free_lynx_globals NOARGS
#ifdef EXP_PERSISTENT_COOKIES
FREE(LYCookieFile);
#endif
+ FREE(LYCookieAcceptDomains);
+ FREE(LYCookieRejectDomains);
+ FREE(LYCookieLooseCheckDomains);
+ FREE(LYCookieStrictCheckDomains);
+ FREE(LYCookieQueryCheckDomains);
FREE(LYUserAgent);
FREE(LYUserAgentDefault);
FREE(LYHostName);
@@ -491,6 +501,7 @@ PRIVATE void free_lynx_globals NOARGS
FREE(URLDomainSuffixes);
FREE(XLoadImageCommand);
FREE(lynx_version_putenv_command);
+ FREE(lynx_temp_space);
FREE(LYTraceLogPath);
FREE(lynx_cfg_file);
#if defined(USE_HASH)
diff --git a/src/LYMainLoop.c b/src/LYMainLoop.c
index 0d68c81d..a4ad942e 100644
--- a/src/LYMainLoop.c
+++ b/src/LYMainLoop.c
@@ -68,7 +68,7 @@ PRIVATE int are_phys_different PARAMS((document *doc1, document *doc2));
#endif
#define FASTTAB
-#ifdef FASTTAB
+
PRIVATE int sametext ARGS2(
char *, een,
char *, twee)
@@ -77,7 +77,6 @@ PRIVATE int sametext ARGS2(
return (strcmp(een, twee) == 0);
return TRUE;
}
-#endif /* FASTTAB */
PUBLIC HTList * Goto_URLs = NULL; /* List of Goto URLs */
@@ -2408,6 +2407,176 @@ new_cmd: /*
}
break;
+ case LYK_FASTFORW_LINK:
+ {
+ int samepage = 0, nextlink = curdoc.link;
+ if (nlinks > 1) {
+
+ /*
+ * If in textarea, move to first link or field
+ * after it if there is one on this screen. - kw
+ */
+ if (links[curdoc.link].type == WWW_FORM_LINK_TYPE &&
+ links[curdoc.link].form->type == F_TEXTAREA_TYPE) {
+ int thisgroup = links[curdoc.link].form->number;
+ char *thisname = links[curdoc.link].form->name;
+
+ if (curdoc.link < nlinks-1 &&
+ !(links[nlinks-1].type == WWW_FORM_LINK_TYPE &&
+ links[nlinks-1].form->type == F_TEXTAREA_TYPE &&
+ links[nlinks-1].form->number == thisgroup &&
+ sametext(links[nlinks-1].form->name, thisname))) {
+ do nextlink++;
+ while
+ (links[nextlink].type == WWW_FORM_LINK_TYPE &&
+ links[nextlink].form->type == F_TEXTAREA_TYPE &&
+ links[nextlink].form->number == thisgroup &&
+ sametext(links[nextlink].form->name, thisname));
+ samepage = 1;
+ } else if (!more && Newline == 1 && curdoc.link > 0) {
+ nextlink = 0;
+ samepage = 1;
+ }
+ } else if (curdoc.link < nlinks-1) {
+ nextlink++;
+ samepage = 1;
+ } else if (!more && Newline == 1 && curdoc.link > 0) {
+ nextlink = 0;
+ samepage = 1;
+ }
+ }
+ if (samepage) {
+ highlight(OFF, curdoc.link, prev_target);
+ curdoc.link = nextlink;
+ break; /* and we are done. */
+
+ /*
+ * At the bottom of list and there is only one page.
+ * Move to the top link on the page.
+ */
+ } else if (!more && Newline == 1 && curdoc.link == nlinks-1) {
+ highlight(OFF, curdoc.link, prev_target);
+ curdoc.link = 0;
+
+ } else if (more && /* need a later page */
+ HTGetLinkOrFieldStart(curdoc.link,
+ &Newline, &newdoc.link,
+ +1, TRUE) != NO) {
+ Newline++; /* our line counting starts with 1 not 0 */
+ /* nothing more to do here */
+
+ } else if (old_c != real_c) {
+ old_c = real_c;
+ HTInfoMsg(NO_LINKS_BELOW);
+ }
+ break;
+ }
+ case LYK_FASTBACKW_LINK:
+ {
+ int samepage = 0, nextlink = curdoc.link;
+ int res;
+ if (nlinks > 1) {
+
+ /*
+ * If in textarea, move to first link or textarea group
+ * before it if there is one on this screen. - kw
+ */
+ if (links[curdoc.link].type == WWW_FORM_LINK_TYPE &&
+ links[curdoc.link].form->type == F_TEXTAREA_TYPE) {
+ int thisgroup = links[curdoc.link].form->number;
+ char *thisname = links[curdoc.link].form->name;
+
+ if (curdoc.link > 0 &&
+ !(links[0].type == WWW_FORM_LINK_TYPE &&
+ links[0].form->type == F_TEXTAREA_TYPE &&
+ links[0].form->number == thisgroup &&
+ sametext(links[0].form->name, thisname))) {
+ do nextlink--;
+ while
+ (links[nextlink].type == WWW_FORM_LINK_TYPE &&
+ links[nextlink].form->type == F_TEXTAREA_TYPE &&
+ links[nextlink].form->number == thisgroup &&
+ sametext(links[nextlink].form->name, thisname));
+ samepage = 1;
+
+ } else if (!more && Newline == 1 &&
+ (links[0].type == WWW_FORM_LINK_TYPE &&
+ links[0].form->type == F_TEXTAREA_TYPE &&
+ links[0].form->number == thisgroup &&
+ sametext(links[0].form->name, thisname)) &&
+ !(links[nlinks-1].type == WWW_FORM_LINK_TYPE &&
+ links[nlinks-1].form->type == F_TEXTAREA_TYPE &&
+ links[nlinks-1].form->number == thisgroup &&
+ sametext(links[nlinks-1].form->name, thisname))) {
+ nextlink = nlinks - 1;
+ samepage = 1;
+
+ } else if (!more && Newline == 1 && curdoc.link > 0) {
+ nextlink = 0;
+ samepage = 1;
+ }
+ } else if (curdoc.link > 0) {
+ nextlink--;
+ samepage = 1;
+ } else if (!more && Newline == 1) {
+ nextlink = nlinks - 1;
+ samepage = 1;
+ }
+ }
+ if (samepage) {
+ /*
+ * If the link as determined so far is part of a
+ * group of textarea fields, try to use the first
+ * of them that's on the screen instead. - kw
+ */
+ if (nextlink > 0 &&
+ links[nextlink].type == WWW_FORM_LINK_TYPE &&
+ links[nextlink].form->type == F_TEXTAREA_TYPE) {
+ int thisgroup = links[nextlink].form->number;
+ char *thisname = links[nextlink].form->name;
+ if (links[0].type == WWW_FORM_LINK_TYPE &&
+ links[0].form->type == F_TEXTAREA_TYPE &&
+ links[0].form->number == thisgroup &&
+ sametext(links[0].form->name, thisname)) {
+ nextlink = 0;
+ } else
+ while
+ (nextlink > 1 &&
+ links[nextlink-1].type == WWW_FORM_LINK_TYPE &&
+ links[nextlink-1].form->type == F_TEXTAREA_TYPE &&
+ links[nextlink-1].form->number == thisgroup &&
+ sametext(links[nextlink-1].form->name, thisname)) {
+ nextlink--;
+ }
+ }
+ highlight(OFF, curdoc.link, prev_target);
+ curdoc.link = nextlink;
+ break; /* and we are done. */
+
+ } else if (Newline > 1 && /* need a previous page */
+ (res = HTGetLinkOrFieldStart(curdoc.link,
+ &Newline, &newdoc.link,
+ -1, TRUE)) != NO) {
+ if (res == LINK_DO_ARROWUP) {
+ /*
+ * It says we should use the normal PREV_LINK
+ * mechanism, so we'll do that. - kw
+ */
+ if (nlinks > 0)
+ curdoc.link = 0;
+ cmd = LYK_PREV_LINK;
+ goto new_cmd;
+ }
+ Newline++; /* our line counting starts with 1 not 0 */
+ /* nothing more to do here */
+
+ } else if (old_c != real_c) {
+ old_c = real_c;
+ HTInfoMsg(NO_LINKS_ABOVE);
+ }
+ break;
+ }
+
case LYK_UP_LINK:
if (curdoc.link > 0 &&
(links[0].ly != links[curdoc.link].ly ||
@@ -4196,7 +4365,7 @@ if (!LYUseFormsOptions) {
if (is_url(cp) == FILE_URL_TYPE) {
cp = HTfullURL_toFile(cp);
StrAllocCopy(tp, cp);
- free(cp);
+ FREE(cp);
if (stat(tp, &dir_info) == -1) {
HTAlert(NO_STATUS);
@@ -4851,7 +5020,7 @@ check_add_bookmark_to_self:
case LYK_SHELL: /* shell escape */
if (!no_shell) {
stop_curses();
- printf(SPAWNING_MSG);
+ printf("%s\r\n", SPAWNING_MSG);
LYSystem(LYSysShell());
start_curses();
refresh_screen = TRUE; /* for an HText_pageDisplay() */
diff --git a/src/LYNews.c b/src/LYNews.c
index 5cfd41db..6b988b55 100644
--- a/src/LYNews.c
+++ b/src/LYNews.c
@@ -283,12 +283,9 @@ PUBLIC char *LYNewsPost ARGS2(
/*
* Ask if the user wants to include the original message.
*/
- _statusline(INC_ORIG_MSG_PROMPT);
- c = 0;
- while (TOUPPER(c) != 'Y' && TOUPPER(c) != 'N' &&
- !term_message && c != 7 && c != 3)
- c = LYgetch();
- if (TOUPPER(c) == 'Y')
+ if (term_message) {
+ _statusline(INC_ORIG_MSG_PROMPT);
+ } else if (HTConfirm(INC_ORIG_MSG_PROMPT) == YES) {
/*
* The 1 will add the reply ">" in front of every line.
* We're assuming that if the display character set is
@@ -297,6 +294,7 @@ PUBLIC char *LYNewsPost ARGS2(
* converted to 7-bit equivalents. - FM
*/
print_wwwfile_to_fd(fd, 1);
+ }
}
LYCloseTempFP(fd); /* Close the temp file. */
scrollok(stdscr, FALSE); /* Stop scrolling. */
@@ -367,26 +365,20 @@ PUBLIC char *LYNewsPost ARGS2(
* whether to append the sig file. - FM
*/
LYStatusLine = (LYlines - 1);
- _statusline(POST_MSG_PROMPT);
- c = 0;
+ c = HTConfirm(POST_MSG_PROMPT);
LYStatusLine = -1;
- while (TOUPPER(c) != 'Y' && TOUPPER(c) != 'N' &&
- !term_message && c != 7 && c != 3)
- c = LYgetch();
- if (TOUPPER(c) != 'Y') {
+ if (c != YES) {
clear(); /* clear the screen */
goto cleanup;
}
- if ((LynxSigFile != NULL) &&
- (fp = fopen(LynxSigFile, "r")) != NULL) {
+ if ((LynxSigFile != NULL) && (fp = fopen(LynxSigFile, "r")) != NULL) {
+ char *msg = NULL;
+ HTSprintf0(&msg, APPEND_SIG_FILE, LynxSigFile);
+
LYStatusLine = (LYlines - 1);
- _user_message(APPEND_SIG_FILE, LynxSigFile);
- c = 0;
- LYStatusLine = -1;
- while (TOUPPER(c) != 'Y' && TOUPPER(c) != 'N' &&
- !term_message && c != 7 && c != 3)
- c = LYgetch();
- if (TOUPPER(c) == 'Y') {
+ if (term_message) {
+ _user_message(APPEND_SIG_FILE, LynxSigFile);
+ } else if (HTConfirm(msg) == YES) {
if ((fd = LYAppendToTxtFile (my_tempfile)) != NULL) {
fputs("-- \n", fd);
while (fgets(user_input, sizeof(user_input), fp) != NULL) {
@@ -396,6 +388,8 @@ PUBLIC char *LYNewsPost ARGS2(
}
}
fclose(fp);
+ FREE(msg);
+ LYStatusLine = -1;
}
clear(); /* clear the screen */
diff --git a/src/LYPrint.c b/src/LYPrint.c
index e5b35ae7..3aa2a359 100644
--- a/src/LYPrint.c
+++ b/src/LYPrint.c
@@ -280,7 +280,7 @@ PRIVATE BOOLEAN confirm_by_pages ARGS3(
HTSprintf0(&msg, prompt, pages);
_statusline(msg);
- free(msg);
+ FREE(msg);
c = LYgetch();
#ifdef VMS
@@ -740,7 +740,7 @@ PRIVATE void send_file_to_mail ARGS3(
}
/*
* If we are using MIME headers, add content-base and content-location if
- * we have them. This will always be the case if the document is source.
+ * we have them. This will always be the case if the document is source.
* - kw
*/
if (use_mime) {
@@ -926,7 +926,7 @@ check_again:
* [could use unsetenv(), but it's not portable]
*/
SET_ENVIRON(LYNX_PRINT_TITLE, "", "");
- SET_ENVIRON(LYNX_PRINT_URL, "","");
+ SET_ENVIRON(LYNX_PRINT_URL, "", "");
SET_ENVIRON(LYNX_PRINT_DATE, "", "");
SET_ENVIRON(LYNX_PRINT_LASTMOD, "", "");
diff --git a/src/LYReadCFG.c b/src/LYReadCFG.c
index 090cff98..88a04803 100644
--- a/src/LYReadCFG.c
+++ b/src/LYReadCFG.c
@@ -855,14 +855,14 @@ static Config_Type Config_Table [] =
#ifdef USE_COLOR_TABLE
PARSE_FUN("color", CONF_FUN, color_fun),
#endif
- PARSE_STR("cookie_accept_domains", CONF_STR, LYCookieAcceptDomains),
+ PARSE_STR("cookie_accept_domains", CONF_STR, LYCookieSAcceptDomains),
#ifdef EXP_PERSISTENT_COOKIES
PARSE_STR("cookie_file", CONF_STR, LYCookieFile),
#endif /* EXP_PERSISTENT_COOKIES */
- PARSE_STR("cookie_loose_invalid_domains", CONF_STR, LYCookieLooseCheckDomains),
- PARSE_STR("cookie_query_invalid_domains", CONF_STR, LYCookieQueryCheckDomains),
- PARSE_STR("cookie_reject_domains", CONF_STR, LYCookieRejectDomains),
- PARSE_STR("cookie_strict_invalid_domains", CONF_STR, LYCookieStrictCheckDomains),
+ PARSE_STR("cookie_loose_invalid_domains", CONF_STR, LYCookieSLooseCheckDomains),
+ PARSE_STR("cookie_query_invalid_domains", CONF_STR, LYCookieSQueryCheckDomains),
+ PARSE_STR("cookie_reject_domains", CONF_STR, LYCookieSRejectDomains),
+ PARSE_STR("cookie_strict_invalid_domains", CONF_STR, LYCookieSStrictCheckDomains),
PARSE_ENV("cso_proxy", CONF_ENV, 0 ),
#ifdef VMS
PARSE_STR("CSWING_PATH", CONF_STR, LYCSwingPath),
@@ -1040,7 +1040,7 @@ PUBLIC void free_lynx_cfg NOARGS
case CONF_ENV:
if (q->str_value != 0) {
FREE(*(q->str_value));
- free((char *)q->str_value);
+ FREE((char *)q->str_value);
}
break;
default:
@@ -1292,24 +1292,49 @@ PUBLIC void read_cfg ARGS4(
* And for query/strict/loose invalid cookie checking. - BJP
*/
+ if (LYCookieSAcceptDomains != NULL) {
+ cookie_domain_flag_set(LYCookieSAcceptDomains, FLAG_ACCEPT_ALWAYS);
+ FREE(LYCookieSAcceptDomains);
+ }
+
+ if (LYCookieSRejectDomains != NULL) {
+ cookie_domain_flag_set(LYCookieSRejectDomains, FLAG_REJECT_ALWAYS);
+ FREE(LYCookieSRejectDomains);
+ }
+
+ if (LYCookieSStrictCheckDomains != NULL) {
+ cookie_domain_flag_set(LYCookieSStrictCheckDomains, FLAG_INVCHECK_STRICT);
+ FREE(LYCookieSStrictCheckDomains);
+ }
+
+ if (LYCookieSLooseCheckDomains != NULL) {
+ cookie_domain_flag_set(LYCookieSLooseCheckDomains, FLAG_INVCHECK_LOOSE);
+ FREE(LYCookieSLooseCheckDomains);
+ }
+
+ if (LYCookieSQueryCheckDomains != NULL) {
+ cookie_domain_flag_set(LYCookieSQueryCheckDomains, FLAG_INVCHECK_QUERY);
+ FREE(LYCookieSQueryCheckDomains);
+ }
+
if (LYCookieAcceptDomains != NULL) {
- cookie_add_acceptlist(LYCookieAcceptDomains);
+ cookie_domain_flag_set(LYCookieAcceptDomains, FLAG_ACCEPT_ALWAYS);
}
if (LYCookieRejectDomains != NULL) {
- cookie_add_rejectlist(LYCookieRejectDomains);
+ cookie_domain_flag_set(LYCookieRejectDomains, FLAG_REJECT_ALWAYS);
}
if (LYCookieStrictCheckDomains != NULL) {
- cookie_set_invcheck(LYCookieStrictCheckDomains, INVCHECK_STRICT);
+ cookie_domain_flag_set(LYCookieStrictCheckDomains, FLAG_INVCHECK_STRICT);
}
if (LYCookieLooseCheckDomains != NULL) {
- cookie_set_invcheck(LYCookieLooseCheckDomains, INVCHECK_LOOSE);
+ cookie_domain_flag_set(LYCookieLooseCheckDomains, FLAG_INVCHECK_LOOSE);
}
if (LYCookieQueryCheckDomains != NULL) {
- cookie_set_invcheck(LYCookieQueryCheckDomains, INVCHECK_QUERY);
+ cookie_domain_flag_set(LYCookieQueryCheckDomains, FLAG_INVCHECK_QUERY);
}
}
diff --git a/src/LYShowInfo.c b/src/LYShowInfo.c
index 962a7329..bfc0c85a 100644
--- a/src/LYShowInfo.c
+++ b/src/LYShowInfo.c
@@ -153,14 +153,14 @@ PUBLIC int showinfo ARGS4(
s = HTfullURL_toFile(doc->address);
strcpy(temp, s);
- free(s);
+ FREE(s);
fprintf(fp0, " <em>%4s</em> %s\n", gettext("Name:"), temp);
fprintf(fp0, " <em>%4s</em> %s\n", gettext("URL:"), doc->address);
s = HTfullURL_toFile(links[doc->link].lname);
strcpy(temp, s);
- free(s);
+ FREE(s);
if (lstat(temp, &dir_info) == -1) {
CTRACE(tfp, "lstat(%s) failed, errno=%d\n", temp, errno);
diff --git a/src/LYStrings.c b/src/LYStrings.c
index f8d0fe3c..d74e2310 100644
--- a/src/LYStrings.c
+++ b/src/LYStrings.c
@@ -701,6 +701,8 @@ PRIVATE void expand_substring (char* dst, char* first, char* last)
if (s == 0)
s = first + strlen(first);
first = expand_tiname(first, s-first, &dst);
+ if (*first)
+ first++;
} else if (ch == '?') { /* ASCII delete? */
*dst++ = 127;
} else if ((ch & 0x3f) < 0x20) { /* ASCII control char? */
@@ -1091,7 +1093,7 @@ PUBLIC int LYgetch NOARGS
return sl_read_mouse_event ();
#endif
- if ((keysym > DO_NOTHING) || (keysym < 0))
+ if ((keysym+1 >= KEYMAP_SIZE) || (keysym < 0))
return 0;
return keysym;
@@ -1103,7 +1105,7 @@ PUBLIC int LYgetch_for ARGS1(
return LYgetch();
}
-#else /* !USE_KEYMAPS */
+#else /* NOT defined(USE_KEYMAPS) && defined(USE_SLANG) */
/*
* LYgetch() translates some escape sequences and may fake noecho.
@@ -1372,10 +1374,10 @@ re_read:
c = CH_DEL; /* backspace key (delete, not Ctrl-H) S/390 -- gil -- 2041 */
break;
#endif /* KEY_BACKSPACE */
-#if defined(KEY_F) && !defined(__DJGPP__) && !defined(_WINDOWS)
case KEY_F(1):
c = F1; /* VTxxx Help */
break;
+#if defined(KEY_F) && !defined(__DJGPP__) && !defined(_WINDOWS)
case KEY_F(16):
c = DO_KEY; /* VTxxx Do */
break;
@@ -1405,6 +1407,33 @@ re_read:
c = REMOVE_KEY; /* VTxxx Remove */
break;
#endif /* KEY_DC */
+#ifdef KEY_BTAB
+ case KEY_BTAB:
+ c = BACKTAB_KEY; /* Back tab, often Shift-Tab */
+ break;
+#endif /* KEY_BTAB */
+
+/* The following maps PDCurses keys away from lynx reserved values */
+#if (defined(_WINDOWS) || defined(__DJGPP__)) && !defined(USE_SLANG)
+ case KEY_F(2):
+ c = 0x213;
+ break;
+ case KEY_F(3):
+ c = 0x214;
+ break;
+ case KEY_F(4):
+ c = 0x215;
+ break;
+ case KEY_F(5):
+ c = 0x216;
+ break;
+ case KEY_F(6):
+ c = 0x217;
+ break;
+ case KEY_F(7):
+ c = 0x218;
+ break;
+#endif /* PDCurses */
#ifdef NCURSES_MOUSE_VERSION
case KEY_MOUSE:
if (code == FOR_CHOICE) {
@@ -1504,6 +1533,29 @@ re_read:
case K_EEnd:
c = END_KEY;
break;
+ case K_F1: /* F1 key */
+ c = F1;
+ break;
+ case K_Insert: /* Insert key */
+ case K_EInsert:
+ c = INSERT_KEY;
+ break;
+ case K_Delete: /* Delete key */
+ case K_EDelete:
+ c = REMOVE_KEY;
+ break;
+ case K_Alt_Escape: /* Alt-Escape */
+ c = 0x1a7;
+ break;
+ case K_Control_At: /* CTRL-@ */
+ c = 0x1a8;
+ break;
+ case K_Alt_Backspace: /* Alt-Backspace */
+ c = 0x1a9;
+ break;
+ case K_BackTab: /* BackTab */
+ c = BACKTAB_KEY;
+ break;
}
}
#endif /* DGJPP_KEYHANDLER */
@@ -1538,6 +1590,15 @@ re_read:
case SL_KEY_C1: /* lower left of keypad */
c = END_KEY;
break;
+ case SL_KEY_F(1): /* F1 key */
+ c = F1;
+ break;
+ case SL_KEY_IC: /* Insert key */
+ c = INSERT_KEY;
+ break;
+ case SL_KEY_DELETE: /* Delete key */
+ c = REMOVE_KEY;
+ break;
}
}
#endif /* USE_SLANG && __DJGPP__ && !DJGPP_KEYHANDLER && !USE_KEYMAPS */
@@ -1554,7 +1615,7 @@ re_read:
}
}
-#endif /* NOT USE_KEYMAPS */
+#endif /* NOT defined(USE_KEYMAPS) && defined(USE_SLANG) */
/*
* Convert a null-terminated string to lowercase
@@ -1770,7 +1831,8 @@ PUBLIC int LYEdit1 ARGS4(
return(ch);
case LYE_CHAR:
#ifdef EXP_KEYBOARD_LAYOUT
- if (map_active && ch < 128 && LYKbLayouts[current_layout][ch])
+ if (map_active && ch < 128 && ch >= 0 &&
+ LYKbLayouts[current_layout][ch])
ch = UCTransUniChar((long) LYKbLayouts[current_layout][ch],
current_char_set);
#endif
@@ -2075,7 +2137,8 @@ again:
switch (EditBinding(ch)) {
case LYE_TAB:
ch = '\t';
- /* fall through */
+ /* This used to fall through to the next case before
+ tab completion was introduced */
res = LYFindInCloset(MyEdit.buffer);
if (res != 0) {
LYEdit1(&MyEdit, '\0', LYE_ERASE, FALSE);
@@ -2123,6 +2186,14 @@ again:
*/
break;
+ case LYE_FORM_PASS:
+ /*
+ * Used in form_getstr() to end line editing and
+ * pass on the input char/lynxkeycode. Here it
+ * is just ignored. - kw
+ */
+ break;
+
default:
LYLineEdit(&MyEdit, ch, FALSE);
}
diff --git a/src/LYStrings.h b/src/LYStrings.h
index 7c346fc2..4114fa7b 100644
--- a/src/LYStrings.h
+++ b/src/LYStrings.h
@@ -97,8 +97,18 @@ extern char * SNACat PARAMS((
#define SELECT_KEY 267 /* 0x10B */
#define INSERT_KEY 268 /* 0x10C */
#define REMOVE_KEY 269 /* 0x10D */
-#define MOUSE_KEY 270 /* 0x10E */
-#define DO_NOTHING 271 /* 0x10F */
+#define DO_NOTHING 270 /* 0x10E */
+#define BACKTAB_KEY 271 /* 0x10F */
+#define MOUSE_KEY 0x11d /* 0x11D */
+/* *** NOTE: ***
+ If you add definitions for new lynxkeycodes to the above list that
+ need to be mapped to LYK_* lynxactioncodes -
+ - AT LEAST the tables keymap[] and key_override[] in LYKeymap.c
+ have to be changed/reviewed, AS WELL AS the lineedit binding
+ tables in LYEditmap.c !
+ - KEYMAP_SIZE, defined in LYKeymap.h, may need to be changed !
+*/
+
# define FOR_PANEL 0
# define FOR_CHOICE 1
@@ -136,11 +146,15 @@ typedef struct _EditFieldData {
#define LYE_NOP 0 /* Do Nothing */
#define LYE_CHAR (LYE_NOP +1) /* Insert printable char */
-#define LYE_ENTER (LYE_CHAR +1) /* Input complete, return char */
+#define LYE_ENTER (LYE_CHAR +1) /* Input complete, return char/lynxkeycode */
#define LYE_TAB (LYE_ENTER +1) /* Input complete, return TAB */
#define LYE_ABORT (LYE_TAB +1) /* Input cancelled */
-#define LYE_DELN (LYE_ABORT +1) /* Delete next/curr char */
+#define LYE_FORM_PASS (LYE_ABORT +1) /* In form fields: input complete,
+ return char / lynxkeycode;
+ Elsewhere: Do Nothing */
+
+#define LYE_DELN (LYE_FORM_PASS +1) /* Delete next/curr char */
#define LYE_DELC (LYE_DELN) /* Obsolete (DELC case was equiv to DELN) */
#define LYE_DELP (LYE_DELN +1) /* Delete prev char */
#define LYE_DELNW (LYE_DELP +1) /* Delete next word */
diff --git a/src/LYUpload.c b/src/LYUpload.c
index 9f970890..3ccb4728 100644
--- a/src/LYUpload.c
+++ b/src/LYUpload.c
@@ -205,7 +205,7 @@ PUBLIC int LYUpload_options ARGS2(
cp = HTfullURL_toFile(directory);
strcpy(curloc,cp);
LYTrimPathSep(curloc);
- free(cp);
+ FREE(cp);
#endif /* VMS */
LYLocalFileToURL(newfile, tempfile);
diff --git a/src/LYUtils.c b/src/LYUtils.c
index 2c9a92a0..ecced083 100644
--- a/src/LYUtils.c
+++ b/src/LYUtils.c
@@ -1721,7 +1721,7 @@ PUBLIC void free_and_clear ARGS1(
char **, pointer)
{
if (*pointer) {
- free(*pointer);
+ FREE(*pointer);
*pointer = 0;
}
return;
@@ -2188,8 +2188,35 @@ PUBLIC int HTCheckForInterrupt NOARGS
else if (display_partial && (NumOfLines_partial > 2))
/* OK, we got several lines from new document and want to scroll... */
{
+ int res;
switch (keymap[c+1])
{
+ case LYK_FASTBACKW_LINK :
+ if (Newline_partial <= (display_lines)+1) {
+ Newline_partial -= display_lines ;
+ } else if ((res =
+ HTGetLinkOrFieldStart(-1,
+ &Newline_partial, NULL,
+ -1, TRUE)) == LINK_LINE_FOUND) {
+ Newline_partial++;
+ } else if (res == LINK_DO_ARROWUP) {
+ Newline_partial -= display_lines ;
+ }
+ break;
+ case LYK_FASTFORW_LINK :
+ if (HText_canScrollDown()) {
+ /* This is not an exact science... - kw */
+ if ((res =
+ HTGetLinkOrFieldStart(HText_LinksInLines(HTMainText,
+ Newline_partial,
+ display_lines)
+ - 1,
+ &Newline_partial, NULL,
+ +1, TRUE)) == LINK_LINE_FOUND) {
+ Newline_partial++;
+ }
+ }
+ break;
case LYK_PREV_PAGE :
if (Newline_partial > 1)
Newline_partial -= display_lines ;
@@ -4725,7 +4752,11 @@ PUBLIC CONST char * Home_Dir NOARGS
char *cp = NULL;
if (homedir == NULL) {
- if ((cp = getenv("HOME")) == NULL || *cp == '\0') {
+ if ((cp = getenv("HOME")) == NULL || *cp == '\0'
+#ifdef UNIX
+ || *cp != '/'
+#endif /* UNIX */
+ ) {
#if defined (DOSPATH) || defined (__EMX__) /* BAD! WSB */
if ((cp = getenv("TEMP")) == NULL || *cp == '\0') {
if ((cp = getenv("TMP")) == NULL || *cp == '\0') {
@@ -4764,6 +4795,10 @@ PUBLIC CONST char * Home_Dir NOARGS
*/
StrAllocCopy(HomeDir, "/tmp");
}
+#ifdef UNIX
+ if (cp && *cp)
+ HTAlwaysAlert(NULL, gettext("Ignoring invalid HOME"));
+#endif
#endif /* VMS */
#endif /* DOSPATH */
} else {
@@ -5422,7 +5457,7 @@ PUBLIC int putenv ARGS1(
new_environ[size] = (char *) string;
new_environ[size + 1] = NULL;
if (last_environ != NULL)
- free ((char *) last_environ);
+ FREE ((char *) last_environ);
last_environ = new_environ;
environ = new_environ;
}
@@ -5494,7 +5529,7 @@ PRIVATE BOOL IsOurFile ARGS1(char *, name)
break;
}
} while (leaf != path);
- free(path);
+ FREE(path);
#endif
return !linked;
}
@@ -5847,8 +5882,8 @@ PUBLIC void LYRemoveTemp ARGS1(
CTRACE_FLUSH(tfp);
if (p->file != 0)
fclose(p->file);
- free(p->name);
- free(p);
+ FREE(p->name);
+ FREE(p);
break;
}
}
@@ -6251,6 +6286,7 @@ PUBLIC int LYSystem ARGS1(
fflush(stdout);
fflush(stderr);
+ CTRACE_FLUSH(tfp);
#ifdef __DJGPP__
__djgpp_set_ctrl_c(0);
diff --git a/src/LYrcFile.c b/src/LYrcFile.c
index af1f9041..e0c1304c 100644
--- a/src/LYrcFile.c
+++ b/src/LYrcFile.c
@@ -408,11 +408,11 @@ PUBLIC void read_rc NOPARAMS
*/
} else if (FIND_KEYWORD(cp, "cookie_accept_domains")) {
cp = SkipEquals(cp);
- cookie_add_acceptlist(cp);
- if(LYCookieAcceptDomains != NULL) {
- StrAllocCat(LYCookieAcceptDomains, ",");
- }
- StrAllocCat(LYCookieAcceptDomains, cp);
+ cookie_domain_flag_set(cp, FLAG_ACCEPT_ALWAYS);
+ if(LYCookieAcceptDomains != NULL) {
+ StrAllocCat(LYCookieAcceptDomains, ",");
+ }
+ StrAllocCat(LYCookieAcceptDomains, cp);
/*
@@ -420,11 +420,11 @@ PUBLIC void read_rc NOPARAMS
*/
} else if (FIND_KEYWORD(cp, "cookie_reject_domains")) {
cp = SkipEquals(cp);
- cookie_add_rejectlist(cp);
- if(LYCookieRejectDomains != NULL) {
- StrAllocCat(LYCookieRejectDomains, ",");
- }
- StrAllocCat(LYCookieRejectDomains, cp);
+ cookie_domain_flag_set(cp, FLAG_REJECT_ALWAYS);
+ if(LYCookieRejectDomains != NULL) {
+ StrAllocCat(LYCookieRejectDomains, ",");
+ }
+ StrAllocCat(LYCookieRejectDomains, cp);
/*
* Cookie domains to perform loose checks?
@@ -432,7 +432,7 @@ PUBLIC void read_rc NOPARAMS
} else if (FIND_KEYWORD(cp, "cookie_loose_invalid_domains")) {
cp = SkipEquals(cp);
StrAllocCopy(LYCookieLooseCheckDomains, cp);
- cookie_set_invcheck(LYCookieLooseCheckDomains, INVCHECK_LOOSE);
+ cookie_domain_flag_set(cp, FLAG_INVCHECK_LOOSE);
/*
* Cookie domains to perform strict checks?
@@ -440,7 +440,7 @@ PUBLIC void read_rc NOPARAMS
} else if (FIND_KEYWORD(cp, "cookie_strict_invalid_domains")) {
cp = SkipEquals(cp);
StrAllocCopy(LYCookieStrictCheckDomains, cp);
- cookie_set_invcheck(LYCookieStrictCheckDomains, INVCHECK_STRICT);
+ cookie_domain_flag_set(cp, FLAG_INVCHECK_STRICT);
/*
* Cookie domains to query user over invalid cookies?
@@ -448,11 +448,11 @@ PUBLIC void read_rc NOPARAMS
} else if (FIND_KEYWORD(cp, "cookie_query_invalid_domains")) {
cp = SkipEquals(cp);
StrAllocCopy(LYCookieQueryCheckDomains, cp);
- cookie_set_invcheck(LYCookieQueryCheckDomains, INVCHECK_QUERY);
+ cookie_domain_flag_set(cp, FLAG_INVCHECK_QUERY);
#ifdef EXP_PERSISTENT_COOKIES
/*
- * File in which to store persistent cookies.
+ * File in which to store persistent cookies.
*/
} else if (FIND_KEYWORD(cp, "cookie_file")) {
cp = SkipEquals(cp);
@@ -493,7 +493,7 @@ PUBLIC void read_rc NOPARAMS
} else if (FIND_KEYWORD(cp, "partial_thres")) {
cp = SkipEquals(cp);
if (atoi(cp) != 0)
- partial_threshold = atoi(cp);
+ partial_threshold = atoi(cp);
#endif /* DISP_PARTIAL */
/*
@@ -902,12 +902,12 @@ PUBLIC int save_rc NOPARAMS
# override any settings made here. If a single domain is specified in\n\
# both cookie_accept_domains and in cookie_reject_domains, the rejection\n\
# will take precedence.\n"));
- fprintf(fp, "cookie_accept_domains=%s\n",
- (LYCookieAcceptDomains == NULL ? ""
- : LYCookieAcceptDomains));
- fprintf(fp, "cookie_reject_domains=%s\n\n",
- (LYCookieRejectDomains == NULL ? ""
- : LYCookieRejectDomains));
+ fprintf(fp, "cookie_accept_domains=%s\n",
+ (LYCookieAcceptDomains == NULL ? ""
+ : LYCookieAcceptDomains));
+ fprintf(fp, "cookie_reject_domains=%s\n\n",
+ (LYCookieRejectDomains == NULL ? ""
+ : LYCookieRejectDomains));
fprintf(fp, gettext("\
diff --git a/src/UCAuto.c b/src/UCAuto.c
index 903944e2..5a976eb4 100644
--- a/src/UCAuto.c
+++ b/src/UCAuto.c
@@ -150,11 +150,11 @@ PUBLIC void UCChangeTerminalCodepage ARGS2(
}
remove(old_font);
- free(old_font);
+ FREE(old_font);
old_font = 0;
remove(old_umap);
- free(old_umap);
+ FREE(old_umap);
old_umap = 0;
}
return;
diff --git a/src/chrtrans/cp866u_uni.tbl b/src/chrtrans/cp866u_uni.tbl
index 0b14123e..99c30de6 100644
--- a/src/chrtrans/cp866u_uni.tbl
+++ b/src/chrtrans/cp866u_uni.tbl
@@ -1,5 +1,5 @@
#
-#The MIME name of this charset.
+#The MIME name of this charset.
Mcp866u
#Name as a Display Charset (used on Options screen)
@@ -13,10 +13,8 @@ OUkrainian Cyrillic (cp866u)
# Unicode version: 2.0
# Table version: 2.00
# Table format: Format A
-# General notes: based on Cyrillic (cp866) table.
-# Original file: cp866_uni.tbl (authors:
-# Lori Brownell <loribr@microsoft.com>
-# K.D. Chang <a-kchang@microsoft.com>
+# General notes: based on Cyrillic (cp866) table,
+# have different mapping in 0xF2-0xF9 region.
#
# Format: Three tab-separated columns
# Column #1 is the cp866_DOSCyrillicUkrainian code (in hex)
diff --git a/src/chrtrans/iso9945_uni.tbl b/src/chrtrans/iso9945_uni.tbl
index 100ae92c..18cf2ffe 100644
--- a/src/chrtrans/iso9945_uni.tbl
+++ b/src/chrtrans/iso9945_uni.tbl
@@ -2,7 +2,7 @@
Miso-9945-2
#Name as a Display Charset (used on Options screen)
-OUkrainian (ISO-9945-2)
+OUkrainian Cyrillic (ISO-9945-2)
#Codepage number
#?
diff --git a/src/chrtrans/koi8u_uni.tbl b/src/chrtrans/koi8u_uni.tbl
index e3458dba..2c13845b 100644
--- a/src/chrtrans/koi8u_uni.tbl
+++ b/src/chrtrans/koi8u_uni.tbl
@@ -12,8 +12,18 @@ Mkoi8-u
# (verified against RFC2319).
# KOI8-U home page: <http://www.net.ua/KOI8-U>
#
-#hex unicode # description
-#--- U+---- # ---------------
+# Quoted from RFC2319:
+# The upper part of the KOI8-U Character Set contains all Russian
+# letters defined in KOI8-R and four Ukrainian letters (#164, #180 -
+# ukr. ie, #166, #182 - ukr. i, #167, #183 - ukr. yi, #173, #189 - ukr.
+# ghe with upturn) which locations are compliant with ISO-IR-111.
+#
+# BOX DRAWINGS elements in the other positions (that are not used by
+# Ukrainian letters) are the same as in KOI8-R character set.
+#
+#
+#hex unicode # description
+#--- U+---- # ---------------
0x80 U+2500 # BOX DRAWINGS LIGHT HORIZONTAL
0x81 U+2502 # BOX DRAWINGS LIGHT VERTICAL
0x82 U+250C # BOX DRAWINGS LIGHT DOWN AND RIGHT
diff --git a/src/makefile.in b/src/makefile.in
index 56b8c944..6934d250 100644
--- a/src/makefile.in
+++ b/src/makefile.in
@@ -102,7 +102,7 @@ lint:
$(LINT) $(LINTOPTS) $(CPP_OPTS) *.c > $(top_builddir)/lint.lynx
clean:
- rm -f lynx$x core *.[ob] *.bak
+ rm -f lynx$x core *.core *.leaks *.[ob] *.bak
cd chrtrans && $(MAKE) clean
distclean: clean
diff --git a/src/structdump.h b/src/structdump.h
index 8b058189..42b9a07d 100644
--- a/src/structdump.h
+++ b/src/structdump.h
@@ -57,6 +57,7 @@ CTRACE(tfp, "\n" \
" input_field=|%s|\n" \
" show_anchor=%1x\n" \
" inUnderline=%1x\n" \
+ " expansion_anch=%1x\n" \
" *anchor=0x%08x\n" \
"}\n", \
(A), sizeof(*((A))), \
@@ -64,8 +65,8 @@ CTRACE(tfp, "\n" \
(A)->extent, (A)->line_num, \
(A)->hightext, (A)->hightext, (A)->hightext2, (A)->hightext2, \
(A)->hightext2offset, (A)->link_type, \
- (A)->input_field, (A)->input_field, \
- (A)->show_anchor, (A)->inUnderline, (A)->anchor); \
+ (A)->input_field, (A)->input_field, (A)->show_anchor, \
+ (A)->inUnderline, (A)->expansion_anch, (A)->anchor); \
CTRACE_FLUSH(tfp);
@@ -118,20 +119,21 @@ CTRACE_FLUSH(tfp);
#define DUMPSTRUCT_LINE(L,X) \
CTRACE(tfp, "\n" \
"KED: htline_ptr=0x%08x sizeof=%d ["X"]\n" \
- "HTLine struct {\n" \
- " *next=0x%08x\n" \
- " *prev=0x%08x\n" \
- " offset=%d\n" \
- " size=%d\n" \
- " split_after=%1x\n" \
- " bullet=%1x\n" \
- "nodef U_C_S\n" \
- " data[]=0x%08x\n" \
- " data=|%s|\n" \
+ "HTLine struct {\n" \
+ " *next=0x%08x\n" \
+ " *prev=0x%08x\n" \
+ " offset=%d\n" \
+ " size=%d\n" \
+ " split_after=%1x\n" \
+ " bullet=%1x\n" \
+ "expansion_line=%1x\n" \
+ "w/o U_C_S def\n" \
+ " data[]=0x%08x\n" \
+ " data=|%s|\n" \
"}\n", \
(L), sizeof(*((L))), \
(L)->next, (L)->prev, (L)->offset, (L)->size, (L)->split_after, \
- (L)->bullet, (L)->data, (L)->data); \
+ (L)->bullet, (L)->expansion_line, (L)->data, (L)->data); \
CTRACE_FLUSH(tfp);
#endif /* STRUCTDUMP_H */
diff --git a/userdefs.h b/userdefs.h
index 15476e8c..c152f460 100644
--- a/userdefs.h
+++ b/userdefs.h
@@ -609,6 +609,7 @@
* DEC Multinational dec-mcs
* Macintosh (8 bit) macintosh
* NeXT character set next
+ * HP Roman8 hp-roman8
* Chinese euc-cn
* Japanese (EUC-JP) euc-jp
* Japanese (Shift_JIS) shift_jis
@@ -638,6 +639,9 @@
* Hebrew (windows-1255) windows-1255
* Turkish (ISO-8859-9) iso-8859-9
* ISO-8859-10 iso-8859-10
+ * Ukrainian Cyrillic (ISO-9945-2) iso-9945-2
+ * Ukrainian Cyrillic (cp866u) cp866u
+ * Ukrainian Cyrillic (KOI8-U) koi8-u
* UNICODE (UTF-8) utf-8
* RFC 1345 w/o Intro mnemonic+ascii+0
* RFC 1345 Mnemonic mnemonic
@@ -1202,12 +1206,12 @@
* the version definition with the Project Version on checkout. Just
* ignore it. - kw */
/* $Format: "#define LYNX_VERSION \"$ProjectVersion$\""$ */
-#define LYNX_VERSION "2.8.2dev.16"
+#define LYNX_VERSION "2.8.2dev.17"
#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 "Mon, 08 Feb 1999 03:32:59 -0700"
+#define LYNX_DATE "Wed, 17 Feb 1999 07:29:33 -0700"
#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"