about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--CHANGES59
-rw-r--r--INSTALLATION33
-rw-r--r--WWW/Library/Implementation/HTAAUtil.c1
-rw-r--r--WWW/Library/Implementation/HTAccess.c9
-rw-r--r--WWW/Library/Implementation/HTAnchor.c17
-rw-r--r--WWW/Library/Implementation/HTCJK.h4
-rw-r--r--WWW/Library/Implementation/HTDOS.c71
-rw-r--r--WWW/Library/Implementation/HTDOS.h3
-rw-r--r--WWW/Library/Implementation/HTFTP.c45
-rw-r--r--WWW/Library/Implementation/HTFWriter.c4
-rw-r--r--WWW/Library/Implementation/HTFile.c53
-rw-r--r--WWW/Library/Implementation/HTFormat.c32
-rw-r--r--WWW/Library/Implementation/HTFormat.h2
-rw-r--r--WWW/Library/Implementation/HTMLDTD.c118
-rw-r--r--WWW/Library/Implementation/HTNews.c169
-rw-r--r--WWW/Library/Implementation/HTParse.c41
-rw-r--r--WWW/Library/Implementation/HTRules.c4
-rw-r--r--WWW/Library/Implementation/HTString.c82
-rw-r--r--WWW/Library/Implementation/HTTCP.c121
-rw-r--r--WWW/Library/Implementation/HTTCP.h4
-rw-r--r--WWW/Library/Implementation/HTTP.c198
-rw-r--r--WWW/Library/Implementation/HTTP.h4
-rw-r--r--WWW/Library/Implementation/HTUtils.h29
-rw-r--r--WWW/Library/Implementation/HTVMS_WaisUI.c2
-rw-r--r--WWW/Library/Implementation/SGML.c439
-rw-r--r--WWW/Library/Implementation/SGML.h4
-rw-r--r--WWW/Library/Implementation/getline.c4
-rw-r--r--WWW/Library/Implementation/makefile.in2
-rw-r--r--WWW/Library/Implementation/www_tcp.h (renamed from WWW/Library/Implementation/tcp.h)20
-rw-r--r--WWW/Library/djgpp/CommonMakefile2
-rw-r--r--WWW/Library/djgpp/makefile.sla6
-rw-r--r--WWW/Library/vms/descrip.mms6
-rw-r--r--WWW/README.txt4
-rw-r--r--config.hin1
-rwxr-xr-xconfigure261
-rw-r--r--configure.in1
-rw-r--r--docs/README.defines19
-rw-r--r--lib/dirent.c277
-rw-r--r--lib/dirent.h56
-rw-r--r--lynx.cfg19
-rw-r--r--lynx.hlp450
-rw-r--r--lynx.man23
-rw-r--r--lynx.rsp84
-rw-r--r--makefile.bcb656
-rw-r--r--makefile.in9
-rw-r--r--makefile.msc391
-rw-r--r--makefile.w32 (renamed from MAKEFILE.W32)0
-rw-r--r--po/lynx.pot2230
-rw-r--r--src/GridText.c748
-rw-r--r--src/GridText.h17
-rw-r--r--src/HTAlert.c119
-rw-r--r--src/HTFWriter.c122
-rw-r--r--src/HTInit.c22
-rw-r--r--src/HTML.c179
-rw-r--r--src/LYBookmark.c81
-rw-r--r--src/LYCgi.c11
-rw-r--r--src/LYCharSets.c2
-rw-r--r--src/LYCharSets.h3
-rw-r--r--src/LYCharUtils.c116
-rw-r--r--src/LYCookie.c4
-rw-r--r--src/LYCurses.c94
-rw-r--r--src/LYCurses.h19
-rw-r--r--src/LYDownload.c20
-rw-r--r--src/LYEdit.c69
-rw-r--r--src/LYEditmap.c18
-rw-r--r--src/LYExtern.c334
-rw-r--r--src/LYExtern.h1
-rw-r--r--src/LYForms.c142
-rw-r--r--src/LYGlobalDefs.h45
-rw-r--r--src/LYJump.c4
-rw-r--r--src/LYJustify.h75
-rw-r--r--src/LYKeymap.c31
-rw-r--r--src/LYKeymap.h14
-rw-r--r--src/LYList.c4
-rw-r--r--src/LYLocal.c8
-rw-r--r--src/LYMail.c330
-rw-r--r--src/LYMain.c251
-rw-r--r--src/LYMainLoop.c330
-rw-r--r--src/LYNews.c55
-rw-r--r--src/LYOptions.c46
-rw-r--r--src/LYPrint.c83
-rw-r--r--src/LYReadCFG.c55
-rw-r--r--src/LYStrings.c697
-rw-r--r--src/LYStrings.h8
-rw-r--r--src/LYStyle.c5
-rw-r--r--src/LYTraversal.c4
-rw-r--r--src/LYUtils.c654
-rw-r--r--src/LYUtils.h19
-rw-r--r--src/LYexit.c6
-rw-r--r--src/LYrcFile.c4
-rw-r--r--src/UCdomap.c4
-rw-r--r--src/Xsystem.c598
-rw-r--r--src/chrtrans/README.format2
-rw-r--r--src/chrtrans/UCkd.h3
-rw-r--r--src/chrtrans/jcuken_kb.h2
-rw-r--r--src/chrtrans/make-msc.bat49
-rw-r--r--src/chrtrans/makefile.dos4
-rw-r--r--src/chrtrans/makefile.in2
-rw-r--r--src/chrtrans/makefile.msc23
-rw-r--r--src/chrtrans/makefile.w32 (renamed from src/chrtrans/MAKEFILE.W32)0
-rw-r--r--src/chrtrans/makeuctb.c1
-rw-r--r--src/chrtrans/makew32.bat (renamed from src/chrtrans/MAKEW32.BAT)88
-rw-r--r--src/chrtrans/rot13_kb.h2
-rw-r--r--src/chrtrans/yawerty_kb.h2
-rw-r--r--src/makefile.dos124
-rw-r--r--src/makefile.dsl139
-rw-r--r--src/makefile.wsl128
-rw-r--r--userdefs.h4
108 files changed, 9686 insertions, 2407 deletions
diff --git a/CHANGES b/CHANGES
index 43f2c76f..193633b0 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,63 @@
 Changes since Lynx 2.8 release
 ===============================================================================
 
+1999-07-14 (2.8.3dev.4)
+* minor fixes to build with SunOS K&R compiler -TD
+* cleanup unbalanced curly braces from other recent experimental options -TD
+* rename internal definition for LINKS_AND_FORM_FIELDS_ARE_NUMBERED to
+  LINKS_AND_FIELDS_ARE_NUMBERED to keep it shorter than 32 characters -TD
+* change ifndef's for NO_JUSTIFY to ifdef EXP_JUSTIFY_ELTS since something in
+  VH's recent code causes core dumps, by crosslinking the state of two parts of
+  the parser -TD
+* modify slang code to recognize F1 from terminfo/termcap on Unix (John Davis)
+* changes to use the WATT-32 tcp library, making a DOS port that does http,
+  ftp, news, mailto, and telnet -DK
+  Remaining work includes:
+  * This has been tested only with slang and the djgpp_keyhandler code.  There
+    will probably need to be more changes to have this work properly with
+    PDCurses.
+  * There is at least one bug.  When set to use http_proxy, there seems to be a
+    long wait between socket connect and write if the proxy is accessed too
+    rapidly in succession.  It seems that if it is accessed more frequently
+    than about 20 seconds, there is a timeout of up to about 85 seconds.
+  * some problems with ctrl-break handling, will report to the watt-32 list.
+* rename tcp.h to www_tcp.h -DK
+* fix typo in manpage description of -color (Christian Hudon
+  <chrish@debian.org>).
+* add $(LDFLAGS) to chrtrans/makefile.in, for NetBSD -JS
+* use symbolic link rather than hard link for installing copyright files -TD
+* now dashes and underscores can be intermixed in commandline options, and in
+  -restriction option, ifdef'd with OPTNAME_ALLOW_DASHES -VH
+* added commandline switch '-dont_wrap_pre' that will inhibit line wrapping in
+  <pre> when -dump'ing and -crawl'ing.  (But maximal length of line on output
+  can't exceed MAX_LINE (1023 by default)) -VH
+* lynx.man updated to reflect new option -dont_wrap_pre and to note that gnu
+  style of options (with two dashes) is also supported -VH
+* some small developer's docs tweaks -VH
+* added text justification (controlled by commandline switch '-justify' and
+  from lynx.cfg too), ifdef'd with NO_JUSTIFY -VH
+* added support for emitting backspaces (a-la man) - commandline option is
+  '-with-backspaces', ifdef'd with NO_DUMP_WITH_BACKSPACES -VH
+* added support for forcing-empty-HREFless-As - ie A element that doesn't
+  contain HREF will be closed after it was seen (without waiting for </a>) -
+  this fixes rendering of documentation, produced by broken translators that
+  don't emit balanced 'A's (eg RedHat docs produced by 'dlh', Sybase docs) -
+  commandline option is --force-empty-hrefless-a, and force_empty_hrefless_a in
+  lynx.cfg, ifdef'd with NO_EMPTY_HREFLESS_A -VH
+* incorporate changes for win32 by Hiroyuki Senshu <senshu@shonai-cit.ac.jp>
+  from
+    ftp://crab.it.osha.sut.ac.jp/pub/Win32/develope/senshu/Lynx/
+  based on his patch against 2.8.2pre.6
+  Most changes are ifdef'd
+    #define _WIN_CC=    .... for Windows C Compiler
+    #define CJK_EX      .... CJK EXtention
+    #define SH_EX       .... Senshu Hiroyuki EXtention
+    #define WIN_EX      .... Windows EXtention
+* add missing null-pointer check in MakeNewMapValue(), for verbose-images
+  (from Debian bug report #39596) -TD
+* test/build with gettext-0.10.35 -TD
+* renamed uppercase makefiles and .bat files to lowercase, change the makefiles
+  consistently to Unix-style format -TD
 1999-06-29 (2.8.3dev.3)
 * move HTAlert call so we don't get it each time we run the options menu -TD
 * entify messages in LYshow_statusline_messages() -LP
@@ -74,7 +131,7 @@ Changes since Lynx 2.8 release
 * minor tweaks (LYCharUtils.c, LYMain.c, LYPrint.c) -KW
 * flush Lynx.leaks file after writing each memory leak record but before
   freeing the memory block, to ensure the info is on disk if something goes
-  seriously wrong (i.e., FREE causes a signal).
+  seriously wrong (i.e., FREE causes a signal) -KW
 * more general checking in postoptions - `lynx LYNXOPTIONS:foo' now doesn't
   crash -KW
 * revived dired "install" functionality, more or less as it was (apparently)
diff --git a/INSTALLATION b/INSTALLATION
index 6e5a31ef..7ace6593 100644
--- a/INSTALLATION
+++ b/INSTALLATION
@@ -672,16 +672,14 @@ V. Compile instructions -- 386 DOS
     zlib.h and zconf.h in the include subdirectory.
 
     In addition to the files in the Lynx distribution, you will need a
-    curses package and a TCP package. You can use PDCurses (available at
-    "http://www.lightlink.com/hessling/") and the DJGPP port of WATTCP
-    (available in two different versions at "ftp://neonatal.sm.med.ic.ac.uk/"
-    and in "http://www.fdisk.com/doslynx/wlynx/source/djgpp.zip").
-    A patched copy of the version from the neonatal site is also
-    available from "http://www.rahul.net/dkaufman/tcplibdj.zip" or
-    "ftp://ftp.rahul.net/pub/dkaufman/tcplibdj.zip". You can also use slang
-    ("ftp://space.mit.edu/pub/davis/slang") as your curses library. You need
-    to compile these before you go any further. If you wish to use PDCurses
-    2.3, you need to first apply the following patch:
+    curses package and a TCP package. You can use PDCurses (available
+    at "http://www.lightlink.com/hessling/") and the DJGPP port of
+    WATTCP. The updated version of WATTCP is known as WATT-32, and
+    is available at "http://www.bgnett.no/~giva/". You can also
+    use slang ("ftp://space.mit.edu/pub/davis/slang") as your curses
+    library. You need to compile these before you go any further. If
+    you wish to use PDCurses 2.3, you need to first apply the following
+    patch:
 
 *** curses.h	Thu Jul  9 19:38:28 1998
 --- curses.h.new	Sat Aug 15 11:02:08 1998
@@ -716,14 +714,11 @@ V. Compile instructions -- 386 DOS
   # else
 
     If you have trouble applying the patch, try using the "patch" program,
-    ("http://www.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/pat25b.zip").  The
-    WATTCP TCPLIB sources must also be patched prior to compilation.  See
-    "http://www.flora.org/lynx-dev/html/month1197/msg00403.html".
-
+    ("http://www.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/pat25b.zip").
     To read the Unix man style documentation, use, for example, "less"
     ("http://www.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/lss332b.zip").
     Compile or place your compiled PDCurses library in lynx2-*/curses, and
-    compile or place your compiled WATTCP library in lynx2-*/djgpp/tcplib.  If
+    compile or place your compiled WATT-32 library in lynx2-*/djgpp/watt32.  If
     using the SLANG library, put libslang.a in your DJGPP/lib directory and put
     slang.h and slcurses.h in your DJGPP/include directory, or in the
     appropriate directories specified by LIBRARY_PATH and INCLUDE_PATH in your
@@ -797,8 +792,9 @@ V. Compile instructions -- 386 DOS
     texts more readable under DOS.  If you compile lynx regularly, you may
     automate the procedure by creating a batch file such as the following.
 
-	cd djgpp\tcplib\obj
-	make
+	cd djgpp\watt32\src
+	build djgpp
+	make -f djgpp.mak
 	cd ..\..\..\www\library\djgpp
 	make
 	cd ..\..\..\src\chrtrans
@@ -808,7 +804,7 @@ V. Compile instructions -- 386 DOS
 	strip lynx.exe
 	cd ..
 
-    This batch file expects the DJGPP port of WATTCP to be installed in the
+    This batch file expects the DJGPP port of WATT-32 to be installed in the
     lynx2-* directory.  Place a copy of this batch file, named "djgpp.bat",
     in the lynx2-* directory, move to that directory and type "djgpp".  A more
     complete batch file with error checking and annotation can be found at:
@@ -879,7 +875,6 @@ VII. Setting environment variables before running Lynx (optional)
 
     386 version only:
     WATTCP.CFG   Set to the full path for the WATTCP.CFG directory
-    (Depending on how you compiled libtcp.a, you may have to use WATCONF.)
 
     Define these in your batch file for running Lynx.  For example, if your
     application line is "D:\win32\lynx.bat", lynx.bat for Win32 may look like:
diff --git a/WWW/Library/Implementation/HTAAUtil.c b/WWW/Library/Implementation/HTAAUtil.c
index a0312b49..757f42df 100644
--- a/WWW/Library/Implementation/HTAAUtil.c
+++ b/WWW/Library/Implementation/HTAAUtil.c
@@ -48,6 +48,7 @@
 #include <HTAAUtil.h>	/* Implemented here	*/
 #include <HTAssoc.h>	/* Assoc list		*/
 #include <HTTCP.h>
+#include <HTTP.h>
 
 #include <LYStrings.h>
 #include <LYLeaks.h>
diff --git a/WWW/Library/Implementation/HTAccess.c b/WWW/Library/Implementation/HTAccess.c
index c5f8ef06..a87d14dc 100644
--- a/WWW/Library/Implementation/HTAccess.c
+++ b/WWW/Library/Implementation/HTAccess.c
@@ -355,6 +355,15 @@ PUBLIC BOOL override_proxy ARGS1(
 	    FREE(host);
 	    return YES;
 	}
+#ifdef CJK_EX	/* ASATAKU PROXY HACK */
+	if ((!templ_port || templ_port == port)	 &&
+	    (t_len > 0	&&  t_len <= h_len  &&
+	     isdigit(*no_proxy) && !strncmp(host, no_proxy, t_len))) {
+	    FREE(host);
+	    return YES;
+	}
+#endif	/* ASATAKU PROXY HACK */
+
 	if (*end)
 	    no_proxy = (end + 1);
 	else
diff --git a/WWW/Library/Implementation/HTAnchor.c b/WWW/Library/Implementation/HTAnchor.c
index ba131155..b2a911ed 100644
--- a/WWW/Library/Implementation/HTAnchor.c
+++ b/WWW/Library/Implementation/HTAnchor.c
@@ -103,7 +103,12 @@ PRIVATE HTParentAnchor * HTParentAnchor_new NOARGS
 
 PRIVATE HTChildAnchor * HTChildAnchor_new NOARGS
 {
-    return (HTChildAnchor *)calloc(1, sizeof(HTChildAnchor)); /* zero-filled */
+    HTChildAnchor *p;
+
+    p = (HTChildAnchor *)calloc(1, sizeof(HTChildAnchor)); /* zero-filled */
+    if (p == NULL)
+	outofmem(__FILE__, "HTChildAnchor_new");
+    return p;
 }
 
 
@@ -149,6 +154,12 @@ PRIVATE BOOL HTIdentical ARGS2(
 	CONST char *,	t)
 {
     if (s && t) {  /* Make sure they point to something */
+#ifdef SH_EX	/* 1998/04/28 (Tue) 22:02:58 */
+	if (*s == 'P' || *t == 'P') {
+	    if (strcmp(s + 1, "Name") == 0 || strcmp(t + 1, "Name") == 0)
+		return NO;
+	}
+#endif
 	for (; *s && *t; s++, t++) {
 	    if (*s != *t) {
 		return(NO);
@@ -202,9 +213,7 @@ PUBLIC HTChildAnchor * HTAnchor_findChild ARGS2(
     }
 
     child = HTChildAnchor_new();
-    if (child == NULL)
-	outofmem(__FILE__, "HTChildAnchor_new");
-    CTRACE(tfp, "new Anchor %p named `%s' is child of %p\n",
+    CTRACE(tfp, "HTAnchor: New Anchor %p named `%s' is child of %p\n",
 		(void *)child,
 		tag ? tag : (CONST char *)"",
 		(void *)parent); /* int for apollo */
diff --git a/WWW/Library/Implementation/HTCJK.h b/WWW/Library/Implementation/HTCJK.h
index 8765461d..95221e38 100644
--- a/WWW/Library/Implementation/HTCJK.h
+++ b/WWW/Library/Implementation/HTCJK.h
@@ -41,12 +41,12 @@
 #define IS_EUC_LOS(lo)	((0x21<=lo)&&(lo<=0x7E))	/* standard */
 #define IS_EUC_LOX(lo)	((0xA1<=lo)&&(lo<=0xFE))	/* extended */
 #define IS_EUC_HI(hi)	((0xA1<=hi)&&(hi<=0xFE))
-#define IS_EUC(hi,lo) IS_EUC_HI(hi) && (IS_EUC_LOS(lo) || IS_EUC_LOX(lo))
+#define IS_EUC(hi,lo) (IS_EUC_HI(hi) && (IS_EUC_LOS(lo) || IS_EUC_LOX(lo)))
 
 #define IS_BIG5_LOS(lo)	((0x40<=lo)&&(lo<=0x7E))	/* standard */
 #define IS_BIG5_LOX(lo)	((0xA1<=lo)&&(lo<=0xFE))	/* extended */
 #define IS_BIG5_HI(hi)	((0xA1<=hi)&&(hi<=0xFE))
-#define IS_BIG5(hi,lo) IS_BIG5_HI(hi) && (IS_BIG5_LOS(lo) || IS_BIG5_LOX(lo))
+#define IS_BIG5(hi,lo) (IS_BIG5_HI(hi) && (IS_BIG5_LOS(lo) || IS_BIG5_LOX(lo)))
 
 typedef enum _HTkcode {NOKANJI, EUC, SJIS, JIS} HTkcode;
 typedef enum _HTCJKlang {NOCJK, JAPANESE, CHINESE, KOREAN, TAIPEI} HTCJKlang;
diff --git a/WWW/Library/Implementation/HTDOS.c b/WWW/Library/Implementation/HTDOS.c
index 8b8231f0..a1b5cb4b 100644
--- a/WWW/Library/Implementation/HTDOS.c
+++ b/WWW/Library/Implementation/HTDOS.c
@@ -5,6 +5,12 @@
 #include <HTUtils.h>
 #include <HTDOS.h>
 
+#ifdef _WINDOWS
+#include <HTString.h>
+#include <stdio.h>
+#include <windows.h>
+#endif
+
 /*
  * Make a copy of the source argument in the result, allowing some extra
  * space so we can append directly onto the result without reallocating.
@@ -28,14 +34,42 @@ PRIVATE char * copy_plus ARGS2(char **, result, char *, source)
 */
 char * HTDOS_wwwName ARGS1(char *, dosname)
 {
-    static char *wwwname;
+    static char *wwwname = NULL;
     char *cp_url = copy_plus(&wwwname, dosname);
+    int wwwname_len;
 
+#ifdef SH_EX
+    char ch;
+
+    while ((ch = *dosname) != '\0') {
+	switch (ch) {
+	case '\\':
+	/* convert dos backslash to unix-style */
+	    *cp_url++ = '/';
+	    break;
+	case ' ':
+	    *cp_url++ = '%';
+	    *cp_url++ = '2';
+	    *cp_url++ = '0';
+	    break;
+      default:
+	    *cp_url++ = ch;
+	    break;;
+      }
+      dosname++;
+    }
+    *cp_url = '\0';
+#else
     for ( ; *cp_url != '\0' ; cp_url++)
 	if(*cp_url == '\\')
 	    *cp_url = '/';   /* convert dos backslash to unix-style */
+#endif
+
+    wwwname_len = strlen(wwwname);
+    if (wwwname_len > 1)
+	cp_url--;	/* point last char */
 
-    if(strlen(wwwname) > 3 && *cp_url == '/')
+    if (wwwname_len > 3 && *cp_url == '/')
 	*cp_url = '\0';
 
 #ifdef NOTUSED
@@ -59,10 +93,15 @@ char * HTDOS_wwwName ARGS1(char *, dosname)
 */
 char * HTDOS_name ARGS1(char *, wwwname)
 {
-    static char *cp_url;
-    char *result;
+#ifdef _WINDOWS	/* 1998/04/02 (Thu) 08:47:20 */
+    extern char windows_drive[];
+    char temp_buff[LY_MAXPATH];
+#endif
+    static char *cp_url = NULL;
+    char *result, *ret;
     int joe;
 
+    CTRACE(tfp, "HTDOS_name changed `%s'\n", wwwname);
     copy_plus(&cp_url, wwwname);
 
     for (joe = 0; cp_url[joe] != '\0'; joe++)	{
@@ -79,6 +118,26 @@ char * HTDOS_name ARGS1(char *, wwwname)
 	result = cp_url+1;
     }
 
-    CTRACE(tfp, "HTDOS_name changed `%s' to `%s'\n", wwwname, result);
-    return (result);
+#ifdef _WINDOWS	/* 1998/04/02 (Thu) 08:59:48 */
+    if (strchr(result, '\\') && strchr(result, ':')==NULL) {
+	sprintf(temp_buff, "%s\\%s", windows_drive, result);
+	ret = NULL;
+	StrAllocCopy(ret, temp_buff);
+	free(cp_url);
+    } else {
+	char *p;
+	p = strchr(result, ':');
+	if (p && (strcmp(p, ":\\") == 0)) {
+	    p[2] = '.';
+	    p[3] = '\0';
+	}
+	ret = result;
+    }
+#else
+    ret = result;
+#endif
+
+    CTRACE(tfp, "HTDOS_name changed `%s' to `%s'\n", wwwname, ret);
+    return (ret);
 }
+
diff --git a/WWW/Library/Implementation/HTDOS.h b/WWW/Library/Implementation/HTDOS.h
index 37a61386..a4c68446 100644
--- a/WWW/Library/Implementation/HTDOS.h
+++ b/WWW/Library/Implementation/HTDOS.h
@@ -31,5 +31,8 @@ char * HTDOS_wwwName PARAMS((char * dosname));
 */
 char * HTDOS_name PARAMS((char * wwwname));
 
+#ifdef __WIN32__
+char * HTDOS_short_name (char * fn);
+#endif
 
 #endif /*  HTDOS_H */
diff --git a/WWW/Library/Implementation/HTFTP.c b/WWW/Library/Implementation/HTFTP.c
index 86544009..208020da 100644
--- a/WWW/Library/Implementation/HTFTP.c
+++ b/WWW/Library/Implementation/HTFTP.c
@@ -78,6 +78,8 @@ BUGS:	@@@	Limit connection cache size!
 #include <HTUtils.h>
 
 #include <HTAlert.h>
+#include <HTTCP.h>
+#include <HTTP.h>
 
 #include <HTFTP.h>	/* Implemented here */
 
@@ -2631,7 +2633,14 @@ AgainForMultiNet:
 
 	    BytesReceived += chunk->size;
 	    if (BytesReceived > BytesReported + 1024) {
+#ifdef _WINDOWS
+		extern int ws_read_per_sec;
+
+		sprintf(NumBytes,gettext("Transferred %d bytes (%5d)"),
+				BytesReceived, ws_read_per_sec);
+#else
 		sprintf(NumBytes, TRANSFERRED_X_BYTES, BytesReceived);
+#endif
 		HTProgress(NumBytes);
 		BytesReported = BytesReceived;
 	    }
@@ -2682,6 +2691,14 @@ unload_btree:
 	/* Run through tree printing out in order
 	 */
 	{
+#ifdef SH_EX	/* 1997/10/18 (Sat) 14:14:28 */
+	    char *p, name_buff[256];
+	    int  name_len, dot_len;
+
+#define	FNAME_WIDTH	30
+#define	FILE_GAP	2
+
+#endif
 	    HTBTElement * ele;
 	    int i;
 	    for (ele = HTBTree_next(bt, NULL);
@@ -2705,16 +2722,44 @@ unload_btree:
 
 		/* start the anchor */
 		HTDirEntry(target, lastpath, entry_info->filename);
+#ifdef SH_EX	/* 1997/10/18 (Sat) 16:00 */
+		name_len = strlen(entry_info->filename);
+
+		sprintf(name_buff, "%-30s", entry_info->filename);
+
+		if (name_len < FNAME_WIDTH) {
+		    dot_len = FNAME_WIDTH - FILE_GAP - name_len;
+		    if (dot_len > 0) {
+			p = name_buff + name_len + 1;
+			while (dot_len--)
+			    *p++ = '.';
+		    }
+		} else {
+		    name_buff[FNAME_WIDTH] = '\0';
+		}
+
+		PUTS(name_buff);
+#else
 		PUTS(entry_info->filename);
+#endif
 		END(HTML_A);
 
 		if (entry_info->size) {
+#ifdef SH_EX	/* 1998/02/02 (Mon) 16:34:52 */
+		    if (entry_info->size < 1024)
+			sprintf(string_buffer, "%6d bytes",
+					       entry_info->size);
+		    else
+			sprintf(string_buffer, "%6d Kb",
+					        entry_info->size/1024);
+#else
 		    if (entry_info->size < 1024)
 			sprintf(string_buffer, "  %d bytes",
 					       entry_info->size);
 		    else
 			sprintf(string_buffer, "  %dKb",
 						entry_info->size/1024);
+#endif
 		    PUTS(string_buffer);
 		}
 
diff --git a/WWW/Library/Implementation/HTFWriter.c b/WWW/Library/Implementation/HTFWriter.c
index b101e95c..468916de 100644
--- a/WWW/Library/Implementation/HTFWriter.c
+++ b/WWW/Library/Implementation/HTFWriter.c
@@ -256,7 +256,7 @@ PUBLIC HTStream* HTSaveAndExecute ARGS3(
     tmpnam (fnam);
     if (suffix) strcat(fnam, suffix);
 
-    me->fp = fopen (fnam, "w");
+    me->fp = fopen (fnam, "wb");
     if (!me->fp) {
 	HTAlert(CANNOT_OPEN_TEMP);
         FREE(fnam);
@@ -333,7 +333,7 @@ PUBLIC HTStream* HTSaveLocally ARGS3(
 
     FREE(fnam);
 
-    me->fp = fopen (answer, "w");
+    me->fp = fopen (answer, "wb");
     if (!me->fp) {
 	HTAlert(CANNOT_OPEN_OUTPUT);
         FREE(answer);
diff --git a/WWW/Library/Implementation/HTFile.c b/WWW/Library/Implementation/HTFile.c
index f4699191..8a213373 100644
--- a/WWW/Library/Implementation/HTFile.c
+++ b/WWW/Library/Implementation/HTFile.c
@@ -140,10 +140,7 @@ PRIVATE HTSuffix unknown_suffix = { "*.*", NULL, NULL, NULL, 1.0};
 
 
 #ifdef _WINDOWS
-int exists(char *filename)
-{
- return (access(filename,0)==0);
-}
+#define exists(p)	(access(p,0)==0)
 #endif
 
 
@@ -207,12 +204,22 @@ PRIVATE void LYListFmtParse ARGS5(
 	char *datestr;
 	int len;
 #define SEC_PER_YEAR	(60 * 60 * 24 * 365)
+
+#ifdef _WINDOWS	/* 1998/01/06 (Tue) 21:20:53 */
+	static char *pbits[] = {
+		"---", "--x", "-w-", "-wx",
+		"r--", "r-x", "rw-", "rwx", 
+		0 };
+#define PBIT(a, n, s)  pbits[((a) >> (n)) & 0x7] 
+
+#else
 	static char *pbits[] = { "---", "--x", "-w-", "-wx",
 		"r--", "r-x", "rw-", "rwx", 0 };
 	static char *psbits[] = { "--S", "--s", "-wS", "-ws",
 		"r-S", "r-s", "rwS", "rws", 0 };
 #define PBIT(a, n, s)  (s) ? psbits[((a) >> (n)) & 0x7] : \
 	pbits[((a) >> (n)) & 0x7]
+#endif
 #ifdef S_ISVTX
 	static char *ptbits[] = { "--T", "--t", "-wT", "-wt",
 		"r-T", "r-t", "rwT", "rwt", 0 };
@@ -221,8 +228,13 @@ PRIVATE void LYListFmtParse ARGS5(
 #define PTBIT(a, s)  PBIT(a, 0, 0)
 #endif
 
+#ifdef _WINDOWS
+	if (stat(file, &st) < 0)
+		fmtstr = "    %a";	/* can't stat so just do anchor */
+#else
 	if (lstat(file, &st) < 0)
 		fmtstr = "    %a";	/* can't stat so just do anchor */
+#endif
 
 	StrAllocCopy(str, fmtstr);
 	s = str;
@@ -340,7 +352,11 @@ PRIVATE void LYListFmtParse ARGS5(
 
 		case 'p':	/* unix-style permission bits */
 			switch(st.st_mode & S_IFMT) {
+#if defined(_MSC_VER) && defined(_S_IFIFO)
+			case _S_IFIFO: type = 'p'; break;
+#else
 			case S_IFIFO: type = 'p'; break;
+#endif
 			case S_IFCHR: type = 'c'; break;
 			case S_IFDIR: type = 'd'; break;
 			case S_IFREG: type = '-'; break;
@@ -361,13 +377,23 @@ PRIVATE void LYListFmtParse ARGS5(
 #endif /* S_IFSOCK */
 			default: type = '?'; break;
 			}
+#ifdef _WINDOWS
+			sprintf(tmp, "%c%s", type, 
+				PBIT(st.st_mode, 6, st.st_mode & S_IRWXU));
+#else
 			sprintf(tmp, "%c%s%s%s", type,
 				PBIT(st.st_mode, 6, st.st_mode & S_ISUID),
 				PBIT(st.st_mode, 3, st.st_mode & S_ISGID),
 				PTBIT(st.st_mode,   st.st_mode & S_ISVTX));
+#endif
 			FormatStr(&buf, start, tmp);
 			break;
 
+#ifdef _WINDOWS
+		case 'o':	/* owner */
+		case 'g':	/* group */
+			break;
+#else
 		case 'o':	/* owner */
 			name = HTAA_UidToName (st.st_uid);
 			if (*name) {
@@ -385,6 +411,7 @@ PRIVATE void LYListFmtParse ARGS5(
 				FormatNum(&buf, start, (int) st.st_gid);
 			}
 			break;
+#endif
 
 		case 'l':	/* link count */
 			FormatNum(&buf, start, (int) st.st_nlink);
@@ -665,7 +692,12 @@ PUBLIC char * HTnameOfFile_WWW ARGS3(
 	else
 	    home = HTVMS_wwwName(home);
 #else
-	if ((home = getenv("HOME")) == 0)
+#if defined(_WINDOWS)	/* 1997/10/16 (Thu) 20:42:51 */
+	home =  (char *)Home_Dir();
+#else
+	home = getenv("HOME");
+#endif
+	if (home == 0)
 	    home = "/tmp";
 #endif /* VMS */
 	HTSprintf0(&result, "%s/WWW/%s/%s%s", home, acc_method, host, path);
@@ -1078,7 +1110,7 @@ PUBLIC float HTFileValue ARGS1(
 	    return suff->quality;		/* OK -- found */
 	}
     }
-    return 0.3;		/* Dunno! */
+    return (float)0.3;		/* Dunno! */
 }
 
 /*	Determine write access to a file.
@@ -1178,7 +1210,7 @@ PUBLIC HTStream * HTFileSaveStream ARGS1(
     CONST char * addr = HTAnchor_address((HTAnchor*)anchor);
     char *  localname = HTLocalName(addr);
 
-    FILE* fp = fopen(localname, "w");
+    FILE* fp = fopen(localname, "wb");
     if (!fp)
 	return NULL;
 
@@ -1369,9 +1401,10 @@ PUBLIC BOOL HTDirTitles ARGS3(
 	HTSprintf0(&relative, "%s/..", current);
 
 #ifdef DOSPATH
-	if (local_link)
+	if (local_link) {
 	    if (strlen(parent) == 3 )
 		StrAllocCat(relative, "/.");
+	}
 #endif
 
 #if !defined (VMS)
@@ -1951,7 +1984,7 @@ PUBLIC int HTLoadFile ARGS4(
 	FREE(newname);
 	FREE(acc_method);
     }
-#ifdef VMS
+#if defined(VMS) || defined(DOSPATH)
     HTUnEscape(filename);
 #endif /* VMS */
 
@@ -2420,7 +2453,7 @@ PUBLIC int HTLoadFile ARGS4(
 */
 #endif /* HAVE_READDIR */
 	{
-#  ifdef __EMX__
+#  if defined(__EMX__) || defined(WIN_EX)
 	    int len = strlen(localname);
 	    int bin = ((len > 3) && !strcasecomp(localname + len - 3, ".gz"));
 	    FILE * fp = fopen(localname, (bin ? "rb" : "r"));
diff --git a/WWW/Library/Implementation/HTFormat.c b/WWW/Library/Implementation/HTFormat.c
index b2c933ef..f44bd543 100644
--- a/WWW/Library/Implementation/HTFormat.c
+++ b/WWW/Library/Implementation/HTFormat.c
@@ -396,9 +396,11 @@ PUBLIC HTStream * HTStreamStack ARGS4(
 
     /* don't return on WWW_SOURCE some people might like
      * to make use of the source!!!!  LJM
-     *//*
+     */
+#if 0
     if (rep_out == WWW_SOURCE || rep_out == rep_in)
-	return sink;  LJM */
+	return sink;	/*  LJM */
+#endif
 
     if (rep_out == rep_in)
 	return sink;
@@ -594,6 +596,12 @@ PUBLIC int HTCopy ARGS4(
     HTStreamClass targetClass;
     int bytes;
     int rv = 0;
+#ifdef _WINDOWS	/* 1997/11/11 (Tue) 15:18:16 */
+    long file_length;
+    extern int bytes_already_read;
+    
+    file_length = anchor->content_length;
+#endif
 
     /*	Push the data down the stream
     */
@@ -638,6 +646,9 @@ PUBLIC int HTCopy ARGS4(
 		    rv = -1;
 		goto finished;
 	    } else if (SOCKET_ERRNO == ENOTCONN ||
+#ifdef _WINDOWS	/* 1997/11/10 (Mon) 16:57:18 */
+		       SOCKET_ERRNO == ETIMEDOUT || 
+#endif
 		       SOCKET_ERRNO == ECONNRESET ||
 		       SOCKET_ERRNO == EPIPE) {
 		/*
@@ -818,11 +829,12 @@ PUBLIC int HTMemCopy ARGS2(
 	HTChunk *,		chunk,
 	HTStream *,		sink)
 {
-    HTStreamClass targetClass = *(sink->isa);
+    HTStreamClass targetClass;
     int bytes = 0;
     CONST char *data = chunk->data;
     int rv = HT_OK;
 
+    targetClass = *(sink->isa);
     HTReadProgress(0, 0);
     for (;;) {
 	/* Push the data down the stream a piece at a time, in case we're
@@ -1078,9 +1090,12 @@ PUBLIC int HTParseFile ARGS5(
     HTStreamClass targetClass;
     int rv;
 
-    stream = HTStreamStack(rep_in,
-			format_out,
-			sink , anchor);
+#ifdef SH_EX		/* 1998/01/04 (Sun) 16:04:09 */
+    if (fp == NULL)
+	return HT_LOADED;
+#endif
+
+    stream = HTStreamStack(rep_in, format_out, sink, anchor);
 
     if (!stream) {
 	char *buffer = 0;
@@ -1211,9 +1226,7 @@ PUBLIC int HTParseGzFile ARGS5(
     HTStreamClass targetClass;
     int rv;
 
-    stream = HTStreamStack(rep_in,
-			format_out,
-			sink , anchor);
+    stream = HTStreamStack(rep_in, format_out, sink, anchor);
 
     if (!stream) {
 	char *buffer = 0;
@@ -1334,4 +1347,3 @@ PUBLIC HTStream * HTNetToText ARGS1(HTStream *, sink)
     me->sink = sink;
     return me;
 }
-
diff --git a/WWW/Library/Implementation/HTFormat.h b/WWW/Library/Implementation/HTFormat.h
index 42aeea50..4d119a66 100644
--- a/WWW/Library/Implementation/HTFormat.h
+++ b/WWW/Library/Implementation/HTFormat.h
@@ -282,7 +282,7 @@ extern float HTStackValue PARAMS((
         float                   initial_value,
         long int                length));
 
-#define NO_VALUE_FOUND  -1e20           /* returned if none found */
+#define NO_VALUE_FOUND  -1e20	/* returned if none found */
 
 /*	Display the page while transfer in progress
 **	-------------------------------------------
diff --git a/WWW/Library/Implementation/HTMLDTD.c b/WWW/Library/Implementation/HTMLDTD.c
index b5b6706e..ddea0b49 100644
--- a/WWW/Library/Implementation/HTMLDTD.c
+++ b/WWW/Library/Implementation/HTMLDTD.c
@@ -8,6 +8,7 @@
 #include <HTUtils.h>
 #include <HTMLDTD.h>
 #include <LYLeaks.h>
+#include <LYJustify.h>
 
 /*
  *     Character entities like &nbsp now excluded from our DTD tables,
@@ -86,7 +87,7 @@ static CONST char* entities[] = {
   "frac12",	/* fraction 1/2 */
   "frac14",	/* fraction 1/4 */
   "frac34",	/* fraction 3/4 */
-  "gt", 	/* greater than */
+  "gt",		/* greater than */
   "hibar",	/* spacing macron */
   "iacute",	/* small i, acute accent */
   "icirc",	/* small i, circumflex accent */
@@ -95,7 +96,7 @@ static CONST char* entities[] = {
   "iquest",	/* inverted question mark */
   "iuml",	/* small i, dieresis or umlaut mark */
   "laquo",	/* angle quotation mark, left */
-  "lt", 	/* less than */
+  "lt",		/* less than */
   "macr",	/* spacing macron */
   "mdash",	/* dash the width of emsp */
   "micro",	/* micro sign */
@@ -279,7 +280,7 @@ static attr body_attr[] = {			/* BODY attributes */
 	{ 0               T(N) } /* Terminate list */
 };
 
-static attr bodytext_attr[] = { 		/* BODYTEXT attributes */
+static attr bodytext_attr[] = {			/* BODYTEXT attributes */
 	{ "CLASS"         T(c) },
 	{ "CLEAR"         T(N) },
 	{ "DATA"          T(N) },
@@ -427,7 +428,7 @@ static attr fig_attr[] = {			/* FIG attributes */
 	{ 0               T(N) }	/* Terminate list */
 };
 
-static attr fieldset_attr[] = { 		/* FIELDSET attributes */
+static attr fieldset_attr[] = {			/* FIELDSET attributes */
 	{ "CLASS"         T(c) },
 	{ "CLEAR"         T(N) },
 	{ "DIR"           T(N) },
@@ -494,7 +495,7 @@ static attr frame_attr[] = {			/* FRAME attributes */
 	{ 0               T(N) }	/* Terminate list */
 };
 
-static attr frameset_attr[] = { 		/* FRAMESET attributes */
+static attr frameset_attr[] = {			/* FRAMESET attributes */
 	{ "COLS"          T(N) },
 	{ "ROWS"          T(N) },
 	{ 0               T(N) }	/* Terminate list */
@@ -511,7 +512,7 @@ static attr gen_attr[] = {			/* Minimum HTML 3.0 */
 	{ 0               T(N) }	/* Terminate list */
 };
 
-static attr glossary_attr[] = { 		/* DL (and DLC) attributes */
+static attr glossary_attr[] = {			/* DL (and DLC) attributes */
 	{ "CLASS"         T(c) },
 	{ "CLEAR"         T(N) },
 	{ "COMPACT"       T(N) },
@@ -993,7 +994,7 @@ static attr td_attr[] = {			/* TD and TH attributes */
 	{ 0               T(N) }	/* Terminate list */
 };
 
-static attr textarea_attr[] = { 		/* TEXTAREA attributes */
+static attr textarea_attr[] = {			/* TEXTAREA attributes */
 	{ "ACCEPT-CHARSET" T(N) },	/* RFC 2070 HTML i18n - kw */
 	{ "ALIGN"         T(N) },
 	{ "CLASS"         T(c) },
@@ -1076,7 +1077,7 @@ static attr ulist_attr[] = {			/* UL attributes */
    BASEFONT, APPLET, OBJECT, EMBED, SCRIPT, MAP, MARQUEE, HR, ISINDEX, BGSOUND, TAB,?IMG,
    1 e?      2	     2 l     1 e    2 l     8	 4	  4 E 1? E     1 E	! E ?1 E
    IMAGE, BR, plus NOEMBED, SERVER, SPACER, AUDIOSCOPE, and SIDEBAR; ?area
-   1 n	  1 E	     n	      n       n       n 	      n       8 E
+   1 n	  1 E	     n	      n	      n	      n		      n	      8 E
 
    %text;
 
@@ -1148,7 +1149,7 @@ static attr ulist_attr[] = {			/* UL attributes */
  /* { "BIG"	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED }, */
 #define T_BIG		0x0001, 0x8B04F,0x8FFFF,0xA778F,0xF7FBF,0x00001,0x00014
  /* { "BLINK"	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED }, */
-#define T_BLINK 	0x0001, 0x8B04F,0x8FFFF,0xA778F,0xF7FAF,0x00001,0x00014
+#define T_BLINK		0x0001, 0x8B04F,0x8FFFF,0xA778F,0xF7FAF,0x00001,0x00014
  /* { "BLOCKQUOTE", bq_attr,	HTML_BQ_ATTRIBUTES,	SGML_MIXED }, */
 #define T_BLOCKQUOTE	0x0200, 0xAFBCF,0xAFFFF,0xB6680,0xB6FAF,0x8031F,0x00000
  /* { "BODY"	, body_attr,	HTML_BODY_ATTRIBUTES,	SGML_MIXED }, */
@@ -1195,7 +1196,7 @@ static attr ulist_attr[] = {			/* UL attributes */
  /* { "EM"	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED }, */
 #define T_EM		0x0002, 0x8B04F,0x8FFFF,0xA778F,0xF7FAF,0x00003,0x00010
  /* { "EMBED"	, embed_attr,	HTML_EMBED_ATTRIBUTES,	SGML_EMPTY }, */
-#define T_EMBED 	0x2000, 0x8F107,0x8FFF7,0xB6FBF,0xB7FBF,0x1FF7F,0x00001
+#define T_EMBED		0x2000, 0x8F107,0x8FFF7,0xB6FBF,0xB7FBF,0x1FF7F,0x00001
  /* { "FIELDSET", fieldset_attr,HTML_FIELDSET_ATTRIBUTES, SGML_MIXED }, */
 #define T_FIELDSET	0x0200, 0x0FB42,0x0FF5F,0x07787,0x37FF7,0x8805F,0x00000
  /* { "FIG"	, fig_attr,	HTML_FIG_ATTRIBUTES,	SGML_MIXED }, */
@@ -1207,7 +1208,7 @@ static attr ulist_attr[] = {			/* UL attributes */
  /* { "FORM"	, form_attr,	HTML_FORM_ATTRIBUTES,	SGML_EMPTY }, */
 #define T_FORM		0x0080, 0x0FF6F,0x0FF7F,0x36E07,0x33F07,0x88DFF,0x00000
  /* { "FRAME"	, frame_attr,	HTML_FRAME_ATTRIBUTES,	SGML_EMPTY }, */
-#define T_FRAME 	0x10000,0x00000,0x00000,0x10000,0x10000,0x9FFFF,0x00001
+#define T_FRAME		0x10000,0x00000,0x00000,0x10000,0x10000,0x9FFFF,0x00001
  /* { "FRAMESET", frameset_attr,HTML_FRAMESET_ATTRIBUTES, SGML_MIXED }, */
 #define T_FRAMESET	0x10000,0x90000,0x90000,0x90000,0x93000,0x9FFFF,0x00000
  /* { "H1"	, h_attr,	HTML_H_ATTRIBUTES,	SGML_MIXED }, */
@@ -1235,7 +1236,7 @@ static attr ulist_attr[] = {			/* UL attributes */
  /* { "IMG"	, img_attr,	HTML_IMG_ATTRIBUTES,	SGML_EMPTY }, */
 #define T_IMG		0x1000, 0x00000,0x00000,0x3779F,0x37FBF,0x80000,0x00001
  /* { "INPUT"	, input_attr,	HTML_INPUT_ATTRIBUTES,	SGML_EMPTY }, */
-#define T_INPUT 	0x0040, 0x00000,0x00000,0x03F87,0x37F87,0x8904F,0x00001
+#define T_INPUT		0x0040, 0x00000,0x00000,0x03F87,0x37F87,0x8904F,0x00001
  /* { "INS"	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED }, */
 #define T_INS		0x0002, 0x8B04F,0x8FFFF,0xA778F,0xF7FBF,0x00003,0x00000
  /* { "ISINDEX" , isindex_attr, HTML_ISINDEX_ATTRIBUTES,SGML_EMPTY }, */
@@ -1245,7 +1246,7 @@ static attr ulist_attr[] = {			/* UL attributes */
  /* { "KEYGEN"	, keygen_attr,	HTML_KEYGEN_ATTRIBUTES, SGML_EMPTY }, */
 #define T_KEYGEN	0x0040, 0x00000,0x00000,0x07FB7,0x37FB7,0x80070,0x00001
  /* { "LABEL"	, label_attr,	HTML_LABEL_ATTRIBUTES,	SGML_MIXED }, */
-#define T_LABEL 	0x0020, 0x9FFFF,0x9FFFF,0x9FFFF,0x9FFFF,0x00007,0x00000
+#define T_LABEL		0x0020, 0x9FFFF,0x9FFFF,0x9FFFF,0x9FFFF,0x00007,0x00000
 #define T_LEGEND	0x0002, 0x0B04F,0x0FF7F,0x00200,0x37FA7,0x00003,0x00000
  /* { "LH"	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_EMPTY }, */
 #define T_LH		0x0400, 0x0BB7F,0x8FFFF,0x00800,0x97FFF,0x8071F,0x00001
@@ -1282,7 +1283,7 @@ static attr ulist_attr[] = {			/* UL attributes */
  /* { "P"	, p_attr,	HTML_P_ATTRIBUTES,	SGML_EMPTY }, */
 #define T_P		0x0100, 0x0B04F,0x8FFFF,0x36680,0xB6FA7,0x80117,0x00001
  /* { "PARAM"	, param_attr,	HTML_PARAM_ATTRIBUTES,	SGML_EMPTY }, */
-#define T_PARAM 	0x1000, 0x00000,0x00000,0x33500,0x37FFF,0x81560,0x00001
+#define T_PARAM		0x1000, 0x00000,0x00000,0x33500,0x37FFF,0x81560,0x00001
  /* { "PLAINTEXT", gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_LITTERAL }, */
 #define T_PLAINTEXT	0x10000,0xFFFFF,0xFFFFF,0x90000,0x90000,0x3FFFF,0x00001
  /* { "PRE"	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED }, */
@@ -1299,7 +1300,7 @@ static attr ulist_attr[] = {			/* UL attributes */
 #define T_SELECT	0x0040, 0x08000,0x08000,0x03FAF,0x13FBF,0x80F5F,0x00008
 #define T_SHY		0x1000, 0x00000,0x00000,0x3779F,0x77FBF,0x8101F,0x00001
  /* { "SMALL"	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED }, */
-#define T_SMALL 	0x0001, 0x8B04F,0x8FFFF,0xA778F,0xF7FBF,0x00001,0x00014
+#define T_SMALL		0x0001, 0x8B04F,0x8FFFF,0xA778F,0xF7FBF,0x00001,0x00014
  /* { "SPAN"	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED }, */
 #define T_SPAN		0x0002, 0x8B04F,0x8FFFF,0xA778F,0xF7FBF,0x80003,0x00000
  /* { "SPOT"	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_EMPTY }, */
@@ -1309,7 +1310,7 @@ static attr ulist_attr[] = {			/* UL attributes */
  /* { "STRONG"	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED }, */
 #define T_STRONG	0x0002, 0x8B04F,0x8FFFF,0xA778F,0xF7FAF,0x00003,0x00010
  /* { "STYLE"	, style_attr,	HTML_STYLE_ATTRIBUTES,	SGML_LITTERAL }, */
-#define T_STYLE 	0x40000,0x00000,0x00000,0x7638F,0x76FAF,0x8001F,0x00000
+#define T_STYLE		0x40000,0x00000,0x00000,0x7638F,0x76FAF,0x8001F,0x00000
  /* { "SUB"	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED }, */
 #define T_SUB		0x0004, 0x8B05F,0x8FFFF,0x8779F,0xF7FBF,0x00007,0x00000
  /* { "SUP"	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED }, */
@@ -1317,9 +1318,9 @@ static attr ulist_attr[] = {			/* UL attributes */
  /* { "TAB"	, tab_attr,	HTML_TAB_ATTRIBUTES,	SGML_EMPTY }, */
 #define T_TAB		0x1000, 0x00000,0x00000,0x3778F,0x57FAF,0x00001,0x00001
  /* { "TABLE"	, table_attr,	HTML_TABLE_ATTRIBUTES,	SGML_MIXED }, */
-#define T_TABLE 	0x0800, 0x0F1E0,0x8FFFF,0x36680,0xB6FA7,0x8C57F,0x00000
+#define T_TABLE		0x0800, 0x0F1E0,0x8FFFF,0x36680,0xB6FA7,0x8C57F,0x00000
  /* { "TBODY"	, tr_attr,	HTML_TR_ATTRIBUTES,	SGML_EMPTY }, */
-#define T_TBODY 	0x0020, 0x00020,0x8FFFF,0x00880,0xB7FB7,0x8C75F,0x00003
+#define T_TBODY		0x0020, 0x00020,0x8FFFF,0x00880,0xB7FB7,0x8C75F,0x00003
  /* { "TD"	, td_attr,	HTML_TD_ATTRIBUTES,	SGML_EMPTY }, */
 #define T_TD		0x0400, 0x0FBCF,0x8FFFF,0x00020,0xB7FB7,0x8C75F,0x00001
  /* { "TEXTAREA", textarea_attr,HTML_TEXTAREA_ATTRIBUTES, SGML_LITTERAL }, */
@@ -1327,13 +1328,13 @@ static attr ulist_attr[] = {			/* UL attributes */
  /* { "TEXTFLOW", bodytext_attr,HTML_BODYTEXT_ATTRIBUTES, SGML_MIXED }, */
 #define T_TEXTFLOW	0x20000,0x8FBFF,0x9FFFF,0x977B0,0xB7FB7,0x9B00F,0x00003
  /* { "TFOOT"	, tr_attr,	HTML_TR_ATTRIBUTES,	SGML_EMPTY }, */
-#define T_TFOOT 	0x0020, 0x00020,0x8FFFF,0x00800,0xB7FB7,0x8CF5F,0x00001
+#define T_TFOOT		0x0020, 0x00020,0x8FFFF,0x00800,0xB7FB7,0x8CF5F,0x00001
  /* { "TH"	, td_attr,	HTML_TD_ATTRIBUTES,	SGML_EMPTY }, */
 #define T_TH		0x0400, 0x0FBCF,0x0FFFF,0x00020,0xB7FB7,0x8CF5F,0x00001
  /* { "THEAD"	, tr_attr,	HTML_TR_ATTRIBUTES,	SGML_EMPTY }, */
-#define T_THEAD 	0x0020, 0x00020,0x8FFFF,0x00800,0xB7FB7,0x8CF5F,0x00001
+#define T_THEAD		0x0020, 0x00020,0x8FFFF,0x00800,0xB7FB7,0x8CF5F,0x00001
  /* { "TITLE",	  gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_RCDATA }, */
-#define T_TITLE 	0x40000,0x00000,0x00000,0x50000,0x50000,0x0031F,0x00004
+#define T_TITLE		0x40000,0x00000,0x00000,0x50000,0x50000,0x0031F,0x00004
  /* { "TR"	, tr_attr,	HTML_TR_ATTRIBUTES,	SGML_EMPTY }, */
 #define T_TR		0x0020, 0x00400,0x8FFFF,0x00820,0xB7FB7,0x8C75F,0x00001
  /* { "TT"	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED }, */
@@ -1361,14 +1362,24 @@ static attr ulist_attr[] = {			/* UL attributes */
 **  of the tags_old[] table (otherwise unchanged from original Lynx treatment)
 **  with the tags_new[] table below. - kw
 **
-**    Name,	Attributes,	No. of attributes,     content,   extra info...
+**    Name*,	Attributes,	No. of attributes,     content,   extra info...
 */
 #ifdef USE_COLOR_STYLE
-#define P(x) x , (sizeof x) -1
-#define NULL_HTTag NULL, 0
+#define P_(x) x , (sizeof x) -1
+#define NULL_HTTag_ NULL, 0
 #else
-#define P(x) x
-#define NULL_HTTag NULL
+#define P_(x) x
+#define NULL_HTTag_ NULL
+#endif
+
+#ifdef EXP_JUSTIFY_ELTS
+#define P(x) P_(x), 1
+#define P0(x) P_(x), 0
+#define NULL_HTTag NULL_HTTag_,0
+#else
+#define P(x) P_(x)
+#define P0(x) P_(x)
+#define NULL_HTTag NULL_HTTag_
 #endif
 
 static CONST HTTag tags_old[HTML_ELEMENTS] = {
@@ -1381,7 +1392,7 @@ static CONST HTTag tags_old[HTML_ELEMENTS] = {
  { P("AU")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED,T_AU},
  { P("AUTHOR")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED,T_AUTHOR},
  { P("B")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_EMPTY,T_B},
- { P("BANNER")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED,T_BANNER},
+ { P0("BANNER")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED,T_BANNER},
  { P("BASE")	, base_attr,	HTML_BASE_ATTRIBUTES,	SGML_EMPTY,T_BASE},
  { P("BASEFONT"), font_attr,	HTML_FONT_ATTRIBUTES,	SGML_EMPTY,T_BASEFONT},
  { P("BDO")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED,T_BDO},
@@ -1395,7 +1406,7 @@ static CONST HTTag tags_old[HTML_ELEMENTS] = {
  { P("BR")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_EMPTY,T_BR},
  { P("BUTTON")	, button_attr,	HTML_BUTTON_ATTRIBUTES, SGML_MIXED,T_BUTTON},
  { P("CAPTION") , caption_attr, HTML_CAPTION_ATTRIBUTES, SGML_MIXED,T_CAPTION},
- { P("CENTER")	, div_attr,	HTML_DIV_ATTRIBUTES,	SGML_MIXED,T_CENTER},
+ { P0("CENTER")	, div_attr,	HTML_DIV_ATTRIBUTES,	SGML_MIXED,T_CENTER},
  { P("CITE")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_EMPTY,T_CITE},
  { P("CODE")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED,T_CODE},
  { P("COL")	, col_attr,	HTML_COL_ATTRIBUTES,	SGML_EMPTY,T_COL},
@@ -1419,12 +1430,12 @@ static CONST HTTag tags_old[HTML_ELEMENTS] = {
  { P("FORM")	, form_attr,	HTML_FORM_ATTRIBUTES,	SGML_EMPTY,T_FORM},
  { P("FRAME")	, frame_attr,	HTML_FRAME_ATTRIBUTES,	SGML_EMPTY,T_FRAME},
  { P("FRAMESET"), frameset_attr,HTML_FRAMESET_ATTRIBUTES, SGML_MIXED,T_FRAMESET},
- { P("H1")	, h_attr,	HTML_H_ATTRIBUTES,	SGML_MIXED,T_H1},
- { P("H2")	, h_attr,	HTML_H_ATTRIBUTES,	SGML_MIXED,T_H2},
- { P("H3")	, h_attr,	HTML_H_ATTRIBUTES,	SGML_MIXED,T_H3},
- { P("H4")	, h_attr,	HTML_H_ATTRIBUTES,	SGML_MIXED,T_H4},
- { P("H5")	, h_attr,	HTML_H_ATTRIBUTES,	SGML_MIXED,T_H5},
- { P("H6")	, h_attr,	HTML_H_ATTRIBUTES,	SGML_MIXED,T_H6},
+ { P0("H1")	, h_attr,	HTML_H_ATTRIBUTES,	SGML_MIXED,T_H1},
+ { P0("H2")	, h_attr,	HTML_H_ATTRIBUTES,	SGML_MIXED,T_H2},
+ { P0("H3")	, h_attr,	HTML_H_ATTRIBUTES,	SGML_MIXED,T_H3},
+ { P0("H4")	, h_attr,	HTML_H_ATTRIBUTES,	SGML_MIXED,T_H4},
+ { P0("H5")	, h_attr,	HTML_H_ATTRIBUTES,	SGML_MIXED,T_H5},
+ { P0("H6")	, h_attr,	HTML_H_ATTRIBUTES,	SGML_MIXED,T_H6},
  { P("HEAD")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED,T_HEAD},
  { P("HR")	, hr_attr,	HTML_HR_ATTRIBUTES,	SGML_EMPTY,T_HR},
  { P("HTML")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED,T_HTML},
@@ -1458,10 +1469,10 @@ static CONST HTTag tags_old[HTML_ELEMENTS] = {
  { P("P")	, p_attr,	HTML_P_ATTRIBUTES,	SGML_EMPTY,T_P},
  { P("PARAM")	, param_attr,	HTML_PARAM_ATTRIBUTES,	SGML_EMPTY,T_PARAM},
  { P("PLAINTEXT"), gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_LITTERAL,T_PLAINTEXT},
- { P("PRE")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED,T_PRE},
+ { P0("PRE")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED,T_PRE},
  { P("Q")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED,T_Q},
  { P("S")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED,T_S},
- { P("SAMP")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED,T_SAMP},
+ { P0("SAMP")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED,T_SAMP},
  { P("SCRIPT")	, script_attr,	HTML_SCRIPT_ATTRIBUTES, SGML_LITTERAL,T_SCRIPT},
  { P("SELECT")	, select_attr,	HTML_SELECT_ATTRIBUTES, SGML_MIXED,T_SELECT},
  { P("SHY")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_EMPTY,T_SHY},
@@ -1474,7 +1485,7 @@ static CONST HTTag tags_old[HTML_ELEMENTS] = {
  { P("SUB")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED,T_SUB},
  { P("SUP")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED,T_SUP},
  { P("TAB")	, tab_attr,	HTML_TAB_ATTRIBUTES,	SGML_EMPTY,T_TAB},
- { P("TABLE")	, table_attr,	HTML_TABLE_ATTRIBUTES,	SGML_MIXED,T_TABLE},
+ { P0("TABLE")	, table_attr,	HTML_TABLE_ATTRIBUTES,	SGML_MIXED,T_TABLE},
  { P("TBODY")	, tr_attr,	HTML_TR_ATTRIBUTES,	SGML_EMPTY,T_TBODY},
  { P("TD")	, td_attr,	HTML_TD_ATTRIBUTES,	SGML_EMPTY,T_TD},
  { P("TEXTAREA"), textarea_attr,HTML_TEXTAREA_ATTRIBUTES, SGML_LITTERAL,T_TEXTAREA},
@@ -1489,7 +1500,7 @@ static CONST HTTag tags_old[HTML_ELEMENTS] = {
  { P("UL")	, ulist_attr,	HTML_UL_ATTRIBUTES,	SGML_MIXED,T_UL},
  { P("VAR")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED,T_VAR},
  { P("WBR")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_EMPTY,T_WBR},
- { P("XMP")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_LITTERAL,T_XMP},
+ { P0("XMP")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_LITTERAL,T_XMP},
 };
 
 static CONST HTTag tags_new[HTML_ELEMENTS] = {
@@ -1502,7 +1513,7 @@ static CONST HTTag tags_new[HTML_ELEMENTS] = {
  { P("AU")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED,T_AU},
  { P("AUTHOR")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED,T_AUTHOR},
  { P("B")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED,T_B},
- { P("BANNER")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED,T_BANNER},
+ { P0("BANNER")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED,T_BANNER},
  { P("BASE")	, base_attr,	HTML_BASE_ATTRIBUTES,	SGML_EMPTY,T_BASE},
  { P("BASEFONT"), font_attr,	HTML_FONT_ATTRIBUTES,	SGML_EMPTY,T_BASEFONT},
  { P("BDO")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED,T_BDO},
@@ -1516,7 +1527,7 @@ static CONST HTTag tags_new[HTML_ELEMENTS] = {
  { P("BR")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_EMPTY,T_BR},
  { P("BUTTON")	, button_attr,	HTML_BUTTON_ATTRIBUTES, SGML_MIXED,T_BUTTON},
  { P("CAPTION") , caption_attr, HTML_CAPTION_ATTRIBUTES, SGML_MIXED,T_CAPTION},
- { P("CENTER")	, div_attr,	HTML_DIV_ATTRIBUTES,	SGML_MIXED,T_CENTER},
+ { P0("CENTER")	, div_attr,	HTML_DIV_ATTRIBUTES,	SGML_MIXED,T_CENTER},
  { P("CITE")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED,T_CITE},
  { P("CODE")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED,T_CODE},
  { P("COL")	, col_attr,	HTML_COL_ATTRIBUTES,	SGML_EMPTY,T_COL},
@@ -1540,12 +1551,12 @@ static CONST HTTag tags_new[HTML_ELEMENTS] = {
  { P("FORM")	, form_attr,	HTML_FORM_ATTRIBUTES,	SGML_MIXED,T_FORM},
  { P("FRAME")	, frame_attr,	HTML_FRAME_ATTRIBUTES,	SGML_EMPTY,T_FRAME},
  { P("FRAMESET"), frameset_attr,HTML_FRAMESET_ATTRIBUTES, SGML_ELEMENT,T_FRAMESET},
- { P("H1")	, h_attr,	HTML_H_ATTRIBUTES,	SGML_MIXED,T_H1},
- { P("H2")	, h_attr,	HTML_H_ATTRIBUTES,	SGML_MIXED,T_H2},
- { P("H3")	, h_attr,	HTML_H_ATTRIBUTES,	SGML_MIXED,T_H3},
- { P("H4")	, h_attr,	HTML_H_ATTRIBUTES,	SGML_MIXED,T_H4},
- { P("H5")	, h_attr,	HTML_H_ATTRIBUTES,	SGML_MIXED,T_H5},
- { P("H6")	, h_attr,	HTML_H_ATTRIBUTES,	SGML_MIXED,T_H6},
+ { P0("H1")	, h_attr,	HTML_H_ATTRIBUTES,	SGML_MIXED,T_H1},
+ { P0("H2")	, h_attr,	HTML_H_ATTRIBUTES,	SGML_MIXED,T_H2},
+ { P0("H3")	, h_attr,	HTML_H_ATTRIBUTES,	SGML_MIXED,T_H3},
+ { P0("H4")	, h_attr,	HTML_H_ATTRIBUTES,	SGML_MIXED,T_H4},
+ { P0("H5")	, h_attr,	HTML_H_ATTRIBUTES,	SGML_MIXED,T_H5},
+ { P0("H6")	, h_attr,	HTML_H_ATTRIBUTES,	SGML_MIXED,T_H6},
  { P("HEAD")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_ELEMENT,T_HEAD},
  { P("HR")	, hr_attr,	HTML_HR_ATTRIBUTES,	SGML_EMPTY,T_HR},
  { P("HTML")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED,T_HTML},
@@ -1579,10 +1590,10 @@ static CONST HTTag tags_new[HTML_ELEMENTS] = {
  { P("P")	, p_attr,	HTML_P_ATTRIBUTES,	SGML_MIXED,T_P},
  { P("PARAM")	, param_attr,	HTML_PARAM_ATTRIBUTES,	SGML_EMPTY,T_PARAM},
  { P("PLAINTEXT"), gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_LITTERAL,T_PLAINTEXT},
- { P("PRE")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED,T_PRE},
+ { P0("PRE")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED,T_PRE},
  { P("Q")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED,T_Q},
  { P("S")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED,T_S},
- { P("SAMP")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED,T_SAMP},
+ { P0("SAMP")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED,T_SAMP},
  { P("SCRIPT")	, script_attr,	HTML_SCRIPT_ATTRIBUTES, SGML_LITTERAL,T_SCRIPT},
  { P("SELECT")	, select_attr,	HTML_SELECT_ATTRIBUTES, SGML_ELEMENT,T_SELECT},
  { P("SHY")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_EMPTY,T_SHY},
@@ -1595,7 +1606,7 @@ static CONST HTTag tags_new[HTML_ELEMENTS] = {
  { P("SUB")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED,T_SUB},
  { P("SUP")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED,T_SUP},
  { P("TAB")	, tab_attr,	HTML_TAB_ATTRIBUTES,	SGML_EMPTY,T_TAB},
- { P("TABLE")	, table_attr,	HTML_TABLE_ATTRIBUTES,	SGML_ELEMENT,T_TABLE},
+ { P0("TABLE")	, table_attr,	HTML_TABLE_ATTRIBUTES,	SGML_ELEMENT,T_TABLE},
  { P("TBODY")	, tr_attr,	HTML_TR_ATTRIBUTES,	SGML_ELEMENT,T_TBODY},
  { P("TD")	, td_attr,	HTML_TD_ATTRIBUTES,	SGML_MIXED,T_TD},
  { P("TEXTAREA"), textarea_attr,HTML_TEXTAREA_ATTRIBUTES, SGML_LITTERAL,T_TEXTAREA},
@@ -1610,9 +1621,12 @@ static CONST HTTag tags_new[HTML_ELEMENTS] = {
  { P("UL")	, ulist_attr,	HTML_UL_ATTRIBUTES,	SGML_MIXED,T_UL},
  { P("VAR")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_MIXED,T_VAR},
  { P("WBR")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_EMPTY,T_WBR},
- { P("XMP")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_LITTERAL,T_XMP},
+ { P0("XMP")	, gen_attr,	HTML_GEN_ATTRIBUTES,	SGML_LITTERAL,T_XMP},
 };
+
 #undef P
+#undef P0
+#undef P_
 
 /* Dummy space, will be filled with the contents of either tags_new
    or tags_old on calling HTSwitchDTD - kw */
@@ -1668,7 +1682,7 @@ struct _HTStructured {
 };
 
 PUBLIC void HTStartAnchor ARGS3(
-	HTStructured *, 	obj,
+	HTStructured *,		obj,
 	CONST char *,		name,
 	CONST char *,		href)
 {
@@ -1692,7 +1706,7 @@ PUBLIC void HTStartAnchor ARGS3(
 }
 
 PUBLIC void HTStartIsIndex ARGS3(
-	HTStructured *, 	obj,
+	HTStructured *,		obj,
 	CONST char *,		prompt,
 	CONST char *,		href)
 {
diff --git a/WWW/Library/Implementation/HTNews.c b/WWW/Library/Implementation/HTNews.c
index 32f4e3a6..3719d2ff 100644
--- a/WWW/Library/Implementation/HTNews.c
+++ b/WWW/Library/Implementation/HTNews.c
@@ -564,14 +564,14 @@ PRIVATE char * author_name ARGS1 (char *,email)
     StrAllocCopy(name, email);
     CTRACE(tfp,"Trying to find name in: %s\n",name);
 
-    if ((p = strchr(name, '(')) && (e = strchr(name, ')'))) {
+    if ((p = strrchr(name, '(')) && (e = strrchr(name, ')'))) {
 	if (e > p) {
 	    *e = '\0';			/* Chop off everything after the ')'  */
 	    return HTStrip(p+1);	/* Remove leading and trailing spaces */
 	}
     }
 
-    if ((p = strchr(name, '<')) && (e = strchr(name, '>'))) {
+    if ((p = strrchr(name, '<')) && (e = strrchr(name, '>'))) {
 	if (e > p) {
 	    strcpy(p, e+1);		/* Remove <...> */
 	    return HTStrip(name);	/* Remove leading and trailing spaces */
@@ -600,8 +600,8 @@ PRIVATE char * author_address ARGS1(char *,email)
     StrAllocCopy(address, email);
     CTRACE(tfp,"Trying to find address in: %s\n",address);
 
-    if ((p = strchr(address, '<'))) {
-	if ((e = strchr(p, '>')) && (at = strchr(p, '@'))) {
+    if ((p = strrchr(address, '<'))) {
+	if ((e = strrchr(p, '>')) && (at = strrchr(p, '@'))) {
 	    if (at < e) {
 		*e = '\0';		 /* Remove > */
 		return HTStrip(p+1);  /* Remove leading and trailing spaces */
@@ -609,15 +609,15 @@ PRIVATE char * author_address ARGS1(char *,email)
 	}
     }
 
-    if ((p = strchr(address, '(')) &&
-	(e = strchr(address, ')')) && (at = strchr(address, '@'))) {
+    if ((p = strrchr(address, '(')) &&
+	(e = strrchr(address, ')')) && (at = strchr(address, '@'))) {
 	if (e > p && at < e) {
 	    *p = '\0';			/* Chop off everything after the ')'  */
 	    return HTStrip(address);	/* Remove leading and trailing spaces */
 	}
     }
 
-    if ((at = strchr(address, '@')) && at > address) {
+    if ((at = strrchr(address, '@')) && at > address) {
 	p = (at - 1);
 	e = (at + 1);
 	while (p > address && !isspace((unsigned char)*p))
@@ -838,7 +838,12 @@ PRIVATE void post_article ARGS1(
     **	Open the temporary file with the
     **	nntp headers and message body. - FM
     */
-    if ((fd = fopen((postfile ? postfile : ""), "r")) == NULL) {
+#ifdef DOSPATH
+    if ((fd = fopen((postfile ? postfile : ""), "rt")) == NULL)
+#else
+    if ((fd = fopen((postfile ? postfile : ""), "r")) == NULL)
+#endif
+    {
 	HTAlert(FAILED_CANNOT_OPEN_POST);
 	return;
     }
@@ -940,6 +945,83 @@ PRIVATE void post_article ARGS1(
     }
 }
 
+#ifdef SH_EX	/* for MIME */
+#define NEWS_DEBUG 0
+#if NEWS_DEBUG
+/* for DEBUG 1997/11/07 (Fri) 17:20:16 */
+void debug_print(unsigned char *p)
+{
+    while (*p) {
+	if (*p == '\0')
+	    break;
+	if (*p == 0x1b)
+	   printf("[ESC]");
+	else if (*p == '\n')
+	   printf("[NL]");
+	else if (*p < ' ' || *p >= 0x80) 
+	   printf("(%02x)", *p);
+	else
+	   putchar(*p);
+       p++;
+    }
+    printf("]\n");
+}
+#endif
+
+#ifdef NOTUSED_CHARTRANS
+static char *decode_mime(char *str)
+{
+    return HTmmdecode(str, str);
+}
+#else
+static char *decode_mime(char *str)
+{
+    char temp[LINE_LENGTH+256];
+    char *p, *q;
+
+    if (str == NULL)
+	return "";
+
+    if (HTCJK != JAPANESE)
+	return str;
+
+    strcpy(temp, str);
+    q = temp;
+    for (;;) {
+	p = strchr(q, '=');
+	if (p == NULL)
+	    break;
+	if (p && p[1] == '?') {
+	    HTmmdecode(p, p);
+	    q = p + 2;
+	} else {
+	    q = p + 1;
+	}
+    }
+#if NEWS_DEBUG
+    printf("new=[");
+    debug_print(temp);
+#endif
+    HTrjis(temp, temp);
+    strcpy(str, temp);
+
+    return str;
+}
+#endif /* NOTUSED_CHARTRANS */
+#else /* !SH_EX */
+static char *decode_mime ARGS1(char *, str)
+{
+#ifdef NOTUSED_CHARTRANS
+    return HTmmdecode(str, str);
+#else
+    HTmmdecode(str, str);
+    HTrjis(str, str);
+    return str;
+#endif
+}
+#endif
+
+
 /*	Read in an Article					read_article
 **	------------------
 **
@@ -1025,38 +1107,22 @@ PRIVATE int read_article ARGS1(
 
 		} else if (match(full_line, "SUBJECT:")) {
 		    StrAllocCopy(subject, HTStrip(strchr(full_line,':')+1));
-		    if (HTCJK == JAPANESE) {
-			HTmmdecode(subject, subject);
-			HTrjis(subject, subject);
-		    }
-		    if (*subject) {
-			HTAnchor_setSubject(thisanchor, subject);
-		    }
-
+		    decode_mime(subject);
 		} else if (match(full_line, "DATE:")) {
 		    StrAllocCopy(date, HTStrip(strchr(full_line,':')+1));
 
 		} else if (match(full_line, "ORGANIZATION:")) {
 		    StrAllocCopy(organization,
 				 HTStrip(strchr(full_line,':')+1));
-		    if (HTCJK == JAPANESE) {
-			HTmmdecode(organization, organization);
-			HTrjis(organization, organization);
-		    }
+		    decode_mime(organization);
 
 		} else if (match(full_line, "FROM:")) {
 		    StrAllocCopy(from, HTStrip(strchr(full_line,':')+1));
-		    if (HTCJK == JAPANESE) {
-			HTmmdecode(from, from);
-			HTrjis(from, from);
-		    }
+		    decode_mime(from);
 
 		} else if (match(full_line, "REPLY-TO:")) {
 		    StrAllocCopy(replyto, HTStrip(strchr(full_line,':')+1));
-		    if (HTCJK == JAPANESE) {
-			HTmmdecode(replyto, replyto);
-			HTrjis(replyto, replyto);
-		    }
+		    decode_mime(replyto);
 
 		} else if (match(full_line, "NEWSGROUPS:")) {
 		    StrAllocCopy(newsgroups, HTStrip(strchr(full_line,':')+1));
@@ -1341,6 +1407,9 @@ PRIVATE int read_article ARGS1(
 	if (((char)ich == LF) || (p == &line[LINE_LENGTH])) {
 	    *p++ = '\0';			/* Terminate the string */
 	    CTRACE(tfp, "B %s", line);
+#if NEWS_DEBUG	/* 1997/11/09 (Sun) 15:56:11 */
+	    debug_print(line);	/* @@@ */
+#endif
 	    if (line[0] == '.') {
 		/*
 		**  End of article?
@@ -1379,8 +1448,8 @@ PRIVATE int read_article ARGS1(
 		    char *p2;
 
 		    while ((p2 = strstr(l, "rticle <")) != NULL) {
-			char *q  = strchr(p2,'>');
-			char *at = strchr(p2, '@');
+			char *q  = strrchr(p2,'>');
+			char *at = strrchr(p2, '@');
 			if (q && at && at<q) {
 			    char c = q[1];
 			    q[1] = 0;		/* chop up */
@@ -1892,11 +1961,8 @@ PRIVATE int read_group ARGS3(
 			case 's':
 			    if (match(line, "SUBJECT:")) {
 				strcpy(subject, line+9);/* Save subject */
-				if (HTCJK == JAPANESE) {
-				    HTmmdecode(subject, subject);
-				    HTrjis(subject, subject);
+				decode_mime(subject);
 				}
-			    }
 			    break;
 
 			case 'M':
@@ -1914,10 +1980,7 @@ PRIVATE int read_group ARGS3(
 				char * p2;
 				strcpy(author,
 					author_name(strchr(line,':')+1));
-				if (HTCJK == JAPANESE) {
-				    HTmmdecode(author, author);
-				    HTrjis(author, author);
-				}
+				decode_mime(author);
 				p2 = author + strlen(author) - 1;
 				if (*p2==LF)
 				    *p2 = '\0'; /* Chop off newline */
@@ -1938,7 +2001,11 @@ PRIVATE int read_group ARGS3(
 
 		PUTC('\n');
 		START(HTML_LI);
+#ifdef SH_EX	/* for MIME */
+		sprintf(buffer, "\"%s\"", decode_mime(subject));
+#else
 		sprintf(buffer, "\"%s\"", subject);
+#endif
 		if (reference) {
 		    write_anchor(buffer, reference);
 		    FREE(reference);
@@ -1949,7 +2016,11 @@ PRIVATE int read_group ARGS3(
 		     PUTS(" - ");
 		     if (LYListNewsDates)
 			 START(HTML_I);
+#ifdef SH_EX	/* for MIME */
+		     PUTS(decode_mime(author));
+#else
 		     PUTS(author);
+#endif
 		     if (LYListNewsDates)
 			 END(HTML_I);
 		     author[0] = '\0';
@@ -2349,10 +2420,10 @@ PRIVATE int HTLoadNews ARGS4(
 	    strcat(command, groupName);
 	} else {
 	    strcpy(command, "ARTICLE ");
-	    if (strchr(p1, '<') == 0)
+	    if (strrchr(p1, '<') == 0)
 		strcat(command,"<");
 	    strcat(command, p1);
-	    if (strchr(p1, '>') == 0)
+	    if (strrchr(p1, '>') == 0)
 		strcat(command,">");
 	}
 
@@ -2556,7 +2627,8 @@ PRIVATE int HTLoadNews ARGS4(
 		return(HT_NOT_LOADED);
 	    }
 	    if (postfile == NULL) {
-		postfile = LYNewsPost(ListArg, (reply_wanted || sreply_wanted));
+		postfile = LYNewsPost(ListArg,
+				(BOOLEAN)(reply_wanted || sreply_wanted));
 	    }
 	    if (postfile == NULL) {
 		HTProgress(CANCELLED);
@@ -2603,6 +2675,12 @@ PRIVATE int HTLoadNews ARGS4(
 	}
 
 Send_NNTP_command:
+#ifdef NEWS_DEB
+	if (postfile)
+	    printf("postfile = %s, command = %s", postfile, command);
+	else
+	    printf("command = %s", command);
+#endif
 	if ((status = response(command)) == HT_INTERRUPTED) {
 	    _HTProgress(CONNECTION_INTERRUPTED);
 	    break;
@@ -2763,10 +2841,11 @@ Send_NNTP_command:
 	return status;
     } /* Retry loop */
 
-    /* HTAlert(gettext("Sorry, could not load requested news.")); */
-
-/*    NXRunAlertPanel(NULL, "Sorry, could not load `%s'.",
-	    NULL,NULL,NULL, arg);No -- message earlier wil have covered it */
+#if 0
+    HTAlert(gettext("Sorry, could not load requested news."));
+    NXRunAlertPanel(NULL, "Sorry, could not load `%s'.", NULL,NULL,NULL, arg);
+    /* No -- message earlier wil have covered it */
+#endif
 
     if (!(post_wanted || reply_wanted ||
 	  spost_wanted || sreply_wanted)) {
diff --git a/WWW/Library/Implementation/HTParse.c b/WWW/Library/Implementation/HTParse.c
index 9e75b8db..1122d3a1 100644
--- a/WWW/Library/Implementation/HTParse.c
+++ b/WWW/Library/Implementation/HTParse.c
@@ -187,7 +187,8 @@ PUBLIC char * HTParse ARGS3(
     char * acc_method;
     struct struct_parts given, related;
 
-    CTRACE(tfp, "HTParse: aName:%s   relatedName:%s\n", aName, relatedName);
+    CTRACE(tfp, "HTParse: aName:`%s'\n", aName);
+    CTRACE(tfp, "   relatedName:`%s'\n", relatedName);
 
     if (wanted & (PARSE_STRICTPATH | PARSE_QUERY)) { /* if detail wanted... */
 	if ((wanted & (PARSE_STRICTPATH | PARSE_QUERY))
@@ -371,7 +372,7 @@ PUBLIC char * HTParse ARGS3(
 	    if (wanted & PARSE_PUNCTUATION)
 		strcat(result, "/");
 	    strcat(result, given.absolute);
-	    CTRACE(tfp, "1\n");
+	    CTRACE(tfp, "HTParse: (ABS)\n");
 	} else if (related.absolute) {		/* Adopt path not name */
 	    strcat(result, "/");
 	    strcat(result, related.absolute);
@@ -385,13 +386,13 @@ PUBLIC char * HTParse ARGS3(
 		strcat(result, given.relative); /* Add given one */
 		HTSimplify (result);
 	    }
-	    CTRACE(tfp, "2\n");
+	    CTRACE(tfp, "HTParse: (Related-ABS)\n");
 	} else if (given.relative) {
 	    strcat(result, given.relative);		/* what we've got */
-	    CTRACE(tfp, "3\n");
+	    CTRACE(tfp, "HTParse: (REL)\n");
 	} else if (related.relative) {
 	    strcat(result, related.relative);
-	    CTRACE(tfp, "4\n");
+	    CTRACE(tfp, "HTParse: (Related-REL)\n");
 	} else {  /* No inheritance */
 	    if (strncasecomp(aName, "lynxcgi:", 8) &&
 		strncasecomp(aName, "lynxexec:", 9) &&
@@ -400,7 +401,7 @@ PUBLIC char * HTParse ARGS3(
 	    }
 	    if (!strcmp(result, "news:/"))
 		result[5] = '*';
-	    CTRACE(tfp, "5\n");
+	    CTRACE(tfp, "HTParse: (No inheritance)\n");
 	}
 	if (want_detail) {
 	    p = strchr(tail, '?');	/* Search part? */
@@ -664,7 +665,8 @@ PUBLIC char * HTRelative ARGS2(
 	    strcat(result, "../");
 	strcat(result, last_slash+1);
     }
-    CTRACE(tfp, "HT: `%s' expressed relative to\n    `%s' is\n   `%s'.",
+    CTRACE(tfp,
+        "HTparse: `%s' expressed relative to\n   `%s' is\n   `%s'.\n",
 		aName, relatedName, result);
     return result;
 }
@@ -797,16 +799,21 @@ PUBLIC char * HTUnEscape ARGS1(
 	    p[1] && p[2] &&
 	    isxdigit((unsigned char)p[1]) &&
 	    isxdigit((unsigned char)p[2])) {
-	    p++;
-	    if (*p)
-	        *q = from_hex(*p++) * 16;
-	    if (*p)
-		/*
-		** Careful!  FROMASCII() may evaluate its arg more than once!
-		*/  /* S/390 -- gil -- 0221 */
-		*q =           *q + from_hex(*p++) ;
-		*q = FROMASCII(*q                 );
-	    q++;
+	      if (iscntrl(FROMASCII(from_hex(p[1])*16 + from_hex(p[2])))) {
+		*q++ = *p++;     /* Ignore control codes.  --HN [98/09/08] */
+	      } else {
+		p++;
+		if (*p)
+		    *q = from_hex(*p++) * 16;
+		if (*p) {
+		    /*
+		    ** Careful! FROMASCII() may evaluate its arg more than once!
+		    */  /* S/390 -- gil -- 0221 */
+		    *q = *q + from_hex(*p++) ;
+		}
+		*q = FROMASCII(*q);
+		q++;
+	      }
 	} else {
 	    *q++ = *p++;
 	}
diff --git a/WWW/Library/Implementation/HTRules.c b/WWW/Library/Implementation/HTRules.c
index 6140765e..53945fe0 100644
--- a/WWW/Library/Implementation/HTRules.c
+++ b/WWW/Library/Implementation/HTRules.c
@@ -189,7 +189,7 @@ PRIVATE BOOL rule_cond_ok ARGS1(
 	return result;
     else
 	return (!result);
-	
+
 }
 /*	Translate by rules					HTTranslate()
 **	------------------
@@ -479,7 +479,7 @@ PUBLIC int  HTSetConfiguration ARGS1(
 			    &quality, &secs, &secs_per_byte, &maxbytes);
 	else status = 0;
 	HTSetPresentation(word2, word3,
-		    status >= 1? quality		: 1.0,
+		    status >= 1 ? quality		: 1.0,
 		    status >= 2 ? secs			: 0.0,
 		    status >= 3 ? secs_per_byte 	: 0.0,
 		    status >= 4 ? maxbytes		: 0 );
diff --git a/WWW/Library/Implementation/HTString.c b/WWW/Library/Implementation/HTString.c
index 039c0e64..7ab09c78 100644
--- a/WWW/Library/Implementation/HTString.c
+++ b/WWW/Library/Implementation/HTString.c
@@ -19,7 +19,11 @@ PUBLIC int WWW_TraceFlag = 0;	/* Global trace flag for ALL W3 code */
 #define VC "unknown"
 #endif /* !VC */
 
+#ifdef _WINDOWS
+CONST char * HTLibraryVersion = "2.14FM"; /* String for help screen etc */
+#else
 PUBLIC CONST char * HTLibraryVersion = VC; /* String for help screen etc */
+#endif
 
 /*
 **     strcasecomp8 is a variant of strcasecomp (below)
@@ -73,8 +77,82 @@ PUBLIC int strncasecomp8 ARGS3(
     }
     /*NOTREACHED*/
 }
+
 #ifndef VM		/* VM has these already it seems */
 
+#ifdef SH_EX	/* 1997/12/23 (Tue) 16:40:31 */
+
+/*
+ * This array is designed for mapping upper and lower case letter
+ * together for a case independent comparison.  The mappings are
+ * based upon ascii character sequences.
+ */
+static unsigned char charmap[] = {
+	'\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
+	'\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
+	'\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
+	'\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037',
+	'\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047',
+	'\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057',
+	'\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067',
+	'\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077',
+	'\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
+	'\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
+	'\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
+	'\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137',
+	'\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
+	'\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
+	'\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
+	'\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177',
+	'\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207',
+	'\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217',
+	'\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227',
+	'\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237',
+	'\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247',
+	'\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257',
+	'\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267',
+	'\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277',
+	'\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
+	'\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
+	'\360', '\361', '\362', '\363', '\364', '\365', '\366', '\327',
+	'\370', '\371', '\372', '\373', '\374', '\375', '\376', '\337',
+	'\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
+	'\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
+	'\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
+	'\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377',
+};
+
+PUBLIC int strcasecomp ARGS2(
+	CONST char*,	s1,
+	CONST char*,	s2)
+{
+    register unsigned char *cm = charmap;
+    register unsigned char *us1 = (unsigned char *)s1;
+    register unsigned char *us2 = (unsigned char *)s2;
+
+    while (cm[*us1] == cm[*us2++])
+	if (*us1++ == '\0')
+	    return(0);
+    return (cm[*us1] - cm[*--us2]);
+}
+
+PUBLIC int strncasecomp ARGS3(
+	CONST char*,	a,
+	CONST char*,	b,
+	int,		n)
+{
+    register unsigned char *cm = charmap;
+    register unsigned char *us1 = (unsigned char *)a;
+    register unsigned char *us2 = (unsigned char *)b;
+
+    while ((long)(--n) >= 0 && cm[*us1] == cm[*us2++])
+	if (*us1++ == '\0')
+	    return(0);
+    return ((long)n < 0 ? 0 : cm[*us1] - cm[*--us2]);
+}
+
+#else
+
 /*	Strings of any length
 **	---------------------
 */
@@ -120,6 +198,8 @@ PUBLIC int strncasecomp ARGS3(
     }
     /*NOTREACHED*/
 }
+
+#endif	/* SH_EX */
 #endif /* VM */
 
 #ifdef NOT_ASCII
@@ -683,6 +763,8 @@ PUBLIC char * HTSprintf0 (va_alist)
 	char **		pstr = va_arg(ap, char **);
 	CONST char *	fmt  = va_arg(ap, CONST char *);
 #endif
+	if (pstr != 0)
+	    *pstr = 0;
 	result = StrAllocVsprintf(pstr, 0, fmt, &ap);
     }
     va_end(ap);
diff --git a/WWW/Library/Implementation/HTTCP.c b/WWW/Library/Implementation/HTTCP.c
index a0f6948a..bd68d5be 100644
--- a/WWW/Library/Implementation/HTTCP.c
+++ b/WWW/Library/Implementation/HTTCP.c
@@ -114,15 +114,24 @@ extern int sys_nerr;
 #endif	/* !PCNFS */
 
 #ifdef _WINDOWS_NSL
-	 char host[512];
-	 struct hostent  *phost;	/* Pointer to host - See netdb.h */
-	 int donelookup;
+char host[512];
+struct hostent  *phost;	/* Pointer to host - See netdb.h */
+int donelookup;
 
 unsigned long _fork_func (void *arglist)
 {
-	 phost = gethostbyname(host);
-	 donelookup = TRUE;
-	 return (unsigned long)(phost);
+#ifdef SH_EX
+    unsigned long addr;
+    addr = (unsigned long)inet_addr(host);
+    if ((int)addr != -1)
+	phost = gethostbyaddr((char *)&addr, sizeof (addr), AF_INET);
+    else
+	phost = gethostbyname(host);
+#else
+    phost = gethostbyname(host);
+#endif
+    donelookup = TRUE;
+    return (unsigned long)(phost);
 }
 #endif /* _WINDOWS_NSL */
 
@@ -674,8 +683,12 @@ PUBLIC struct hostent * LYGetHostByName ARGS1(
     if (!valid_hostname(host)) {
 	lynx_nsl_status = HT_NOT_ACCEPTABLE;
 #ifdef NO_RECOVERY
+#ifdef _WINDOWS
+	WSASetLastError(NO_RECOVERY);
+#else
 	h_errno = NO_RECOVERY;
 #endif
+#endif
 	return NULL;
     }
 
@@ -1061,43 +1074,51 @@ PUBLIC struct hostent * LYGetHostByName ARGS1(
 
 #ifdef _WINDOWS_NSL
     {
-#ifdef __BORLANDC__
-		HANDLE hThread, dwThreadID;
-#else
-		unsigned long hThread, dwThreadID;
-#endif /* __BORLANDC__ */
-		phost = (struct hostent *) NULL;
-		hThread = CreateThread((void *)NULL, 4096UL,
-#ifdef __BORLANDC__
-			 (LPTHREAD_START_ROUTINE)_fork_func,
-#else
-			 (unsigned long (*)())_fork_func,
-#endif /* __BORLANDC__ */
-			 (void *)NULL, 0UL, (unsigned long *)&dwThreadID);
-		if (!hThread)
-			 MessageBox((void *)NULL, "CreateThread",
-				"CreateThread Failed", 0L);
-
-		donelookup = FALSE;
-		while (!donelookup)
-			if (HTCheckForInterrupt())
-			 {
-			  /* Note that host is a character array and is not freed */
-			  /* to avoid possible subthread problems: */
-			  if (!CloseHandle(hThread))
-				 MessageBox((void *)NULL, "CloseHandle","CloseHandle Failed",
-						0L);
-			  lynx_nsl_status = HT_INTERRUPTED;
-			  return NULL;
-			};
-		if (phost) {
-		    lynx_nsl_status = HT_OK;
-		    result_phost = phost;
-		} else {
-		    lynx_nsl_status = HT_ERROR;
-		    goto failed;
+	char buff[256];
+	LPSTR szIPAddr;	/* IP address as a dotted decimal string */
+	IN_ADDR addr;
+	IN_ADDR *p;
+
+	HANDLE hThread, dwThreadID;
+
+	if (!system_is_NT) {	/* for Windows9x */
+	    unsigned long t;
+	    t = (unsigned long)inet_addr((char *)host);
+	    if ((int)t != -1)
+		phost = gethostbyaddr((char *)&t, sizeof (t), AF_INET);
+	    else
+		phost = gethostbyname((char *)host);
+	} else {		/* for Windows NT */
+	    phost = (struct hostent *) NULL;
+	    hThread = CreateThread((void *)NULL, 4096UL,
+		(LPTHREAD_START_ROUTINE)_fork_func,
+		(void *)NULL, 0UL, (unsigned long *)&dwThreadID);
+	    if (!hThread)
+		MessageBox((void *)NULL, "CreateThread",
+			   "CreateThread Failed", 0L);
+
+	    donelookup = FALSE;
+	    while (!donelookup) {
+		if (HTCheckForInterrupt()) {
+		    /* Note that host is a character array and is not freed */
+		    /* to avoid possible subthread problems: */
+		    if (!CloseHandle(hThread)) {
+			MessageBox((void *)NULL,
+				   "CloseHandle","CloseHandle Failed", 0L);
+		    }
+		    lynx_nsl_status = HT_INTERRUPTED;
+		    return NULL;
 		}
-    };
+	    }
+	}
+	if (phost) {
+	    lynx_nsl_status = HT_OK;
+	    result_phost = phost;
+	} else {
+	    lynx_nsl_status = HT_ERROR;
+	    goto failed;
+	}
+    }
 
 #else /* !NSL_FORK, !_WINDOWS_NSL: */
     {
@@ -1698,7 +1719,11 @@ PUBLIC int HTDoConnect ARGS4(
 	    if (HTCheckForInterrupt()) {
 		CTRACE(tfp, "*** INTERRUPTED in middle of connect.\n");
 		status = HT_INTERRUPTED;
+#ifdef _WINDOWS
+		WSASetLastError(EINTR);
+#else
 		SOCKET_ERRNO = EINTR;
+#endif
 		break;
 	    }
 	}
@@ -1771,7 +1796,11 @@ PUBLIC int HTDoRead ARGS3(
 	return -1;
 
     if (HTCheckForInterrupt()) {
+#ifdef _WINDOWS
+	WSASetLastError(EINTR);
+#else
 	SOCKET_ERRNO = EINTR;
+#endif
 	return (HT_INTERRUPTED);
     }
 
@@ -1786,7 +1815,11 @@ PUBLIC int HTDoRead ARGS3(
 	*/
 	if (tries++ >= 180000) {
 	    HTAlert(gettext("Socket read failed for 180,000 tries."));
+#ifdef _WINDOWS
+	    WSASetLastError(EINTR);
+#else
 	    SOCKET_ERRNO = EINTR;
+#endif
 	    return HT_INTERRUPTED;
 	}
 
@@ -1814,7 +1847,11 @@ PUBLIC int HTDoRead ARGS3(
 	} else if (ret > 0) {
 	    ready = 1;
 	} else if (HTCheckForInterrupt()) {
+#ifdef _WINDOWS
+	    WSASetLastError(EINTR);
+#else
 	    SOCKET_ERRNO = EINTR;
+#endif
 	    return HT_INTERRUPTED;
 	}
     }
diff --git a/WWW/Library/Implementation/HTTCP.h b/WWW/Library/Implementation/HTTCP.h
index 4e43ed27..d22cac8d 100644
--- a/WWW/Library/Implementation/HTTCP.h
+++ b/WWW/Library/Implementation/HTTCP.h
@@ -33,7 +33,7 @@ extern CONST char * HTInetString PARAMS((struct sockaddr_in* mysin));
 ** On return:
 **      returns a negative status in the unix way.
 */
-#ifdef __STDC__
+#if defined(__STDC__) || defined(__BORLANDC__) || defined(_MSC_VER)
         extern int HTInetStatus(char *where);
 #else
         extern int HTInetStatus();
@@ -104,7 +104,7 @@ extern struct hostent * LYGetHostByName PARAMS((
 **               *sin is filled in.  If no port is specified in str, that
 **               field is left unchanged in *sin.
 */
-#ifdef __STDC__
+#if defined(__STDC__) || defined(__BORLANDC__) || defined(_MSC_VER)
         extern int HTParseInet(struct sockaddr_in * mysin, CONST char * str);
         /*!! had to change this to get it to compile. CTB */
 #else
diff --git a/WWW/Library/Implementation/HTTP.c b/WWW/Library/Implementation/HTTP.c
index 2dd3ac84..ff9a5534 100644
--- a/WWW/Library/Implementation/HTTP.c
+++ b/WWW/Library/Implementation/HTTP.c
@@ -7,6 +7,9 @@
 */
 
 #include <HTUtils.h>
+#ifdef __DJGPP__
+#include <tcp.h>
+#endif /* __DJGPP__ */
 #include <HTTP.h>
 #include <LYUtils.h>
 
@@ -68,6 +71,179 @@ extern BOOL dump_output_immediately;  /* TRUE if no interactive user */
 #define HTTP_NETWRITE(a, b, c, d)  NETWRITE(a, b, c)
 #define HTTP_NETCLOSE(a, b)  (void)NETCLOSE(a)
 
+#ifdef _WINDOWS		/* 1997/11/06 (Thu) 13:00:08 */
+
+#define	BOX_TITLE	"Lynx " __FILE__
+#define	BOX_FLAG	(MB_ICONINFORMATION | MB_SETFOREGROUND)
+
+typedef struct {
+	int fd;
+	char *buf;
+	int len;
+} recv_data_t;
+
+PUBLIC int ws_read_per_sec = 0;
+PRIVATE int ws_errno = 0;
+
+PRIVATE DWORD g_total_times = 0;
+PRIVATE DWORD g_total_bytes = 0;
+
+
+PUBLIC char * str_speed(void)
+{
+    static char buff[32];
+
+    if (ws_read_per_sec > 1000)
+	sprintf(buff, "%d.%03dkB", ws_read_per_sec / 1000, 
+			(ws_read_per_sec % 1000) );
+    else
+	sprintf(buff, "%3d", ws_read_per_sec);
+
+    return buff;
+}
+
+/* The same like read, but takes care of EINTR and uses select to
+   timeout the stale connections.  */
+
+PRIVATE int ws_read(int fd, char *buf, int len)
+{
+     int res;
+     int retry = 3;
+
+     do {
+	res = recv(fd, buf, len, 0);
+	if (WSAEWOULDBLOCK == WSAGetLastError()) {
+	  Sleep(100);
+	  if (retry-- > 0)
+	    continue;
+	}
+     } while (res == SOCKET_ERROR && SOCKET_ERRNO == EINTR);
+
+     return res;
+}
+
+PRIVATE void _thread_func (void *p)
+{
+    int i, val, ret;
+    recv_data_t *q = (recv_data_t *)p;
+
+    i = 0;
+    i++;
+    val = ws_read(q->fd, q->buf, q->len);
+
+    if (val == SOCKET_ERROR) {
+	ws_errno = WSAGetLastError();
+#if 0
+	char buff[256];
+	sprintf(buff, "Thread read: %d, error (%ld), fd = %d, len = %d",
+		i, ws_errno, q->fd, q->len);
+	MessageBox(NULL, buff, BOX_TITLE, BOX_FLAG);
+#endif
+	ret = -1;
+    } else {
+	ret = val;
+    }
+
+    ExitThread((DWORD)ret);
+}
+
+/* The same like read, but takes care of EINTR and uses select to
+   timeout the stale connections.  */
+
+PUBLIC int ws_netread(int fd, char *buf, int len)
+{
+    int i;
+    char buff[256];
+
+     /* 1998/03/30 (Mon) 09:01:21 */
+    HANDLE hThread;
+    DWORD dwThreadID;
+    DWORD exitcode = 0;
+    DWORD ret_val, val, process_time, now_TickCount, save_TickCount;
+
+    static recv_data_t para;
+
+    extern int win32_check_interrupt(void);	/* LYUtil.c */
+    extern int lynx_timeout;			/* LYMain.c */
+    extern int AlertSecs;			/* LYMain.c */
+    extern CRITICAL_SECTION critSec_READ;	/* LYMain.c */
+
+#define TICK	5
+#define STACK_SIZE	0x2000uL
+
+    InitializeCriticalSection(&critSec_READ);
+
+    para.fd = fd;
+    para.buf = buf;
+    para.len = len;
+
+    ws_read_per_sec = 0;
+    save_TickCount = GetTickCount();
+
+    hThread = CreateThread((void *)NULL, STACK_SIZE,
+		 (LPTHREAD_START_ROUTINE)_thread_func,
+		 (void *)&para, 0UL, &dwThreadID);
+
+    if (hThread == 0) {
+	HTInfoMsg("CreateThread Failed (read)");
+	goto read_exit;
+    }
+
+    i = 0;
+    while (1) {
+	val = WaitForSingleObject(hThread, 1000/TICK);
+	i++;
+	if (val == WAIT_FAILED) {
+	    HTInfoMsg("Wait Failed");
+	    ret_val = -1;
+	    break;
+	} else if (val == WAIT_TIMEOUT) {
+	    i++;
+	    if (i/TICK > (AlertSecs + 2)) {
+		sprintf(buff, "Read Waiting (%2d.%01d) for %d Bytes",
+			i/TICK, (i%TICK) * 10 / TICK, len);
+		SetConsoleTitle(buff);
+	    }
+	    if (win32_check_interrupt() || ((i/TICK) > lynx_timeout)) {
+		if (CloseHandle(hThread) == FALSE) {
+		    HTInfoMsg("Thread terminate Failed");
+		}
+		WSASetLastError(ETIMEDOUT);
+		ret_val = HT_INTERRUPTED;
+		break;
+	    }
+	} else if (val == WAIT_OBJECT_0) {
+	    if (GetExitCodeThread(hThread, &exitcode) == FALSE) {
+		exitcode = -1;
+	    }
+	    if (CloseHandle(hThread) == FALSE) {
+		HTInfoMsg("Thread terminate Failed");
+	    }
+	    now_TickCount = GetTickCount();
+	    if (now_TickCount > save_TickCount)
+		process_time = now_TickCount - save_TickCount;
+	    else
+		process_time = now_TickCount + (0xffffffff - save_TickCount);
+
+	    g_total_times += process_time;
+	    g_total_bytes += exitcode;
+	    
+	    if (g_total_bytes > 2000000) {
+		ws_read_per_sec = g_total_bytes / (g_total_times/1000);
+	    } else {
+		ws_read_per_sec = g_total_bytes * 1000 / g_total_times;
+	    }
+	    ret_val = exitcode;
+	    break;
+	}
+    }	/* end while(1) */
+
+    read_exit:
+    LeaveCriticalSection(&critSec_READ);
+    return ret_val;
+}
+#endif
+
 
 /*		Load Document from HTTP Server			HTLoadHTTP()
 **		==============================
@@ -109,6 +285,7 @@ PRIVATE int HTLoadHTTP ARGS4 (
   BOOL had_header;		/* Have we had at least one header? */
   char *line_buffer;
   char *line_kept_clean;
+  int real_length_of_line;
   BOOL extensions;		/* Assume good HTTP server */
   char line[INIT_LINE_SIZE];
   char temp[80];
@@ -178,8 +355,15 @@ try_again:
        goto done;
    }
    if (status < 0) {
-	CTRACE(tfp, "HTTP: Unable to connect to remote host for `%s' (errno = %d).\n",
+#ifdef _WINDOWS
+      CTRACE(tfp, "HTTP: Unable to connect to remote host for `%s'\n"
+			  " (status = %d, sock_errno = %d).\n",
+			  url, status, SOCKET_ERRNO);
+#else
+      CTRACE(tfp,
+	    "HTTP: Unable to connect to remote host for `%s' (errno = %d).\n",
 	    url, SOCKET_ERRNO);
+#endif
       HTAlert(gettext("Unable to connect to remote host."));
       status = HT_NOT_LOADED;
       goto done;
@@ -674,8 +858,7 @@ try_again:
 	    if (line_buffer == NULL)
 		outofmem(__FILE__, "HTLoadHTTP");
 	}
-	CTRACE (tfp, "HTTP: Trying to read %d\n",
-		     buffer_length - length - 1);
+	CTRACE(tfp, "HTTP: Trying to read %d\n", buffer_length - length - 1);
 	status = HTTP_NETREAD(s, line_buffer + length,
 			      buffer_length - length - 1, handle);
 	CTRACE (tfp, "HTTP: Read %d\n", status);
@@ -692,6 +875,9 @@ try_again:
 		goto clean_up;
 	    } else if  (status < 0 &&
 			(SOCKET_ERRNO == ENOTCONN ||
+#ifdef _WINDOWS	/* 1997/11/09 (Sun) 16:59:58 */
+			 SOCKET_ERRNO == ETIMEDOUT ||
+#endif
 			 SOCKET_ERRNO == ECONNRESET ||
 			 SOCKET_ERRNO == EPIPE) &&
 			!already_retrying && !do_post) {
@@ -745,6 +931,7 @@ try_again:
 	    if (line_kept_clean == NULL)
 		outofmem(__FILE__, "HTLoadHTTP");
 	    memcpy(line_kept_clean, line_buffer, buffer_length);
+	    real_length_of_line = length + status;
 	}
 
 	eol = strchr(line_buffer + length, LF);
@@ -1720,7 +1907,12 @@ Cookie2_continuation:
       **  It was a HEAD request, or we want the headers and source.
       */
       start_of_data = line_kept_clean;
+#ifdef SH_EX	/* FIX BUG by kaz@maczuka.hitachi.ibaraki.jp */
+/* GIF file contains \0, so strlen does not return the data length */
+      length = real_length_of_line;
+#else
       length = rawlength;
+#endif
       format_in = HTAtom_for("text/plain");
   }
 
diff --git a/WWW/Library/Implementation/HTTP.h b/WWW/Library/Implementation/HTTP.h
index cd6925f2..1079557f 100644
--- a/WWW/Library/Implementation/HTTP.h
+++ b/WWW/Library/Implementation/HTTP.h
@@ -24,6 +24,10 @@ extern char * redirecting_url;
 extern BOOL permanent_redirection;
 extern BOOL redirect_post_content;
 
+#ifdef _WINDOWS
+extern int ws_netread(int fd, char *buf, int len);
+#endif /* _WINDOWS */
+
 #endif /* HTTP_H */
 
 /*
diff --git a/WWW/Library/Implementation/HTUtils.h b/WWW/Library/Implementation/HTUtils.h
index dd0a51e7..f5237989 100644
--- a/WWW/Library/Implementation/HTUtils.h
+++ b/WWW/Library/Implementation/HTUtils.h
@@ -1,7 +1,7 @@
 /*                                       Utility macros for the W3 code library
                                   MACROS FOR GENERAL USE
 
-   See also: the system dependent file "tcp.h", which is included here.
+   See also: the system dependent file "www_tcp.h", which is included here.
 
  */
 
@@ -40,7 +40,7 @@
 #define DISP_PARTIAL	/* experimental */
 #endif
 
-#if defined(__STDC__) || defined(VMS)
+#if defined(__STDC__) || defined(VMS) || defined(_WINDOWS)
 #define ANSI_VARARGS 1
 #undef HAVE_STDARG_H
 #define HAVE_STDARG_H 1
@@ -102,13 +102,24 @@
 #define	GCC_UNUSED /* nothing */
 #endif
 
-#ifdef _WINDOWS                         /* SCW */
-#include <windef.h>
+#if defined(__CYGWIN__)			/* 1998/12/31 (Thu) 16:13:46 */
+#include <windows.h>		/* #include "windef.h" */
+#define BOOLEAN_DEFINED
+#endif
+
+#if defined(_WINDOWS) && !defined(__CYGWIN__)	/* SCW */
+#include <windows.h>		/* #include "windef.h" */
 #define BOOLEAN_DEFINED
-#define va_arg
 #include <dos.h>
+#undef sleep			/* 1998/06/23 (Tue) 16:54:53 */
+extern void sleep(unsigned __seconds);
 #define popen _popen
 #define pclose _pclose
+
+#if defined(_MSC_VER)
+typedef unsigned short mode_t;
+#endif
+
 #endif /* _WINDOWS */
 
 #ifdef __EMX__
@@ -201,7 +212,7 @@ Macros for declarations
 #define PUBLIC                  /* Accessible outside this module     */
 #define PRIVATE static          /* Accessible only within this module */
 
-#ifdef __STDC__
+#if defined(__STDC__) || defined(__BORLANDC__) || defined(_MSC_VER)
 #define CONST const             /* "const" only exists in STDC */
 #define NOPARAMS (void)
 #define PARAMS(parameter_list) parameter_list
@@ -268,7 +279,7 @@ Macros for declarations
 OFTEN USED INTEGER MACROS
 
   Min and Max functions
-  
+
  */
 #ifndef HTMIN
 #define HTMIN(a,b) ((a) <= (b) ? (a) : (b))
@@ -412,7 +423,7 @@ Upper- and Lowercase macros
 #define TOUPPER(c) (islower((unsigned char)c) ? toupper((unsigned char)c) : ((unsigned char)c))
 #endif /* TOLOWER */
 
-#define FREE(x) if (x) {free(x); x = NULL;}
+#define FREE(x) if (x != 0) {free((char *)x); x = NULL;}
 
 /*
 
@@ -433,7 +444,7 @@ The local equivalents of CR and LF
 
 extern FILE *TraceFP NOPARAMS;
 
-#include <tcp.h>
+#include <www_tcp.h>
 
 /*
  * We force this include-ordering since socks.h contains redefinitions of
diff --git a/WWW/Library/Implementation/HTVMS_WaisUI.c b/WWW/Library/Implementation/HTVMS_WaisUI.c
index 1f9ffccc..f5c5954e 100644
--- a/WWW/Library/Implementation/HTVMS_WaisUI.c
+++ b/WWW/Library/Implementation/HTVMS_WaisUI.c
@@ -40,7 +40,7 @@
 #include <HTVMS_WaisProt.h>
 #include <HTTCP.h>
 
-#undef MAXINT	/* we don't need it here, and tcp.h may conflict */
+#undef MAXINT	/* we don't need it here, and www_tcp.h may conflict */
 #include <math.h>
 
 #include <LYexit.h>
diff --git a/WWW/Library/Implementation/SGML.c b/WWW/Library/Implementation/SGML.c
index 7d436284..7efb4d9b 100644
--- a/WWW/Library/Implementation/SGML.c
+++ b/WWW/Library/Implementation/SGML.c
@@ -39,6 +39,10 @@
 # include <LYPrettySrc.h>
 #endif
 
+#ifdef CJK_EX	/* 1997/12/12 (Fri) 16:54:58 */
+extern HTkcode last_kcode;
+#endif
+
 #define INVALID (-1)
 
 #ifdef USE_PSRC
@@ -224,8 +228,13 @@ PRIVATE void HTMLSRC_apply_markup ARGS3(
     }
 }
 
+#ifdef __STDC__
 #  define PSRCSTART(x)	HTMLSRC_apply_markup(context,HTL_##x,START)
 #  define PSRCSTOP(x)  HTMLSRC_apply_markup(context,HTL_##x,STOP)
+#else
+#  define PSRCSTART(x)	HTMLSRC_apply_markup(context,HTL_/**/x,START)
+#  define PSRCSTOP(x)  HTMLSRC_apply_markup(context,HTL_/**/x,STOP)
+#endif
 
 PRIVATE BOOL cur_attr_is_href;
 PRIVATE BOOL cur_attr_is_name;
@@ -1132,7 +1141,7 @@ PRIVATE void start_element ARGS1(
 		!strcasecomp(new_tag->name, "FIELDSET") ||
 		!strcasecomp(new_tag->name, "LABEL") ||
 		!strcasecomp(new_tag->name, "LEGEND") ||
-		!strcasecomp(new_tag->name, "FORM")) {
+		!strcasecomp(new_tag->name, "FORM"))
 #else
 	    switch (e) {
 		case HTML_INPUT:  case HTML_TEXTAREA: case HTML_SELECT:
@@ -1143,8 +1152,9 @@ PRIVATE void start_element ARGS1(
 		default:
 		    break;
 	    }
-	    if (ok) {
+	    if (ok)
 #endif
+	    {
 		/*
 		**  It is another form-related start tag, so terminate
 		**  the current SELECT block and fall through. - FM
@@ -1180,10 +1190,10 @@ PRIVATE void start_element ARGS1(
 	N->next = context->element_stack;
 	N->tag = new_tag;
 	context->element_stack = N;
-#if !OPT
-    } else if (!strcasecomp(new_tag->name, "META")) {
-#else
+#if OPT
     } else if (e == HTML_META ) {
+#else
+    } else if (!strcasecomp(new_tag->name, "META")) {
 #endif
 	/*
 	**  Check for result of META tag. - KW & FM
@@ -1360,7 +1370,11 @@ PRIVATE void SGML_character ARGS2(
     char * p;
     BOOLEAN chk;	/* Helps (?) walk through all the else ifs... */
     UCode_t clong, uck = 0; /* Enough bits for UCS4 ... */
+#ifdef CJK_EX
+    unsigned char c;
+#else
     char c;
+#endif
     char saved_char_in = '\0';
 
     /*
@@ -1369,6 +1383,10 @@ PRIVATE void SGML_character ARGS2(
     **	we can revert back to the unchanged c_in. - KW
     */
 #define unsign_c clong
+#ifdef CJK_EX	/* 1997/12/12 (Fri) 18:08:48 */
+    static unsigned char sjis_1st = '\0';
+    unsigned char sjis_hi, sjis_lo;
+#endif
 
     c = c_in;
     clong = (unsigned char)c;	/* a.k.a. unsign_c */
@@ -1579,6 +1597,25 @@ top1:
 	HTCJK == NOCJK)
 	return;
 
+#ifdef CJK_EX	/* 1998/11/24 (Tue) 17:02:31 */
+    if (HTCJK == JAPANESE && last_kcode == SJIS) {
+	if (sjis_1st == '\0' && (IS_SJIS_HI1(c) || IS_SJIS_HI2(c))) {
+	    sjis_1st = c;
+	} else if (sjis_1st && IS_SJIS_LO(c)) {
+	    sjis_1st = '\0';
+	} else {
+	    if (context->state == S_text) {
+		if (0xA1 <= (unsigned char)c && (unsigned char)c <= 0xDF) {
+		    JISx0201TO0208_SJIS(c, &sjis_hi, &sjis_lo);
+		    PUTC(sjis_hi);
+		    PUTC(sjis_lo);
+		    return;
+		}
+	    }
+	}
+    }
+#endif
+
     /*
     **	Ignore 127 if we don't have HTPassHighCtrlRaw
     **	or HTCJK set. - FM
@@ -3276,6 +3313,17 @@ top1:
 		PSRCSTOP(attrval);
 	    } else
 #endif
+#ifdef CJK_EX	/* Quick hack. - JH7AYN */
+	    {   char jis_buf[512];
+		if (string->data[0] == '$') {
+		  if (string->data[1] == 'B' || string->data[1] == '@') {
+		    jis_buf[0] = '\033';
+		    strcpy(jis_buf + 1, string->data);
+		    TO_EUC(jis_buf, string->data);
+		  }
+		}
+	    }
+#endif
 	    handle_attribute_value(context, string->data);
 	    string->size = 0;
 	    if (c == '>') {		/* End of tag */
@@ -3494,11 +3542,11 @@ top1:
 #endif
 		context->current_tag = t;
 #if OPT
+		if (tag_OK
 #ifdef EXTENDED_HTMLDTD
-		if (tag_OK && Old_DTD) {
-#else
-		if (tag_OK) {
+		 && Old_DTD
 #endif
+		 ) {
 		   switch (e) {
 		     case HTML_DD: case HTML_DT: case HTML_LI: case HTML_LH :
 		     case HTML_TD: case HTML_TH: case HTML_TR: case HTML_THEAD:
@@ -3524,9 +3572,10 @@ top1:
 		} else
 #endif /* EXTENDED_HTMLDTD */
 
-
-#if !OPT
 		if (tag_OK &&
+#if OPT
+		    (branch == 0)
+#else
 		    (!strcasecomp(string->data, "DD") ||
 		     !strcasecomp(string->data, "DT") ||
 		     !strcasecomp(string->data, "LI") ||
@@ -3537,10 +3586,9 @@ top1:
 		     !strcasecomp(string->data, "THEAD") ||
 		     !strcasecomp(string->data, "TFOOT") ||
 		     !strcasecomp(string->data, "TBODY") ||
-		     !strcasecomp(string->data, "COLGROUP"))) {
-#else
-		if (tag_OK && branch == 0) {
+		     !strcasecomp(string->data, "COLGROUP"))
 #endif
+		 ) {
 		    /*
 		    **	Don't treat these end tags as invalid,
 		    **	nor act on them. - FM
@@ -3555,8 +3603,10 @@ top1:
 			context->state = S_text;
 		    }
 		    break;
-#if !OPT
 		} else if (tag_OK &&
+#if OPT
+			   (branch == 1)
+#else
 			   (!strcasecomp(string->data, "A") ||
 			    !strcasecomp(string->data, "B") ||
 			    !strcasecomp(string->data, "BLINK") ||
@@ -3568,10 +3618,9 @@ top1:
 			    !strcasecomp(string->data, "P") ||
 			    !strcasecomp(string->data, "STRONG") ||
 			    !strcasecomp(string->data, "TT") ||
-			    !strcasecomp(string->data, "U"))) {
-#else
-		} else if (tag_OK && branch == 1) {
+			    !strcasecomp(string->data, "U"))
 #endif
+		) {
 		    /*
 		    **	Handle end tags for container elements declared
 		    **	as SGML_EMPTY to prevent "expected tag substitution"
@@ -3844,10 +3893,10 @@ top1:
 		if (!WHITE(c)) {
 		    seen_letter_in_junk_tag = TRUE;
 		    PUTC(c);
-		};
+		}
 	    } else
 		PUTC(c);
-	};
+	}
 #endif
 
     } /* switch on context->state */
@@ -4009,8 +4058,8 @@ PUBLIC HTStream* SGML_new  ARGS3(
 #ifdef USE_PSRC
     if (psrc_view) {
 	psrc_view = FALSE;
-	SGML_string(context, "<HTML><HEAD><TITLE>source</TITLE></HEAD>"
-			     "<BODY><PRE>") ;
+	SGML_string(context,
+		    "<HTML><HEAD><TITLE>source</TITLE></HEAD><BODY><PRE>");
 	psrc_view = TRUE;
 	psrc_convert_string = FALSE;
 	sgml_in_psrc_was_initialized = TRUE;
@@ -4132,6 +4181,21 @@ PUBLIC void JISx0201TO0208_EUC ARGS4(
     }
 }
 
+PRIVATE int IS_SJIS_STR ARGS1(CONST unsigned char *, str)
+{
+    CONST unsigned char *s;
+    unsigned char ch;
+    int is_sjis = 0;
+
+    s = str;
+    while ((ch = *s++) != '\0') {
+	if (ch & 0x80)
+	    if (IS_SJIS(ch, *s, is_sjis))
+		return 1;
+    }
+    return 0;
+}
+
 PUBLIC unsigned char * SJIS_TO_JIS1 ARGS3(
 	register unsigned char,		HI,
 	register unsigned char,		LO,
@@ -4177,8 +4241,9 @@ PUBLIC unsigned char * EUC_TO_SJIS1 ARGS3(
 	unsigned char,			LO,
 	register unsigned char *,	SJCODE)
 {
-    if (HI == 0x8E) JISx0201TO0208_EUC(HI, LO, &HI, &LO);
-    JIS_TO_SJIS1(HI&0x7F, LO&0x7F, SJCODE);
+    if (HI == 0x8E)
+	JISx0201TO0208_EUC(HI, LO, &HI, &LO);
+    JIS_TO_SJIS1(HI & 0x7F, LO & 0x7F, SJCODE);
     return SJCODE;
 }
 
@@ -4189,8 +4254,8 @@ PUBLIC void JISx0201TO0208_SJIS ARGS3(
 {
     unsigned char SJCODE[2];
 
-    JISx0201TO0208_EUC(216, I, OHI, OLO);
-    JIS_TO_SJIS1(*OHI&0x7F, *OLO&0x7F, SJCODE);
+    JISx0201TO0208_EUC(0x8E, I, OHI, OLO);
+    JIS_TO_SJIS1(*OHI & 0x7F, *OLO & 0x7F, SJCODE);
     *OHI = SJCODE[0];
     *OLO = SJCODE[1];
 }
@@ -4213,17 +4278,17 @@ PUBLIC unsigned char * SJIS_TO_EUC ARGS2(
     register unsigned char hi, lo, *sp, *dp;
     register int in_sjis = 0;
 
-    for (sp = src, dp = dst; (0 != (hi = sp[0]));) {
+    in_sjis = IS_SJIS_STR(src);
+    for (sp = src, dp = dst; (hi = sp[0]) != '\0';) {
 	lo = sp[1];
 	if (TREAT_SJIS && IS_SJIS(hi, lo, in_sjis)) {
-	    SJIS_TO_JIS1(hi,lo,dp);
+	    SJIS_TO_JIS1(hi, lo, dp);
 	    dp[0] |= 0x80;
 	    dp[1] |= 0x80;
 	    dp += 2;
 	    sp += 2;
-	} else {
+	} else
 	    *dp++ = *sp++;
-	}
     }
     *dp = 0;
     return dst;
@@ -4238,7 +4303,7 @@ PUBLIC unsigned char * EUC_TO_SJIS ARGS2(
     for (sp = src, dp = dst; *sp;) {
 	if (*sp & 0x80) {
 	    if (sp[1] && (sp[1] & 0x80)) {
-		JIS_TO_SJIS1(sp[0]&0x7F, sp[1]&0x7F, dp);
+		JIS_TO_SJIS1(sp[0] & 0x7F, sp[1] & 0x7F, dp);
 		dp += 2;
 		sp += 2;
 	    } else {
@@ -4252,7 +4317,9 @@ PUBLIC unsigned char * EUC_TO_SJIS ARGS2(
     return dst;
 }
 
-PUBLIC unsigned char * EUC_TO_JIS ARGS4(
+#define Strcpy(a,b)	(strcpy((char*)a,(CONST char*)b),&a[strlen((CONST char*)a)])
+
+PUBLIC unsigned char *EUC_TO_JIS ARGS4(
 	unsigned char *,	src,
 	unsigned char *,	dst,
 	CONST char *,		toK,
@@ -4262,15 +4329,20 @@ PUBLIC unsigned char * EUC_TO_JIS ARGS4(
     register unsigned char cch;
     register unsigned char *sp = src;
     register unsigned char *dp = dst;
-    register int i;
+    int is_JIS = 0;
 
-    while (0 != (cch = *sp++)) {
+    while ((cch = *sp++) != '\0') {
 	if (cch & 0x80) {
+	    if (!IS_EUC(cch, *sp)) {
+		if (cch == 0xA0 && is_JIS)	/* ignore NBSP */
+		    continue;
+		is_JIS++;
+		*dp++ = cch;
+		continue;
+	    }
 	    if (!kana_mode) {
 		kana_mode = ~kana_mode;
-		for (i = 0; toK[i]; i++) {
-		    *dp++ = (unsigned char)toK[i];
-		}
+		dp = Strcpy(dp, toK);
 	    }
 	    if (*sp & 0x80) {
 		*dp++ = cch & ~0x80;
@@ -4279,70 +4351,244 @@ PUBLIC unsigned char * EUC_TO_JIS ARGS4(
 	} else {
 	    if (kana_mode) {
 		kana_mode = ~kana_mode;
-		for (i = 0; toA[i]; i++) {
-		    *dp++ = (unsigned char)toA[i];
-		    *dp = '\0';
-		}
+		dp = Strcpy(dp, toA);
 	    }
 	    *dp++ = cch;
 	}
     }
-    if (kana_mode) {
-	for (i = 0; toA[i]; i++) {
-	    *dp++ = (unsigned char)toA[i];
-	}
-    }
+    if (kana_mode)
+	dp = Strcpy(dp, toA);
 
     if (dp)
 	*dp = 0;
     return dst;
 }
 
-PUBLIC unsigned char * TO_EUC ARGS2(
+#define	IS_JIS7(c1,c2)	(0x20<(c1)&&(c1)<0x7F && 0x20<(c2)&&(c2)<0x7F)
+#define SO		('N'-0x40)
+#define SI		('O'-0x40)
+
+PUBLIC int repair_JIS = 0;
+
+PRIVATE CONST unsigned char *repairJIStoEUC ARGS2(
+	CONST unsigned char *,	src,
+	unsigned char **,	dstp)
+{
+    CONST unsigned char *s;
+    unsigned char *d, ch1, ch2;
+
+    d = *dstp;
+    s = src;
+    while ((ch1 = s[0]) && (ch2 = s[1])) {
+	s += 2;
+	if (ch1 == '(')
+	    if (ch2 == 'B' || ch2 == 'J') {
+		*dstp = d;
+		return s;
+	    }
+	if (!IS_JIS7(ch1, ch2))
+	    return 0;
+
+	*d++ = 0x80 | ch1;
+	*d++ = 0x80 | ch2;
+    }
+    return 0;
+}
+
+#if 0	/* NOTUSED */
+
+static struct {
+    char *ee;
+    char de;
+} entities[] = {
+    {"&lt;", '<' },
+    {"&gt;", '>' },
+    {"&amp;", '&'},
+    {"&quot;", '"'},
+    {NULL, 0}
+};
+
+PRIVATE int isHTMLentity ARGS2(
+	char *, str,
+	int *, chp)
+{
+    int ei, ej;
+    char *es, ec;
+    int off;
+
+    off = *str == '&' ? 0 : 1;
+    for (ei = 0; (es = entities[ei].ee) != '\0'; ei++) {
+	for (ej = 0; (ec = es[off + ej]) != '\0'; ej++) {
+	    if (ec != str[ej])
+		break;
+	    if (ec == ';') {
+		*chp = entities[ei].de;
+		return ej + 1;
+	    }
+	}
+    }
+    return 0;
+}
+
+#define sputc(sp,ch)	(sp?(*sp++ = ch):ch)
+
+PUBLIC int FIX_2022 ARGS3(
+	char *, src,
+	char *, dst,
+	char *, ctype)
+{
+    int in2B;
+    char ch1, ch2, *sp, *dp;
+    int bad;
+    int isHTML, len, ech;
+
+    in2B = 0;
+    sp = src;
+    dp = dst;
+    bad = 0;
+
+    isHTML = strcasecomp(ctype, "text/html") == 0;
+
+    while ((ch1 = *sp++) != '\0') {
+	if (ch1 == ESC) {
+	    if (*sp == TO_2BCODE) {
+		if (sp[1] == 'B' || sp[1] == '@') {
+		    in2B = 1;
+		    sputc(dp, ch1);
+		    sputc(dp, *sp++);
+		    sputc(dp, *sp++);
+		    continue;
+		}
+	    } else if (*sp == TO_1BCODE) {
+		if (sp[1] == 'B' || sp[1] == 'J') {
+		    in2B = 0;
+		    sputc(dp, ch1);
+		    sputc(dp, *sp++);
+		    sputc(dp, *sp++);
+		    continue;
+		}
+	    }
+	}
+	if (in2B) {
+	    if ((ch1 <= 0x20)
+		|| (sp[0] <= 0x20)
+		|| (ch1 == '<' && sp[0] == '/')
+		|| (sp[0] == '<' && sp[1] == '/')) {
+		in2B = 0;
+		sputc(dp, ESC);
+		sputc(dp, TO_1BCODE);
+		sputc(dp, 'B');
+		sputc(dp, ch1);
+		bad = 1;
+		continue;
+	    }
+	    if (isHTML && ch1 == '&')
+		if ((len = isHTMLentity(sp, &ech)) != '\0')
+		    if (sp[len] != 0) {
+			ch1 = ech;
+			sp += len;
+			bad = 1;
+		    }
+	    ch2 = *sp++;
+
+	    if (isHTML && ch2 == '&')
+		if ((len = isHTMLentity(sp, &ech)) != '\0')
+		    if (sp[len] != 0) {
+			ch2 = ech;
+			sp += len;
+			bad = 1;
+		    }
+	    sputc(dp, ch1);
+	    sputc(dp, ch2);
+	} else {
+	    sputc(dp, ch1);
+	}
+    }
+    sputc(dp, 0);
+    return bad;
+}
+
+#endif
+
+PUBLIC unsigned char *TO_EUC ARGS2(
 	CONST unsigned char *,	jis,
 	unsigned char *,	euc)
 {
     register CONST unsigned char *s;
-    register unsigned char *d, c, jis_stat;
+    register unsigned char c, jis_stat;
+    unsigned char *d;
     register int to1B, to2B;
     register int in_sjis = 0;
+    static int nje;
+    int n8bits;
+    int is_JIS;
 
+    nje++;
+    n8bits = 0;
     s = jis;
     d = euc;
     jis_stat = 0;
     to2B = TO_2BCODE;
     to1B = TO_1BCODE;
-
-    while (0 != (c = *s++)) {
+    in_sjis = IS_SJIS_STR(jis);
+    is_JIS = 0;
+
+    while ((c = *s++) != '\0') {
+	if (c == 0x80)
+	    continue;		/* ignore it */
+	if (c == 0xA0 && is_JIS)
+	    continue;		/* ignore Non-breaking space */
+
+	if (c == to2B && jis_stat == 0 && repair_JIS) {
+	    if (*s == 'B' || *s == '@') {
+		CONST unsigned char *ts;
+		if ((ts = repairJIStoEUC(s + 1, &d)) != NULL) {
+		    s = ts;
+		    continue;
+		}
+	    }
+	}
 	if (c == ESC) {
 	    if (*s == to2B) {
-		if ((s[1] == 'B') || (s[1] == '@') || (s[1] == 'A')) {
+		if ((s[1] == 'B') || (s[1] == '@')) {
 		    jis_stat = 0x80;
 		    s += 2;
-		    continue;
-		} else if ((s[1] == '(') && s[2] && (s[2] == 'C')) {
-		    jis_stat = 0x80;
-		    s += 3;
+		    is_JIS++;
 		    continue;
 		}
-	    } else {
-		if (*s == to1B) {
-		    if ((s[1]=='B') || (s[1]=='J') ||
-			(s[1]=='H') || (s[1]=='T')) {
-			jis_stat = 0;
-			s += 2;
-			continue;
-		    }
+		jis_stat = 0;
+	    } else if (*s == to1B) {
+		jis_stat = 0;
+		if ((s[1] == 'B') || (s[1] == 'J') || (s[1] == 'H')) {
+		    s += 2;
+		    continue;
 		}
+	    } else if (*s == ',') {	/* MULE */
+		jis_stat = 0;
 	    }
 	}
-	if (IS_SJIS(c,*s,in_sjis)) {
+	if (c & 0x80)
+	    n8bits++;
+
+	if (IS_SJIS(c, *s, in_sjis)) {
 	    SJIS_TO_EUC1(c, *s, d);
 	    d += 2;
 	    s++;
+	    is_JIS++;
+	} else if (jis_stat) {
+	    if (c <= 0x20 || 0x7F <= c) {
+		*d++ = c;
+		if (c == '\n')
+		    jis_stat = 0;
+	    } else {
+		if (IS_JIS7(c, *s)) {
+		    *d++ = jis_stat | c;
+		    *d++ = jis_stat | *s++;
+		} else
+		    *d++ = c;
+	    }
 	} else {
-	    if (jis_stat && (0x20 < c)) {
-		*d++ = jis_stat | c;
+	    if (n8bits == 0 && (c == SI || c == SO)) {
 	    } else {
 		*d++ = c;
 	    }
@@ -4352,22 +4598,47 @@ PUBLIC unsigned char * TO_EUC ARGS2(
     return euc;
 }
 
+#define non94(ch) ((ch) <= 0x20 || (ch) == 0x7F)
+
+PRIVATE int is_EUC_JP ARGS1(unsigned char *, euc)
+{
+    unsigned char *cp;
+    int ch1, ch2;
+
+    for (cp = euc; (ch1 = *cp) != '\0'; cp++) {
+	if (ch1 & 0x80) {
+	    ch2 = cp[1] & 0xFF;
+	    if ((ch2 & 0x80) == 0) {
+		/* sv1log("NOT_EUC1[%x][%x]\n",ch1,ch2); */
+		return 0;
+	    }
+	    if (non94(ch1 & 0x7F) || non94(ch2 & 0x7F)) {
+		/* sv1log("NOT_EUC2[%x][%x]\n",ch1,ch2); */
+		return 0;
+	    }
+	    cp++;
+	}
+    }
+    return 1;
+}
+
 PUBLIC void TO_SJIS ARGS2(
 	CONST unsigned char *,	any,
 	unsigned char *,	sjis)
 {
     unsigned char *euc;
 
-    if (!any || !sjis)
-	return;
-
-    euc = (unsigned char*)malloc(strlen((CONST char *)any)+1);
-    if (euc == NULL)
+    euc = malloc(strlen(any) + 1);
+#ifdef CJK_EX
+    if (!euc)
 	outofmem(__FILE__, "TO_SJIS");
-
+#endif
     TO_EUC(any, euc);
-    EUC_TO_SJIS(euc, sjis);
-    FREE(euc);
+    if (is_EUC_JP(euc))
+	EUC_TO_SJIS(euc, sjis);
+    else
+	strcpy(sjis, any);
+    free(euc);
 }
 
 PUBLIC void TO_JIS ARGS2(
@@ -4376,14 +4647,24 @@ PUBLIC void TO_JIS ARGS2(
 {
     unsigned char *euc;
 
-    if (!any || !jis)
+    if (any[0] == 0) {
+	jis[0] = 0;
 	return;
-
-    euc = (unsigned char*)malloc(strlen((CONST char *)any)+1);
-    if (euc == NULL)
+    }
+    euc = malloc(strlen(any) + 1);
+#ifdef CJK_EX
+    if (!euc)
 	outofmem(__FILE__, "TO_JIS");
-
+#endif
     TO_EUC(any, euc);
+#if 0
+    if (is_EUC_JP(euc))
+	EUC_TO_JIS(euc, jis, TO_KANJI, TO_ASCII);
+    else
+	strcpy(jis, any);
+#endif
+    is_EUC_JP(euc);
     EUC_TO_JIS(euc, jis, TO_KANJI, TO_ASCII);
-    FREE(euc);
+
+    free(euc);
 }
diff --git a/WWW/Library/Implementation/SGML.h b/WWW/Library/Implementation/SGML.h
index 9ae3ae36..1a1334ba 100644
--- a/WWW/Library/Implementation/SGML.h
+++ b/WWW/Library/Implementation/SGML.h
@@ -19,6 +19,7 @@
 
 #include <HTStream.h>
 #include <HTAnchor.h>
+#include <LYJustify.h>
 
 /*
 
@@ -113,6 +114,9 @@ struct _tag{
 #ifdef USE_COLOR_STYLE
     int		name_len;		/* The length of the name */
 #endif
+#ifdef EXP_JUSTIFY_ELTS
+    BOOL	can_justify;		/* justification allowed?*/
+#endif
     attr *	attributes;		/* The list of acceptable attributes */
     int		number_of_attributes;	/* Number of possible attributes */
     SGMLContent contents;		/* End only on end tag @@ */
diff --git a/WWW/Library/Implementation/getline.c b/WWW/Library/Implementation/getline.c
index 3168b9ec..370c5a6e 100644
--- a/WWW/Library/Implementation/getline.c
+++ b/WWW/Library/Implementation/getline.c
@@ -39,7 +39,11 @@ unsigned int len;
 
    if (lineptr == NULL || n == NULL)
    {
+#ifdef _WINDOWS
+      WSASetLastError(EINVAL);
+#else
       SOCKET_ERRNO = EINVAL;
+#endif
       return -1;
    }
 
diff --git a/WWW/Library/Implementation/makefile.in b/WWW/Library/Implementation/makefile.in
index 19def689..96803c91 100644
--- a/WWW/Library/Implementation/makefile.in
+++ b/WWW/Library/Implementation/makefile.in
@@ -135,7 +135,7 @@ HFILES = $(CMN)HTParse.h $(CMN)HTAccess.h $(CMN)HTTP.h $(CMN)HTFile.h \
 	$(CMN)HTFormat.h $(CMN)HTInit.h \
 	$(CMN)HTMIME.h $(CMN)HTNews.h \
 	$(CMN)HTGopher.h \
-	$(CMN)HTUtils.h $(CMN)tcp.h $(CMN)HText.h \
+	$(CMN)HTUtils.h $(CMN)www_tcp.h $(CMN)HText.h \
 	$(CMN)HTTelnet.h $(CMN)HTFinger.h \
 	$(CMN)HTWAIS.h  $(CMN)HTWSRC.h \
 	$(CMN)HTAABrow.h \
diff --git a/WWW/Library/Implementation/tcp.h b/WWW/Library/Implementation/www_tcp.h
index fe977bca..b9e3bbf5 100644
--- a/WWW/Library/Implementation/tcp.h
+++ b/WWW/Library/Implementation/www_tcp.h
@@ -67,6 +67,11 @@ typedef struct sockaddr_in SockA;  /* See netinet/in.h */
 #undef HAVE_SYS_FILIO_H
 #endif /* DJGPP or __BORLANDC__ */
 
+#if defined(_MSC_VER)
+#define HAVE_DIRENT_H
+#undef HAVE_SYS_FILIO_H
+#endif /* _MSC_VER */
+
 #ifdef HAVE_DIRENT_H
 # include <dirent.h>
 # define D_NAMLEN(dirent) strlen((dirent)->d_name)
@@ -159,7 +164,7 @@ IBM-PC running Windows NT
 #undef NETWRITE
 #undef NETCLOSE
 #undef IOCTL
-#define NETREAD(s,b,l)  recv((s),(b),(l),0)
+#define NETREAD(s,b,l)  ws_netread((s),(b),(l))	/* 1997/11/06 (Thu) */
 #define NETWRITE(s,b,l) send((s),(b),(l),0)
 #define NETCLOSE(s)     closesocket(s)
 #define IOCTL				ioctlsocket
@@ -171,6 +176,13 @@ IBM-PC running Windows NT
 #include <direct.h>
 #include <winsock.h>
 typedef struct sockaddr_in SockA;  /* See netinet/in.h */
+
+#if defined(_MSC_VER)
+#undef EINTR
+#undef EAGAIN
+#endif /* _MSC_VER */
+
+#define EWOULDBLOCK          (WSABASEERR+35)	/* ADD by JH7AYN */
 #define EINPROGRESS          (WSABASEERR+36)
 #define EALREADY             (WSABASEERR+37)
 #define EISCONN              (WSABASEERR+56)
@@ -178,7 +190,10 @@ typedef struct sockaddr_in SockA;  /* See netinet/in.h */
 #define EAGAIN               (WSABASEERR+1002)
 #define ENOTCONN             (WSABASEERR+57)
 #define ECONNRESET           (WSABASEERR+54)
+#define ETIMEDOUT             WSAETIMEDOUT	/* 1997/11/10 (Mon) */
 #define EINVAL                22
+#undef  SOCKET_ERRNO	/* 1997/10/19 (Sun) 18:01:46 */
+#define SOCKET_ERRNO          WSAGetLastError()
 #define INCLUDES_DONE
 #define TCP_INCLUDES_DONE
 #endif  /* WINDOWS */
@@ -485,6 +500,7 @@ struct timeval {
 #undef SELECT
 #define TCP_INCLUDES_DONE
 #define NO_IOCTL
+#define DECL_ERRNO
 #include <errno.h>
 #include <sys/types.h>
 #include <socket.h>
@@ -495,7 +511,9 @@ struct timeval {
 #define NETREAD read_s
 #undef NETCLOSE
 #define NETCLOSE close_s
+#ifndef WATT32
 #define getsockname getsockname_s
+#endif /* WATT32 */
 #ifdef HAVE_GETTEXT
 #define gettext gettext__
 #endif
diff --git a/WWW/Library/djgpp/CommonMakefile b/WWW/Library/djgpp/CommonMakefile
index f4bdad38..676052d9 100644
--- a/WWW/Library/djgpp/CommonMakefile
+++ b/WWW/Library/djgpp/CommonMakefile
@@ -116,7 +116,7 @@ HFILES = $(CMN)HTParse.h $(CMN)HTAccess.h $(CMN)HTTP.h $(CMN)HTFile.h \
 	$(CMN)HTFormat.h $(CMN)HTInit.h \
 	$(CMN)HTMIME.h $(CMN)HTNews.h \
 	$(CMN)HTGopher.h \
-	$(CMN)HTUtils.h $(CMN)tcp.h $(CMN)HText.h \
+	$(CMN)HTUtils.h $(CMN)www_tcp.h $(CMN)HText.h \
 	$(CMN)HTTelnet.h $(CMN)HTFinger.h \
 	$(CMN)HTWAIS.h  $(CMN)HTWSRC.h \
 	$(CMN)HTAAUtil.h $(CMN)HTAABrow.h \
diff --git a/WWW/Library/djgpp/makefile.sla b/WWW/Library/djgpp/makefile.sla
index 78b63da9..bc9439e1 100644
--- a/WWW/Library/djgpp/makefile.sla
+++ b/WWW/Library/djgpp/makefile.sla
@@ -8,10 +8,10 @@ WWW_MACH = djgpp
 #ASIS_MACH = hardware/os
 
 CFLAGS = -O3 -DUSE_SLANG -DUSE_ZLIB -DDOSPATH -DNOUSERS -DDISP_PARTIAL \
--DDIRED_SUPPORT -DSOURCE_CACHE -DUSE_PSRC -DNOPORT \
+-DDIRED_SUPPORT -DSOURCE_CACHE -DUSE_PSRC \
+-DWATT32 \
 -I../Implementation \
--I../../../djgpp/tcplib/include \
--I../../../djgpp/tcplib/include/tcp \
+-I../../../djgpp/watt32/inc -I../../../djgpp/watt32/inc/sys \
 -I../../../src \
 -I../../.. $(SLANGINC) $(INTLFLAGS)
 LFLAGS =
diff --git a/WWW/Library/vms/descrip.mms b/WWW/Library/vms/descrip.mms
index 6bbdaaba..ddac73f3 100644
--- a/WWW/Library/vms/descrip.mms
+++ b/WWW/Library/vms/descrip.mms
@@ -163,7 +163,7 @@ CFLAGS = $(DEBUGFLAGS) /Define = ($(EXTRADEFINES), MULTINET) $(INCLUDES)
 CC = gcc
 .endif
 
-!HEADERS = HTUtils.h, HTStream.h, tcp.h, HText.h -
+!HEADERS = HTUtils.h, HTStream.h, www_tcp.h, HText.h -
 !        HTParse.h, HTAccess.h, HTTP.h, HTFile.h, -
 !	HTBTree.h, HTTCP.h, SGML.h, -
 !	HTML.h, HTMLDTD.h, HTChunk.h, HTPlain.h, -
@@ -212,7 +212,7 @@ clean :
 ! Simple Dependencies
 
 
-!HTString.obj :	HTString.c HTString.h tcp.h Version.make HTUtils.h
+!HTString.obj :	HTString.c HTString.h www_tcp.h Version.make HTUtils.h
 !HTAtom.obj :	HTAtom.c HTAtom.h HTUtils.h HTString.h
 !HTChunk.obj :	HTChunk.c HTChunk.h HTUtils.h
 !HTList.obj :	HTList.c HTList.h HTUtils.h
@@ -235,7 +235,7 @@ clean :
 !HTNews.obj :	HTNews.c HTNews.h HTUtils.h HTList.h
 !HTParse.obj :	HTParse.c HTParse.h HTUtils.h
 !HTStyle.obj :	HTStyle.c HTStyle.h HTUtils.h
-!HTTCP.obj :	HTTCP.c HTTCP.h HTUtils.h tcp.h
+!HTTCP.obj :	HTTCP.c HTTCP.h HTUtils.h www_tcp.h
 !HTTP.obj :	HTTP.c HTTP.h HTUtils.h
 !SGML.obj :	SGML.c SGML.h HTUtils.h
 !HTAABrow.obj :	HTAABrow.c HTUtils.h
diff --git a/WWW/README.txt b/WWW/README.txt
index ad5d8bee..be7e3e96 100644
--- a/WWW/README.txt
+++ b/WWW/README.txt
@@ -95,8 +95,8 @@ Basic WWW software installation from source
       Check the  WWW/All/$WWW_MACH/Makefile.include for suitable directory and
       flag definitions.
       
-      Check the file tcp.h for the system-specific include file coordinates,
-      etc.
+      Check the file www_tcp.h for the system-specific include file
+      coordinates, etc.
       
       Send any changes you have to make back to www-request@info.cern.ch for
       inclusion into future releases.
diff --git a/config.hin b/config.hin
index e5e0f450..1628adc4 100644
--- a/config.hin
+++ b/config.hin
@@ -94,6 +94,7 @@
 #undef HAVE_SYS_WAIT_H		/* have <sys/wait.h> */
 #undef HAVE_TERMIOS_H		/* have <termios.h> */
 #undef HAVE_TERMIO_H		/* have <termio.h> */
+#undef HAVE_TRUNCATE
 #undef HAVE_TTYTYPE
 #undef HAVE_TYPE_UNIONWAIT	/* CF_UNION_WAIT */
 #undef HAVE_UNISTD_H		/* have <unistd.h> */
diff --git a/configure b/configure
index 62d8a985..552f588c 100755
--- a/configure
+++ b/configure
@@ -9452,17 +9452,18 @@ for ac_func in \
 	putenv \
 	readdir \
 	strerror \
+	truncate \
 	unsetenv \
 	waitpid \
 
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:9461: checking for $ac_func" >&5
+echo "configure:9462: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 9466 "configure"
+#line 9467 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -9485,7 +9486,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:9489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -9515,12 +9516,12 @@ for ac_func in \
 
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:9519: checking for $ac_func" >&5
+echo "configure:9520: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 9524 "configure"
+#line 9525 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -9543,7 +9544,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:9547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -9574,12 +9575,12 @@ for ac_func in strstr
 do
 
 echo $ac_n "checking for $ac_func declaration""... $ac_c" 1>&6
-echo "configure:9578: checking for $ac_func declaration" >&5
+echo "configure:9579: checking for $ac_func declaration" >&5
 if eval "test \"`echo '$''{'ac_cv_func_decl_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 9583 "configure"
+#line 9584 "configure"
 #include "confdefs.h"
 #include <string.h>
 int main() {
@@ -9588,11 +9589,11 @@ extern	int	${ac_func}();
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:9592: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
 cat > conftest.$ac_ext <<EOF
-#line 9596 "configure"
+#line 9597 "configure"
 #include "confdefs.h"
 #include <string.h>
 int main() {
@@ -9601,7 +9602,7 @@ int	(*p)() = ${ac_func};
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:9605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
 eval "ac_cv_func_decl_$ac_func=yes"
@@ -9643,12 +9644,12 @@ for ac_func in getgrgid getgrnam
 do
 
 echo $ac_n "checking for $ac_func declaration""... $ac_c" 1>&6
-echo "configure:9647: checking for $ac_func declaration" >&5
+echo "configure:9648: checking for $ac_func declaration" >&5
 if eval "test \"`echo '$''{'ac_cv_func_decl_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 9652 "configure"
+#line 9653 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -9659,11 +9660,11 @@ extern	int	${ac_func}();
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:9663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
 cat > conftest.$ac_ext <<EOF
-#line 9667 "configure"
+#line 9668 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -9674,7 +9675,7 @@ int	(*p)() = ${ac_func};
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:9678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9679: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
 eval "ac_cv_func_decl_$ac_func=yes"
@@ -9716,13 +9717,13 @@ done
 
 
 echo $ac_n "checking if TRUE/FALSE are defined""... $ac_c" 1>&6
-echo "configure:9720: checking if TRUE/FALSE are defined" >&5
+echo "configure:9721: checking if TRUE/FALSE are defined" >&5
 if eval "test \"`echo '$''{'cf_cv_bool_defs'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 cat > conftest.$ac_ext <<EOF
-#line 9726 "configure"
+#line 9727 "configure"
 #include "confdefs.h"
 
 #include <${cf_cv_ncurses_header-curses.h}>
@@ -9731,7 +9732,7 @@ int main() {
 int x = TRUE, y = FALSE
 ; return 0; }
 EOF
-if { (eval echo configure:9735: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9736: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_bool_defs=yes
 else
@@ -9758,13 +9759,13 @@ fi
 
 
 echo $ac_n "checking if external errno is declared""... $ac_c" 1>&6
-echo "configure:9762: checking if external errno is declared" >&5
+echo "configure:9763: checking if external errno is declared" >&5
 if eval "test \"`echo '$''{'cf_cv_dcl_errno'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
     cat > conftest.$ac_ext <<EOF
-#line 9768 "configure"
+#line 9769 "configure"
 #include "confdefs.h"
 
 #if HAVE_STDLIB_H
@@ -9777,7 +9778,7 @@ int main() {
 long x = (long) errno
 ; return 0; }
 EOF
-if { (eval echo configure:9781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   eval 'cf_cv_dcl_'errno'=yes'
 else
@@ -9808,13 +9809,13 @@ fi
 # It's possible (for near-UNIX clones) that the data doesn't exist
 
 echo $ac_n "checking if external errno exists""... $ac_c" 1>&6
-echo "configure:9812: checking if external errno exists" >&5
+echo "configure:9813: checking if external errno exists" >&5
 if eval "test \"`echo '$''{'cf_cv_have_errno'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
     cat > conftest.$ac_ext <<EOF
-#line 9818 "configure"
+#line 9819 "configure"
 #include "confdefs.h"
 
 #undef errno
@@ -9824,7 +9825,7 @@ int main() {
 errno = 2
 ; return 0; }
 EOF
-if { (eval echo configure:9828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval 'cf_cv_have_'errno'=yes'
 else
@@ -9856,20 +9857,20 @@ fi
 
 
 echo $ac_n "checking for setlocale()""... $ac_c" 1>&6
-echo "configure:9860: checking for setlocale()" >&5
+echo "configure:9861: checking for setlocale()" >&5
 if eval "test \"`echo '$''{'cf_cv_locale'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 cat > conftest.$ac_ext <<EOF
-#line 9866 "configure"
+#line 9867 "configure"
 #include "confdefs.h"
 #include <locale.h>
 int main() {
 setlocale(LC_ALL, "")
 ; return 0; }
 EOF
-if { (eval echo configure:9873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   cf_cv_locale=yes
 else
@@ -9890,13 +9891,13 @@ EOF
 
 
 echo $ac_n "checking if NGROUPS is defined""... $ac_c" 1>&6
-echo "configure:9894: checking if NGROUPS is defined" >&5
+echo "configure:9895: checking if NGROUPS is defined" >&5
 if eval "test \"`echo '$''{'cf_cv_ngroups'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 cat > conftest.$ac_ext <<EOF
-#line 9900 "configure"
+#line 9901 "configure"
 #include "confdefs.h"
 
 #if HAVE_SYS_PARAM_H
@@ -9910,7 +9911,7 @@ int main() {
 int x = NGROUPS
 ; return 0; }
 EOF
-if { (eval echo configure:9914: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_ngroups=yes
 else
@@ -9918,7 +9919,7 @@ else
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   cat > conftest.$ac_ext <<EOF
-#line 9922 "configure"
+#line 9923 "configure"
 #include "confdefs.h"
 
 #if HAVE_SYS_PARAM_H
@@ -9932,7 +9933,7 @@ int main() {
 int x = NGROUPS_MAX
 ; return 0; }
 EOF
-if { (eval echo configure:9936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9937: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_ngroups=NGROUPS_MAX
 else
@@ -9966,13 +9967,13 @@ for cf_name in sys_nerr sys_errlist
 do
     
 echo $ac_n "checking if external $cf_name is declared""... $ac_c" 1>&6
-echo "configure:9970: checking if external $cf_name is declared" >&5
+echo "configure:9971: checking if external $cf_name is declared" >&5
 if eval "test \"`echo '$''{'cf_cv_dcl_$cf_name'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
     cat > conftest.$ac_ext <<EOF
-#line 9976 "configure"
+#line 9977 "configure"
 #include "confdefs.h"
 
 #if HAVE_STDLIB_H
@@ -9985,7 +9986,7 @@ int main() {
 long x = (long) $cf_name
 ; return 0; }
 EOF
-if { (eval echo configure:9989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   eval 'cf_cv_dcl_'$cf_name'=yes'
 else
@@ -10016,13 +10017,13 @@ fi
 # It's possible (for near-UNIX clones) that the data doesn't exist
 
 echo $ac_n "checking if external $cf_name exists""... $ac_c" 1>&6
-echo "configure:10020: checking if external $cf_name exists" >&5
+echo "configure:10021: checking if external $cf_name exists" >&5
 if eval "test \"`echo '$''{'cf_cv_have_$cf_name'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
     cat > conftest.$ac_ext <<EOF
-#line 10026 "configure"
+#line 10027 "configure"
 #include "confdefs.h"
 
 #undef $cf_name
@@ -10032,7 +10033,7 @@ int main() {
 $cf_name = 2
 ; return 0; }
 EOF
-if { (eval echo configure:10036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval 'cf_cv_have_'$cf_name'=yes'
 else
@@ -10065,13 +10066,13 @@ done
 
 
 echo $ac_n "checking if struct utmp is declared""... $ac_c" 1>&6
-echo "configure:10069: checking if struct utmp is declared" >&5
+echo "configure:10070: checking if struct utmp is declared" >&5
 if eval "test \"`echo '$''{'cf_cv_have_utmp'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 	cat > conftest.$ac_ext <<EOF
-#line 10075 "configure"
+#line 10076 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -10080,7 +10081,7 @@ int main() {
 struct utmp x; char *y = &x.ut_host[0]
 ; return 0; }
 EOF
-if { (eval echo configure:10084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_have_utmp=yes
 else
@@ -10088,14 +10089,14 @@ else
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   cat > conftest.$ac_ext <<EOF
-#line 10092 "configure"
+#line 10093 "configure"
 #include "confdefs.h"
 #include <utmpx.h>
 int main() {
 struct utmpx x; char *y = &x.ut_host[0]
 ; return 0; }
 EOF
-if { (eval echo configure:10099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_have_utmp=utmpx
 else
@@ -10123,13 +10124,13 @@ EOF
 
 
 echo $ac_n "checking if external h_errno exists""... $ac_c" 1>&6
-echo "configure:10127: checking if external h_errno exists" >&5
+echo "configure:10128: checking if external h_errno exists" >&5
 if eval "test \"`echo '$''{'cf_cv_have_h_errno'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
     cat > conftest.$ac_ext <<EOF
-#line 10133 "configure"
+#line 10134 "configure"
 #include "confdefs.h"
 
 #undef h_errno
@@ -10139,7 +10140,7 @@ int main() {
 h_errno = 2
 ; return 0; }
 EOF
-if { (eval echo configure:10143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval 'cf_cv_have_'h_errno'=yes'
 else
@@ -10170,13 +10171,13 @@ fi
 
 
 echo $ac_n "checking if character set is EBCDIC""... $ac_c" 1>&6
-echo "configure:10174: checking if character set is EBCDIC" >&5
+echo "configure:10175: checking if character set is EBCDIC" >&5
 if eval "test \"`echo '$''{'cf_cv_ebcdic'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 	cat > conftest.$ac_ext <<EOF
-#line 10180 "configure"
+#line 10181 "configure"
 #include "confdefs.h"
  
 int main() {
@@ -10189,7 +10190,7 @@ make an error "Character set is not EBCDIC"
 #endif 
 ; return 0; }
 EOF
-if { (eval echo configure:10193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
    # TryCompile action if true
 cf_cv_ebcdic=yes 
@@ -10223,7 +10224,7 @@ esac
 if test $cf_cv_screen != slang ; then
 	
 echo $ac_n "checking if curses supports alternate-character set""... $ac_c" 1>&6
-echo "configure:10227: checking if curses supports alternate-character set" >&5
+echo "configure:10228: checking if curses supports alternate-character set" >&5
 if eval "test \"`echo '$''{'cf_cv_alt_char_set'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -10231,7 +10232,7 @@ else
 for mapname in acs_map _acs_map
 do
 	cat > conftest.$ac_ext <<EOF
-#line 10235 "configure"
+#line 10236 "configure"
 #include "confdefs.h"
 
 #include <${cf_cv_ncurses_header-curses.h}>
@@ -10240,7 +10241,7 @@ int main() {
 chtype x = $mapname['l']; $mapname['m'] = 0
 ; return 0; }
 EOF
-if { (eval echo configure:10244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   cf_cv_alt_char_set=$mapname
 	 break
@@ -10263,13 +10264,13 @@ EOF
 
 	
 echo $ac_n "checking if curses supports fancy attributes""... $ac_c" 1>&6
-echo "configure:10267: checking if curses supports fancy attributes" >&5
+echo "configure:10268: checking if curses supports fancy attributes" >&5
 if eval "test \"`echo '$''{'cf_cv_fancy_curses'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 	cat > conftest.$ac_ext <<EOF
-#line 10273 "configure"
+#line 10274 "configure"
 #include "confdefs.h"
 
 #include <${cf_cv_ncurses_header-curses.h}>
@@ -10282,7 +10283,7 @@ attrset(A_UNDERLINE|A_BOLD|A_REVERSE);
 	
 ; return 0; }
 EOF
-if { (eval echo configure:10286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   cf_cv_fancy_curses=yes
 else
@@ -10302,7 +10303,7 @@ EOF
 
 
 	echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
-echo "configure:10306: checking for ncurses version" >&5
+echo "configure:10307: checking for ncurses version" >&5
 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -10327,7 +10328,7 @@ Autoconf "old"
 #endif
 EOF
 	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
-	{ (eval echo configure:10331: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
+	{ (eval echo configure:10332: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
 	if test -f conftest.out ; then
 		cf_out=`cat conftest.out | sed -e 's@^Autoconf @@' -e 's@^[^"]*"@@' -e 's@".*@@'`
 		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
@@ -10336,7 +10337,7 @@ EOF
 
 else
   cat > conftest.$ac_ext <<EOF
-#line 10340 "configure"
+#line 10341 "configure"
 #include "confdefs.h"
 
 #include <${cf_cv_ncurses_header-curses.h}>
@@ -10359,7 +10360,7 @@ int main()
 	exit(0);
 }
 EOF
-if { (eval echo configure:10363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
 	cf_cv_ncurses_version=`cat $cf_tempfile`
@@ -10379,13 +10380,13 @@ echo "$ac_t""$cf_cv_ncurses_version" 1>&6
 
 if test "$cf_cv_ncurses_version" != no ; then
 echo $ac_n "checking for obsolete/broken version of ncurses""... $ac_c" 1>&6
-echo "configure:10383: checking for obsolete/broken version of ncurses" >&5
+echo "configure:10384: checking for obsolete/broken version of ncurses" >&5
 if eval "test \"`echo '$''{'cf_cv_ncurses_broken'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 cat > conftest.$ac_ext <<EOF
-#line 10389 "configure"
+#line 10390 "configure"
 #include "confdefs.h"
 
 #include <${cf_cv_ncurses_header-curses.h}>
@@ -10399,7 +10400,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:10403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10404: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_ncurses_broken=no
 else
@@ -10424,13 +10425,13 @@ fi
 
 	
 echo $ac_n "checking if curses supports color attributes""... $ac_c" 1>&6
-echo "configure:10428: checking if curses supports color attributes" >&5
+echo "configure:10429: checking if curses supports color attributes" >&5
 if eval "test \"`echo '$''{'cf_cv_color_curses'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 	cat > conftest.$ac_ext <<EOF
-#line 10434 "configure"
+#line 10435 "configure"
 #include "confdefs.h"
 
 #include <${cf_cv_ncurses_header-curses.h}>
@@ -10445,7 +10446,7 @@ chtype x = COLOR_BLUE;
 	
 ; return 0; }
 EOF
-if { (eval echo configure:10449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   cf_cv_color_curses=yes
 else
@@ -10472,7 +10473,7 @@ fi
 
 	
 echo $ac_n "checking declaration of size-change""... $ac_c" 1>&6
-echo "configure:10476: checking declaration of size-change" >&5
+echo "configure:10477: checking declaration of size-change" >&5
 if eval "test \"`echo '$''{'cf_cv_sizechange'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -10486,7 +10487,7 @@ do
     CFLAGS="$cf_save_CFLAGS"
     test -n "$cf_opts" && CFLAGS="$CFLAGS -D$cf_opts"
     cat > conftest.$ac_ext <<EOF
-#line 10490 "configure"
+#line 10491 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if HAVE_TERMIOS_H
@@ -10525,7 +10526,7 @@ int main() {
 	
 ; return 0; }
 EOF
-if { (eval echo configure:10529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10530: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_sizechange=yes
 else
@@ -10557,20 +10558,20 @@ EOF
 
 	
 echo $ac_n "checking if ttytype is declared in curses library""... $ac_c" 1>&6
-echo "configure:10561: checking if ttytype is declared in curses library" >&5
+echo "configure:10562: checking if ttytype is declared in curses library" >&5
 if eval "test \"`echo '$''{'cf_cv_have_ttytype'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 	cat > conftest.$ac_ext <<EOF
-#line 10567 "configure"
+#line 10568 "configure"
 #include "confdefs.h"
 #include <${cf_cv_ncurses_header-curses.h}>
 int main() {
 char *x = &ttytype[1]; *x = 1
 ; return 0; }
 EOF
-if { (eval echo configure:10574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   cf_cv_have_ttytype=yes
 else
@@ -10598,12 +10599,12 @@ EOF
 	
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:10602: checking for $ac_func" >&5
+echo "configure:10603: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 10607 "configure"
+#line 10608 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -10626,7 +10627,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:10630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -10656,7 +10657,7 @@ fi
 
 
 echo $ac_n "checking if configuration info should be browsable""... $ac_c" 1>&6
-echo "configure:10660: checking if configuration info should be browsable" >&5
+echo "configure:10661: checking if configuration info should be browsable" >&5
 
 # Check whether --enable-config-info or --disable-config-info was given.
 if test "${enable_config_info+set}" = set; then
@@ -10680,7 +10681,7 @@ EOF
 
 
 echo $ac_n "checking if new-style forms-based options screen should be used""... $ac_c" 1>&6
-echo "configure:10684: checking if new-style forms-based options screen should be used" >&5
+echo "configure:10685: checking if new-style forms-based options screen should be used" >&5
 
 # Check whether --enable-forms-options or --disable-forms-options was given.
 if test "${enable_forms_options+set}" = set; then
@@ -10704,7 +10705,7 @@ EOF
 
 
 echo $ac_n "checking if old-style options menu should be used""... $ac_c" 1>&6
-echo "configure:10708: checking if old-style options menu should be used" >&5
+echo "configure:10709: checking if old-style options menu should be used" >&5
 
 # Check whether --enable-menu-options or --disable-menu-options was given.
 if test "${enable_menu_options+set}" = set; then
@@ -10728,7 +10729,7 @@ EOF
 
 
 echo $ac_n "checking if experimental address-list page should be used""... $ac_c" 1>&6
-echo "configure:10732: checking if experimental address-list page should be used" >&5
+echo "configure:10733: checking if experimental address-list page should be used" >&5
 
 # Check whether --enable-addrlist-page or --disable-addrlist-page was given.
 if test "${enable_addrlist_page+set}" = set; then
@@ -10752,7 +10753,7 @@ EOF
 
 
 echo $ac_n "checking if color-style code should be used""... $ac_c" 1>&6
-echo "configure:10756: checking if color-style code should be used" >&5
+echo "configure:10757: checking if color-style code should be used" >&5
 
 # Check whether --enable-color-style or --disable-color-style was given.
 if test "${enable_color_style+set}" = set; then
@@ -10800,7 +10801,7 @@ EOF
 	echo "$ac_t""yes" 1>&6
 
 	echo $ac_n "checking for location of style-sheet file""... $ac_c" 1>&6
-echo "configure:10804: checking for location of style-sheet file" >&5
+echo "configure:10805: checking for location of style-sheet file" >&5
 	LYNX_LSS_FILE=$cf_libdir/lynx.lss
 	cat >> confdefs.h <<EOF
 #define LYNX_LSS_FILE "$LYNX_LSS_FILE"
@@ -10818,7 +10819,7 @@ test ".$ac_cv_func_use_default_colors" = ".yes" && use_dft_colors=maybe
 
 if test "$use_dft_colors" != no ; then
 echo $ac_n "checking if you want to use default-colors""... $ac_c" 1>&6
-echo "configure:10822: checking if you want to use default-colors" >&5
+echo "configure:10823: checking if you want to use default-colors" >&5
 
 # Check whether --enable-default-colors or --disable-default-colors was given.
 if test "${enable_default_colors+set}" = set; then
@@ -10843,7 +10844,7 @@ EOF
 fi
 
 echo $ac_n "checking if experimental file-upload logic should be used""... $ac_c" 1>&6
-echo "configure:10847: checking if experimental file-upload logic should be used" >&5
+echo "configure:10848: checking if experimental file-upload logic should be used" >&5
 
 # Check whether --enable-file-upload or --disable-file-upload was given.
 if test "${enable_file_upload+set}" = set; then
@@ -10867,7 +10868,7 @@ EOF
 
 
 echo $ac_n "checking if experimental keyboard-layout logic should be used""... $ac_c" 1>&6
-echo "configure:10871: checking if experimental keyboard-layout logic should be used" >&5
+echo "configure:10872: checking if experimental keyboard-layout logic should be used" >&5
 
 # Check whether --enable-kbd-layout or --disable-kbd-layout was given.
 if test "${enable_kbd_layout+set}" = set; then
@@ -10891,7 +10892,7 @@ EOF
 
 
 echo $ac_n "checking if experimental JavaScript support should be used""... $ac_c" 1>&6
-echo "configure:10895: checking if experimental JavaScript support should be used" >&5
+echo "configure:10896: checking if experimental JavaScript support should be used" >&5
 
 # Check whether --enable-libjs or --disable-libjs was given.
 if test "${enable_libjs+set}" = set; then
@@ -10915,7 +10916,7 @@ EOF
 
 
 echo $ac_n "checking if html source should be colorized""... $ac_c" 1>&6
-echo "configure:10919: checking if html source should be colorized" >&5
+echo "configure:10920: checking if html source should be colorized" >&5
 
 # Check whether --enable-prettysrc or --disable-prettysrc was given.
 if test "${enable_prettysrc+set}" = set; then
@@ -10939,7 +10940,7 @@ EOF
 
 
 echo $ac_n "checking if source caching should be used""... $ac_c" 1>&6
-echo "configure:10943: checking if source caching should be used" >&5
+echo "configure:10944: checking if source caching should be used" >&5
 
 # Check whether --enable-source-cache or --disable-source-cache was given.
 if test "${enable_source_cache+set}" = set; then
@@ -10966,7 +10967,7 @@ EOF
 
 
 echo $ac_n "checking if alternative line-edit bindings should be used""... $ac_c" 1>&6
-echo "configure:10970: checking if alternative line-edit bindings should be used" >&5
+echo "configure:10971: checking if alternative line-edit bindings should be used" >&5
 
 # Check whether --enable-alt-bindings or --disable-alt-bindings was given.
 if test "${enable_alt_bindings+set}" = set; then
@@ -10990,7 +10991,7 @@ EOF
 
 
 echo $ac_n "checking if you want to use extended HTML DTD logic""... $ac_c" 1>&6
-echo "configure:10994: checking if you want to use extended HTML DTD logic" >&5
+echo "configure:10995: checking if you want to use extended HTML DTD logic" >&5
 
 # Check whether --enable-extended-dtd or --disable-extended-dtd was given.
 if test "${enable_extended_dtd+set}" = set; then
@@ -11014,7 +11015,7 @@ EOF
 
 
 echo $ac_n "checking if partial-display should be used""... $ac_c" 1>&6
-echo "configure:11018: checking if partial-display should be used" >&5
+echo "configure:11019: checking if partial-display should be used" >&5
 
 # Check whether --enable-partial or --disable-partial was given.
 if test "${enable_partial+set}" = set; then
@@ -11038,7 +11039,7 @@ EOF
 
 
 echo $ac_n "checking if you want to use external commands""... $ac_c" 1>&6
-echo "configure:11042: checking if you want to use external commands" >&5
+echo "configure:11043: checking if you want to use external commands" >&5
 
 # Check whether --enable-externs or --disable-externs was given.
 if test "${enable_externs+set}" = set; then
@@ -11062,7 +11063,7 @@ EOF
 
 
 echo $ac_n "checking if you want to use setfont support""... $ac_c" 1>&6
-echo "configure:11066: checking if you want to use setfont support" >&5
+echo "configure:11067: checking if you want to use setfont support" >&5
 
 # Check whether --enable-font-switch or --disable-font-switch was given.
 if test "${enable_font_switch+set}" = set; then
@@ -11086,7 +11087,7 @@ EOF
 
 
 echo $ac_n "checking if you want cgi-link support""... $ac_c" 1>&6
-echo "configure:11090: checking if you want cgi-link support" >&5
+echo "configure:11091: checking if you want cgi-link support" >&5
 
 # Check whether --enable-cgi-links or --disable-cgi-links was given.
 if test "${enable_cgi_links+set}" = set; then
@@ -11105,7 +11106,7 @@ fi
 echo "$ac_t""$enableval" 1>&6
 
 echo $ac_n "checking if you want change-exec support""... $ac_c" 1>&6
-echo "configure:11109: checking if you want change-exec support" >&5
+echo "configure:11110: checking if you want change-exec support" >&5
 
 # Check whether --enable-change-exec or --disable-change-exec was given.
 if test "${enable_change_exec+set}" = set; then
@@ -11124,7 +11125,7 @@ fi
 echo "$ac_t""$enableval" 1>&6
 
 echo $ac_n "checking if you want exec-links support""... $ac_c" 1>&6
-echo "configure:11128: checking if you want exec-links support" >&5
+echo "configure:11129: checking if you want exec-links support" >&5
 
 # Check whether --enable-exec-links or --disable-exec-links was given.
 if test "${enable_exec_links+set}" = set; then
@@ -11143,7 +11144,7 @@ fi
 echo "$ac_t""$enableval" 1>&6
 
 echo $ac_n "checking if you want exec-scripts support""... $ac_c" 1>&6
-echo "configure:11147: checking if you want exec-scripts support" >&5
+echo "configure:11148: checking if you want exec-scripts support" >&5
 
 # Check whether --enable-exec-scripts or --disable-exec-scripts was given.
 if test "${enable_exec_scripts+set}" = set; then
@@ -11162,7 +11163,7 @@ fi
 echo "$ac_t""$enableval" 1>&6
 
 echo $ac_n "checking if you want internal-links feature""... $ac_c" 1>&6
-echo "configure:11166: checking if you want internal-links feature" >&5
+echo "configure:11167: checking if you want internal-links feature" >&5
 
 # Check whether --enable-internal-links or --disable-internal-links was given.
 if test "${enable_internal_links+set}" = set; then
@@ -11186,7 +11187,7 @@ EOF
 
 
 echo $ac_n "checking if you want to fork NSL requests""... $ac_c" 1>&6
-echo "configure:11190: checking if you want to fork NSL requests" >&5
+echo "configure:11191: checking if you want to fork NSL requests" >&5
 
 # Check whether --enable-nsl-fork or --disable-nsl-fork was given.
 if test "${enable_nsl_fork+set}" = set; then
@@ -11210,7 +11211,7 @@ EOF
 
 
 echo $ac_n "checking if you want to log URL requests via syslog""... $ac_c" 1>&6
-echo "configure:11214: checking if you want to log URL requests via syslog" >&5
+echo "configure:11215: checking if you want to log URL requests via syslog" >&5
 
 # Check whether --enable-syslog or --disable-syslog was given.
 if test "${enable_syslog+set}" = set; then
@@ -11234,7 +11235,7 @@ EOF
 
 
 echo $ac_n "checking if persistent-cookie logic should be used""... $ac_c" 1>&6
-echo "configure:11238: checking if persistent-cookie logic should be used" >&5
+echo "configure:11239: checking if persistent-cookie logic should be used" >&5
 
 # Check whether --enable-persistent-cookies or --disable-persistent-cookies was given.
 if test "${enable_persistent_cookies+set}" = set; then
@@ -11258,7 +11259,7 @@ EOF
 
 
 echo $ac_n "checking if you want to underline links""... $ac_c" 1>&6
-echo "configure:11262: checking if you want to underline links" >&5
+echo "configure:11263: checking if you want to underline links" >&5
 
 # Check whether --enable-underlines or --disable-underlines was given.
 if test "${enable_underlines+set}" = set; then
@@ -11282,7 +11283,7 @@ EOF
 
 
 echo $ac_n "checking if help files should be gzip'ed""... $ac_c" 1>&6
-echo "configure:11286: checking if help files should be gzip'ed" >&5
+echo "configure:11287: checking if help files should be gzip'ed" >&5
 
 # Check whether --enable-gzip-help or --disable-gzip-help was given.
 if test "${enable_gzip_help+set}" = set; then
@@ -11311,7 +11312,7 @@ fi
 
 
 echo $ac_n "checking if you want to use zlib for decompression of some gzip files""... $ac_c" 1>&6
-echo "configure:11315: checking if you want to use zlib for decompression of some gzip files" >&5
+echo "configure:11316: checking if you want to use zlib for decompression of some gzip files" >&5
 
 # Check whether --with-zlib or --without-zlib was given.
 if test "${with_zlib+set}" = set; then
@@ -11328,12 +11329,12 @@ if test ".$use_zlib" != ".no" ; then
 	cf_cv_have_lib_z=no
 	cf_libdir=""
 	echo $ac_n "checking for gzopen""... $ac_c" 1>&6
-echo "configure:11332: checking for gzopen" >&5
+echo "configure:11333: checking for gzopen" >&5
 if eval "test \"`echo '$''{'ac_cv_func_gzopen'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 11337 "configure"
+#line 11338 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gzopen(); below.  */
@@ -11356,7 +11357,7 @@ gzopen();
 
 ; return 0; }
 EOF
-if { (eval echo configure:11360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_gzopen=yes"
 else
@@ -11376,17 +11377,17 @@ else
 
 		cf_save_LIBS="$LIBS"
 		echo $ac_n "checking for gzopen in -lz""... $ac_c" 1>&6
-echo "configure:11380: checking for gzopen in -lz" >&5
+echo "configure:11381: checking for gzopen in -lz" >&5
 		LIBS="-lz $LIBS"
 		cat > conftest.$ac_ext <<EOF
-#line 11383 "configure"
+#line 11384 "configure"
 #include "confdefs.h"
 #include <zlib.h>
 int main() {
 gzopen("name","mode")
 ; return 0; }
 EOF
-if { (eval echo configure:11390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
 			 cf_cv_have_lib_z=yes
@@ -11413,17 +11414,17 @@ test "$prefix" != /usr           && cf_search="$cf_search /usr/lib /usr/lib/z"
 			for cf_libdir in $cf_search
 			do
 				echo $ac_n "checking for -lz in $cf_libdir""... $ac_c" 1>&6
-echo "configure:11417: checking for -lz in $cf_libdir" >&5
+echo "configure:11418: checking for -lz in $cf_libdir" >&5
 				LIBS="-L$cf_libdir -lz $cf_save_LIBS"
 				cat > conftest.$ac_ext <<EOF
-#line 11420 "configure"
+#line 11421 "configure"
 #include "confdefs.h"
 #include <zlib.h>
 int main() {
 gzopen("name","mode")
 ; return 0; }
 EOF
-if { (eval echo configure:11427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
 			 		 cf_cv_have_lib_z=yes
@@ -11459,7 +11460,7 @@ EOF
 fi
 
 echo $ac_n "checking if you want to exclude FINGER code""... $ac_c" 1>&6
-echo "configure:11463: checking if you want to exclude FINGER code" >&5
+echo "configure:11464: checking if you want to exclude FINGER code" >&5
 
 # Check whether --enable-finger or --disable-finger was given.
 if test "${enable_finger+set}" = set; then
@@ -11483,7 +11484,7 @@ EOF
 
 
 echo $ac_n "checking if you want to exclude GOPHER code""... $ac_c" 1>&6
-echo "configure:11487: checking if you want to exclude GOPHER code" >&5
+echo "configure:11488: checking if you want to exclude GOPHER code" >&5
 
 # Check whether --enable-gopher or --disable-gopher was given.
 if test "${enable_gopher+set}" = set; then
@@ -11507,7 +11508,7 @@ EOF
 
 
 echo $ac_n "checking if you want to exclude NEWS code""... $ac_c" 1>&6
-echo "configure:11511: checking if you want to exclude NEWS code" >&5
+echo "configure:11512: checking if you want to exclude NEWS code" >&5
 
 # Check whether --enable-news or --disable-news was given.
 if test "${enable_news+set}" = set; then
@@ -11531,7 +11532,7 @@ EOF
 
 
 echo $ac_n "checking if you want to exclude FTP code""... $ac_c" 1>&6
-echo "configure:11535: checking if you want to exclude FTP code" >&5
+echo "configure:11536: checking if you want to exclude FTP code" >&5
 
 # Check whether --enable-ftp or --disable-ftp was given.
 if test "${enable_ftp+set}" = set; then
@@ -11560,7 +11561,7 @@ EOF
 # All DirEd functions that were enabled on compilation can be disabled
 # or modified at run time via DIRED_MENU symbols in lynx.cfg.
 echo $ac_n "checking if directory-editor code should be used""... $ac_c" 1>&6
-echo "configure:11564: checking if directory-editor code should be used" >&5
+echo "configure:11565: checking if directory-editor code should be used" >&5
 
 # Check whether --enable-dired or --disable-dired was given.
 if test "${enable_dired+set}" = set; then
@@ -11586,7 +11587,7 @@ EOF
 
 
 	echo $ac_n "checking if you wish to allow extracting from archives via DirEd""... $ac_c" 1>&6
-echo "configure:11590: checking if you wish to allow extracting from archives via DirEd" >&5
+echo "configure:11591: checking if you wish to allow extracting from archives via DirEd" >&5
 	
 # Check whether --enable-dired-archive or --disable-dired-archive was given.
 if test "${enable_dired_archive+set}" = set; then
@@ -11605,7 +11606,7 @@ fi
 	echo "$ac_t""$enableval" 1>&6
 
 	echo $ac_n "checking if you wish to allow users to redefine DirEd keys""... $ac_c" 1>&6
-echo "configure:11609: checking if you wish to allow users to redefine DirEd keys" >&5
+echo "configure:11610: checking if you wish to allow users to redefine DirEd keys" >&5
 	
 # Check whether --enable-dired-override or --disable-dired-override was given.
 if test "${enable_dired_override+set}" = set; then
@@ -11631,7 +11632,7 @@ fi
 	echo "$ac_t""$enableval" 1>&6
 
 	echo $ac_n "checking if you wish to allow permissions commands via DirEd""... $ac_c" 1>&6
-echo "configure:11635: checking if you wish to allow permissions commands via DirEd" >&5
+echo "configure:11636: checking if you wish to allow permissions commands via DirEd" >&5
 	
 # Check whether --enable-dired-permit or --disable-dired-permit was given.
 if test "${enable_dired_permit+set}" = set; then
@@ -11657,7 +11658,7 @@ fi
 	echo "$ac_t""$enableval" 1>&6
 
 	echo $ac_n "checking if you wish to allow executable-permission commands via DirEd""... $ac_c" 1>&6
-echo "configure:11661: checking if you wish to allow executable-permission commands via DirEd" >&5
+echo "configure:11662: checking if you wish to allow executable-permission commands via DirEd" >&5
 	
 # Check whether --enable-dired-xpermit or --disable-dired-xpermit was given.
 if test "${enable_dired_xpermit+set}" = set; then
@@ -11676,7 +11677,7 @@ fi
 	echo "$ac_t""$enableval" 1>&6
 
 	echo $ac_n "checking if you wish to allow "tar" commands from DirEd""... $ac_c" 1>&6
-echo "configure:11680: checking if you wish to allow "tar" commands from DirEd" >&5
+echo "configure:11681: checking if you wish to allow "tar" commands from DirEd" >&5
 	
 # Check whether --enable-dired-tar or --disable-dired-tar was given.
 if test "${enable_dired_tar+set}" = set; then
@@ -11702,7 +11703,7 @@ fi
 	echo "$ac_t""$enableval" 1>&6
 
 	echo $ac_n "checking if you wish to allow "uudecode" commands from DirEd""... $ac_c" 1>&6
-echo "configure:11706: checking if you wish to allow "uudecode" commands from DirEd" >&5
+echo "configure:11707: checking if you wish to allow "uudecode" commands from DirEd" >&5
 	
 # Check whether --enable-dired-uudecode or --disable-dired-uudecode was given.
 if test "${enable_dired_uudecode+set}" = set; then
@@ -11728,7 +11729,7 @@ fi
 	echo "$ac_t""$enableval" 1>&6
 
 	echo $ac_n "checking if you wish to allow "zip" and "unzip" commands from DirEd""... $ac_c" 1>&6
-echo "configure:11732: checking if you wish to allow "zip" and "unzip" commands from DirEd" >&5
+echo "configure:11733: checking if you wish to allow "zip" and "unzip" commands from DirEd" >&5
 	
 # Check whether --enable-dired-zip or --disable-dired-zip was given.
 if test "${enable_dired_zip+set}" = set; then
@@ -11754,7 +11755,7 @@ fi
 	echo "$ac_t""$enableval" 1>&6
 
 	echo $ac_n "checking if you wish to allow "gzip" and "gunzip" commands from DirEd""... $ac_c" 1>&6
-echo "configure:11758: checking if you wish to allow "gzip" and "gunzip" commands from DirEd" >&5
+echo "configure:11759: checking if you wish to allow "gzip" and "gunzip" commands from DirEd" >&5
 	
 # Check whether --enable-dired-gzip or --disable-dired-gzip was given.
 if test "${enable_dired_gzip+set}" = set; then
@@ -11781,7 +11782,7 @@ fi
 fi
 
 echo $ac_n "checking if you want long-directory listings""... $ac_c" 1>&6
-echo "configure:11785: checking if you want long-directory listings" >&5
+echo "configure:11786: checking if you want long-directory listings" >&5
 
 # Check whether --enable-long-list or --disable-long-list was given.
 if test "${enable_long_list+set}" = set; then
@@ -11807,7 +11808,7 @@ fi
 echo "$ac_t""$enableval" 1>&6
 
 echo $ac_n "checking if parent-directory references are permitted""... $ac_c" 1>&6
-echo "configure:11811: checking if parent-directory references are permitted" >&5
+echo "configure:11812: checking if parent-directory references are permitted" >&5
 
 # Check whether --enable-parent-dir-refs or --disable-parent-dir-refs was given.
 if test "${enable_parent_dir_refs+set}" = set; then
@@ -11827,7 +11828,7 @@ echo "$ac_t""$enableval" 1>&6
 
 
 echo $ac_n "checking if we can include termio.h with curses""... $ac_c" 1>&6
-echo "configure:11831: checking if we can include termio.h with curses" >&5
+echo "configure:11832: checking if we can include termio.h with curses" >&5
 if eval "test \"`echo '$''{'cf_cv_termio_and_curses'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -11836,7 +11837,7 @@ else
     CFLAGS="$CFLAGS -DHAVE_CONFIG_H -I. -I${srcdir-.} -I${srcdir-.}/src -I${srcdir-.}/WWW/Library/Implementation"
     touch lynx_cfg.h
     cat > conftest.$ac_ext <<EOF
-#line 11840 "configure"
+#line 11841 "configure"
 #include "confdefs.h"
 
 #include <LYCurses.h>
@@ -11845,7 +11846,7 @@ int main() {
 putchar(0x0a)
 ; return 0; }
 EOF
-if { (eval echo configure:11849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:11850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_termio_and_curses=yes
 else
diff --git a/configure.in b/configure.in
index d75577e5..721a1a2c 100644
--- a/configure.in
+++ b/configure.in
@@ -488,6 +488,7 @@ AC_CHECK_FUNCS( \
 	putenv \
 	readdir \
 	strerror \
+	truncate \
 	unsetenv \
 	waitpid \
 )
diff --git a/docs/README.defines b/docs/README.defines
index 33e391b0..982447e0 100644
--- a/docs/README.defines
+++ b/docs/README.defines
@@ -104,7 +104,7 @@ Related to *experimental* (unsupported) character style code
 Other general
 -------------
 # -DDONT_TRACK_INTERNAL_LINKS - Handle following links to same doc differently.
-# -DEXP_CHARTRANS_AUTOSWITCH (see INSTALLATION, Section II-1c) 
+# -DEXP_CHARTRANS_AUTOSWITCH (see INSTALLATION, Section II-1c)
 # -DIGNORE_CTRL_C  Define if Control-C shouldn't exit lynx.
 # -DLY_FIND_LEAKS  (see INSTALLATION, Section II-1c)
 # -DNO_CPU_LIMIT   Disables Max CPU timeout (includes CLOCKS_PER_SECOND)
@@ -126,17 +126,20 @@ Defined in the source files to which they apply.  Only filenames are listed,
 the files would have to be read and edited anyway to change the definition.
 Normally installers shouldn't have to care about any of these symbols.
 
-SOCKET_DEBUG_TRACE			HTTCP.c
+ADVANCED_INFO				LYShowInfo.c
+CHECK_FREE_MEM				GridText.c
 DEBUG_HOSTENT				HTTCP.c
 DEBUG_HOSTENT_CHILD			HTTCP.c
+DEFAULT_INVCHECK_BV			LYCookie.c
 DUPLICATE_ANCHOR_NAME_WORKAROUND	HTAnchor.c
-reverse_mailcap				HTInit.c
 EXTENDED_OPTION_LOGIC			LYMain.c
 EXTENDED_STARTFILE_RECALL		LYMain.c
-reverse_mailcap				HTInit.c
-ADVANCED_INFO				LYShowInfo.c
-CHECK_FREE_MEM				GridText.c
+OPTNAME_ALLOW_DASHES			LYMain.c
+RESTRICT_NM_ALLOW_DASHES		LYUtils.c
+SOCKET_DEBUG_TRACE			HTTCP.c
+max_cookies_buffer			LYCookie.c
 max_cookies_domain			LYCookie.c
 max_cookies_global			LYCookie.c
-max_cookies_buffer			LYCookie.c
-DEFAULT_INVCHECK_BV			LYCookie.c
+reverse_mailcap				HTInit.c
+reverse_mailcap				HTInit.c
+
diff --git a/lib/dirent.c b/lib/dirent.c
new file mode 100644
index 00000000..5f31686e
--- /dev/null
+++ b/lib/dirent.c
@@ -0,0 +1,277 @@
+/* 
+   dir.c for MS-DOS by Samuel Lam <skl@van-bc.UUCP>, June/87 
+ */
+
+/* #ifdef WIN32 */
+/* 
+ * @(#)dir.c 1.4 87/11/06 Public Domain. 
+ * 
+ *  A public domain implementation of BSD directory routines for 
+ *  MS-DOS.  Written by Michael Rendell ({uunet,utai}michael@garfield), 
+ *  August 1897 
+ *  Ported to OS/2 by Kai Uwe Rommel 
+ *  December 1989, February 1990 
+ *  Ported to Windows NT 22 May 91 
+ *    other mods Summer '92 brianmo@microsoft.com 
+ *  opendirx() was horribly written, very inefficient, and did not take care
+ *    of all cases.  It is still not too clean, but it is far more efficient.
+ *    Changes made by Gordon Chaffee (chaffee@bugs-bunny.cs.berkeley.edu)
+ */
+
+
+/*Includes: 
+ *    crt 
+ */
+#include <windows.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys\types.h>
+#include <sys\stat.h>
+#include "dirent.h"
+
+#define stat _stat
+
+/* 
+ *    NT specific 
+ */
+#include <stdio.h>
+
+/* 
+ *    random typedefs 
+ */
+#define HDIR        HANDLE
+#define HFILE       HANDLE
+#define PHFILE      PHANDLE
+
+/* 
+ *    local functions 
+ */
+static char *getdirent(char *);
+static void free_dircontents(struct _dircontents *);
+
+static HDIR FindHandle;
+static WIN32_FIND_DATA FileFindData;
+
+static struct dirent dp;
+
+DIR *opendirx(char *name, char *pattern)
+{
+    struct stat statb;
+    DIR *dirp;
+    char c;
+    char *s;
+    struct _dircontents *dp;
+    int len;
+    int unc;
+    char path[OFS_MAXPATHNAME];
+    register char *ip, *op;
+
+    for (ip = name, op = path;; op++, ip++) {
+	*op = *ip;
+	if (*ip == '\0') {
+	    break;
+	}
+    }
+    len = ip - name;
+    if (len > 0) {
+	unc = ((path[0] == '\\' || path[0] == '/') &&
+	       (path[1] == '\\' || path[1] == '/'));
+	c = path[len - 1];
+	if (unc) {
+	    if (c != '\\' && c != '/') {
+		path[len] = '/';
+		len++;
+		path[len] = '\0';
+	    }
+	} else {
+	    if ((c == '\\' || c == '/') && (len > 1)) {
+		len--;
+		path[len] = '\0';
+
+		if (path[len - 1] == ':') {
+		    path[len] = '/';
+		    len++;
+		    path[len] = '.';
+		    len++;
+		    path[len] = '\0';
+		}
+	    } else if (c == ':') {
+		path[len] = '.';
+		len++;
+		path[len] = '\0';
+	    }
+	}
+    } else {
+	unc = 0;
+	path[0] = '.';
+	path[1] = '\0';
+	len = 1;
+    }
+
+    if (stat(path, &statb) < 0 || (statb.st_mode & S_IFMT) != S_IFDIR) {
+	return NULL;
+    }
+    dirp = malloc(sizeof(DIR));
+    if (dirp == NULL) {
+	return dirp;
+    }
+    c = path[len - 1];
+    if (c == '.') {
+	if (len == 1) {
+	    len--;
+	} else {
+	    c = path[len - 2];
+	    if (c == '\\' || c == ':') {
+		len--;
+	    } else {
+		path[len] = '/';
+		len++;
+	    }
+	}
+    } else if (!unc && ((len != 1) || (c != '\\' && c != '/'))) {
+	path[len] = '/';
+	len++;
+    }
+    strcpy(path + len, pattern);
+
+    dirp->dd_loc = 0;
+    dirp->dd_contents = dirp->dd_cp = NULL;
+
+    if ((s = getdirent(path)) == NULL) {
+	return dirp;
+    }
+    do {
+	if (((dp = malloc(sizeof(struct _dircontents))) == NULL) ||
+	     ((dp->_d_entry = malloc(strlen(s) + 1)) == NULL)) {
+	    if (dp)
+		free(dp);
+	    free_dircontents(dirp->dd_contents);
+
+	    return NULL;
+	}
+	if (dirp->dd_contents)
+	    dirp->dd_cp = dirp->dd_cp->_d_next = dp;
+	else
+	    dirp->dd_contents = dirp->dd_cp = dp;
+
+	strcpy(dp->_d_entry, s);
+	dp->_d_next = NULL;
+
+    }
+    while ((s = getdirent(NULL)) != NULL);
+
+    dirp->dd_cp = dirp->dd_contents;
+    return dirp;
+}
+
+DIR *opendir(char *name)
+{
+    return opendirx(name, "*");
+}
+
+void closedir(DIR * dirp)
+{
+    free_dircontents(dirp->dd_contents);
+    free(dirp);
+}
+
+struct dirent *readdir(DIR * dirp)
+{
+    /* static struct dirent dp; */
+    if (dirp->dd_cp == NULL)
+	return NULL;
+
+    /*strcpy(dp.d_name,dirp->dd_cp->_d_entry); */
+
+    dp.d_name = dirp->dd_cp->_d_entry;
+
+    dp.d_namlen = dp.d_reclen =
+	strlen(dp.d_name);
+
+    dp.d_ino = dirp->dd_loc + 1;	/* fake the inode */
+
+    dirp->dd_cp = dirp->dd_cp->_d_next;
+    dirp->dd_loc++;
+
+
+    return &dp;
+}
+
+void seekdir(DIR * dirp, long off)
+{
+    long i = off;
+    struct _dircontents *dp;
+
+    if (off >= 0) {
+	for (dp = dirp->dd_contents; --i >= 0 && dp; dp = dp->_d_next);
+
+	dirp->dd_loc = off - (i + 1);
+	dirp->dd_cp = dp;
+    }
+}
+
+
+long telldir(DIR * dirp)
+{
+    return dirp->dd_loc;
+}
+
+static void free_dircontents(struct _dircontents *dp)
+{
+    struct _dircontents *odp;
+
+    while (dp) {
+	if (dp->_d_entry)
+	    free(dp->_d_entry);
+
+	dp = (odp = dp)->_d_next;
+	free(odp);
+    }
+}
+/* end of "free_dircontents" */
+
+static char *getdirent(char *dir)
+{
+    int got_dirent;
+
+    if (dir != NULL) {		/* get first entry */
+	if ((FindHandle = FindFirstFile(dir, &FileFindData))
+	    == (HDIR) 0xffffffff) {
+	    return NULL;
+	}
+	got_dirent = 1;
+    } else			/* get next entry */
+	got_dirent = FindNextFile(FindHandle, &FileFindData);
+
+    if (got_dirent)
+	return FileFindData.cFileName;
+    else {
+	FindClose(FindHandle);
+	return NULL;
+    }
+}
+/* end of getdirent() */
+
+struct passwd *_cdecl
+ getpwnam(char *name)
+{
+    return NULL;
+}
+
+struct passwd *_cdecl
+ getpwuid(int uid)
+{
+    return NULL;
+}
+
+int getuid()
+{
+    return 0;
+}
+
+void _cdecl
+ endpwent(void)
+{
+}
+
+/* #endif */
diff --git a/lib/dirent.h b/lib/dirent.h
new file mode 100644
index 00000000..c0852a17
--- /dev/null
+++ b/lib/dirent.h
@@ -0,0 +1,56 @@
+/* 
+ * @(#) dirent.h 2.0 17 Jun 91   Public Domain. 
+ * 
+ *  A public domain implementation of BSD directory routines for 
+ *  MS-DOS.  Written by Michael Rendell ({uunet,utai}michael@garfield), 
+ *  August 1987 
+ * 
+ *  Enhanced and ported to OS/2 by Kai Uwe Rommel; added scandir() prototype 
+ *  December 1989, February 1990 
+ *  Change of MAXPATHLEN for HPFS, October 1990 
+ *   
+ *  Unenhanced and ported to Windows NT by Bill Gallagher 
+ *  17 Jun 91 
+ *  changed d_name to char * instead of array, removed non-std extensions 
+ *  
+ *  Cleanup, other hackery, Summer '92, Brian Moran , brianmo@microsoft.com 
+ */ 
+
+#ifndef _DIRENT
+#define _DIRENT
+
+#include <direct.h>
+
+struct dirent 
+{ 
+    ino_t    d_ino;                   /* a bit of a farce */ 
+    short    d_reclen;                /* more farce */ 
+    short    d_namlen;                /* length of d_name */ 
+    char    *d_name;
+}; 
+ 
+struct _dircontents 
+{ 
+    char *_d_entry; 
+    struct _dircontents *_d_next; 
+}; 
+ 
+typedef struct _dirdesc 
+{ 
+    int  dd_id;			   /* uniquely identify each open directory*/ 
+    long dd_loc;			/* where we are in directory entry */ 
+    struct _dircontents *dd_contents;	/* pointer to contents of dir */ 
+    struct _dircontents *dd_cp;		/* pointer to current position */ 
+} 
+DIR; 
+ 
+extern DIR *opendir(char *); 
+extern struct dirent *readdir(DIR *); 
+extern void seekdir(DIR *, long); 
+extern long telldir(DIR *); 
+extern void closedir(DIR *); 
+#define rewinddir(dirp) seekdir(dirp, 0L) 
+
+#endif /* _DIRENT */
+
+/* end of dirent.h */ 
diff --git a/lynx.cfg b/lynx.cfg
index 31294557..b89068e0 100644
--- a/lynx.cfg
+++ b/lynx.cfg
@@ -955,7 +955,7 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html
 # COOKIE_FILE is the default file from which persistent cookies are read
 # at startup (if the file exists), and into which persistent cookies are
 # stored before exiting, if Lynx was compiled with EXP_PERSISTENT_COOKIES.
-# The cookie file can also be specified in .lynxrc or on the commandline.
+# The cookie file can also be specified in .lynxrc or on the command line.
 #COOKIE_FILE:~/.lynx_cookies
 
 # PERSISTENT_COOKIES indicates that cookies should be stored for use between
@@ -2209,3 +2209,20 @@ MINIMAL_COMMENTS:TRUE
 #HTMLSRC_TAGNAME_XFORM:2
 #HTMLSRC_ATTRNAME_XFORM:2
 
+# FORCE_EMPTY_HREFLESS_A - HTML parsing
+# This option mirrors command-line option with the same name.  Default is
+# FALSE.  If true, then any 'A' element without HREF will be closed
+# immediately.  This is useful when viewing documentation produced by broken
+# translator that doesn't emit balanced A elements.  If lynx was compiled with
+# color styles, setting this option to TRUE will make lynx screen much more
+# reasonable (otherwise all text will probably have color corresponding to the
+# A element).
+#
+#FORCE_EMPTY_HREFLESS_A:FALSE
+
+# JUSTIFY - Appearance
+# This option mirrors command-line option with same name.  Default is TRUE.  If
+# true, most of text (except headers and like this) will be justified.  This
+# has no influence on CJK text rendering.
+#
+#JUSTIFY:TRUE
diff --git a/lynx.hlp b/lynx.hlp
index fcfac894..ba3ebe18 100644
--- a/lynx.hlp
+++ b/lynx.hlp
@@ -34,21 +34,26 @@
        "?"   or  "H"  while  running  Lynx.  Then follow the link
        titled, "Help on URLs."
 
-       -      If the argument is only '-', then Lynx  expects  to
+       Lynx uses only long option names. Option names  can  begin
+       with  double  dash  as well, underscores and dashes can be
+       intermixed in option names (in the reference below options
+       are with one dash before them and with underscores).
+
+       -      If  the  argument is only '-', then Lynx expects to
               receive the arguments from stdin.  This is to allow
               for the potentially very long command line that can
-              be  associated  with  the  -get_data  or -post_data
-              arguments (see below).  It  can  also  be  used  to
-              avoid  having sensitive information in the invoking
-              command line  (which  would  be  visible  to  other
-              processes  on  most  systems),  especially when the
+              be associated  with  the  -get_data  or  -post_data
+              arguments  (see  below).   It  can  also be used to
+              avoid having sensitive information in the  invoking
+              command  line  (which  would  be  visible  to other
+              processes on most  systems),  especially  when  the
               -auth or -pauth options are used.
 
        -accept_all_cookies
               accept all cookies.
 
        -anonymous
-              apply restrictions for anonymous account, see  also
+              apply  restrictions for anonymous account, see also
               -restrictions.
 
        -assume_charset=MIMEname
@@ -61,58 +66,58 @@
               use this instead of unrecognized charsets.
 
        -auth=ID:PASSWD
-              set  authorization  ID  and  password for protected
-              documents at  startup.   Be  sure  to  protect  any
+              set authorization ID  and  password  for  protected
+              documents  at  startup.   Be  sure  to  protect any
               script files which use this switch.
 
-       -base  prepend  a  request  URL  comment  and  BASE tag to
+       -base  prepend a request  URL  comment  and  BASE  tag  to
               text/html outputs for -source dumps.
 
-       -blink forces high intensity bg colors for color mode,  if
-              available  and  supported  by  the  terminal.  Lynx
-              needs to be compiled with  the  slang  library  for
+       -blink forces  high intensity bg colors for color mode, if
+              available and  supported  by  the  terminal.   Lynx
+              needs  to  be  compiled  with the slang library for
               this flag.
 
        -book  use  the  bookmark  page  as  the  startfile.   The
-              default or command line startfile is still set  for
-              the  Main  screen  command, and will be used if the
+              default  or command line startfile is still set for
+              the Main screen command, and will be  used  if  the
               bookmark page is unavailable or blank.
 
        -buried_news
-              toggles  scanning  of  news  articles  for   buried
-              references,  and  converts them to news links.  Not
-              recommended because  email  addresses  enclosed  in
-              angle  brackets  will  be  converted  to false news
+              toggles   scanning  of  news  articles  for  buried
+              references, and converts them to news  links.   Not
+              recommended  because  email  addresses  enclosed in
+              angle brackets will  be  converted  to  false  news
               links, and uuencoded messages can be trashed.
 
        -cache=NUMBER
-              set the NUMBER of documents cached in memory.   The
+              set  the NUMBER of documents cached in memory.  The
               default is 10.
 
        -case  enable case-sensitive string searching.
 
        -cfg=FILENAME
-              specifies  a Lynx configuration file other than the
+              specifies a Lynx configuration file other than  the
               default lynx.cfg.
 
-       -child exit on left-arrow in startfile, and  disable  save
+       -child exit  on  left-arrow in startfile, and disable save
               to disk.
 
-       -color forces  color mode on, if available.  Default color
-              control sequences  which  work  for  many  terminal
-              types   are  assumed  if  the  terminal  capability
-              description does not specify how to  handle  color.
-              Lynx  needs  to  be compiled with the slang library
-              for this flag, it  is  equivalent  to  setting  the
-              COLORTERM  environment variable.  (If color support
+       -color forces color mode on, if available.  Default  color
+              control  sequences  which  work  for  many terminal
+              types  are  assumed  if  the  terminal   capability
 
+              description  does  not specify how to handle color.
+              Lynx needs to be compiled with  the  slang  library
+              for  this  flag,  it  is  equivalent to setting the
+              COLORTERM environment variable.  (If color  support
               is  instead  provided  by  a  color-capable  curses
               library like ncurses, Lynx relies completely on the
-              terminal description  to  determine  whether  color
-              mode  is  possible, and this flag is not needed and
-              thus  unavailable.)   A   saved   show_color=always
-              setting  found in a .lynxrc file at startup has the
-              same effect.  A saved  show_color=always  found  in
+              terminal  description  to  determine  whether color
+              mode is possible, and this flag is not  needed  and
+              thus   unavailable.)    A  saved  show_color=always
+              setting found in a .lynxrc file at startup has  the
+              same  effect.   A  saved  show_color=never found in
               .lynxrc on startup is overridden by this flag.
 
        -cookies
@@ -123,8 +128,8 @@
 
        -core  toggles forced core dumps on fatal errors.
 
-       -crawl with  -traversal, output each page to a file.  with
-              -dump, format output as  with  -traversal,  but  to
+       -crawl with -traversal, output each page to a file.   with
+              -dump,  format  output  as  with -traversal, but to
               stdout.
 
        -debug_partial
@@ -133,6 +138,10 @@
        -display=DISPLAY
               set the display variable for X rexec-ed programs.
 
+       -dont_wrap_pre
+              inhibit wrapping of text in  <pre>  when  -dump'ing
+              and -crawl'ing.
+
        -dump  dumps  the formatted output of the default document
               or one specified on the command  line  to  standard
               output.  This can be used in the following way:
@@ -162,8 +171,12 @@
               include  all  versions  of  files  in   local   VMS
               directory listings.
 
+       -force_empty_hrefless_a
+              force  HREF-less  'A'  elements  to be empty (close
+              them as soon as they are seen).
+
        -force_html
-              forces  the  first  document  to  be interpreted as
+              forces the first  document  to  be  interpreted  as
               HTML.
 
        -force_secure
@@ -188,18 +201,18 @@
               control the display of hidden links.
 
               merge hidden links show up as bracketed numbers and
-              are  numbered  together  with  other  links  in the
+              are numbered  together  with  other  links  in  the
               sequence of their occurrence in the document.
 
-              listonly hidden  links  are  shown  only  on  L)ist
+              listonly  hidden  links  are  shown  only  on L)ist
               screens and listings generated by -dump or from the
-              P)rint menu, but appear separately at  the  end  of
+              P)rint  menu,  but  appear separately at the end of
               those lists.  This is the default behavior.
 
               ignore hidden links do not appear even in listings.
 
        -historical
-              toggles use of '>' or '-->'  as  a  terminator  for
+              toggles  use  of  '>'  or '-->' as a terminator for
               comments.
 
        -homepage=URL
@@ -211,9 +224,12 @@
        -index=URL
               set the default index file to the specified URL.
 
-       -ismap toggles  inclusion  of ISMAP links when client-side
+       -ismap toggles inclusion of ISMAP links  when  client-side
               MAPs are present.
 
+       -justify
+              do justification of text.
+
        -link=NUMBER
               starting  count  for  lnk#.dat  files  produced  by
               -crawl.
@@ -222,12 +238,12 @@
               disable URLs that point to remote hosts.
 
        -locexec
-              enable  local  program  execution  from local files
-              only (if Lynx was  compiled  with  local  execution
+              enable local program  execution  from  local  files
+              only  (if  Lynx  was  compiled with local execution
               enabled).
 
        -mime_header
-              prints  the MIME header of a fetched document along
+              prints the MIME header of a fetched document  along
               with its source.
 
        -minimal
@@ -237,25 +253,25 @@
               number of articles in chunked news listings.
 
        -newsmaxchunk=NUMBER
-              maximum news articles in listings before  chunking.
+              maximum  news articles in listings before chunking.
 
        -nobrowse
               disable directory browsing.
 
-       -nocc  disable  Cc:  prompts  for self copies of mailings.
-              Note that this does not disable any CCs  which  are
+       -nocc  disable Cc: prompts for self  copies  of  mailings.
+              Note  that  this does not disable any CCs which are
               incorporated within a mailto URL or form ACTION.
 
        -nocolor
               force   color   mode   off,   overriding   terminal
-              capabilities  and  any  -color   flags,   COLORTERM
+              capabilities   and   any  -color  flags,  COLORTERM
               variable, and saved .lynxrc settings.
 
        -noexec
               disable local program execution. (DEFAULT)
 
        -nofilereferer
-              disable  transmissions  of Referer headers for file
+              disable transmissions of Referer headers  for  file
               URLs.
 
        -nolist
@@ -265,10 +281,10 @@
               owners.
 
        -nonrestarting_sigwinch
-              This  flag  is  not  available on all systems, Lynx
-              needs to be compiled with  HAVE_SIGACTION  defined.
-              If  available,  this  flag  may cause Lynx to react
-              more immediately to window changes when run  within
+              This flag is not available  on  all  systems,  Lynx
+              needs  to  be compiled with HAVE_SIGACTION defined.
+              If available, this flag may  cause  Lynx  to  react
+              more  immediately to window changes when run within
               an xterm.
 
        -nopause
@@ -301,23 +317,23 @@
               with partial-display logic
 
        -pauth=ID:PASSWD
-              set  authorization  ID and password for a protected
-              proxy server at startup.  Be sure  to  protect  any
+              set authorization ID and password for  a  protected
+              proxy  server  at  startup.  Be sure to protect any
               script files which use this switch.
 
-       -popup toggles  handling  of  single-choice SELECT options
+       -popup toggles handling of  single-choice  SELECT  options
               via popup windows or as lists of radio buttons.
 
        -post_data
-              send form data from stdin  using  POST  method  and
+              send  form  data  from  stdin using POST method and
               dump results.
 
        -preparsed
-              show  HTML  source  preparsed  and reformatted when
+              show HTML source  preparsed  and  reformatted  when
               used with -source or in source view.
 
        -prettysrc
-              show HTML source view  with  lexical  elements  and
+              show  HTML  source  view  with lexical elements and
               tags in color.
 
        -print enable print functions. (default)
@@ -325,8 +341,8 @@
        -pseudo_inlines
               toggles pseudo-ALTs for inlines with no ALT string.
 
-       -raw   toggles  default   setting   of   8-bit   character
-              translations  or CJK mode for the startup character
+       -raw   toggles   default   setting   of   8-bit  character
+              translations or CJK mode for the startup  character
               set.
 
        -realm restricts access to URLs in the starting realm.
@@ -336,9 +352,10 @@
               document affected).
 
        -restrictions=[option][,option][,option]...
-              allows   a   list   of   services  to  be  disabled
-              selectively.  The following list is printed  if  no
-              options are specified.
+              allows  a  list  of   services   to   be   disabled
+              selectively. Dashes and underscores in option names
+              can be intermixed. The following list is printed if
+              no options are specified.
 
               all - restricts all options listed below.
 
@@ -376,6 +393,7 @@
               restriction).
 
               editor - disallow external editing.
+
               exec - disable execution scripts.
 
               exec_frozen  -  disallow the user from changing the
@@ -521,6 +539,7 @@
               turn on mouse support, if available.  Clicking  the
               left mouse button on a link traverses it.  Clicking
               the right mouse button pops back.  Click on the top
+
               line  to  scroll  up.   Click on the bottom line to
               scroll down.  The first few positions  in  the  top
               and  bottom  line  may invoke additional functions.
@@ -551,206 +570,211 @@
               number of columns for formatting of dumps,  default
               is 80.
 
+       -with_backspaces
+              emit  backspaces in output if -dumping or -crawling
+              (like 'man' does)
+
 2 COMMANDS
-       o  Use Up arrow and Down arrow to scroll through hypertext
+       o Use Up arrow and Down arrow to scroll through  hypertext
        links.
-       o  Right  arrow  or  Return  will  follow  a   highlighted
+       o   Right  arrow  or  Return  will  follow  a  highlighted
        hypertext link.
        o Left Arrow will retreat from a link.
        o Type "H" or "?" for online help and descriptions of key-
        stroke commands.
-       o Type "K" for a complete list of the  current  key-stroke
+       o  Type  "K" for a complete list of the current key-stroke
        command mappings.
 
 2 ENVIRONMENT
-       In  addition  to  various "standard" environment variables
-       such as HOME,  PATH,  USER,  DISPLAY,  TMPDIR,  etc,  Lynx
-       utilizes  several  Lynx-specific environment variables, if
+       In addition to various  "standard"  environment  variables
+       such  as  HOME,  PATH,  USER,  DISPLAY,  TMPDIR, etc, Lynx
+       utilizes several Lynx-specific environment  variables,  if
        they exist.
 
-       Others may be created or modified by Lynx to pass data  to
-       an  external  program,  or  for  other reasons.  These are
+       Others  may be created or modified by Lynx to pass data to
+       an external program, or  for  other  reasons.   These  are
        listed separately below.
 
-       See also the sections on SIMULATED CGI SUPPORT and  NATIVE
+       See  also the sections on SIMULATED CGI SUPPORT and NATIVE
        LANGUAGE SUPPORT, below.
 
        Note:  Not all environment variables apply to all types of
-       platforms supported by Lynx, though most do.  Feedback  on
+       platforms  supported by Lynx, though most do.  Feedback on
        platform dependencies is solicited.
 
        Environment Variables Used By Lynx:
 
-       COLORTERM           If   set,  color  capability  for  the
+       COLORTERM           If  set,  color  capability  for   the
                            terminal is forced on at startup time.
-                           The   actual  value  assigned  to  the
+                           The  actual  value  assigned  to   the
                            variable is ignored.  This variable is
                            only  meaningful  if  Lynx  was  built
-                           using   the   slang    screen-handling
+                           using    the   slang   screen-handling
                            library.
 
-       LYNX_CFG            This  variable,  if set, will override
-                           the default location and name  of  the
-                           global  configuration  file (normally,
+       LYNX_CFG            This variable, if set,  will  override
+                           the  default  location and name of the
+                           global configuration  file  (normally,
                            lynx.cfg)  that  was  defined  by  the
                            LYNX_CFG_FILE    constant    in    the
-                           userdefs.h file, during  installation.
-                           See   the  userdefs.h  file  for  more
+                           userdefs.h  file, during installation.
+                           See  the  userdefs.h  file  for   more
                            information.
 
-       LYNX_LSS            This variable, if set,  specifies  the
+       LYNX_LSS            This  variable,  if set, specifies the
                            location of the default Lynx character
                            style  sheet  file.   [Currently  only
-                           meaningful  if  Lynx  was  built using
+                           meaningful if  Lynx  was  built  using
                            experimental color style support.]
 
-       LYNX_SAVE_SPACE     This variable, if set,  will  override
+       LYNX_SAVE_SPACE     This  variable,  if set, will override
                            the  default  path  prefix  for  files
-                           saved to disk that is defined  in  the
-                           lynx.cfg  SAVE_SPACE:  statement.  See
+                           saved  to  disk that is defined in the
+                           lynx.cfg SAVE_SPACE:  statement.   See
                            the    lynx.cfg    file    for    more
                            information.
 
-       LYNX_TEMP_SPACE     This  variable,  if set, will override
-                           the default path prefix for  temporary
-                           files    that   was   defined   during
-                           installation, as  well  as  any  value
-                           that  may  be  assigned  to the TMPDIR
+       LYNX_TEMP_SPACE     This variable, if set,  will  override
+                           the  default path prefix for temporary
+                           files   that   was   defined    during
+                           installation,  as  well  as  any value
+                           that may be  assigned  to  the  TMPDIR
                            variable.
 
-       MAIL                This variable  specifies  the  default
+       MAIL                This  variable  specifies  the default
                            inbox Lynx will check for new mail, if
-                           such  checking  is  enabled   in   the
+                           such   checking   is  enabled  in  the
                            lynx.cfg file.
 
-       NEWS_ORGANIZATION   This  variable,  if  set, provides the
-                           string  used  in   the   Organization:
-                           header  of  USENET  news postings.  It
-                           will  override  the  setting  of   the
-                           ORGANIZATION  environment variable, if
-                           it is also  set  (and,  on  UNIX,  the
+       NEWS_ORGANIZATION   This variable, if  set,  provides  the
+                           string   used   in  the  Organization:
+                           header of USENET  news  postings.   It
+
+                           will   override  the  setting  of  the
+                           ORGANIZATION environment variable,  if
+                           it  is  also  set  (and,  on UNIX, the
                            contents of an /etc/organization file,
                            if present).
 
-       NNTPSERVER          If set, this  variable  specifies  the
-                           default  NNTP server that will be used
-                           for USENET news  reading  and  posting
+       NNTPSERVER          If  set,  this  variable specifies the
+                           default NNTP server that will be  used
+                           for  USENET  news  reading and posting
                            with Lynx, via news: URL's.
 
-       ORGANIZATION        This  variable,  if  set, provides the
-                           string  used  in   the   Organization:
-                           header  of  USENET  news postings.  On
+       ORGANIZATION        This variable, if  set,  provides  the
+                           string   used   in  the  Organization:
+                           header of USENET  news  postings.   On
                            UNIX, it will override the contents of
                            an /etc/organization file, if present.
 
        PROTOCOL_proxy      Lynx supports the use of proxy servers
-                           that  can act as firewall gateways and
-
-                           caching servers.  They are  preferable
+                           that can act as firewall gateways  and
+                           caching  servers.  They are preferable
                            to  the  older  gateway  servers  (see
-                           WWW_access_GATEWAY,   below).     Each
-                           protocol  used  by  Lynx,  (http, ftp,
+                           WWW_access_GATEWAY,    below).    Each
+                           protocol used  by  Lynx,  (http,  ftp,
                            gopher, etc), can be mapped separately
-                           by  setting  environment  variables of
+                           by setting  environment  variables  of
                            the  form  PROTOCOL_proxy  (literally:
                            http_proxy,  ftp_proxy,  gopher_proxy,
                            etc),                               to
                            "http://some.server.dom:port/".    See
-                           Lynx  Users   Guide   for   additional
+                           Lynx   Users   Guide   for  additional
                            details and examples.
 
-       WWW_access_GATEWAY  Lynx  still  supports  use  of gateway
-                           servers, with  the  servers  specified
+       WWW_access_GATEWAY  Lynx still  supports  use  of  gateway
+                           servers,  with  the  servers specified
                            via   "WWW_access_GATEWAY"   variables
-                           (where "access" is lower case and  can
+                           (where  "access" is lower case and can
                            be "http", "ftp", "gopher" or "wais"),
                            however most gateway servers have been
-                           discontinued.   Note  that  you do not
-                           include a terminal '/'  for  gateways,
-                           but   do   for  proxies  specified  by
-                           PROTOCOL_proxy environment  variables.
+                           discontinued.  Note that  you  do  not
+                           include  a  terminal '/' for gateways,
+                           but  do  for  proxies   specified   by
+                           PROTOCOL_proxy  environment variables.
                            See Lynx Users Guide for details.
 
-       WWW_HOME            This  variable,  if set, will override
-                           the default startup URL  specified  in
+       WWW_HOME            This variable, if set,  will  override
+                           the  default  startup URL specified in
                            any of the Lynx configuration files.
 
        Environment Variables Set or Modified By Lynx:
 
        LYNX_PRINT_DATE     This  variable  is  set  by  the  Lynx
-                           p(rint) function, to the Date:  string
-                           seen  in  the  document's "Information
-                           about" page (= cmd), if  any.   It  is
-                           created   for   use   by  an  external
+                           p(rint)  function, to the Date: string
+                           seen in  the  document's  "Information
+                           about"  page  (=  cmd), if any.  It is
+                           created  for  use   by   an   external
                            program,  as  defined  in  a  lynx.cfg
                            PRINTER: definition statement.  If the
                            field does not exist for the document,
-                           the  variable  is set to a null string
+                           the variable is set to a  null  string
                            under UNIX, or "No Date" under VMS.
 
        LYNX_PRINT_LASTMOD  This  variable  is  set  by  the  Lynx
-                           p(rint)  function,  to  the  Last Mod:
-                           string   seen   in   the    document's
-                           "Information  about"  page (= cmd), if
-                           any.  It is  created  for  use  by  an
+                           p(rint) function,  to  the  Last  Mod:
+                           string    seen   in   the   document's
+                           "Information about" page (=  cmd),  if
+                           any.   It  is  created  for  use by an
                            external  program,  as  defined  in  a
                            lynx.cfg      PRINTER:      definition
                            statement.   If  the  field  does  not
-                           exist for the document,  the  variable
+                           exist  for  the document, the variable
                            is set to a null string under UNIX, or
                            "No LastMod" under VMS.
 
        LYNX_PRINT_TITLE    This  variable  is  set  by  the  Lynx
                            p(rint)  function,  to  the  Linkname:
-                           string   seen   in   the    document's
-                           "Information  about"  page (= cmd), if
-                           any.  It is  created  for  use  by  an
+                           string    seen   in   the   document's
+                           "Information about" page (=  cmd),  if
+                           any.   It  is  created  for  use by an
                            external  program,  as  defined  in  a
                            lynx.cfg      PRINTER:      definition
                            statement.   If  the  field  does  not
-                           exist for the document,  the  variable
+                           exist  for  the document, the variable
                            is set to a null string under UNIX, or
                            "No Title" under VMS.
 
        LYNX_PRINT_URL      This  variable  is  set  by  the  Lynx
-                           p(rint)  function,  to the URL: string
-                           seen in  the  document's  "Information
-                           about"  page  (=  cmd), if any.  It is
-                           created  for  use   by   an   external
+                           p(rint) function, to the  URL:  string
+                           seen  in  the  document's "Information
+                           about" page (= cmd), if  any.   It  is
+                           created   for   use   by  an  external
                            program,  as  defined  in  a  lynx.cfg
                            PRINTER: definition statement.  If the
                            field does not exist for the document,
-                           the variable is set to a  null  string
+                           the  variable  is set to a null string
                            under UNIX, or "No URL" under VMS.
 
-       LYNX_VERSION        This  variable  is always set by Lynx,
+       LYNX_VERSION        This variable is always set  by  Lynx,
                            and may be used by an external program
-                           to  determine  if  it  was  invoked by
-                           Lynx.  See also the  comments  in  the
+                           to determine  if  it  was  invoked  by
+                           Lynx.   See  also  the comments in the
                            distribution's  sample  mailcap  file,
                            for notes on usage in such a file.
 
-       TERM                Normally, this  variable  is  used  by
-                           Lynx  to  determine  the terminal type
-                           being  used  to  invoke   Lynx.    If,
-                           however,  it  is unset at startup time
-                           (or has the value  "unknown"),  or  if
-                           the  -term command-line option is used
+       TERM                Normally,  this  variable  is  used by
+                           Lynx to determine  the  terminal  type
+                           being   used   to  invoke  Lynx.   If,
+                           however, it is unset at  startup  time
+                           (or  has  the  value "unknown"), or if
+
+                           the -term command-line option is  used
                            (see OPTIONS section above), Lynx will
-                           set  or  modify  its value to the user
-                           specified terminal type (for the  Lynx
-                           execution   environment).    Note:  If
-                           set/modified by Lynx,  the  values  of
-                           the  LINES  and/or COLUMNS environment
+                           set or modify its value  to  the  user
+                           specified  terminal type (for the Lynx
+                           execution  environment).    Note:   If
+                           set/modified  by  Lynx,  the values of
+                           the LINES and/or  COLUMNS  environment
                            variables may also be changed.
 
 2 SIMULATED CGI SUPPORT
-       If built with the cgi-links option  enabled,  Lynx  allows
-       access  to  a  cgi script directly without the need for an
+       If  built  with  the cgi-links option enabled, Lynx allows
+       access to a cgi script directly without the  need  for  an
        http daemon.
 
-       When executing such "lynxcgi scripts"  (if  enabled),  the
-       following  variables  may  be  set  for  simulating  a CGI
+       When  executing  such  "lynxcgi scripts" (if enabled), the
+       following variables  may  be  set  for  simulating  a  CGI
        environment:
 
        CONTENT_LENGTH
@@ -779,114 +803,114 @@
 
        SERVER_SOFTWARE
 
-       Other environment  variables  are  not  inherited  by  the
+       Other  environment  variables  are  not  inherited  by the
        script, unless they are provided via a LYNXCGI_ENVIRONMENT
-       statement in the configuration  file.   See  the  lynx.cfg
-       file,    and    the    (draft)   CGI   1.1   Specification
+       statement  in  the  configuration  file.  See the lynx.cfg
+       file,   and   the   (draft)    CGI    1.1    Specification
        <http://Web.Golux.Com/coar/cgi/draft-coar-cgi-v11-00.txt>
        for the definition and usage of these variables.
 
        The CGI Specification, and other associated documentation,
-       should be consulted for general information on CGI  script
+       should  be consulted for general information on CGI script
        programming.
 
 2 NATIVE LANGUAGE SUPPORT
-       If  configured and installed with Native Language Support,
-       Lynx will display status and other messages in your  local
-       language.    See   the   file   ABOUT_NLS  in  the  source
-       distribution,  or  at  your  local  GNU  site,  for   more
+       If configured and installed with Native Language  Support,
+       Lynx  will display status and other messages in your local
+       language.   See  the  file   ABOUT_NLS   in   the   source
+       distribution,   or  at  your  local  GNU  site,  for  more
        information about internationalization.
 
-       The  following  environment variables may be used to alter
+       The following environment variables may be used  to  alter
        default settings:
 
-       LANG                This variable, if set,  will  override
-                           the  default  message language.  It is
+       LANG                This  variable,  if set, will override
+                           the default message language.   It  is
                            an ISO 639 two-letter code identifying
-                           the  language.  Language codes are NOT
+                           the language.  Language codes are  NOT
                            the same as the country codes given in
                            ISO 3166.
 
-       LANGUAGE            This  variable,  if set, will override
+       LANGUAGE            This variable, if set,  will  override
                            the default message language.  This is
-                           a   GNU   extension  that  has  higher
-                           priority  for  setting   the   message
+                           a  GNU  extension  that   has   higher
+                           priority   for   setting  the  message
                            catalog than LANG or LC_ALL.
 
        LC_ALL              and
 
-       LC_MESSAGES         These  variables,  if set, specify the
-                           notion of native  language  formatting
+       LC_MESSAGES         These variables, if set,  specify  the
+                           notion  of  native language formatting
                            style.  They are POSIXly correct.
 
-       LINGUAS             This   variable,   if   set  prior  to
+       LINGUAS             This  variable,  if   set   prior   to
                            configuration,  limits  the  installed
                            languages to specific values.  It is a
-                           space-separated  list  of   two-letter
+                           space-separated   list  of  two-letter
                            codes.  Currently, it is hard-coded to
                            a wish list.
 
-       NLSPATH             This variable, if set, is used as  the
+       NLSPATH             This  variable, if set, is used as the
                            path prefix for message catalogs.
 
 2 NOTES
        This is the Lynx v2.8.2 Release
 
-       If  you  wish  to contribute to the further development of
-       Lynx, subscribe  to  our  mailing  list.   Send  email  to
-       <majordomo@sig.net>  with "subscribe lynx-dev" as the only
+       If you wish to contribute to the  further  development  of
+       Lynx,  subscribe  to  our  mailing  list.   Send  email to
+       <majordomo@sig.net> with "subscribe lynx-dev" as the  only
        line in the body of your message.
 
-       Send  bug  reports,  comments,   suggestions   to   <lynx-
+       Send   bug   reports,   comments,  suggestions  to  <lynx-
        dev@sig.net> after subscribing.
 
-       Unsubscribe  by  sending email to <majordomo@sig.net> with
-       "unsubscribe lynx-dev" as the only line  in  the  body  of
-       your  message.  Do not send the unsubscribe message to the
+       Unsubscribe by sending email to  <majordomo@sig.net>  with
+       "unsubscribe  lynx-dev"  as  the  only line in the body of
+       your message.  Do not send the unsubscribe message to  the
        lynx-dev list, itself.
 
 2 SEE ALSO
-       catgets(3),  curses(3),  environ(7),  execve(2),   ftp(1),
-       gettext(GNU),   localeconv(3),  ncurses(3),  setlocale(3),
+       catgets(3),   curses(3),  environ(7),  execve(2),  ftp(1),
+       gettext(GNU),  localeconv(3),  ncurses(3),   setlocale(3),
        slang(?), termcap(5), terminfo(5), wget(GNU)
 
-       Note that man page availability and section  numbering  is
-       somewhat  platform  dependent, and may vary from the above
+       Note  that  man page availability and section numbering is
+       somewhat platform dependent, and may vary from  the  above
        references.
 
-       A section shown as (GNU), is intended to denote  that  the
-       topic  may be available via an info page, instead of a man
-       page (ie, try "info subject", rather than "man  subject").
+       A  section  shown as (GNU), is intended to denote that the
+       topic may be available via an info page, instead of a  man
+       page  (ie, try "info subject", rather than "man subject").
 
-       A  section  shown as (?) denotes that documentation on the
+       A section shown as (?) denotes that documentation  on  the
        topic exists, but is not part of an established documentation
-       retrieval system (see the distribution files associated
-       with the topic, or contact your System  Administrator
+       retrieval system (see the distribution files  associated
+       with the topic, or contact your System Administrator
        for further information).
 
 2 ACKNOWLEDGMENTS
        Lynx has incorporated code from a variety of sources along
        the way.  The earliest versions of Lynx included code from
-       Earl  Fogel  of  Computing  Services  at the University of
-       Saskatchewan, who implemented HYPERREZ in the  Unix  envi-
-       ronment.    HYPERREZ  was  developed  by  Niel  Larson  of
-       Think.com and served as the model for the  early  versions
-       of  Lynx.  Those versions also incorporated libraries from
-       the Unix Gopher clients developed  at  the  University  of
-       Minnesota,  and the later versions of Lynx rely on the WWW
-       client library code developed by Tim Berners-Lee  and  the
-       WWW  community.   Also a special thanks to Foteos Macrides
-       who ported much of Lynx to VMS and did or  organized  most
-       of  its  development  since the departures of Lou Montulli
-       and Garrett Blythe from the University of  Kansas  in  the
-       summer  of  1994 through the release of v2.7.2, and to ev-
-       eryone on the net who has contributed to  Lynx's  develop-
+       Earl Fogel of Computing  Services  at  the  University  of
+       Saskatchewan,  who  implemented HYPERREZ in the Unix envi-
+       ronment.   HYPERREZ  was  developed  by  Niel  Larson   of
+       Think.com  and  served as the model for the early versions
+       of Lynx.  Those versions also incorporated libraries  from
+       the  Unix  Gopher  clients  developed at the University of
+       Minnesota, and the later versions of Lynx rely on the  WWW
+       client  library  code developed by Tim Berners-Lee and the
+       WWW community.  Also a special thanks to  Foteos  Macrides
+       who  ported  much of Lynx to VMS and did or organized most
+       of its development since the departures  of  Lou  Montulli
+       and  Garrett  Blythe  from the University of Kansas in the
+       summer of 1994 through the release of v2.7.2, and  to  ev-
+       eryone  on  the net who has contributed to Lynx's develop-
        ment either directly (through patches, comments or bug re-
-       ports) or indirectly (through inspiration and  development
+       ports)  or indirectly (through inspiration and development
        of other systems).
 
 2 AUTHORS
-       Lou  Montulli,  Garrett  Blythe,  Craig  Lavender, Michael
+       Lou Montulli,  Garrett  Blythe,  Craig  Lavender,  Michael
        Grobe, Charles Rezac
        Academic Computing Services
        University of Kansas
diff --git a/lynx.man b/lynx.man
index 45c5bce2..0f33cac9 100644
--- a/lynx.man
+++ b/lynx.man
@@ -52,6 +52,12 @@ file or remote URL specified at the command
 line.  For help with URLs, press \fB"?"\fR
 or \fB"H"\fR while running \fILynx\fR.
 Then follow the link titled, "Help on URLs."
+
+\fILynx\fR uses only long option names. Option
+names can begin with double dash as well, 
+underscores and dashes can be intermixed in
+option names (in the reference below options
+are with one dash before them and with underscores).
 .PP
 .TP
 .B -
@@ -129,7 +135,7 @@ library like \fBncurses\fR, Lynx relies completely on the terminal
 description to determine whether color mode is possible, and
 this flag is not needed and thus unavailable.)
 A saved show_color=always setting found in a .lynxrc file at
-startup has the same effect.  A saved show_color=always found
+startup has the same effect.  A saved show_color=never found
 in .lynxrc on startup is overridden by this flag.
 .TP
 .B -cookies
@@ -151,6 +157,9 @@ incremental display stages with MessageSecs delay
 .B -display\fR=\fIDISPLAY
 set the display variable for X rexec-ed programs.
 .TP
+.B -dont_wrap_pre
+inhibit wrapping of text in <pre> when -dump'ing and -crawl'ing.
+.TP
 .B -dump
 dumps the formatted output of the default document or one
 specified on the command line to standard output.
@@ -178,6 +187,9 @@ enable local program execution (normally not configured).
 .B -fileversions
 include all versions of files in local VMS directory listings.
 .TP
+.B -force_empty_hrefless_a
+force HREF-less 'A' elements to be empty (close them as soon as they are seen).
+.TP
 .B -force_html
 forces the first document to be interpreted as HTML.
 .TP
@@ -235,6 +247,9 @@ set the default index file to the specified URL.
 toggles inclusion of ISMAP links when client-side
 MAPs are present.
 .TP
+.B -justify
+do justification of text.
+.TP
 .B -link\fR=\fINUMBER
 starting count for lnk#.dat files produced by -crawl.
 .TP
@@ -356,7 +371,8 @@ flushes the cache on a proxy server
 .TP
 .B -restrictions\fR=\fI[option][,option][,option]...
 allows a list of services to be disabled
-selectively.  The following list is printed
+selectively. Dashes and underscores in option names
+can be intermixed. The following list is printed
 if no options are specified.
 
 .I all
@@ -584,6 +600,9 @@ enable vi-like key movement.
 .TP
 .B -width\fR=\fINUMBER
 number of columns for formatting of dumps, default is 80.
+.TP
+.B -with_backspaces
+emit backspaces in output if -dumping or -crawling (like 'man' does)
 .SH COMMANDS
 o Use \fBUp arrow\fR and \fBDown arrow\fR to scroll through hypertext links.
 .br
diff --git a/lynx.rsp b/lynx.rsp
new file mode 100644
index 00000000..e72c13f6
--- /dev/null
+++ b/lynx.rsp
@@ -0,0 +1,84 @@
+../obj/DefaultStyle.obj
+../obj/GridText.obj
+../obj/HTAabrow.obj
+../obj/HTAaprot.obj
+../obj/HTAautil.obj
+../obj/HTAccess.obj
+../obj/HTAlert.obj
+../obj/HTAnchor.obj
+../obj/HTAssoc.obj
+../obj/HTAtom.obj
+../obj/HTBtree.obj
+../obj/HTChunk.obj
+../obj/HTDOS.obj
+../obj/HTFile.obj
+../obj/HTFinger.obj
+../obj/HTFormat.obj
+../obj/HTFtp.obj
+../obj/HTFwriter.obj
+../obj/HTGopher.obj
+../obj/HTGroup.obj
+../obj/HTInit.obj
+../obj/HTLex.obj
+../obj/HTList.obj
+../obj/HTMIME.obj
+../obj/HTML.obj
+../obj/HTMLDTD.obj
+../obj/HTMLGen.obj
+../obj/HTNews.obj
+../obj/HTParse.obj
+../obj/HTPlain.obj
+../obj/HTRules.obj
+../obj/HTString.obj
+../obj/HTStyle.obj
+../obj/HTTP.obj
+../obj/HTTcp.obj
+../obj/HTTelnet.obj
+../obj/HTUU.obj
+../obj/HTWSRC.obj
+../obj/LYBookmark.obj
+../obj/LYCgi.obj
+../obj/LYCharSets.obj
+../obj/LYCharUtils.obj
+../obj/LYClean.obj
+../obj/LYCookie.obj
+../obj/LYCurses.obj
+../obj/LYDownload.obj
+../obj/LYEdit.obj
+../obj/LYEditmap.obj
+../obj/LYExit.obj
+../obj/LYExtern.obj
+../obj/LYForms.obj
+../obj/LYGetFile.obj
+../obj/LYHistory.obj
+../obj/LYJump.obj
+../obj/LYKeymap.obj
+../obj/LYLeaks.obj
+../obj/LYList.obj
+../obj/LYLocal.obj
+../obj/LYMail.obj
+../obj/LYMain.obj
+../obj/LYMainLoop.obj
+../obj/LYMap.obj
+../obj/LYNews.obj
+../obj/LYOptions.obj
+../obj/LYPrint.obj
+../obj/LYPrettySrc.obj
+../obj/LYReadCFG.obj
+../obj/LYSearch.obj
+../obj/LYShowInfo.obj
+../obj/LYStrings.obj
+../obj/LYTraversal.obj
+../obj/LYUpload.obj
+../obj/LYrcFile.obj
+../obj/SGML.obj
+../obj/UCAuto.obj
+../obj/UCAux.obj
+../obj/UCdomap.obj
+../obj/crypt.obj
+../obj/crypt_util.obj
+../obj/getline.obj
+../obj/lyutils.obj
+../obj/xsystem.obj
+../curses/PDCURSES.LIB
+../curses/ZLIB.LIB
diff --git a/makefile.bcb b/makefile.bcb
new file mode 100644
index 00000000..faea8508
--- /dev/null
+++ b/makefile.bcb
@@ -0,0 +1,656 @@
+#
+# Borland C++ / C++ builder
+# 1997/11/08 (Sat) 10:45:37
+#
+.AUTODEPEND
+
+
+#
+# Borland C++ tools
+#
+IMPLIB  = Implib
+BCC32   = Bcc32 +BccW32.cfg 
+TLINK32 = TLink32
+TLIB    = TLib
+BRC32   = Brc32
+TASM32  = Tasm32
+#
+# macros
+#
+BCB = $(MAKEDIR)/..
+BCC_INC = $(BCB)/INCLUDE
+#BCC_INC = c:/cbuilder/include
+WWW_LIB = WWW/Library/Implementation
+OBJ = ../obj
+ETC_LIB = ../curses
+
+
+#
+# Options
+#
+#
+DEBUG=
+#DEBUG=-v -y -vG
+#DEBUG=-v -y
+
+CC_FLAGS = $(DEBUG) \
+-I./;$(ETC_LIB);SRC;$(WWW_LIB);$(BCC_INC);SRC/CHRTRANS \
+-DNO_UNISTD_H \
+-DVC="2.14FM" \
+-D_WINDOWS \
+-DXMOSAIC_HACK \
+-DACCESS_AUTH \
+-DNO_FILIO_H \
+-DNO_UTMP \
+-DNO_CUSERID \
+-DNO_TTYTYPE \
+-DNOSIGHUP \
+-DDOSPATH \
+-DNOUSERS \
+-DEXP_CHARTRANS \
+-DNCURSES \
+-DFANCY_CURSES \
+-DCOLOR_CURSES \
+-DUSE_COLOR_TABLE \
+-DHAVE_KEYPAD \
+-DNCURSES_VERSION \
+-DUSE_EXTERNALS \
+-DUSE_ZLIB \
+-DPDCURSES \
+-DSUPPORT_MULTIBYTE_EDIT \
+-DUSE_MULTIBYTE_CURSES \
+-DNCURSES_MOUSE_VERSION \
+-DLONG_LIST \
+-DDISP_PARTIAL \
+-DHAVE_DIRENT_H=1 \
+-DEXP_PERSISTENT_COOKIES \
+-DNO_CONFIG_INFO \
+-DEXP_ALT_BINDINGS \
+-DSOURCE_CACHE \
+-DUSE_PSRC \
+### Add by Hiroyuki
+-DLY_MAXPATH=1024 \
+-D_WIN_CC=1 \
+-DCJK_EX \
+-DSH_EX \
+-DWIN_EX
+
+#
+# Dependency List
+#
+Dep_lynx = lynx.exe
+
+lynx : BccW32.cfg $(Dep_lynx)
+  echo MakeNode 
+
+Dep_lynxdexe = \
+   $(ETC_LIB)/zlib.lib\
+   $(ETC_LIB)/pdcurses.lib\
+   $(OBJ)/HTDOS.obj\
+   $(OBJ)/UCAuto.obj\
+   $(OBJ)/UCAux.obj\
+   $(OBJ)/UCdomap.obj\
+   $(OBJ)/HTAlert.obj\
+   $(OBJ)/HTFwriter.obj\
+   $(OBJ)/HTInit.obj\
+   $(OBJ)/HTTcp.obj\
+   $(OBJ)/crypt.obj\
+   $(OBJ)/crypt_util.obj\
+   $(OBJ)/getline.obj\
+   $(OBJ)/HTAABrow.obj\
+   $(OBJ)/HTAAProt.obj\
+   $(OBJ)/HTAAUtil.obj\
+   $(OBJ)/HTAccess.obj\
+   $(OBJ)/HTAnchor.obj\
+   $(OBJ)/HTAssoc.obj\
+   $(OBJ)/HTAtom.obj\
+   $(OBJ)/HTBtree.obj\
+   $(OBJ)/HTChunk.obj\
+   $(OBJ)/HTFile.obj\
+   $(OBJ)/HTFinger.obj\
+   $(OBJ)/HTFormat.obj\
+   $(OBJ)/HTFtp.obj\
+   $(OBJ)/HTGopher.obj\
+   $(OBJ)/HTGroup.obj\
+   $(OBJ)/HTLex.obj\
+   $(OBJ)/HTList.obj\
+   $(OBJ)/HTMIME.obj\
+   $(OBJ)/HTMLDTD.obj\
+   $(OBJ)/HTMLGen.obj\
+   $(OBJ)/HTNews.obj\
+   $(OBJ)/HTParse.obj\
+   $(OBJ)/HTPlain.obj\
+   $(OBJ)/HTRules.obj\
+   $(OBJ)/HTString.obj\
+   $(OBJ)/HTStyle.obj\
+   $(OBJ)/HTTelnet.obj\
+   $(OBJ)/HTTP.obj\
+   $(OBJ)/HTUU.obj\
+   $(OBJ)/HTWSRC.obj\
+   $(OBJ)/SGML.obj\
+   $(OBJ)/DefaultStyle.obj\
+   $(OBJ)/GridText.obj\
+   $(OBJ)/HTML.obj\
+   $(OBJ)/LYBookmark.obj\
+   $(OBJ)/LYCgi.obj\
+   $(OBJ)/LYCharSets.obj\
+   $(OBJ)/LYCharUtils.obj\
+   $(OBJ)/LYClean.obj\
+   $(OBJ)/LYCookie.obj\
+   $(OBJ)/LYCurses.obj\
+   $(OBJ)/LYDownload.obj\
+   $(OBJ)/LYEdit.obj\
+   $(OBJ)/LYEditmap.obj\
+   $(OBJ)/LYExit.obj\
+   $(OBJ)/LYExtern.obj\
+   $(OBJ)/LYForms.obj\
+   $(OBJ)/LYGetFile.obj\
+   $(OBJ)/LYHistory.obj\
+   $(OBJ)/LYJump.obj\
+   $(OBJ)/LYKeymap.obj\
+   $(OBJ)/LYLeaks.obj\
+   $(OBJ)/LYList.obj\
+   $(OBJ)/LYLocal.obj\
+   $(OBJ)/LYMail.obj\
+   $(OBJ)/LYMain.obj\
+   $(OBJ)/LYMainLoop.obj\
+   $(OBJ)/LYMap.obj\
+   $(OBJ)/LYNews.obj\
+   $(OBJ)/LYOptions.obj\
+   $(OBJ)/LYPrint.obj\
+   $(OBJ)/LYPrettySrc.obj\
+   $(OBJ)/LYrcFile.obj\
+   $(OBJ)/LYReadCFG.obj\
+   $(OBJ)/LYSearch.obj\
+   $(OBJ)/LYShowInfo.obj\
+   $(OBJ)/LYStrings.obj\
+   $(OBJ)/LYTraversal.obj\
+   $(OBJ)/LYUpload.obj\
+   $(OBJ)/lyutils.obj\
+   $(OBJ)/xsystem.obj
+
+
+lynx.exe : $(Dep_lynxdexe)
+#	$(BCC32) $(DEBUG) -lOS -elynx.exe @lynx_dbg.rsp
+	$(BCC32) $(DEBUG) -lOS -elynx.exe @lynx.rsp
+#
+###
+
+$(OBJ)/HTDOS.obj :  $(WWW_LIB)/HTDOS.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ $(WWW_LIB)/HTDOS.c
+|
+
+$(OBJ)/UCAuto.obj :  src/UCAuto.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/UCAuto.c
+|
+
+$(OBJ)/UCAux.obj :  src/UCAux.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/UCAux.c
+|
+
+$(OBJ)/UCdomap.obj :  src/UCdomap.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/UCdomap.c
+|
+
+$(OBJ)/HTAlert.obj :  src/HTAlert.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/HTAlert.c
+|
+
+$(OBJ)/HTFwriter.obj :  src/HTFwriter.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/HTFwriter.c
+|
+
+$(OBJ)/HTInit.obj :  src/HTInit.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/HTInit.c
+|
+
+$(OBJ)/HTTcp.obj :  $(WWW_LIB)/HTTcp.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ $(WWW_LIB)/HTTcp.c
+|
+
+$(OBJ)/crypt.obj :  $(WWW_LIB)/crypt.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ $(WWW_LIB)/crypt.c
+|
+
+$(OBJ)/crypt_util.obj :  $(WWW_LIB)/crypt_util.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ $(WWW_LIB)/crypt_util.c
+|
+
+$(OBJ)/getline.obj :  $(WWW_LIB)/getline.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ $(WWW_LIB)/getline.c
+|
+
+$(OBJ)/HTAABrow.obj :  $(WWW_LIB)/HTAABrow.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ $(WWW_LIB)/HTAABrow.c
+|
+
+$(OBJ)/HTAAProt.obj :  $(WWW_LIB)/HTAAProt.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ $(WWW_LIB)/HTAAProt.c
+|
+
+$(OBJ)/HTAAUtil.obj :  $(WWW_LIB)/HTAAUtil.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ $(WWW_LIB)/HTAAUtil.c
+|
+
+$(OBJ)/HTAccess.obj :  $(WWW_LIB)/HTAccess.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ $(WWW_LIB)/HTAccess.c
+|
+
+$(OBJ)/HTAnchor.obj :  $(WWW_LIB)/HTAnchor.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ $(WWW_LIB)/HTAnchor.c
+|
+
+$(OBJ)/HTAssoc.obj :  $(WWW_LIB)/HTAssoc.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ $(WWW_LIB)/HTAssoc.c
+|
+
+$(OBJ)/HTAtom.obj :  $(WWW_LIB)/HTAtom.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ $(WWW_LIB)/HTAtom.c
+|
+
+$(OBJ)/HTBtree.obj :  $(WWW_LIB)/HTBtree.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ $(WWW_LIB)/HTBtree.c
+|
+
+$(OBJ)/HTChunk.obj :  $(WWW_LIB)/HTChunk.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ $(WWW_LIB)/HTChunk.c
+|
+
+$(OBJ)/HTFile.obj :  $(WWW_LIB)/HTFile.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ $(WWW_LIB)/HTFile.c
+|
+
+$(OBJ)/HTFinger.obj :  $(WWW_LIB)/HTFinger.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ $(WWW_LIB)/HTFinger.c
+|
+
+$(OBJ)/HTFormat.obj :  $(WWW_LIB)/HTFormat.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ $(WWW_LIB)/HTFormat.c
+|
+
+$(OBJ)/HTFtp.obj :  $(WWW_LIB)/HTFtp.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ $(WWW_LIB)/HTFtp.c
+|
+
+$(OBJ)/HTGopher.obj :  $(WWW_LIB)/HTGopher.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ $(WWW_LIB)/HTGopher.c
+|
+
+$(OBJ)/HTGroup.obj :  $(WWW_LIB)/HTGroup.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ $(WWW_LIB)/HTGroup.c
+|
+
+$(OBJ)/HTLex.obj :  $(WWW_LIB)/HTLex.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ $(WWW_LIB)/HTLex.c
+|
+
+$(OBJ)/HTList.obj :  $(WWW_LIB)/HTList.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ $(WWW_LIB)/HTList.c
+|
+
+$(OBJ)/HTMIME.obj :  $(WWW_LIB)/HTMIME.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ $(WWW_LIB)/HTMIME.c
+|
+
+$(OBJ)/HTMLDTD.obj :  $(WWW_LIB)/HTMLDTD.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ $(WWW_LIB)/HTMLDTD.c
+|
+
+$(OBJ)/HTMLGen.obj :  $(WWW_LIB)/HTMLGen.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ $(WWW_LIB)/HTMLGen.c
+|
+
+$(OBJ)/HTNews.obj :  $(WWW_LIB)/HTNews.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ $(WWW_LIB)/HTNews.c
+|
+
+$(OBJ)/HTParse.obj :  $(WWW_LIB)/HTParse.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ $(WWW_LIB)/HTParse.c
+|
+
+$(OBJ)/HTPlain.obj :  $(WWW_LIB)/HTPlain.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ $(WWW_LIB)/HTPlain.c
+|
+
+$(OBJ)/HTRules.obj :  $(WWW_LIB)/HTRules.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ $(WWW_LIB)/HTRules.c
+|
+
+$(OBJ)/HTString.obj :  $(WWW_LIB)/HTString.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ $(WWW_LIB)/HTString.c
+|
+
+$(OBJ)/HTStyle.obj :  $(WWW_LIB)/HTStyle.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ $(WWW_LIB)/HTStyle.c
+|
+
+$(OBJ)/HTTelnet.obj :  $(WWW_LIB)/HTTelnet.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ $(WWW_LIB)/HTTelnet.c
+|
+
+$(OBJ)/HTTP.obj :  $(WWW_LIB)/HTTP.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ $(WWW_LIB)/HTTP.c
+|
+
+$(OBJ)/HTUU.obj :  $(WWW_LIB)/HTUU.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ $(WWW_LIB)/HTUU.c
+|
+
+$(OBJ)/HTWSRC.obj :  $(WWW_LIB)/HTWSRC.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ $(WWW_LIB)/HTWSRC.c
+|
+
+$(OBJ)/SGML.obj :  $(WWW_LIB)/SGML.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ $(WWW_LIB)/SGML.c
+|
+
+$(OBJ)/DefaultStyle.obj :  src/DefaultStyle.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/DefaultStyle.c
+|
+
+$(OBJ)/GridText.obj :  src/GridText.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/GridText.c
+|
+
+$(OBJ)/HTML.obj :  src/HTML.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/HTML.c
+|
+
+$(OBJ)/LYBookmark.obj :  src/LYBookmark.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/LYBookmark.c
+|
+
+$(OBJ)/LYCgi.obj :  src/LYCgi.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/LYCgi.c
+|
+
+$(OBJ)/LYCharSets.obj :  src/LYCharSets.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/LYCharSets.c
+|
+
+$(OBJ)/LYCharUtils.obj :  src/LYCharUtils.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/LYCharUtils.c
+|
+
+$(OBJ)/LYClean.obj :  src/LYClean.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/LYClean.c
+|
+
+$(OBJ)/LYCookie.obj :  src/LYCookie.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/LYCookie.c
+|
+
+$(OBJ)/LYCurses.obj :  src/LYCurses.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/LYCurses.c
+|
+
+$(OBJ)/LYDownload.obj :  src/LYDownload.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/LYDownload.c
+|
+
+$(OBJ)/LYEdit.obj :  src/LYEdit.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/LYEdit.c
+|
+
+$(OBJ)/LYEditmap.obj :  src/LYEditmap.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/LYEditmap.c
+|
+
+$(OBJ)/LYExit.obj :  src/LYExit.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/LYExit.c
+|
+
+$(OBJ)/LYExtern.obj :  src/LYExtern.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/LYExtern.c
+|
+
+$(OBJ)/LYForms.obj :  src/LYForms.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/LYForms.c
+|
+
+$(OBJ)/LYGetFile.obj :  src/LYGetFile.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/LYGetFile.c
+|
+
+$(OBJ)/LYHistory.obj :  src/LYHistory.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/LYHistory.c
+|
+
+$(OBJ)/LYJump.obj :  src/LYJump.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/LYJump.c
+|
+
+$(OBJ)/LYKeymap.obj :  src/LYKeymap.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/LYKeymap.c
+|
+
+$(OBJ)/LYLeaks.obj :  src/LYLeaks.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/LYLeaks.c
+|
+
+$(OBJ)/LYList.obj :  src/LYList.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/LYList.c
+|
+
+$(OBJ)/LYLocal.obj :  src/LYLocal.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/LYLocal.c
+|
+
+$(OBJ)/LYMail.obj :  src/LYMail.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/LYMail.c
+|
+
+$(OBJ)/LYMain.obj :  src/LYMain.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/LYMain.c
+|
+
+$(OBJ)/LYMainLoop.obj :  src/LYMainLoop.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/LYMainLoop.c
+|
+
+$(OBJ)/LYMap.obj :  src/LYMap.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/LYMap.c
+|
+
+$(OBJ)/LYNews.obj :  src/LYNews.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/LYNews.c
+|
+
+$(OBJ)/LYOptions.obj :  src/LYOptions.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/LYOptions.c
+|
+
+$(OBJ)/LYPrint.obj :  src/LYPrint.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/LYPrint.c
+|
+
+$(OBJ)/LYPrettySrc.obj :  src/LYPrettySrc.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/LYPrettySrc.c
+|
+
+$(OBJ)/LYrcFile.obj :  src/LYrcFile.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/LYrcFile.c
+|
+
+$(OBJ)/LYReadCFG.obj :  src/LYReadCFG.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/LYReadCFG.c
+|
+
+$(OBJ)/LYSearch.obj :  src/LYSearch.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/LYSearch.c
+|
+
+$(OBJ)/LYShowInfo.obj :  src/LYShowInfo.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/LYShowInfo.c
+|
+
+$(OBJ)/LYStrings.obj :  src/LYStrings.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/LYStrings.c
+|
+
+$(OBJ)/LYTraversal.obj :  src/LYTraversal.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/LYTraversal.c
+|
+
+$(OBJ)/LYUpload.obj :  src/LYUpload.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/LYUpload.c
+|
+
+$(OBJ)/lyutils.obj :  src/lyutils.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/lyutils.c
+|
+
+$(OBJ)/xsystem.obj :  src/xsystem.c
+  $(BCC32) -P- -c @&&|
+ $(CEAT_lynxdexe) $(CC_FLAGS) -o$@ src/xsystem.c
+|
+
+# Compiler configuration file
+BccW32.cfg : 
+   Copy &&|
+-R
+-vi
+-w
+-A-
+-tWM
+-wcpt
+-wrpt
+-wrng
+-w-voi
+-w-ret
+-w-sus
+-w-dup
+-w-big
+-w-ext
+-w-zdi
+-w-bei
+-w-obi
+-w-ofp
+-w-eas
+-w-hid
+-w-ncf
+-w-ibc
+-w-dsz
+-w-nst
+-w-mpc
+-w-mpd
+-w-ntd
+-w-nvf
+-w-hch
+-w-inl
+-w-lin
+-w-lvc
+-w-pia
+-w-def
+-w-nod
+-w-pro
+-w-rvl
+-wccc
+-w-aus
+-w-par
+-w-rch
+-w-eff
+-w-ill
+-w-ias
+-w-msg
+-O2
+-5
+-d
+-K
+-a4
+-r
+-w-stu
+-wbbf
+-w-dpu
+-wcln
+-wsig
+-wucp
+-g255
+-H-
+-v-
+-WC
+-WM
+-wamb
+| $@
+
diff --git a/makefile.in b/makefile.in
index 1a2db48c..d9079b22 100644
--- a/makefile.in
+++ b/makefile.in
@@ -23,6 +23,7 @@ LIBS		= @LIBS@
 INSTALL		= @INSTALL@
 INSTALL_PROGRAM	= @INSTALL_PROGRAM@
 INSTALL_DATA	= @INSTALL_DATA@
+LN_S		= @LN_S@
 
 ## This is the version which we are developing (or, upon release, make this
 ## the same).  Use no dots in the name, since it must work on VMS and MS-DOS.
@@ -372,11 +373,9 @@ install-help : $(DOCDIR) $(HELPDIR)
 		$(LIBDIR)/lynx.tmp >$(LIBDIR)/lynx.cfg
 	chmod 644 $(LIBDIR)/lynx.cfg
 	-rm -f $(LIBDIR)/lynx.tmp
-	$(INSTALL_DATA) $(srcdir)/COPYHEADER $(DOCDIR)/COPYHEADER
-	$(INSTALL_DATA) $(srcdir)/COPYING    $(DOCDIR)/COPYING
-	cd $(HELPDIR) && ( \
-		ln $(DOCDIR)/COPYHEADER . || cp $(DOCDIR)/COPYHEADER . ; \
-		ln $(DOCDIR)/COPYING    . || cp $(DOCDIR)/COPYING . )
+	$(SHELL) -c 'for name in COPYING COPYHEADER; do \
+		cd $(DOCDIR) && ( $(LN_S) $$name $(HELPDIR)/ || cp $$name $(HELPDIR)/ );\
+		done'
 
 LYHelp.h : LYHelp.hin
 	@echo Constructing sed-script
diff --git a/makefile.msc b/makefile.msc
new file mode 100644
index 00000000..b5783ceb
--- /dev/null
+++ b/makefile.msc
@@ -0,0 +1,391 @@
+#
+# Makefile for `Lynx' browser for Microsoft Visual C++ 4.2 or later
+#
+
+CC       = cl
+LD       = link
+
+SRC_DIR = src
+WWW_DIR = WWW\Library\Implementation
+
+# pdcurses.lib panel.lib dirent.obj curses.h panel.h dirent.h
+ETC_LIB = lib
+
+INCLUDES = /I "." /I "$(SRC_DIR)" /I "$(SRC_DIR)\chrtrans" /I "$(WWW_DIR)" /I "$(ETC_LIB)"
+DEFS = /D "NDEBUG" /D\
+ "__WIN32__" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "NO_UNISTD_H" /D VC="2.14FM" /D\
+ "_WINDOWS" /D "XMOSAIC_HACK" /D "ACCESS_AUTH" /D "NO_FILIO_H" /D "NO_UTMP" /D\
+ "NO_CUSERID" /D "NO_TTYTYPE" /D "NOSIGHUP" /D "DOSPATH" /D "NOUSERS" /D\
+ "EXP_CHARTRANS" /D "NCURSES" /D "FANCY_CURSES" /D "COLOR_CURSES" /D\
+ "USE_COLOR_TABLE" /D "HAVE_KEYPAD" /D "NCURSES_VERSION" /D "USE_EXTERNALS" /D\
+ "PDCURSES" /D "SUPPORT_MULTIBYTE_EDIT" /D "USE_MULTIBYTE_CURSES" \
+ /D "LONG_LIST" /D "DISP_PARTIAL" /D\
+ "EXP_PERSISTENT_COOKIES" /D "NO_CONFIG_INFO" /D\
+ "EXP_ALT_BINDINGS" /D LY_MAXPATH="1024" /D _WIN_CC="1" /D "CJK_EX" /D "SH_EX" /D "WIN_EX" /D "USE_ZLIB"
+CFLAGS   = /nologo /MT /W3 /GX /O2 /c
+
+LDFLAGS  = /nologo /subsystem:console /incremental:no /machine:I386
+LIBS     = kernel32.lib user32.lib wsock32.lib /NODEFAULTLIB:libc\
+ $(ETC_LIB)\pdcurses.lib $(ETC_LIB)\zlib.lib dirent.obj
+
+COMPILE = $(CC) $(CFLAGS) $(INCLUDES) $(DEFS)
+LINK    = $(LD) $(LDFLAGS) /out:$@
+
+OBJS = \
+	"crypt.obj" \
+	"crypt_util.obj" \
+	"DefaultStyle.obj" \
+	"getline.obj" \
+	"GridText.obj" \
+	"HTAABrow.obj" \
+	"HTAAProt.obj" \
+	"HTAAUtil.obj" \
+	"HTAccess.obj" \
+	"HTAlert.obj" \
+	"HTAnchor.obj" \
+	"HTAssoc.obj" \
+	"HTAtom.obj" \
+	"HTBTree.obj" \
+	"HTChunk.obj" \
+	"HTDOS.obj" \
+	"HTFile.obj" \
+	"HTFinger.obj" \
+	"HTFormat.obj" \
+	"HTFTP.obj" \
+	"HTFWriter.obj" \
+	"HTGopher.obj" \
+	"HTGroup.obj" \
+	"HTInit.obj" \
+	"HTLex.obj" \
+	"HTList.obj" \
+	"HTMIME.obj" \
+	"HTML.obj" \
+	"HTMLDTD.obj" \
+	"HTMLGen.obj" \
+	"HTNews.obj" \
+	"HTParse.obj" \
+	"HTPlain.obj" \
+	"HTRules.obj" \
+	"HTString.obj" \
+	"HTStyle.obj" \
+	"HTTCP.obj" \
+	"HTTelnet.obj" \
+	"HTTP.obj" \
+	"HTUU.obj" \
+	"HTWSRC.obj" \
+	"LYBookmark.obj" \
+	"LYCgi.obj" \
+	"LYCharSets.obj" \
+	"LYCharUtils.obj" \
+	"LYClean.obj" \
+	"LYCookie.obj" \
+	"LYCurses.obj" \
+	"LYDownload.obj" \
+	"LYEdit.obj" \
+	"LYEditmap.obj" \
+	"LYexit.obj" \
+	"LYExtern.obj" \
+	"LYForms.obj" \
+	"LYGetFile.obj" \
+	"LYHistory.obj" \
+	"LYJump.obj" \
+	"LYKeymap.obj" \
+	"LYLeaks.obj" \
+	"LYList.obj" \
+	"LYLocal.obj" \
+	"LYMail.obj" \
+	"LYMain.obj" \
+	"LYMainLoop.obj" \
+	"LYMap.obj" \
+	"LYNews.obj" \
+	"LYOptions.obj" \
+	"LYPrint.obj" \
+	"LYrcFile.obj" \
+	"LYReadCFG.obj" \
+	"LYSearch.obj" \
+	"LYShowInfo.obj" \
+	"LYStrings.obj" \
+	"LYTraversal.obj" \
+	"LYUpload.obj" \
+	"LYUtils.obj" \
+	"SGML.obj" \
+	"UCAuto.obj" \
+	"UCAux.obj" \
+	"UCdomap.obj" \
+	"Xsystem.obj"
+
+
+# Dependencies for building
+
+all : lynx.exe
+
+clean:
+	-del $(OBJS)
+
+lynx.exe: $(OBJS) dirent.obj
+	$(LINK) $(OBJS) $(LIBS)
+
+DefaultStyle.obj : $(SRC_DIR)\DefaultStyle.c
+	$(COMPILE) $(SRC_DIR)\DefaultStyle.c
+
+GridText.obj : $(SRC_DIR)\GridText.c
+	$(COMPILE) $(SRC_DIR)\GridText.c
+
+HTAlert.obj : $(SRC_DIR)\HTAlert.c
+	$(COMPILE) $(SRC_DIR)\HTAlert.c
+
+HTFWriter.obj : $(SRC_DIR)\HTFWriter.c
+	$(COMPILE) $(SRC_DIR)\HTFWriter.c
+
+HTInit.obj : $(SRC_DIR)\HTInit.c
+	$(COMPILE) $(SRC_DIR)\HTInit.c
+
+HTML.obj : $(SRC_DIR)\HTML.c
+	$(COMPILE) $(SRC_DIR)\HTML.c
+
+LYBookmark.obj : $(SRC_DIR)\LYBookmark.c
+	$(COMPILE) $(SRC_DIR)\LYBookmark.c
+
+LYCgi.obj : $(SRC_DIR)\LYCgi.c
+	$(COMPILE) $(SRC_DIR)\LYCgi.c
+
+LYCharSets.obj : $(SRC_DIR)\LYCharSets.c
+	$(COMPILE) $(SRC_DIR)\LYCharSets.c
+
+LYCharUtils.obj : $(SRC_DIR)\LYCharUtils.c
+	$(COMPILE) $(SRC_DIR)\LYCharUtils.c
+
+LYClean.obj : $(SRC_DIR)\LYClean.c
+	$(COMPILE) $(SRC_DIR)\LYClean.c
+
+LYCookie.obj : $(SRC_DIR)\LYCookie.c
+	$(COMPILE) $(SRC_DIR)\LYCookie.c
+
+LYCurses.obj : $(SRC_DIR)\LYCurses.c
+	$(COMPILE) $(SRC_DIR)\LYCurses.c
+
+LYDownload.obj : $(SRC_DIR)\LYDownload.c
+	$(COMPILE) $(SRC_DIR)\LYDownload.c
+
+LYEdit.obj : $(SRC_DIR)\LYEdit.c
+	$(COMPILE) $(SRC_DIR)\LYEdit.c
+
+LYEditmap.obj : $(SRC_DIR)\LYEditmap.c
+	$(COMPILE) $(SRC_DIR)\LYEditmap.c
+
+LYexit.obj : $(SRC_DIR)\LYexit.c
+	$(COMPILE) $(SRC_DIR)\LYexit.c
+
+LYExtern.obj : $(SRC_DIR)\LYExtern.c
+	$(COMPILE) $(SRC_DIR)\LYExtern.c
+
+LYForms.obj : $(SRC_DIR)\LYForms.c
+	$(COMPILE) $(SRC_DIR)\LYForms.c
+
+LYGetFile.obj : $(SRC_DIR)\LYGetFile.c
+	$(COMPILE) $(SRC_DIR)\LYGetFile.c
+
+LYHash.obj : $(SRC_DIR)\LYHash.c
+	$(COMPILE) $(SRC_DIR)\LYHash.c
+
+LYHistory.obj : $(SRC_DIR)\LYHistory.c
+	$(COMPILE) $(SRC_DIR)\LYHistory.c
+
+LYJump.obj : $(SRC_DIR)\LYJump.c
+	$(COMPILE) $(SRC_DIR)\LYJump.c
+
+LYKeymap.obj : $(SRC_DIR)\LYKeymap.c
+	$(COMPILE) $(SRC_DIR)\LYKeymap.c
+
+LYLeaks.obj : $(SRC_DIR)\LYLeaks.c
+	$(COMPILE) $(SRC_DIR)\LYLeaks.c
+
+LYList.obj : $(SRC_DIR)\LYList.c
+	$(COMPILE) $(SRC_DIR)\LYList.c
+
+LYLocal.obj : $(SRC_DIR)\LYLocal.c
+	$(COMPILE) $(SRC_DIR)\LYLocal.c
+
+LYMail.obj : $(SRC_DIR)\LYMail.c
+	$(COMPILE) $(SRC_DIR)\LYMail.c
+
+LYMain.obj : $(SRC_DIR)\LYMain.c
+	$(COMPILE) $(SRC_DIR)\LYMain.c
+
+LYMainLoop.obj : $(SRC_DIR)\LYMainLoop.c
+	$(COMPILE) $(SRC_DIR)\LYMainLoop.c
+
+LYMap.obj : $(SRC_DIR)\LYMap.c
+	$(COMPILE) $(SRC_DIR)\LYMap.c
+
+LYNews.obj : $(SRC_DIR)\LYNews.c
+	$(COMPILE) $(SRC_DIR)\LYNews.c
+
+LYOptions.obj : $(SRC_DIR)\LYOptions.c
+	$(COMPILE) $(SRC_DIR)\LYOptions.c
+
+LYPrint.obj : $(SRC_DIR)\LYPrint.c
+	$(COMPILE) $(SRC_DIR)\LYPrint.c
+
+LYrcFile.obj : $(SRC_DIR)\LYrcFile.c
+	$(COMPILE) $(SRC_DIR)\LYrcFile.c
+
+LYReadCFG.obj : $(SRC_DIR)\LYReadCFG.c
+	$(COMPILE) $(SRC_DIR)\LYReadCFG.c
+
+LYSearch.obj : $(SRC_DIR)\LYSearch.c
+	$(COMPILE) $(SRC_DIR)\LYSearch.c
+
+LYShowInfo.obj : $(SRC_DIR)\LYShowInfo.c
+	$(COMPILE) $(SRC_DIR)\LYShowInfo.c
+
+LYStrings.obj : $(SRC_DIR)\LYStrings.c
+	$(COMPILE) $(SRC_DIR)\LYStrings.c
+
+LYStyle.obj : $(SRC_DIR)\LYStyle.c
+	$(COMPILE) $(SRC_DIR)\LYStyle.c
+
+LYTraversal.obj : $(SRC_DIR)\LYTraversal.c
+	$(COMPILE) $(SRC_DIR)\LYTraversal.c
+
+LYUpload.obj : $(SRC_DIR)\LYUpload.c
+	$(COMPILE) $(SRC_DIR)\LYUpload.c
+
+LYUtils.obj : $(SRC_DIR)\LYUtils.c
+	$(COMPILE) $(SRC_DIR)\LYUtils.c
+
+mktime.obj : $(SRC_DIR)\mktime.c
+	$(COMPILE) $(SRC_DIR)\mktime.c
+
+strstr.obj : $(SRC_DIR)\strstr.c
+	$(COMPILE) $(SRC_DIR)\strstr.c
+
+UCAuto.obj : $(SRC_DIR)\UCAuto.c
+	$(COMPILE) $(SRC_DIR)\UCAuto.c
+
+UCAux.obj : $(SRC_DIR)\UCAux.c
+	$(COMPILE) $(SRC_DIR)\UCAux.c
+
+UCdomap.obj : $(SRC_DIR)\UCdomap.c
+	$(COMPILE) $(SRC_DIR)\UCdomap.c
+
+Xsystem.obj : $(SRC_DIR)\Xsystem.c
+	$(COMPILE) $(SRC_DIR)\Xsystem.c
+
+crypt.obj : $(WWW_DIR)\crypt.c
+	$(COMPILE) $(WWW_DIR)\crypt.c
+
+crypt_util.obj : $(WWW_DIR)\crypt_util.c
+	$(COMPILE) $(WWW_DIR)\crypt_util.c
+
+dirent.obj : $(ETC_LIB)\dirent.c
+	$(COMPILE) $(ETC_LIB)\dirent.c
+
+getline.obj : $(WWW_DIR)\getline.c
+	$(COMPILE) $(WWW_DIR)\getline.c
+
+getpass.obj : $(WWW_DIR)\getpass.c
+	$(COMPILE) $(WWW_DIR)\getpass.c
+
+HTAABrow.obj : $(WWW_DIR)\HTAABrow.c
+	$(COMPILE) $(WWW_DIR)\HTAABrow.c
+
+HTAAFile.obj : $(WWW_DIR)\HTAAFile.c
+	$(COMPILE) $(WWW_DIR)\HTAAFile.c
+
+HTAAProt.obj : $(WWW_DIR)\HTAAProt.c
+	$(COMPILE) $(WWW_DIR)\HTAAProt.c
+
+HTAAUtil.obj : $(WWW_DIR)\HTAAUtil.c
+	$(COMPILE) $(WWW_DIR)\HTAAUtil.c
+
+HTAccess.obj : $(WWW_DIR)\HTAccess.c
+	$(COMPILE) $(WWW_DIR)\HTAccess.c
+
+HTAnchor.obj : $(WWW_DIR)\HTAnchor.c
+	$(COMPILE) $(WWW_DIR)\HTAnchor.c
+
+HTAssoc.obj : $(WWW_DIR)\HTAssoc.c
+	$(COMPILE) $(WWW_DIR)\HTAssoc.c
+
+HTAtom.obj : $(WWW_DIR)\HTAtom.c
+	$(COMPILE) $(WWW_DIR)\HTAtom.c
+
+HTBTree.obj : $(WWW_DIR)\HTBTree.c
+	$(COMPILE) $(WWW_DIR)\HTBTree.c
+
+HTChunk.obj : $(WWW_DIR)\HTChunk.c
+	$(COMPILE) $(WWW_DIR)\HTChunk.c
+
+HTDOS.obj : $(WWW_DIR)\HTDOS.c
+	$(COMPILE) $(WWW_DIR)\HTDOS.c
+
+HTFile.obj : $(WWW_DIR)\HTFile.c
+	$(COMPILE) $(WWW_DIR)\HTFile.c
+
+HTFinger.obj : $(WWW_DIR)\HTFinger.c
+	$(COMPILE) $(WWW_DIR)\HTFinger.c
+
+HTFormat.obj : $(WWW_DIR)\HTFormat.c
+	$(COMPILE) $(WWW_DIR)\HTFormat.c
+
+HTFTP.obj : $(WWW_DIR)\HTFTP.c
+	$(COMPILE) $(WWW_DIR)\HTFTP.c
+
+HTGopher.obj : $(WWW_DIR)\HTGopher.c
+	$(COMPILE) $(WWW_DIR)\HTGopher.c
+
+HTGroup.obj : $(WWW_DIR)\HTGroup.c
+	$(COMPILE) $(WWW_DIR)\HTGroup.c
+
+HTLex.obj : $(WWW_DIR)\HTLex.c
+	$(COMPILE) $(WWW_DIR)\HTLex.c
+
+HTList.obj : $(WWW_DIR)\HTList.c
+	$(COMPILE) $(WWW_DIR)\HTList.c
+
+HTMIME.obj : $(WWW_DIR)\HTMIME.c
+	$(COMPILE) $(WWW_DIR)\HTMIME.c
+
+HTMLDTD.obj : $(WWW_DIR)\HTMLDTD.c
+	$(COMPILE) $(WWW_DIR)\HTMLDTD.c
+
+HTMLGen.obj : $(WWW_DIR)\HTMLGen.c
+	$(COMPILE) $(WWW_DIR)\HTMLGen.c
+
+HTNews.obj : $(WWW_DIR)\HTNews.c
+	$(COMPILE) $(WWW_DIR)\HTNews.c
+
+HTParse.obj : $(WWW_DIR)\HTParse.c
+	$(COMPILE) $(WWW_DIR)\HTParse.c
+
+HTPlain.obj : $(WWW_DIR)\HTPlain.c
+	$(COMPILE) $(WWW_DIR)\HTPlain.c
+
+HTRules.obj : $(WWW_DIR)\HTRules.c
+	$(COMPILE) $(WWW_DIR)\HTRules.c
+
+HTString.obj : $(WWW_DIR)\HTString.c
+	$(COMPILE) $(WWW_DIR)\HTString.c
+
+HTStyle.obj : $(WWW_DIR)\HTStyle.c
+	$(COMPILE) $(WWW_DIR)\HTStyle.c
+
+HTTCP.obj : $(WWW_DIR)\HTTCP.c
+	$(COMPILE) $(WWW_DIR)\HTTCP.c
+
+HTTelnet.obj : $(WWW_DIR)\HTTelnet.c
+	$(COMPILE) $(WWW_DIR)\HTTelnet.c
+
+HTTP.obj : $(WWW_DIR)\HTTP.c
+	$(COMPILE) $(WWW_DIR)\HTTP.c
+
+HTUU.obj : $(WWW_DIR)\HTUU.c
+	$(COMPILE) $(WWW_DIR)\HTUU.c
+
+HTWSRC.obj : $(WWW_DIR)\HTWSRC.c
+	$(COMPILE) $(WWW_DIR)\HTWSRC.c
+
+SGML.obj : $(WWW_DIR)\SGML.c
+	$(COMPILE) $(WWW_DIR)\SGML.c
+
diff --git a/MAKEFILE.W32 b/makefile.w32
index a0960a0b..a0960a0b 100644
--- a/MAKEFILE.W32
+++ b/makefile.w32
diff --git a/po/lynx.pot b/po/lynx.pot
index 4f62ae2f..1229cee7 100644
--- a/po/lynx.pot
+++ b/po/lynx.pot
@@ -1,12 +1,41 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
 msgid ""
 msgstr ""
-"Date: 1999-05-25 07:12:28-0400\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"
-"Files: LYMessages.c WWW/Library/Implementation/HTAABrow.c WWW/Library/Implementation/HTAccess.c WWW/Library/Implementation/HTFTP.c WWW/Library/Implementation/HTFile.c WWW/Library/Implementation/HTFinger.c WWW/Library/Implementation/HTGopher.c WWW/Library/Implementation/HTNews.c WWW/Library/Implementation/HTTCP.c WWW/Library/Implementation/HTTP.c WWW/Library/Implementation/HTTelnet.c WWW/Library/Implementation/HTWAIS.c WWW/Library/Implementation/HTWSRC.c src/GridText.c src/HTAlert.c src/HTML.c src/LYBookmark.c src/LYCgi.c src/LYClean.c src/LYCookie.c src/LYCurses.c src/LYDownload.c src/LYHistory.c src/LYLeaks.c src/LYList.c src/LYLocal.c src/LYMail.c src/LYMain.c src/LYMainLoop.c src/LYNews.c src/LYOptions.c src/LYPrint.c src/LYReadCFG.c src/LYShowInfo.c src/LYStyle.c src/LYTraversal.c src/LYUpload.c src/LYUtils.c src/LYrcFile.c\n"
-
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 1999-07-11 09:46-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: ENCODING\n"
+
+#. ******************************************************************
+#. * The following definitions are for status line prompts, messages, or
+#. * warnings issued by Lynx during program execution.  You can modify
+#. * them to make them more appropriate for your site.  We recommend that
+#. * you extend these definitions to other languages using the gettext
+#. * library.  There are also scattered uses of 'gettext()' throughout the
+#. * Lynx source, covering all but those messages which (a) are used for
+#. * debugging (CTRACE) or (b) are constants used in interaction with
+#. * other programs.
+#. *
+#. * Links to collections of alternate definitions, developed by the Lynx
+#. * User Community, are maintained in Lynx links:
+#. *
+#. *    http://www.crl.com/~subir/lynx.html
+#. *
+#. * Because the gettext facility is only recently (with release 2.8.2)
+#. * introduced, these alternate definitions are given as variants on this
+#. * file.  Use them as a starting point to construct a new message
+#. * library as needed.  (see po/readme).
+#.
 #: LYMessages.c:30
+#, c-format
 msgid "Alert!: %s"
 msgstr ""
 
@@ -22,7 +51,6 @@ msgstr ""
 msgid "Really exit from Lynx?"
 msgstr ""
 
-#. VMS
 #: LYMessages.c:38
 msgid "Connection interrupted."
 msgstr ""
@@ -69,12 +97,14 @@ msgstr ""
 
 #. #define HELP
 #: LYMessages.c:50
-msgid "Commands: Use arrow keys to move, '?' for help, 'q' to quit, '<-' to go back."
+msgid ""
+"Commands: Use arrow keys to move, '?' for help, 'q' to quit, '<-' to go back."
 msgstr ""
 
 #. #define MOREHELP
 #: LYMessages.c:52
-msgid "-- press space for more, use arrow keys to move, '?' for help, 'q' to quit."
+msgid ""
+"-- press space for more, use arrow keys to move, '?' for help, 'q' to quit."
 msgstr ""
 
 #: LYMessages.c:53
@@ -82,1888 +112,1962 @@ msgid "-- press space for next page --"
 msgstr ""
 
 #. Forms messages
-#. #define FORM_LINK_TEXT_MESSAGE
+#. #define FORM_LINK_FILE_UNM_MSG
 #: LYMessages.c:57
-msgid "(Text entry field) Enter text.  Use UP or DOWN arrows or tab to move off."
+msgid ""
+"UNMODIFIABLE file entry field.  Use UP or DOWN arrows or tab to move off."
 msgstr ""
 
-msgid "UNMODIFIABLE file entry field.  Use UP or DOWN arrows or tab to move off."
+#. #define FORM_LINK_FILE_MESSAGE
+#: LYMessages.c:59
+msgid ""
+"(File entry field) Enter filename.  Use UP or DOWN arrows or tab to move off."
 msgstr ""
 
-msgid "(File entry field) Enter filename.  Use UP or DOWN arrows or tab to move off."
+#. #define FORM_LINK_TEXT_MESSAGE
+#: LYMessages.c:61
+msgid ""
+"(Text entry field) Enter text.  Use UP or DOWN arrows or tab to move off."
 msgstr ""
 
 #. #define FORM_LINK_TEXTAREA_MESSAGE
-#: LYMessages.c:59
-msgid "(Textarea) Enter text. Use UP/DOWN arrows or TAB to move off (^Ve for editor)."
+#: LYMessages.c:63
+msgid ""
+"(Textarea) Enter text. Use UP/DOWN arrows or TAB to move off (^Ve for "
+"editor)."
 msgstr ""
 
 #. #define FORM_LINK_TEXT_UNM_MSG
-#: LYMessages.c:61
-msgid "UNMODIFIABLE form text field.  Use UP or DOWN arrows or tab to move off."
+#: LYMessages.c:65
+msgid ""
+"UNMODIFIABLE form text field.  Use UP or DOWN arrows or tab to move off."
 msgstr ""
 
 #. #define FORM_LINK_TEXT_SUBMIT_MESSAGE
-#: LYMessages.c:63
-msgid "(Form field) Enter text.  Use <return> to submit ('x' for no cache)."
+#: LYMessages.c:67
+msgid "(Form field) Enter text.  Use <return> to submit (^Vx for no cache)."
 msgstr ""
 
 #. #define FORM_LINK_TEXT_RESUBMIT_MESSAGE
-#: LYMessages.c:65
-msgid "(Form field) Enter text.  Use <return> to submit, arrows or tab to move off."
+#: LYMessages.c:69
+msgid ""
+"(Form field) Enter text.  Use <return> to submit, arrows or tab to move off."
 msgstr ""
 
 #. #define FORM_LINK_TEXT_SUBMIT_UNM_MSG
-#: LYMessages.c:67
+#: LYMessages.c:71
 msgid "UNMODIFIABLE form field.  Use UP or DOWN arrows or tab to move off."
 msgstr ""
 
 #. #define FORM_LINK_TEXT_SUBMIT_MAILTO_MSG
-#: LYMessages.c:69
-msgid "(mailto form field) Enter text.  Use <return> to submit, arrows to move off."
+#: LYMessages.c:73
+msgid ""
+"(mailto form field) Enter text.  Use <return> to submit, arrows to move off."
 msgstr ""
 
 #. #define FORM_LINK_TEXT_SUBMIT_MAILTO_DIS_MSG
-#: LYMessages.c:71
+#: LYMessages.c:75
 msgid "(mailto form field) Mail is disallowed so you cannot submit."
 msgstr ""
 
 #. #define FORM_LINK_PASSWORD_MESSAGE
-#: LYMessages.c:73
-msgid "(Password entry field) Enter text.  Use UP or DOWN arrows or tab to move off."
+#: LYMessages.c:77
+msgid ""
+"(Password entry field) Enter text.  Use UP or DOWN arrows or tab to move off."
 msgstr ""
 
 #. #define FORM_LINK_PASSWORD_UNM_MSG
-#: LYMessages.c:75
+#: LYMessages.c:79
 msgid "UNMODIFIABLE form password.  Use UP or DOWN arrows or tab to move off."
 msgstr ""
 
 #. #define FORM_LINK_CHECKBOX_MESSAGE
-#: LYMessages.c:77
+#: LYMessages.c:81
 msgid "(Checkbox Field)   Use right-arrow or <return> to toggle."
 msgstr ""
 
 #. #define FORM_LINK_CHECKBOX_UNM_MSG
-#: LYMessages.c:79
+#: LYMessages.c:83
 msgid "UNMODIFIABLE form checkbox.  Use UP or DOWN arrows or tab to move off."
 msgstr ""
 
 #. #define FORM_LINK_RADIO_MESSAGE
-#: LYMessages.c:81
+#: LYMessages.c:85
 msgid "(Radio Button)   Use right-arrow or <return> to toggle."
 msgstr ""
 
 #. #define FORM_LINK_RADIO_UNM_MSG
-#: LYMessages.c:83
-msgid "UNMODIFIABLE form radio button.  Use UP or DOWN arrows or tab to move off."
+#: LYMessages.c:87
+msgid ""
+"UNMODIFIABLE form radio button.  Use UP or DOWN arrows or tab to move off."
 msgstr ""
 
 #. #define FORM_LINK_SUBMIT_PREFIX
-#: LYMessages.c:85
+#: LYMessages.c:89
 msgid "Submit ('x' for no cache) to "
 msgstr ""
 
 #. #define FORM_LINK_RESUBMIT_PREFIX
-#: LYMessages.c:87
+#: LYMessages.c:91
 msgid "Submit to "
 msgstr ""
 
 #. #define FORM_LINK_SUBMIT_MESSAGE
-#: LYMessages.c:89
-msgid "(Form submit button) Use right-arrow or <return> to submit ('x' for no cache)."
+#: LYMessages.c:93
+msgid ""
+"(Form submit button) Use right-arrow or <return> to submit ('x' for no "
+"cache)."
 msgstr ""
 
 #. #define FORM_LINK_RESUBMIT_MESSAGE
-#: LYMessages.c:91
+#: LYMessages.c:95
 msgid "(Form submit button) Use right-arrow or <return> to submit."
 msgstr ""
 
 #. #define FORM_LINK_SUBMIT_DIS_MSG
-#: LYMessages.c:93
+#: LYMessages.c:97
 msgid "DISABLED form submit button.  Use UP or DOWN arrows or tab to move off."
 msgstr ""
 
 #. #define FORM_LINK_SUBMIT_MAILTO_PREFIX
-#: LYMessages.c:95
+#: LYMessages.c:99
 msgid "Submit mailto form to "
 msgstr ""
 
 #. #define FORM_LINK_SUBMIT_MAILTO_MSG
-#: LYMessages.c:97
+#: LYMessages.c:101
 msgid "(mailto form submit button) Use right-arrow or <return> to submit."
 msgstr ""
 
 #. #define FORM_LINK_SUBMIT_MAILTO_DIS_MSG
-#: LYMessages.c:99
+#: LYMessages.c:103
 msgid "(mailto form submit button) Mail is disallowed so you cannot submit."
 msgstr ""
 
 #. #define FORM_LINK_RESET_MESSAGE
-#: LYMessages.c:101
-msgid "(Form reset button)   Use right-arrow or <return> to reset form to defaults."
+#: LYMessages.c:105
+msgid ""
+"(Form reset button)   Use right-arrow or <return> to reset form to defaults."
 msgstr ""
 
 #. #define FORM_LINK_RESET_DIS_MSG
-#: LYMessages.c:103
+#: LYMessages.c:107
 msgid "DISABLED form reset button.  Use UP or DOWN arrows or tab to move off."
 msgstr ""
 
 #. #define FORM_LINK_OPTION_LIST_MESSAGE
-#: LYMessages.c:105
-msgid "(Option list) Hit return and use arrow keys and return to select option."
+#: LYMessages.c:109
+msgid ""
+"(Option list) Hit return and use arrow keys and return to select option."
 msgstr ""
 
 #. #define CHOICE_LIST_MESSAGE
-#: LYMessages.c:107
-msgid "(Choice list) Hit return and use arrow keys and return to select option."
+#: LYMessages.c:111
+msgid ""
+"(Choice list) Hit return and use arrow keys and return to select option."
 msgstr ""
 
 #. #define FORM_LINK_OPTION_LIST_UNM_MSG
-#: LYMessages.c:109
+#: LYMessages.c:113
 msgid "UNMODIFIABLE option list.  Use return or arrow keys to review or leave."
 msgstr ""
 
 #. #define CHOICE_LIST_UNM_MSG
-#: LYMessages.c:111
+#: LYMessages.c:115
 msgid "UNMODIFIABLE choice list.  Use return or arrow keys to review or leave."
 msgstr ""
 
-#: LYMessages.c:112
+#: LYMessages.c:116
 msgid "Submitting form..."
 msgstr ""
 
-#: LYMessages.c:113
+#: LYMessages.c:117
 msgid "Resetting form..."
 msgstr ""
 
 #. #define RELOADING_FORM
-#: LYMessages.c:115
+#: LYMessages.c:119
 msgid "Reloading document.  Any form entries will be lost!"
 msgstr ""
 
-#: LYMessages.c:116
+#: LYMessages.c:120
+#, c-format
 msgid "Warning: Cannot transcode form data to charset %s!"
 msgstr ""
 
 #. #define NORMAL_LINK_MESSAGE
-#: LYMessages.c:119
+#: LYMessages.c:123
 msgid "(NORMAL LINK)   Use right-arrow or <return> to activate."
 msgstr ""
 
-#: LYMessages.c:120
+#: LYMessages.c:124
 msgid "The resource requested is not available at this time."
 msgstr ""
 
-#: LYMessages.c:121
+#: LYMessages.c:125
 msgid "Enter Lynx keystroke command: "
 msgstr ""
 
-#: LYMessages.c:122
+#: LYMessages.c:126
 msgid "Looking up "
 msgstr ""
 
-#: LYMessages.c:123
+#: LYMessages.c:127
+#, c-format
 msgid "Getting %s"
 msgstr ""
 
-#: LYMessages.c:124
+#: LYMessages.c:128
+#, c-format
 msgid "Skipping %s"
 msgstr ""
 
-#: LYMessages.c:125
+#: LYMessages.c:129
+#, c-format
 msgid "Using %s"
 msgstr ""
 
-#: LYMessages.c:126
+#: LYMessages.c:130
+#, c-format
 msgid "Illegal URL: %s"
 msgstr ""
 
-#: LYMessages.c:127
+#: LYMessages.c:131
+#, c-format
 msgid "Badly formed address %s"
 msgstr ""
 
-#: LYMessages.c:128
+#: LYMessages.c:132
+#, c-format
 msgid "URL: %s"
 msgstr ""
 
-#: LYMessages.c:129
+#: LYMessages.c:133
 msgid "Unable to access WWW file!!!"
 msgstr ""
 
-#: LYMessages.c:130
+#: LYMessages.c:134
+#, c-format
 msgid "This is a searchable index.  Use %s to search."
 msgstr ""
 
 #. #define WWW_INDEX_MORE_MESSAGE
-#: LYMessages.c:132
+#: LYMessages.c:136
+#, c-format
 msgid "--More--  This is a searchable index.  Use %s to search."
 msgstr ""
 
-#: LYMessages.c:133
+#: LYMessages.c:137
 msgid "You have entered an invalid link number."
 msgstr ""
 
 #. #define SOURCE_HELP
-#: LYMessages.c:135
-msgid "Currently viewing document source.  Press '\\' to return to rendered version."
+#: LYMessages.c:139
+msgid ""
+"Currently viewing document source.  Press '\\' to return to rendered version."
 msgstr ""
 
 #. #define NOVICE_LINE_ONE
-#: LYMessages.c:137
-msgid "  Arrow keys: Up and Down to move.  Right to follow a link; Left to go back.  \n"
+#: LYMessages.c:141
+msgid ""
+"  Arrow keys: Up and Down to move.  Right to follow a link; Left to go back. "
+" \n"
 msgstr ""
 
 #. #define NOVICE_LINE_TWO
-#: LYMessages.c:139
-msgid " H)elp O)ptions P)rint G)o M)ain screen Q)uit /=search [delete]=history list \n"
+#: LYMessages.c:143
+msgid ""
+" H)elp O)ptions P)rint G)o M)ain screen Q)uit /=search [delete]=history list "
+"\n"
 msgstr ""
 
 #. #define NOVICE_LINE_TWO_A
-#: LYMessages.c:141
-msgid "  O)ther cmds  H)elp  K)eymap  G)oto  P)rint  M)ain screen  o)ptions  Q)uit  \n"
+#: LYMessages.c:145
+msgid ""
+"  O)ther cmds  H)elp  K)eymap  G)oto  P)rint  M)ain screen  o)ptions  Q)uit  "
+"\n"
 msgstr ""
 
 #. #define NOVICE_LINE_TWO_B
-#: LYMessages.c:143
-msgid "  O)ther cmds  B)ack  E)dit  D)ownload ^R)eload ^W)ipe screen  search doc: / \n"
+#: LYMessages.c:147
+msgid ""
+"  O)ther cmds  B)ack  E)dit  D)ownload ^R)eload ^W)ipe screen  search doc: / "
+"\n"
 msgstr ""
 
 #. #define NOVICE_LINE_TWO_C
-#: LYMessages.c:145
-msgid "  O)ther cmds  C)omment  History: <delete>  Bookmarks: V)iew, A)dd, R)emove  \n"
+#: LYMessages.c:149
+msgid ""
+"  O)ther cmds  C)omment  History: <delete>  Bookmarks: V)iew, A)dd, R)emove  "
+"\n"
 msgstr ""
 
 #. #define FORM_NOVICELINE_ONE
-#: LYMessages.c:147
-msgid "            Enter text into the field by typing on the keyboard              "
+#: LYMessages.c:151
+msgid ""
+"            Enter text into the field by typing on the keyboard              "
 msgstr ""
 
 #. #define FORM_NOVICELINE_TWO
-#: LYMessages.c:149
-msgid "    Ctrl-U to delete all text in field, [Backspace] to delete a character    "
+#: LYMessages.c:153
+msgid ""
+"    Ctrl-U to delete all text in field, [Backspace] to delete a character    "
 msgstr ""
 
 #. mailto
-#: LYMessages.c:152
+#: LYMessages.c:156
 msgid "Malformed mailto form submission!  Cancelled!"
 msgstr ""
 
-#: LYMessages.c:153
+#: LYMessages.c:157
 msgid "Warning!  Control codes in mail address replaced by ?"
 msgstr ""
 
-#: LYMessages.c:154
+#: LYMessages.c:158
 msgid "Mail disallowed!  Cannot submit."
 msgstr ""
 
-#: LYMessages.c:155
+#: LYMessages.c:159
 msgid "Mailto form submission failed!"
 msgstr ""
 
-#: LYMessages.c:156
+#: LYMessages.c:160
 msgid "Mailto form submission Cancelled!!!"
 msgstr ""
 
-#: LYMessages.c:157
+#: LYMessages.c:161
 msgid "Sending form content..."
 msgstr ""
 
-#: LYMessages.c:158
+#: LYMessages.c:162
 msgid "No email address is present in mailto URL!"
 msgstr ""
 
 #. #define MAILTO_URL_TEMPOPEN_FAILED
-#: LYMessages.c:160
+#: LYMessages.c:164
 msgid "Unable to open temporary file for mailto URL!"
 msgstr ""
 
-#: LYMessages.c:161
+#: LYMessages.c:165
 msgid "Comment request cancelled!!!"
 msgstr ""
 
 #. #define INC_ORIG_MSG_PROMPT
-#: LYMessages.c:163
+#: LYMessages.c:167
 msgid "Do you wish to include the original message?"
 msgstr ""
 
 #. #define INC_PREPARSED_MSG_PROMPT
-#: LYMessages.c:165
+#: LYMessages.c:169
 msgid "Do you wish to include the preparsed source?"
 msgstr ""
 
 #. #define SPAWNING_EDITOR_FOR_MAIL
-#: LYMessages.c:167
+#: LYMessages.c:171
 msgid "Spawning your selected editor to edit mail message"
 msgstr ""
 
 #. #define ERROR_SPAWNING_EDITOR
-#: LYMessages.c:169
+#: LYMessages.c:173
 msgid "Error spawning editor, check your editor definition in the options menu"
 msgstr ""
 
-#: LYMessages.c:170
+#: LYMessages.c:174
 msgid "Send this comment?"
 msgstr ""
 
-#: LYMessages.c:171
+#: LYMessages.c:175
 msgid "Send this message?"
 msgstr ""
 
-#: LYMessages.c:172
+#: LYMessages.c:176
 msgid "Sending your message..."
 msgstr ""
 
-#: LYMessages.c:173
+#: LYMessages.c:177
 msgid "Sending your comment:"
 msgstr ""
 
 #. textarea
-#: LYMessages.c:176
+#: LYMessages.c:180
 msgid "Not in a TEXTAREA; cannot use external editor."
 msgstr ""
 
-#: LYMessages.c:179
+#: LYMessages.c:181
+msgid "Not in a TEXTAREA; cannot use command."
+msgstr ""
+
+#: LYMessages.c:184
 msgid "file: ACTIONs are disallowed!"
 msgstr ""
 
 #. #define FILE_SERVED_LINKS_DISALLOWED
-#: LYMessages.c:181
+#: LYMessages.c:186
 msgid "file: URLs via served links are disallowed!"
 msgstr ""
 
-#: LYMessages.c:182
+#: LYMessages.c:187
+msgid "Access to local files denied."
+msgstr ""
+
+#: LYMessages.c:188
 msgid "file: URLs via bookmarks are disallowed!"
 msgstr ""
 
 #. #define SPECIAL_VIA_EXTERNAL_DISALLOWED
-#: LYMessages.c:184
+#: LYMessages.c:190
 msgid "This special URL is not allowed in external documents!"
 msgstr ""
 
-#: LYMessages.c:185
+#: LYMessages.c:191
 msgid "Press <return> to return to Lynx."
 msgstr ""
 
 #. #define SPAWNING_MSG
-#: LYMessages.c:188
+#: LYMessages.c:194
 msgid "Spawning DCL subprocess.  Use 'logout' to return to Lynx.\n"
 msgstr ""
 
 #. #define SPAWNING_MSG
-#: LYMessages.c:192
+#: LYMessages.c:198
 msgid "Type EXIT to return to Lynx.\n"
 msgstr ""
 
-#. UNIX
 #. #define SPAWNING_MSG
-#: LYMessages.c:195
+#: LYMessages.c:201
 msgid "Spawning your default shell.  Use 'exit' to return to Lynx.\n"
 msgstr ""
 
-#. VMS
-#: LYMessages.c:198
+#: LYMessages.c:204
 msgid "Spawning is currently disabled."
 msgstr ""
 
-#: LYMessages.c:199
+#: LYMessages.c:205
 msgid "The 'd'ownload command is currently disabled."
 msgstr ""
 
-#: LYMessages.c:200
+#: LYMessages.c:206
 msgid "You cannot download an input field."
 msgstr ""
 
-#: LYMessages.c:201
+#: LYMessages.c:207
 msgid "Form has a mailto action!  Cannot download."
 msgstr ""
 
-#: LYMessages.c:202
+#: LYMessages.c:208
 msgid "You cannot download a mailto: link."
 msgstr ""
 
-#: LYMessages.c:203
+#: LYMessages.c:209
 msgid "You cannot download cookies."
 msgstr ""
 
-#: LYMessages.c:204
+#: LYMessages.c:210
 msgid "You cannot download a printing option."
 msgstr ""
 
-#: LYMessages.c:205
+#: LYMessages.c:211
 msgid "You cannot download an upload option."
 msgstr ""
 
-#: LYMessages.c:206
+#: LYMessages.c:212
 msgid "You cannot download an permit option."
 msgstr ""
 
-#: LYMessages.c:207
+#: LYMessages.c:213
 msgid "This special URL cannot be downloaded!"
 msgstr ""
 
-#: LYMessages.c:208
+#: LYMessages.c:214
 msgid "Nothing to download."
 msgstr ""
 
-#: LYMessages.c:209
+#: LYMessages.c:215
 msgid "Trace ON!"
 msgstr ""
 
-#: LYMessages.c:210
+#: LYMessages.c:216
 msgid "Trace OFF!"
 msgstr ""
 
 #. #define CLICKABLE_IMAGES_ON
-#: LYMessages.c:212
+#: LYMessages.c:218
 msgid "Links will be included for all images!  Reloading..."
 msgstr ""
 
 #. #define CLICKABLE_IMAGES_OFF
-#: LYMessages.c:214
+#: LYMessages.c:220
 msgid "Standard image handling restored!  Reloading..."
 msgstr ""
 
 #. #define PSEUDO_INLINE_ALTS_ON
-#: LYMessages.c:216
-msgid "Pseudo_ALTs will be inserted for inlines without ALT strings!  Reloading..."
+#: LYMessages.c:222
+msgid ""
+"Pseudo_ALTs will be inserted for inlines without ALT strings!  Reloading..."
 msgstr ""
 
 #. #define PSEUDO_INLINE_ALTS_OFF
-#: LYMessages.c:218
+#: LYMessages.c:224
 msgid "Inlines without an ALT string specified will be ignored!  Reloading..."
 msgstr ""
 
-#: LYMessages.c:219
+#: LYMessages.c:225
 msgid "Raw 8-bit or CJK mode toggled OFF!  Reloading..."
 msgstr ""
 
-#: LYMessages.c:220
+#: LYMessages.c:226
 msgid "Raw 8-bit or CJK mode toggled ON!  Reloading..."
 msgstr ""
 
 #. #define HEAD_D_L_OR_CANCEL
-#: LYMessages.c:222
+#: LYMessages.c:228
 msgid "Send HEAD request for D)ocument or L)ink, or C)ancel? (d,l,c): "
 msgstr ""
 
 #. #define HEAD_D_OR_CANCEL
-#: LYMessages.c:224
+#: LYMessages.c:230
 msgid "Send HEAD request for D)ocument, or C)ancel? (d,c): "
 msgstr ""
 
-#: LYMessages.c:225
+#: LYMessages.c:231
 msgid "Sorry, the document is not an http URL."
 msgstr ""
 
-#: LYMessages.c:226
+#: LYMessages.c:232
 msgid "Sorry, the link is not an http URL."
 msgstr ""
 
-#: LYMessages.c:227
+#: LYMessages.c:233
 msgid "Sorry, the ACTION for this form is disabled."
 msgstr ""
 
 #. #define FORM_ACTION_NOT_HTTP_URL
-#: LYMessages.c:229
+#: LYMessages.c:235
 msgid "Sorry, the ACTION for this form is not an http URL."
 msgstr ""
 
-#: LYMessages.c:230
+#: LYMessages.c:236
 msgid "Not an http URL or form ACTION!"
 msgstr ""
 
-#: LYMessages.c:231
+#: LYMessages.c:237
 msgid "This special URL cannot be a form ACTION!"
 msgstr ""
 
-#: LYMessages.c:232
+#: LYMessages.c:238
 msgid "URL is not in starting realm!"
 msgstr ""
 
-#: LYMessages.c:233
+#: LYMessages.c:239
 msgid "News posting is disabled!"
 msgstr ""
 
-#: LYMessages.c:234
+#: LYMessages.c:240
 msgid "File management support is disabled!"
 msgstr ""
 
-#: LYMessages.c:235
+#: LYMessages.c:241
 msgid "No jump file is currently available."
 msgstr ""
 
-#: LYMessages.c:236
+#: LYMessages.c:242
 msgid "Jump to (use '?' for list): "
 msgstr ""
 
-#: LYMessages.c:237
+#: LYMessages.c:243
 msgid "Jumping to a shortcut URL is disallowed!"
 msgstr ""
 
-#: LYMessages.c:238
+#: LYMessages.c:244
 msgid "Random URL is disallowed!  Use a shortcut."
 msgstr ""
 
-#: LYMessages.c:239
+#: LYMessages.c:245
 msgid "No random URLs have been used thus far."
 msgstr ""
 
-#: LYMessages.c:240
+#: LYMessages.c:246
 msgid "Bookmark features are currently disabled."
 msgstr ""
 
-#: LYMessages.c:241
+#: LYMessages.c:247
 msgid "Execution via bookmarks is disabled."
 msgstr ""
 
 #. #define BOOKMARK_FILE_NOT_DEFINED
-#: LYMessages.c:243
+#: LYMessages.c:249
+#, c-format
 msgid "Bookmark file is not defined. Use %s to see options."
 msgstr ""
 
 #. #define NO_TEMP_FOR_HOTLIST
-#: LYMessages.c:245
+#: LYMessages.c:251
 msgid "Unable to open tempfile for X Mosaic hotlist conversion."
 msgstr ""
 
-#: LYMessages.c:246
+#: LYMessages.c:252
 msgid "ERROR - unable to open bookmark file."
 msgstr ""
 
 #. #define BOOKMARK_OPEN_FAILED_FOR_DEL
-#: LYMessages.c:248
+#: LYMessages.c:254
 msgid "Unable to open bookmark file for deletion of link."
 msgstr ""
 
 #. #define BOOKSCRA_OPEN_FAILED_FOR_DEL
-#: LYMessages.c:250
+#: LYMessages.c:256
 msgid "Unable to open scratch file for deletion of link."
 msgstr ""
 
-#: LYMessages.c:252
+#: LYMessages.c:258
 msgid "Error renaming scratch file."
 msgstr ""
 
-#: LYMessages.c:254
+#: LYMessages.c:260
 msgid "Error renaming temporary file."
 msgstr ""
 
 #. #define BOOKTEMP_COPY_FAIL
-#: LYMessages.c:256
+#: LYMessages.c:262
 msgid "Unable to copy temporary file for deletion of link."
 msgstr ""
 
 #. #define BOOKTEMP_REOPEN_FAIL_FOR_DEL
-#: LYMessages.c:258
+#: LYMessages.c:264
 msgid "Unable to reopen temporary file for deletion of link."
 msgstr ""
 
-#. VMS
 #. #define BOOKMARK_LINK_NOT_ONE_LINE
-#: LYMessages.c:261
+#: LYMessages.c:267
 msgid "Link is not by itself all on one line in bookmark file."
 msgstr ""
 
-#: LYMessages.c:262
+#: LYMessages.c:268
 msgid "Bookmark deletion failed."
 msgstr ""
 
 #. #define BOOKMARKS_NOT_TRAVERSED
-#: LYMessages.c:264
+#: LYMessages.c:270
 msgid "Bookmark files cannot be traversed (only http URLs)."
 msgstr ""
 
 #. #define BOOKMARKS_NOT_OPEN
-#: LYMessages.c:266
+#: LYMessages.c:272
 msgid "Unable to open bookmark file, use 'a' to save a link first"
 msgstr ""
 
-#: LYMessages.c:267
+#: LYMessages.c:273
 msgid "There are no links in this bookmark file!"
 msgstr ""
 
 #. #define BOOK_D_L_OR_CANCEL
-#: LYMessages.c:269
+#: LYMessages.c:275
 msgid "Save D)ocument or L)ink to bookmark file or C)ancel? (d,l,c): "
 msgstr ""
 
-#: LYMessages.c:270
+#: LYMessages.c:276
 msgid "Save D)ocument to bookmark file or C)ancel? (d,c): "
 msgstr ""
 
-#: LYMessages.c:271
+#: LYMessages.c:277
 msgid "Save L)ink to bookmark file or C)ancel? (l,c): "
 msgstr ""
 
 #. #define NOBOOK_POST_FORM
-#: LYMessages.c:273
+#: LYMessages.c:279
 msgid "Documents from forms with POST content cannot be saved as bookmarks."
 msgstr ""
 
-#: LYMessages.c:274
+#: LYMessages.c:280
 msgid "Cannot save form fields/links"
 msgstr ""
 
 #. #define NOBOOK_HSML
-#: LYMessages.c:276
+#: LYMessages.c:282
 msgid "History, showinfo, menu and list files cannot be saved as bookmarks."
 msgstr ""
 
 #. #define CONFIRM_BOOKMARK_DELETE
-#: LYMessages.c:278
+#: LYMessages.c:284
 msgid "Do you really want to delete this link from your bookmark file?"
 msgstr ""
 
-#: LYMessages.c:279
+#: LYMessages.c:285
 msgid "Malformed address."
 msgstr ""
 
 #. #define HISTORICAL_ON_MINIMAL_OFF
-#: LYMessages.c:281
+#: LYMessages.c:287
 msgid "Historical comment parsing ON (Minimal is overridden)!"
 msgstr ""
 
 #. #define HISTORICAL_OFF_MINIMAL_ON
-#: LYMessages.c:283
+#: LYMessages.c:289
 msgid "Historical comment parsing OFF (Minimal is in effect)!"
 msgstr ""
 
 #. #define HISTORICAL_ON_VALID_OFF
-#: LYMessages.c:285
+#: LYMessages.c:291
 msgid "Historical comment parsing ON (Valid is overridden)!"
 msgstr ""
 
 #. #define HISTORICAL_OFF_VALID_ON
-#: LYMessages.c:287
+#: LYMessages.c:293
 msgid "Historical comment parsing OFF (Valid is in effect)!"
 msgstr ""
 
 #. #define MINIMAL_ON_IN_EFFECT
-#: LYMessages.c:289
+#: LYMessages.c:295
 msgid "Minimal comment parsing ON (and in effect)!"
 msgstr ""
 
 #. #define MINIMAL_OFF_VALID_ON
-#: LYMessages.c:291
+#: LYMessages.c:297
 msgid "Minimal comment parsing OFF (Valid is in effect)!"
 msgstr ""
 
 #. #define MINIMAL_ON_BUT_HISTORICAL
-#: LYMessages.c:293
+#: LYMessages.c:299
 msgid "Minimal comment parsing ON (but Historical is in effect)!"
 msgstr ""
 
 #. #define MINIMAL_OFF_HISTORICAL_ON
-#: LYMessages.c:295
+#: LYMessages.c:301
 msgid "Minimal comment parsing OFF (Historical is in effect)!"
 msgstr ""
 
-#: LYMessages.c:296
+#: LYMessages.c:302
 msgid "Soft double-quote parsing ON!"
 msgstr ""
 
-#: LYMessages.c:297
+#: LYMessages.c:303
 msgid "Soft double-quote parsing OFF!"
 msgstr ""
 
-#: LYMessages.c:298
+#: LYMessages.c:304
 msgid "Now using TagSoup parsing of HTML."
 msgstr ""
 
-#: LYMessages.c:299
+#: LYMessages.c:305
 msgid "Now using SortaSGML parsing of HTML!"
 msgstr ""
 
-#: LYMessages.c:300
+#: LYMessages.c:306
 msgid "You are already at the end of this document."
 msgstr ""
 
-#: LYMessages.c:301
+#: LYMessages.c:307
 msgid "You are already at the beginning of this document."
 msgstr ""
 
-#: LYMessages.c:302
+#: LYMessages.c:308
+#, c-format
 msgid "You are already at page %d of this document."
 msgstr ""
 
-#: LYMessages.c:303
+#: LYMessages.c:309
+#, c-format
 msgid "Link number %d already is current."
 msgstr ""
 
-#: LYMessages.c:304
+#: LYMessages.c:310
 msgid "You are already at the first document"
 msgstr ""
 
-#: LYMessages.c:305
+#: LYMessages.c:311
 msgid "There are no links above this line of the document."
 msgstr ""
 
-#: LYMessages.c:306
+#: LYMessages.c:312
 msgid "There are no links below this line of the document."
 msgstr ""
 
 #. #define MAXLEN_REACHED_DEL_OR_MOV
-#: LYMessages.c:308
+#: LYMessages.c:314
 msgid "Maximum length reached!  Delete text or move off field."
 msgstr ""
 
 #. #define NOT_ON_SUBMIT_OR_LINK
-#: LYMessages.c:310
+#: LYMessages.c:316
 msgid "You are not on a form submission button or normal link."
 msgstr ""
 
 #. #define NEED_CHECKED_RADIO_BUTTON
-#: LYMessages.c:312
+#: LYMessages.c:318
 msgid "One radio button must be checked at all times!"
 msgstr ""
 
-#: LYMessages.c:313
+#: LYMessages.c:319
 msgid "Do you want to go back to the previous document?"
 msgstr ""
 
-#: LYMessages.c:314
+#: LYMessages.c:320
 msgid "Use arrows or tab to move off of field."
 msgstr ""
 
 #. #define ENTER_TEXT_ARROWS_OR_TAB
-#: LYMessages.c:316
+#: LYMessages.c:322
 msgid "Enter text.  Use arrows or tab to move off of field."
 msgstr ""
 
-#: LYMessages.c:317
+#: LYMessages.c:323
 msgid "** Bad HTML!!  No form action defined. **"
 msgstr ""
 
-#: LYMessages.c:318
+#: LYMessages.c:324
 msgid "Bad HTML!!  Unable to create popup window!"
 msgstr ""
 
-#: LYMessages.c:319
+#: LYMessages.c:325
 msgid "Unable to create popup window!"
 msgstr ""
 
-#: LYMessages.c:320
+#: LYMessages.c:326
 msgid "Goto a random URL is disallowed!"
 msgstr ""
 
-#: LYMessages.c:321
+#: LYMessages.c:327
 msgid "Goto a non-http URL is disallowed!"
 msgstr ""
 
-#: LYMessages.c:322
+#: LYMessages.c:328
 msgid "You are not allowed to goto \"cso:\" URLs"
 msgstr ""
 
-#: LYMessages.c:323
+#: LYMessages.c:329
 msgid "You are not allowed to goto \"file:\" URLs"
 msgstr ""
 
-#: LYMessages.c:324
+#: LYMessages.c:330
 msgid "You are not allowed to goto \"finger:\" URLs"
 msgstr ""
 
-#: LYMessages.c:325
+#: LYMessages.c:331
 msgid "You are not allowed to goto \"ftp:\" URLs"
 msgstr ""
 
-#: LYMessages.c:326
+#: LYMessages.c:332
 msgid "You are not allowed to goto \"gopher:\" URLs"
 msgstr ""
 
-#: LYMessages.c:327
+#: LYMessages.c:333
 msgid "You are not allowed to goto \"http:\" URLs"
 msgstr ""
 
-#: LYMessages.c:328
+#: LYMessages.c:334
 msgid "You are not allowed to goto \"https:\" URLs"
 msgstr ""
 
-#: LYMessages.c:329
+#: LYMessages.c:335
 msgid "You are not allowed to goto \"lynxcgi:\" URLs"
 msgstr ""
 
-#: LYMessages.c:330
+#: LYMessages.c:336
 msgid "You are not allowed to goto \"lynxexec:\" URLs"
 msgstr ""
 
-#: LYMessages.c:331
+#: LYMessages.c:337
 msgid "You are not allowed to goto \"lynxprog:\" URLs"
 msgstr ""
 
-#: LYMessages.c:332
+#: LYMessages.c:338
 msgid "You are not allowed to goto \"mailto:\" URLs"
 msgstr ""
 
-#: LYMessages.c:333
+#: LYMessages.c:339
 msgid "You are not allowed to goto \"news:\" URLs"
 msgstr ""
 
-#: LYMessages.c:334
+#: LYMessages.c:340
 msgid "You are not allowed to goto \"nntp:\" URLs"
 msgstr ""
 
-#: LYMessages.c:335
+#: LYMessages.c:341
 msgid "You are not allowed to goto \"rlogin:\" URLs"
 msgstr ""
 
-#: LYMessages.c:336
+#: LYMessages.c:342
 msgid "You are not allowed to goto \"snews:\" URLs"
 msgstr ""
 
-#: LYMessages.c:337
+#: LYMessages.c:343
 msgid "You are not allowed to goto \"telnet:\" URLs"
 msgstr ""
 
-#: LYMessages.c:338
+#: LYMessages.c:344
 msgid "You are not allowed to goto \"tn3270:\" URLs"
 msgstr ""
 
-#: LYMessages.c:339
+#: LYMessages.c:345
 msgid "You are not allowed to goto \"wais:\" URLs"
 msgstr ""
 
-#: LYMessages.c:340
+#: LYMessages.c:346
 msgid "This special URL is not allowed as a goto!"
 msgstr ""
 
-#: LYMessages.c:341
+#: LYMessages.c:347
 msgid "URL to open: "
 msgstr ""
 
-#: LYMessages.c:342
+#: LYMessages.c:348
 msgid "Edit the current Goto URL: "
 msgstr ""
 
-#: LYMessages.c:343
+#: LYMessages.c:349
 msgid "Edit the previous Goto URL: "
 msgstr ""
 
-#: LYMessages.c:344
+#: LYMessages.c:350
 msgid "Edit a previous Goto URL: "
 msgstr ""
 
-#: LYMessages.c:345
+#: LYMessages.c:351
 msgid "Current document has POST data."
 msgstr ""
 
-#: LYMessages.c:346
+#: LYMessages.c:352
 msgid "Edit this document's URL: "
 msgstr ""
 
-#: LYMessages.c:347
+#: LYMessages.c:353
 msgid "Edit the current link's URL: "
 msgstr ""
 
-#: LYMessages.c:348
+#: LYMessages.c:354
 msgid "You cannot edit File Management URLs"
 msgstr ""
 
-#: LYMessages.c:349
+#: LYMessages.c:355
 msgid "Enter a database query: "
 msgstr ""
 
-#: LYMessages.c:350
+#: LYMessages.c:356
 msgid "Enter a whereis query: "
 msgstr ""
 
-#: LYMessages.c:351
+#: LYMessages.c:357
 msgid "Edit the current query: "
 msgstr ""
 
-#: LYMessages.c:352
+#: LYMessages.c:358
 msgid "Edit the previous query: "
 msgstr ""
 
-#: LYMessages.c:353
+#: LYMessages.c:359
 msgid "Edit a previous query: "
 msgstr ""
 
 #. #define USE_C_R_TO_RESUB_CUR_QUERY
-#: LYMessages.c:355
+#: LYMessages.c:361
 msgid "Use Control-R to resubmit the current query."
 msgstr ""
 
-#: LYMessages.c:356
+#: LYMessages.c:362
 msgid "Edit the current shortcut: "
 msgstr ""
 
-#: LYMessages.c:357
+#: LYMessages.c:363
 msgid "Edit the previous shortcut: "
 msgstr ""
 
-#: LYMessages.c:358
+#: LYMessages.c:364
 msgid "Edit a previous shortcut: "
 msgstr ""
 
-#: LYMessages.c:359
+#: LYMessages.c:365
+#, c-format
 msgid "Key '%c' is not mapped to a jump file!"
 msgstr ""
 
-#: LYMessages.c:360
+#: LYMessages.c:366
 msgid "Cannot locate jump file!"
 msgstr ""
 
-#: LYMessages.c:361
+#: LYMessages.c:367
 msgid "Cannot open jump file!"
 msgstr ""
 
-#: LYMessages.c:362
+#: LYMessages.c:368
 msgid "Error reading jump file!"
 msgstr ""
 
-#: LYMessages.c:363
+#: LYMessages.c:369
 msgid "Out of memory reading jump file!"
 msgstr ""
 
-#: LYMessages.c:364
+#: LYMessages.c:370
 msgid "Out of memory reading jump table!"
 msgstr ""
 
-#: LYMessages.c:365
+#: LYMessages.c:371
 msgid "No index is currently available."
 msgstr ""
 
 #. #define CONFIRM_MAIN_SCREEN
-#: LYMessages.c:367
+#: LYMessages.c:373
 msgid "Do you really want to go to the Main screen?"
 msgstr ""
 
-#: LYMessages.c:368
+#: LYMessages.c:374
 msgid "You are already at main screen!"
 msgstr ""
 
 #. #define NOT_ISINDEX
-#: LYMessages.c:370
-msgid "Not a searchable indexed document -- press '/' to search for a text string"
+#: LYMessages.c:376
+msgid ""
+"Not a searchable indexed document -- press '/' to search for a text string"
 msgstr ""
 
 #. #define NO_OWNER
-#: LYMessages.c:372
+#: LYMessages.c:378
 msgid "No owner is defined for this file so you cannot send a comment"
 msgstr ""
 
-#: LYMessages.c:373
+#: LYMessages.c:379
+#, c-format
 msgid "No owner is defined. Use %s?"
 msgstr ""
 
-#: LYMessages.c:374
+#: LYMessages.c:380
 msgid "Do you wish to send a comment?"
 msgstr ""
 
-#: LYMessages.c:375
+#: LYMessages.c:381
 msgid "Mail is disallowed so you cannot send a comment"
 msgstr ""
 
-#: LYMessages.c:376
+#: LYMessages.c:382
 msgid "The 'e'dit command is currently disabled."
 msgstr ""
 
-#: LYMessages.c:377
+#: LYMessages.c:383
+msgid "External editing is currently disabled."
+msgstr ""
+
+#: LYMessages.c:384
 msgid "System error - failure to get status."
 msgstr ""
 
-#: LYMessages.c:378
+#: LYMessages.c:385
 msgid "No editor is defined!"
 msgstr ""
 
-#: LYMessages.c:379
+#: LYMessages.c:386
 msgid "The 'p'rint command is currently disabled."
 msgstr ""
 
-#: LYMessages.c:380
+#: LYMessages.c:387
 msgid "Document has no Toolbar links or Banner."
 msgstr ""
 
-#: LYMessages.c:381
+#: LYMessages.c:388
 msgid "Unable to open traversal file."
 msgstr ""
 
-#: LYMessages.c:382
+#: LYMessages.c:389
 msgid "Unable to open traversal found file."
 msgstr ""
 
-#: LYMessages.c:383
+#: LYMessages.c:390
 msgid "Unable to open reject file."
 msgstr ""
 
-#: LYMessages.c:384
+#: LYMessages.c:391
 msgid "Unable to open traversal errors output file"
 msgstr ""
 
-#: LYMessages.c:385
+#: LYMessages.c:392
 msgid "TRAVERSAL WAS INTERRUPTED"
 msgstr ""
 
-#: LYMessages.c:386
+#: LYMessages.c:393
 msgid "Follow link (or goto link or page) number: "
 msgstr ""
 
-#: LYMessages.c:387
+#: LYMessages.c:394
 msgid "Select option (or page) number: "
 msgstr ""
 
-#: LYMessages.c:388
+#: LYMessages.c:395
 msgid "Option choice (or page) number: "
 msgstr ""
 
-#: LYMessages.c:389
+#: LYMessages.c:396
+#, c-format
 msgid "Option number %d already is current."
 msgstr ""
 
-#: LYMessages.c:390
+#: LYMessages.c:397
+#, c-format
 msgid "Choice number %d already is current."
 msgstr ""
 
 #. #define ALREADY_AT_OPTION_END
-#: LYMessages.c:392
+#: LYMessages.c:399
 msgid "You are already at the end of this option list."
 msgstr ""
 
 #. #define ALREADY_AT_CHOICE_END
-#: LYMessages.c:394
+#: LYMessages.c:401
 msgid "You are already at the end of this choice list."
 msgstr ""
 
 #. #define ALREADY_AT_OPTION_BEGIN
-#: LYMessages.c:396
+#: LYMessages.c:403
 msgid "You are already at the beginning of this option list."
 msgstr ""
 
 #. #define ALREADY_AT_CHOICE_BEGIN
-#: LYMessages.c:398
+#: LYMessages.c:405
 msgid "You are already at the beginning of this choice list."
 msgstr ""
 
 #. #define ALREADY_AT_OPTION_PAGE
-#: LYMessages.c:400
+#: LYMessages.c:407
+#, c-format
 msgid "You are already at page %d of this option list."
 msgstr ""
 
 #. #define ALREADY_AT_CHOICE_PAGE
-#: LYMessages.c:402
+#: LYMessages.c:409
+#, c-format
 msgid "You are already at page %d of this choice list."
 msgstr ""
 
-#: LYMessages.c:403
+#: LYMessages.c:410
 msgid "You have entered an invalid option number."
 msgstr ""
 
-#: LYMessages.c:404
+#: LYMessages.c:411
 msgid "You have entered an invalid choice number."
 msgstr ""
 
-#: LYMessages.c:405
+#: LYMessages.c:412
 msgid "** Bad HTML!!  Use -trace to diagnose. **"
 msgstr ""
 
-#: LYMessages.c:406
+#: LYMessages.c:413
 msgid "Give name of file to save in"
 msgstr ""
 
-#: LYMessages.c:407
+#: LYMessages.c:414
 msgid "Can't save data to file -- please run WWW locally"
 msgstr ""
 
-#: LYMessages.c:408
+#: LYMessages.c:415
 msgid "Can't open temporary file!"
 msgstr ""
 
-#: LYMessages.c:409
+#: LYMessages.c:416
 msgid "Can't open output file!  Cancelling!"
 msgstr ""
 
-#: LYMessages.c:410
+#: LYMessages.c:417
 msgid "Execution is disabled."
 msgstr ""
 
 #. #define EXECUTION_DISABLED_FOR_FILE
-#: LYMessages.c:412
+#: LYMessages.c:419
+#, c-format
 msgid "Execution is not enabled for this file.  See the Options menu (use %s)."
 msgstr ""
 
 #. #define EXECUTION_NOT_COMPILED
-#: LYMessages.c:414
+#: LYMessages.c:421
 msgid "Execution capabilities are not compiled into this version."
 msgstr ""
 
-#: LYMessages.c:415
+#: LYMessages.c:422
 msgid "This file cannot be displayed on this terminal."
 msgstr ""
 
 #. #define CANNOT_DISPLAY_FILE_D_OR_C
-#: LYMessages.c:417
+#: LYMessages.c:424
 msgid "This file cannot be displayed on this terminal:  D)ownload, or C)ancel"
 msgstr ""
 
-#: LYMessages.c:418
+#: LYMessages.c:425
+#, c-format
 msgid "%s  D)ownload, or C)ancel"
 msgstr ""
 
-#: LYMessages.c:419
+#: LYMessages.c:426
 msgid "Cancelling file."
 msgstr ""
 
-#: LYMessages.c:420
+#: LYMessages.c:427
 msgid "Retrieving file.  - PLEASE WAIT -"
 msgstr ""
 
-#: LYMessages.c:421
+#: LYMessages.c:428
 msgid "Enter a filename: "
 msgstr ""
 
-#: LYMessages.c:422
+#: LYMessages.c:429
 msgid "Edit the previous filename: "
 msgstr ""
 
-#: LYMessages.c:423
+#: LYMessages.c:430
 msgid "Edit a previous filename: "
 msgstr ""
 
-#: LYMessages.c:424
+#: LYMessages.c:431
 msgid "Enter a new filename: "
 msgstr ""
 
-#: LYMessages.c:425
+#: LYMessages.c:432
 msgid "File name may not begin with a dot."
 msgstr ""
 
-#: LYMessages.c:427
+#: LYMessages.c:434
 msgid "File exists.  Create higher version?"
 msgstr ""
 
-#: LYMessages.c:429
+#: LYMessages.c:436
 msgid "File exists.  Overwrite?"
 msgstr ""
 
-#. VMS
-#: LYMessages.c:431
+#: LYMessages.c:438
 msgid "Cannot write to file."
 msgstr ""
 
-#: LYMessages.c:432
+#: LYMessages.c:439
 msgid "ERROR! - download command is misconfigured."
 msgstr ""
 
-#: LYMessages.c:433
+#: LYMessages.c:440
 msgid "Unable to download file."
 msgstr ""
 
-#: LYMessages.c:434
+#: LYMessages.c:441
 msgid "Building directory listing..."
 msgstr ""
 
-#: LYMessages.c:435
+#: LYMessages.c:442
 msgid "Saving..."
 msgstr ""
 
-#: LYMessages.c:436
+#: LYMessages.c:443
+#, c-format
 msgid "Could not edit file '%s'."
 msgstr ""
 
-#: LYMessages.c:437
+#: LYMessages.c:444
 msgid "Could not access file."
 msgstr ""
 
-#: LYMessages.c:438
+#: LYMessages.c:445
 msgid "Could not access directory."
 msgstr ""
 
-#: LYMessages.c:439
+#: LYMessages.c:446
 msgid "Could not load data."
 msgstr ""
 
 #. #define CANNOT_EDIT_REMOTE_FILES
-#: LYMessages.c:441
+#: LYMessages.c:448
 msgid "Lynx cannot currently (e)dit remote WWW files."
 msgstr ""
 
 #. #define CANNOT_EDIT_FIELD
-#: LYMessages.c:443
+#: LYMessages.c:450
 msgid "This field cannot be (e)dited with an external editor."
 msgstr ""
 
-#: LYMessages.c:444
+#: LYMessages.c:451
 msgid "Bad rule"
 msgstr ""
 
-#: LYMessages.c:445
+#: LYMessages.c:452
 msgid "Insufficient operands:"
 msgstr ""
 
-#: LYMessages.c:446
+#: LYMessages.c:453
 msgid "You are not authorized to edit this file."
 msgstr ""
 
-#: LYMessages.c:447
+#: LYMessages.c:454
 msgid "Title: "
 msgstr ""
 
-#: LYMessages.c:448
+#: LYMessages.c:455
 msgid "Subject: "
 msgstr ""
 
-#: LYMessages.c:449
+#: LYMessages.c:456
 msgid "Username: "
 msgstr ""
 
-#: LYMessages.c:450
+#: LYMessages.c:457
 msgid "Password: "
 msgstr ""
 
-#: LYMessages.c:451
+#: LYMessages.c:458
 msgid "lynx: Username and Password required!!!"
 msgstr ""
 
-#: LYMessages.c:452
+#: LYMessages.c:459
 msgid "lynx: Password required!!!"
 msgstr ""
 
-#: LYMessages.c:453
+#: LYMessages.c:460
 msgid "Clear all authorization info for this session?"
 msgstr ""
 
-#: LYMessages.c:454
+#: LYMessages.c:461
 msgid "Authorization info cleared."
 msgstr ""
 
-#: LYMessages.c:455
+#: LYMessages.c:462
 msgid "Authorization failed.  Retry?"
 msgstr ""
 
-#: LYMessages.c:456
+#: LYMessages.c:463
 msgid "cgi support has been disabled by system administrator."
 msgstr ""
 
 #. #define CGI_NOT_COMPILED
-#: LYMessages.c:458
+#: LYMessages.c:465
 msgid "Lynxcgi capabilities are not compiled into this version."
 msgstr ""
 
-#: LYMessages.c:459
+#: LYMessages.c:466
+#, c-format
 msgid "Sorry, no known way of converting %s to %s."
 msgstr ""
 
-#: LYMessages.c:460
+#: LYMessages.c:467
 msgid "Unable to set up connection."
 msgstr ""
 
-#: LYMessages.c:461
+#: LYMessages.c:468
 msgid "Unable to make connection"
 msgstr ""
 
 #. #define MALFORMED_EXEC_REQUEST
-#: LYMessages.c:463
+#: LYMessages.c:470
 msgid "Executable link rejected due to malformed request."
 msgstr ""
 
 #. #define BADCHAR_IN_EXEC_LINK
-#: LYMessages.c:465
+#: LYMessages.c:472
+#, c-format
 msgid "Executable link rejected due to `%c' character."
 msgstr ""
 
 #. #define RELPATH_IN_EXEC_LINK
-#: LYMessages.c:467
+#: LYMessages.c:474
 msgid "Executable link rejected due to relative path string ('../')."
 msgstr ""
 
 #. #define BADLOCPATH_IN_EXEC_LINK
-#: LYMessages.c:469
+#: LYMessages.c:476
 msgid "Executable link rejected due to location or path."
 msgstr ""
 
-#: LYMessages.c:470
+#: LYMessages.c:477
 msgid "Mail access is disabled!"
 msgstr ""
 
 #. #define ACCESS_ONLY_LOCALHOST
-#: LYMessages.c:472
+#: LYMessages.c:479
 msgid "Only files and servers on the local host can be accessed."
 msgstr ""
 
-#: LYMessages.c:473
+#: LYMessages.c:480
 msgid "Telnet access is disabled!"
 msgstr ""
 
 #. #define TELNET_PORT_SPECS_DISABLED
-#: LYMessages.c:475
+#: LYMessages.c:482
 msgid "Telnet port specifications are disabled."
 msgstr ""
 
-#: LYMessages.c:476
+#: LYMessages.c:483
 msgid "USENET news access is disabled!"
 msgstr ""
 
-#: LYMessages.c:477
+#: LYMessages.c:484
 msgid "Rlogin access is disabled!"
 msgstr ""
 
-#: LYMessages.c:478
+#: LYMessages.c:485
 msgid "Ftp access is disabled!"
 msgstr ""
 
-#: LYMessages.c:479
+#: LYMessages.c:486
 msgid "There are no references from this document."
 msgstr ""
 
-#: LYMessages.c:480
+#: LYMessages.c:487
 msgid "There are only hidden links from this document."
 msgstr ""
 
-#: LYMessages.c:482
+#: LYMessages.c:489
 msgid "Unable to open command file."
 msgstr ""
 
-#. VMS
-#: LYMessages.c:484
+#: LYMessages.c:491
 msgid "News Post Cancelled!!!"
 msgstr ""
 
 #. #define SPAWNING_EDITOR_FOR_NEWS
-#: LYMessages.c:486
+#: LYMessages.c:493
 msgid "Spawning your selected editor to edit news message"
 msgstr ""
 
-#: LYMessages.c:487
+#: LYMessages.c:494
 msgid "Post this message?"
 msgstr ""
 
-#: LYMessages.c:488
+#: LYMessages.c:495
+#, c-format
 msgid "Append '%s'?"
 msgstr ""
 
-#: LYMessages.c:489
+#: LYMessages.c:496
 msgid "Posting to newsgroup(s)..."
 msgstr ""
 
-#: LYMessages.c:491
+#: LYMessages.c:498
 msgid "*** You have unread mail. ***"
 msgstr ""
 
-#: LYMessages.c:493
+#: LYMessages.c:500
 msgid "*** You have mail. ***"
 msgstr ""
 
-#. VMS
-#: LYMessages.c:495
+#: LYMessages.c:502
 msgid "*** You have new mail. ***"
 msgstr ""
 
-#: LYMessages.c:496
+#: LYMessages.c:503
 msgid "File insert cancelled!!!"
 msgstr ""
 
-#: LYMessages.c:497
+#: LYMessages.c:504
 msgid "File does not exist."
 msgstr ""
 
-#: LYMessages.c:498
+#: LYMessages.c:505
 msgid "File does not exist - reenter or cancel:"
 msgstr ""
 
-#: LYMessages.c:499
+#: LYMessages.c:506
 msgid "File is not readable."
 msgstr ""
 
-#: LYMessages.c:500
+#: LYMessages.c:507
 msgid "File is not readable - reenter or cancel:"
 msgstr ""
 
-#: LYMessages.c:501
+#: LYMessages.c:508
 msgid "Nothing to insert - file is 0-length."
 msgstr ""
 
-#: LYMessages.c:502
+#: LYMessages.c:509
 msgid "Save request cancelled!!!"
 msgstr ""
 
-#: LYMessages.c:503
+#: LYMessages.c:510
 msgid "Mail request cancelled!!!"
 msgstr ""
 
 #. #define CONFIRM_MAIL_SOURCE_PREPARSED
-#: LYMessages.c:505
+#: LYMessages.c:512
 msgid "Viewing preparsed source.  Are you sure you want to mail it?"
 msgstr ""
 
-#: LYMessages.c:506
+#: LYMessages.c:513
 msgid "Please wait..."
 msgstr ""
 
-#: LYMessages.c:507
+#: LYMessages.c:514
 msgid "Mailing file.  Please wait..."
 msgstr ""
 
-#: LYMessages.c:508
+#: LYMessages.c:515
 msgid "ERROR - Unable to mail file"
 msgstr ""
 
 #. #define CONFIRM_LONG_SCREEN_PRINT
-#: LYMessages.c:510
+#: LYMessages.c:517
+#, c-format
 msgid "File is %d screens long.  Are you sure you want to print?"
 msgstr ""
 
-#: LYMessages.c:511
+#: LYMessages.c:518
 msgid "Print request cancelled!!!"
 msgstr ""
 
-#: LYMessages.c:512
+#: LYMessages.c:519
 msgid "Press <return> to begin: "
 msgstr ""
 
-#: LYMessages.c:513
+#: LYMessages.c:520
 msgid "Press <return> to finish: "
 msgstr ""
 
 #. #define CONFIRM_LONG_PAGE_PRINT
-#: LYMessages.c:515
+#: LYMessages.c:522
+#, c-format
 msgid "File is %d pages long.  Are you sure you want to print?"
 msgstr ""
 
 #. #define CHECK_PRINTER
-#: LYMessages.c:517
+#: LYMessages.c:524
 msgid "Be sure your printer is on-line.  Press <return> to start printing:"
 msgstr ""
 
-#: LYMessages.c:518
+#: LYMessages.c:525
 msgid "ERROR - Unable to allocate file space!!!"
 msgstr ""
 
-#: LYMessages.c:519
+#: LYMessages.c:526
 msgid "Unable to open tempfile"
 msgstr ""
 
-#: LYMessages.c:520
+#: LYMessages.c:527
 msgid "Unable to open print options file"
 msgstr ""
 
-#: LYMessages.c:521
+#: LYMessages.c:528
 msgid "Printing file.  Please wait..."
 msgstr ""
 
-#: LYMessages.c:522
+#: LYMessages.c:529
 msgid "Please enter a valid internet mail address: "
 msgstr ""
 
-#: LYMessages.c:523
+#: LYMessages.c:530
 msgid "ERROR! - printer is misconfigured!"
 msgstr ""
 
-#: LYMessages.c:524
+#: LYMessages.c:531
 msgid "Image map from POST response not available!"
 msgstr ""
 
-#: LYMessages.c:525
+#: LYMessages.c:532
 msgid "Misdirected client-side image MAP request!"
 msgstr ""
 
-#: LYMessages.c:526
+#: LYMessages.c:533
 msgid "Client-side image MAP is not accessible!"
 msgstr ""
 
-#: LYMessages.c:527
+#: LYMessages.c:534
 msgid "No client-side image MAPs are available!"
 msgstr ""
 
-#: LYMessages.c:528
+#: LYMessages.c:535
 msgid "Client-side image MAP is not available!"
 msgstr ""
 
 #. #define OPTION_SCREEN_NEEDS_24
-#: LYMessages.c:531
+#: LYMessages.c:538
 msgid "Screen height must be at least 24 lines for the Options menu!"
 msgstr ""
 
 #. #define OPTION_SCREEN_NEEDS_23
-#: LYMessages.c:533
+#: LYMessages.c:540
 msgid "Screen height must be at least 23 lines for the Options menu!"
 msgstr ""
 
 #. #define OPTION_SCREEN_NEEDS_22
-#: LYMessages.c:535
+#: LYMessages.c:542
 msgid "Screen height must be at least 22 lines for the Options menu!"
 msgstr ""
 
-#. !NO_OPTION_MENU
-#: LYMessages.c:537
+#: LYMessages.c:544
 msgid "That key requires Advanced User mode."
 msgstr ""
 
-#: LYMessages.c:538
+#: LYMessages.c:545
+#, c-format
 msgid "Content-type: %s"
 msgstr ""
 
-#: LYMessages.c:539
+#: LYMessages.c:546
 msgid "Command: "
 msgstr ""
 
-#: LYMessages.c:540
+#: LYMessages.c:547
 msgid " Version "
 msgstr ""
 
-#: LYMessages.c:541
+#: LYMessages.c:548
 msgid " first."
 msgstr ""
 
-#: LYMessages.c:542
+#: LYMessages.c:549
 msgid ", guessing..."
 msgstr ""
 
-#: LYMessages.c:543
+#: LYMessages.c:550
 msgid "Permissions for "
 msgstr ""
 
-#: LYMessages.c:544
+#: LYMessages.c:551
 msgid "Select "
 msgstr ""
 
-#: LYMessages.c:545
+#: LYMessages.c:552
 msgid "capital letter"
 msgstr ""
 
-#: LYMessages.c:546
+#: LYMessages.c:553
 msgid " of option line,"
 msgstr ""
 
-#: LYMessages.c:547
+#: LYMessages.c:554
 msgid " to save,"
 msgstr ""
 
-#: LYMessages.c:548
+#: LYMessages.c:555
 msgid " to "
 msgstr ""
 
-#: LYMessages.c:549
+#: LYMessages.c:556
 msgid " or "
 msgstr ""
 
-#: LYMessages.c:550
+#: LYMessages.c:557
 msgid " index"
 msgstr ""
 
-#: LYMessages.c:551
+#: LYMessages.c:558
 msgid " to return to Lynx."
 msgstr ""
 
-#: LYMessages.c:552
+#: LYMessages.c:559
 msgid "Accept Changes"
 msgstr ""
 
-#: LYMessages.c:553
+#: LYMessages.c:560
 msgid "Reset Changes"
 msgstr ""
 
-#: LYMessages.c:554
+#: LYMessages.c:561
 msgid "Left Arrow cancels changes"
 msgstr ""
 
-#: LYMessages.c:555
+#: LYMessages.c:562
 msgid "Save options to disk"
 msgstr ""
 
-#: LYMessages.c:556
+#: LYMessages.c:563
 msgid "Hit RETURN to accept entered data."
 msgstr ""
 
 #. #define ACCEPT_DATA_OR_DEFAULT
-#: LYMessages.c:558
+#: LYMessages.c:565
 msgid "Hit RETURN to accept entered data.  Delete data to invoke the default."
 msgstr ""
 
-#: LYMessages.c:559
+#: LYMessages.c:566
 msgid "Value accepted!"
 msgstr ""
 
 #. #define VALUE_ACCEPTED_WARNING_X
-#: LYMessages.c:561
+#: LYMessages.c:568
 msgid "Value accepted! -- WARNING: Lynx is configured for XWINDOWS!"
 msgstr ""
 
 #. #define VALUE_ACCEPTED_WARNING_NONX
-#: LYMessages.c:563
+#: LYMessages.c:570
 msgid "Value accepted! -- WARNING: Lynx is NOT configured for XWINDOWS!"
 msgstr ""
 
-#: LYMessages.c:564
+#: LYMessages.c:571
 msgid "You are not allowed to change which editor to use!"
 msgstr ""
 
-#: LYMessages.c:565
+#: LYMessages.c:572
 msgid "Failed to set DISPLAY variable!"
 msgstr ""
 
-#: LYMessages.c:566
+#: LYMessages.c:573
 msgid "Failed to clear DISPLAY variable!"
 msgstr ""
 
 #. #define BOOKMARK_CHANGE_DISALLOWED
-#: LYMessages.c:568
+#: LYMessages.c:575
 msgid "You are not allowed to change the bookmark file!"
 msgstr ""
 
-#: LYMessages.c:569
+#: LYMessages.c:576
 msgid "Terminal does not support color"
 msgstr ""
 
-#: LYMessages.c:570
+#: LYMessages.c:577
+#, c-format
 msgid "Your '%s' terminal does not support color."
 msgstr ""
 
-#: LYMessages.c:571
+#: LYMessages.c:578
 msgid "Access to dot files is disabled!"
 msgstr ""
 
 #. #define UA_COPYRIGHT_WARNING
-#: LYMessages.c:573
-msgid "WARNING: Misrepresentation of the User-Agent may be a copyright violation!"
+#: LYMessages.c:580
+msgid ""
+"WARNING: Misrepresentation of the User-Agent may be a copyright violation!"
 msgstr ""
 
 #. #define CHANGE_OF_SETTING_DISALLOWED
-#: LYMessages.c:575
+#: LYMessages.c:582
 msgid "You are not allowed to change this setting."
 msgstr ""
 
-#: LYMessages.c:576
+#: LYMessages.c:583
 msgid "Saving Options..."
 msgstr ""
 
-#: LYMessages.c:577
+#: LYMessages.c:584
 msgid "Options saved!"
 msgstr ""
 
-#: LYMessages.c:578
+#: LYMessages.c:585
 msgid "Unable to save Options!"
 msgstr ""
 
-#: LYMessages.c:579
+#: LYMessages.c:586
 msgid " 'r' to return to Lynx "
 msgstr ""
 
-#: LYMessages.c:580
+#: LYMessages.c:587
 msgid " '>' to save, or 'r' to return to Lynx "
 msgstr ""
 
 #. #define ANY_KEY_CHANGE_RET_ACCEPT
-#: LYMessages.c:582
+#: LYMessages.c:589
 msgid "Hit any key to change value; RETURN to accept."
 msgstr ""
 
-#: LYMessages.c:583
+#: LYMessages.c:590
 msgid "Error uncompressing temporary file!"
 msgstr ""
 
-#: LYMessages.c:584
+#: LYMessages.c:591
 msgid "Unsupported URL scheme!"
 msgstr ""
 
-#: LYMessages.c:585
+#: LYMessages.c:592
 msgid "Unsupported data: URL!  Use SHOWINFO, for now."
 msgstr ""
 
-#: LYMessages.c:586
+#: LYMessages.c:593
 msgid "Redirection limit of 10 URL's reached."
 msgstr ""
 
-#: LYMessages.c:587
+#: LYMessages.c:594
 msgid "Illegal redirection URL received from server!"
 msgstr ""
 
 #. #define SERVER_ASKED_FOR_REDIRECTION
-#: LYMessages.c:589
+#: LYMessages.c:596
+#, c-format
 msgid "Server asked for %d redirection of POST content to"
 msgstr ""
 
-#: LYMessages.c:590
+#: LYMessages.c:597
 msgid "P)roceed, use G)ET or C)ancel "
 msgstr ""
 
-#: LYMessages.c:591
+#: LYMessages.c:598
 msgid "P)roceed, or C)ancel "
 msgstr ""
 
 #. #define ADVANCED_POST_GET_REDIRECT
-#: LYMessages.c:593
+#: LYMessages.c:600
 msgid "Redirection of POST content.  P)roceed, see U)RL, use G)ET or C)ancel"
 msgstr ""
 
 #. #define ADVANCED_POST_REDIRECT
-#: LYMessages.c:595
+#: LYMessages.c:602
 msgid "Redirection of POST content.  P)roceed, see U)RL, or C)ancel"
 msgstr ""
 
 #. #define CONFIRM_POST_RESUBMISSION
-#: LYMessages.c:597
+#: LYMessages.c:604
 msgid "Document from Form with POST content.  Resubmit?"
 msgstr ""
 
 #. #define CONFIRM_POST_RESUBMISSION_TO
-#: LYMessages.c:599
+#: LYMessages.c:606
+#, c-format
 msgid "Resubmit POST content to %s ?"
 msgstr ""
 
 #. #define CONFIRM_POST_LIST_RELOAD
-#: LYMessages.c:601
+#: LYMessages.c:608
+#, c-format
 msgid "List from document with POST data.  Reload %s ?"
 msgstr ""
 
 #. #define CONFIRM_POST_DOC_HEAD
-#: LYMessages.c:603
+#: LYMessages.c:610
 msgid "Document from POST action, HEAD may not be understood.  Proceed?"
 msgstr ""
 
 #. #define CONFIRM_POST_LINK_HEAD
-#: LYMessages.c:605
+#: LYMessages.c:612
 msgid "Form submit action is POST, HEAD may not be understood.  Proceed?"
 msgstr ""
 
-#: LYMessages.c:606
+#: LYMessages.c:613
 msgid "Proceed without a username and password?"
 msgstr ""
 
-#: LYMessages.c:607
+#: LYMessages.c:614
+#, c-format
 msgid "Proceed (%s)?"
 msgstr ""
 
-#: LYMessages.c:608
+#: LYMessages.c:615
 msgid "Cannot POST to this host."
 msgstr ""
 
-#: LYMessages.c:609
+#: LYMessages.c:616
 msgid "POST not supported for this URL - ignoring POST data!"
 msgstr ""
 
-#: LYMessages.c:610
+#: LYMessages.c:617
 msgid "Discarding POST data..."
 msgstr ""
 
-#: LYMessages.c:611
+#: LYMessages.c:618
 msgid "Document will not be reloaded!"
 msgstr ""
 
-#: LYMessages.c:612
+#: LYMessages.c:619
 msgid "Location: "
 msgstr ""
 
-#: LYMessages.c:613
+#: LYMessages.c:620
+#, c-format
 msgid "'%s' not found!"
 msgstr ""
 
-#: LYMessages.c:614
+#: LYMessages.c:621
 msgid "Default Bookmark File"
 msgstr ""
 
-#: LYMessages.c:615
+#: LYMessages.c:622
 msgid "Screen too small! (8x35 min)"
 msgstr ""
 
-#: LYMessages.c:616
+#: LYMessages.c:623
 msgid "Select destination or ^G to Cancel: "
 msgstr ""
 
 #. #define MULTIBOOKMARKS_SELECT
-#: LYMessages.c:618
+#: LYMessages.c:625
 msgid "Select subbookmark, '=' for menu, or ^G to cancel: "
 msgstr ""
 
 #. #define MULTIBOOKMARKS_SELF
-#: LYMessages.c:620
+#: LYMessages.c:627
 msgid "Reproduce L)ink in this bookmark file or C)ancel? (l,c): "
 msgstr ""
 
-#: LYMessages.c:621
+#: LYMessages.c:628
 msgid "Multiple bookmark support is not available."
 msgstr ""
 
-#: LYMessages.c:622
+#: LYMessages.c:629
+#, c-format
 msgid " Select Bookmark (screen %d of %d)"
 msgstr ""
 
-#: LYMessages.c:623
+#: LYMessages.c:630
 msgid "       Select Bookmark"
 msgstr ""
 
 #. #define MULTIBOOKMARKS_EHEAD_MASK
-#: LYMessages.c:625
+#: LYMessages.c:632
+#, c-format
 msgid "Editing Bookmark DESCRIPTION and FILEPATH (%d of 2)"
 msgstr ""
 
 #. #define MULTIBOOKMARKS_EHEAD
-#: LYMessages.c:627
+#: LYMessages.c:634
 msgid "         Editing Bookmark DESCRIPTION and FILEPATH"
 msgstr ""
 
-#: LYMessages.c:628
+#: LYMessages.c:635
 msgid "Letter: "
 msgstr ""
 
 #. #define USE_PATH_OFF_HOME
-#: LYMessages.c:631
+#: LYMessages.c:638
 msgid "Use a filepath off your login directory in SHELL syntax!"
 msgstr ""
 
-#: LYMessages.c:633
+#: LYMessages.c:640
 msgid "Use a filepath off your home directory!"
 msgstr ""
 
-#. VMS
 #. #define MAXLINKS_REACHED
-#: LYMessages.c:636
+#: LYMessages.c:643
 msgid "Maximum links per page exceeded!  Use half-page or two-line scrolling."
 msgstr ""
 
 #. #define MAXHIST_REACHED
-#: LYMessages.c:638
+#: LYMessages.c:645
 msgid "History List maximum reached!  Document not pushed."
 msgstr ""
 
-#: LYMessages.c:639
+#: LYMessages.c:646
 msgid "No previously visited links available!"
 msgstr ""
 
-#: LYMessages.c:640
+#: LYMessages.c:647
 msgid "Memory exhausted!  Program aborted!"
 msgstr ""
 
-#: LYMessages.c:641
+#: LYMessages.c:648
 msgid "Memory exhausted!  Aborting..."
 msgstr ""
 
-#: LYMessages.c:642
+#: LYMessages.c:649
 msgid "Directory/File Manager not available"
 msgstr ""
 
-#: LYMessages.c:643
+#: LYMessages.c:650
 msgid "HREF in BASE tag is not an absolute URL."
 msgstr ""
 
-#: LYMessages.c:644
+#: LYMessages.c:651
 msgid "Location URL is not absolute."
 msgstr ""
 
-#: LYMessages.c:645
+#: LYMessages.c:652
 msgid "Refresh URL is not absolute."
 msgstr ""
 
 #. #define SENDING_MESSAGE_WITH_BODY_TO
-#: LYMessages.c:647
+#: LYMessages.c:654
 msgid ""
 "You are sending a message with body to:\n"
 "  "
 msgstr ""
 
-#: LYMessages.c:648
+#: LYMessages.c:655
 msgid ""
 "You are sending a comment to:\n"
 "  "
 msgstr ""
 
-#: LYMessages.c:649
+#: LYMessages.c:656
 msgid ""
 "\n"
 " With copy to:\n"
 "  "
 msgstr ""
 
-#: LYMessages.c:650
+#: LYMessages.c:657
 msgid ""
 "\n"
 " With copies to:\n"
@@ -1971,7 +2075,7 @@ msgid ""
 msgstr ""
 
 #. #define CTRL_G_TO_CANCEL_SEND
-#: LYMessages.c:652
+#: LYMessages.c:659
 msgid ""
 "\n"
 "\n"
@@ -1979,561 +2083,578 @@ msgid ""
 msgstr ""
 
 #. #define ENTER_NAME_OR_BLANK
-#: LYMessages.c:654
+#: LYMessages.c:661
 msgid ""
 "\n"
 " Please enter your name, or leave it blank to remain anonymous\n"
 msgstr ""
 
 #. #define ENTER_MAIL_ADDRESS_OR_OTHER
-#: LYMessages.c:656
+#: LYMessages.c:663
 msgid ""
 "\n"
 " Please enter a mail address or some other\n"
 msgstr ""
 
 #. #define MEANS_TO_CONTACT_FOR_RESPONSE
-#: LYMessages.c:658
+#: LYMessages.c:665
 msgid " means to contact you, if you desire a response.\n"
 msgstr ""
 
-#: LYMessages.c:659
+#: LYMessages.c:666
 msgid ""
 "\n"
 " Please enter a subject line.\n"
 msgstr ""
 
 #. #define ENTER_ADDRESS_FOR_CC
-#: LYMessages.c:661
+#: LYMessages.c:668
 msgid ""
 "\n"
 " Enter a mail address for a CC of your message.\n"
 msgstr ""
 
-#: LYMessages.c:662
+#: LYMessages.c:669
 msgid " (Leave blank if you don't want a copy.)\n"
 msgstr ""
 
-#: LYMessages.c:663
+#: LYMessages.c:670
 msgid ""
 "\n"
 " Please review the message body:\n"
 "\n"
 msgstr ""
 
-#: LYMessages.c:664
+#: LYMessages.c:671
 msgid ""
 "\n"
 "Press RETURN to continue: "
 msgstr ""
 
-#: LYMessages.c:665
+#: LYMessages.c:672
 msgid ""
 "\n"
 "Press RETURN to clean up: "
 msgstr ""
 
-#: LYMessages.c:666
+#: LYMessages.c:673
 msgid " Use Control-U to erase the default.\n"
 msgstr ""
 
-#: LYMessages.c:667
+#: LYMessages.c:674
 msgid ""
 "\n"
 " Please enter your message below."
 msgstr ""
 
 #. #define ENTER_PERIOD_WHEN_DONE_A
-#: LYMessages.c:669 src/LYNews.c:331
+#: LYMessages.c:676 src/LYNews.c:331
 msgid ""
 "\n"
 " When you are done, press enter and put a single period (.)"
 msgstr ""
 
 #. #define ENTER_PERIOD_WHEN_DONE_B
-#: LYMessages.c:671 src/LYNews.c:332
+#: LYMessages.c:678 src/LYNews.c:332
 msgid ""
 "\n"
 " on a line and press enter again."
 msgstr ""
 
+#. Cookies messages
 #. #define ADVANCED_COOKIE_CONFIRMATION
-#: LYMessages.c:675
+#: LYMessages.c:682
+#, c-format
 msgid "%s cookie: %.*s=%.*s  Allow? (Y/N/Always/neVer)"
 msgstr ""
 
 #. #define INVALID_COOKIE_DOMAIN_CONFIRMATION
-#: LYMessages.c:677
+#: LYMessages.c:684
+#, c-format
 msgid "Accept invalid cookie domain=%s for '%s'?"
 msgstr ""
 
 #. #define INVALID_COOKIE_PATH_CONFIRMATION
-#: LYMessages.c:679
+#: LYMessages.c:686
+#, c-format
 msgid "Accept invalid cookie path=%s as a prefix of '%s'?"
 msgstr ""
 
-#: LYMessages.c:680
+#: LYMessages.c:687
 msgid "Allowing this cookie."
 msgstr ""
 
-#: LYMessages.c:681
+#: LYMessages.c:688
 msgid "Rejecting this cookie."
 msgstr ""
 
-#: LYMessages.c:682
+#: LYMessages.c:689
 msgid "The Cookie Jar is empty."
 msgstr ""
 
 #. #define ACTIVATE_TO_GOBBLE
-#: LYMessages.c:684
+#: LYMessages.c:691
 msgid "Activate links to gobble up cookies or entire domains,"
 msgstr ""
 
-#: LYMessages.c:685
+#: LYMessages.c:692
 msgid "or to change a domain's 'allow' setting."
 msgstr ""
 
-#: LYMessages.c:686
+#: LYMessages.c:693
 msgid "(Cookies never allowed.)"
 msgstr ""
 
-#: LYMessages.c:687
+#: LYMessages.c:694
 msgid "(Cookies always allowed.)"
 msgstr ""
 
-#: LYMessages.c:688
+#: LYMessages.c:695
 msgid "(Cookies allowed via prompt.)"
 msgstr ""
 
-#: LYMessages.c:689
+#: LYMessages.c:696
 msgid "(Persistent Cookies.)"
 msgstr ""
 
-#: LYMessages.c:690
+#: LYMessages.c:697
 msgid "(No title.)"
 msgstr ""
 
-#: LYMessages.c:691
+#: LYMessages.c:698
 msgid "(No name.)"
 msgstr ""
 
-#: LYMessages.c:692
+#: LYMessages.c:699
 msgid "(No value.)"
 msgstr ""
 
-#: LYMessages.c:693
+#: LYMessages.c:700
 msgid "None"
 msgstr ""
 
-#: LYMessages.c:694
+#: LYMessages.c:701
 msgid "(End of session.)"
 msgstr ""
 
-#: LYMessages.c:695
+#: LYMessages.c:702
 msgid "Delete this cookie?"
 msgstr ""
 
-#: LYMessages.c:696
+#: LYMessages.c:703
 msgid "The cookie has been eaten!"
 msgstr ""
 
-#: LYMessages.c:697
+#: LYMessages.c:704
 msgid "Delete this empty domain?"
 msgstr ""
 
-#: LYMessages.c:698
+#: LYMessages.c:705
 msgid "The domain has been eaten!"
 msgstr ""
 
 #. #define DELETE_COOKIES_SET_ALLOW_OR_CANCEL
-#: LYMessages.c:700
-msgid "D)elete domain's cookies, set allow A)lways/P)rompt/neV)er, or C)ancel? "
+#: LYMessages.c:707
+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:702
+#: LYMessages.c:709
 msgid "D)elete domain, set allow A)lways/P)rompt/neV)er, or C)ancel? "
 msgstr ""
 
-#: LYMessages.c:703
+#: LYMessages.c:710
 msgid "All cookies in the domain have been eaten!"
 msgstr ""
 
-#: LYMessages.c:704
+#: LYMessages.c:711
+#, c-format
 msgid "'A'lways allowing from domain '%s'."
 msgstr ""
 
-#: LYMessages.c:705
+#: LYMessages.c:712
+#, c-format
 msgid "ne'V'er allowing from domain '%s'."
 msgstr ""
 
-#: LYMessages.c:706
+#: LYMessages.c:713
+#, c-format
 msgid "'P'rompting to allow from domain '%s'."
 msgstr ""
 
-#: LYMessages.c:707
+#: LYMessages.c:714
 msgid "Delete all cookies in this domain?"
 msgstr ""
 
-#: LYMessages.c:708
+#: LYMessages.c:715
 msgid "All of the cookies in the jar have been eaten!"
 msgstr ""
 
-#: LYMessages.c:710
+#: LYMessages.c:717
 msgid "Port 19 not permitted in URLs."
 msgstr ""
 
-#: LYMessages.c:711
+#: LYMessages.c:718
 msgid "Port 25 not permitted in URLs."
 msgstr ""
 
-#: LYMessages.c:712
+#: LYMessages.c:719
+#, c-format
 msgid "Port %lu not permitted in URLs."
 msgstr ""
 
-#: LYMessages.c:713
+#: LYMessages.c:720
 msgid "URL has a bad port field."
 msgstr ""
 
-#: LYMessages.c:714
+#: LYMessages.c:721
 msgid "Maximum nesting of HTML elements exceeded."
 msgstr ""
 
-#: LYMessages.c:715
+#: LYMessages.c:722
 msgid "Bad partial reference!  Stripping lead dots."
 msgstr ""
 
-#: LYMessages.c:716
+#: LYMessages.c:723
 msgid "Trace Log open failed.  Trace off!."
 msgstr ""
 
-#: LYMessages.c:717
+#: LYMessages.c:724
 msgid "Lynx Trace Log"
 msgstr ""
 
-#: LYMessages.c:718
+#: LYMessages.c:725
 msgid "No trace log has been started for this session."
 msgstr ""
 
 #. #define MAX_TEMPCOUNT_REACHED
-#: LYMessages.c:720
+#: LYMessages.c:727
 msgid "The maximum temporary file count has been reached!"
 msgstr ""
 
 #. #define FORM_VALUE_TOO_LONG
-#: LYMessages.c:722
+#: LYMessages.c:729
 msgid "Form field value exceeds buffer length!  Trim the tail."
 msgstr ""
 
 #. #define FORM_TAIL_COMBINED_WITH_HEAD
-#: LYMessages.c:724
+#: LYMessages.c:731
 msgid "Modified tail combined with head of form field value."
 msgstr ""
 
 #. HTFile.c
-#: LYMessages.c:727
+#: LYMessages.c:734
 msgid "Directory"
 msgstr ""
 
-#: LYMessages.c:728
+#: LYMessages.c:735
 msgid "Directory browsing is not allowed."
 msgstr ""
 
-#: LYMessages.c:729
+#: LYMessages.c:736
 msgid "Selective access is not enabled for this directory"
 msgstr ""
 
-#: LYMessages.c:730
+#: LYMessages.c:737
 msgid "Multiformat: directory scan failed."
 msgstr ""
 
-#: LYMessages.c:731
+#: LYMessages.c:738
 msgid "This directory is not readable."
 msgstr ""
 
-#: LYMessages.c:732
+#: LYMessages.c:739
 msgid "Can't access requested file."
 msgstr ""
 
-#: LYMessages.c:733
+#: LYMessages.c:740
 msgid "Could not find suitable representation for transmission."
 msgstr ""
 
-#: LYMessages.c:734
+#: LYMessages.c:741
 msgid "Could not open file for decompression!"
 msgstr ""
 
-#: LYMessages.c:735
+#: LYMessages.c:742
 msgid "Files:"
 msgstr ""
 
-#: LYMessages.c:736
+#: LYMessages.c:743
 msgid "Subdirectories:"
 msgstr ""
 
-#: LYMessages.c:737
+#: LYMessages.c:744
 msgid " directory"
 msgstr ""
 
-#: LYMessages.c:738
+#: LYMessages.c:745
 msgid "Up to "
 msgstr ""
 
-#: LYMessages.c:739
+#: LYMessages.c:746
 msgid "Current directory is "
 msgstr ""
 
 #. HTGopher.c
-#: LYMessages.c:742
+#: LYMessages.c:749
 msgid "No response from server!"
 msgstr ""
 
-#: LYMessages.c:743
+#: LYMessages.c:750
 msgid "CSO index"
 msgstr ""
 
-#: LYMessages.c:744
+#: LYMessages.c:751
 msgid ""
 "\n"
 "This is a searchable index of a CSO database.\n"
 msgstr ""
 
-#: LYMessages.c:745
+#: LYMessages.c:752
 msgid "CSO Search Results"
 msgstr ""
 
-#: LYMessages.c:746
+#: LYMessages.c:753
+#, c-format
 msgid "Seek fail on %s\n"
 msgstr ""
 
-#: LYMessages.c:747
+#: LYMessages.c:754
 msgid ""
 "\n"
 "Press the 's' key and enter search keywords.\n"
 msgstr ""
 
-#: LYMessages.c:748
+#: LYMessages.c:755
 msgid ""
 "\n"
 "This is a searchable Gopher index.\n"
 msgstr ""
 
-#: LYMessages.c:749
+#: LYMessages.c:756
 msgid "Gopher index"
 msgstr ""
 
-#: LYMessages.c:750
+#: LYMessages.c:757
 msgid "Gopher Menu"
 msgstr ""
 
-#: LYMessages.c:751
+#: LYMessages.c:758
 msgid " Search Results"
 msgstr ""
 
-#: LYMessages.c:752
+#: LYMessages.c:759
 msgid "Sending CSO/PH request."
 msgstr ""
 
-#: LYMessages.c:753
+#: LYMessages.c:760
 msgid "Sending Gopher request."
 msgstr ""
 
-#: LYMessages.c:754
+#: LYMessages.c:761
 msgid "CSO/PH request sent; waiting for response."
 msgstr ""
 
-#: LYMessages.c:755
+#: LYMessages.c:762
 msgid "Gopher request sent; waiting for response."
 msgstr ""
 
-#: LYMessages.c:756
+#: LYMessages.c:763
 msgid ""
 "\n"
 "Please enter search keywords.\n"
 msgstr ""
 
-#: LYMessages.c:757
+#: LYMessages.c:764
 msgid ""
 "\n"
 "The keywords that you enter will allow you to search on a"
 msgstr ""
 
-#: LYMessages.c:758
+#: LYMessages.c:765
 msgid " person's name in the database.\n"
 msgstr ""
 
-#: LYMessages.c:761
+#. HTNews.c
+#: LYMessages.c:768
 msgid "Connection closed ???"
 msgstr ""
 
-#: LYMessages.c:762
+#: LYMessages.c:769
 msgid "Cannot open temporary file for news POST."
 msgstr ""
 
-#: LYMessages.c:763
+#: LYMessages.c:770
 msgid "This client does not contain support for posting to news with SSL."
 msgstr ""
 
 #. HTStyle.c
-#: LYMessages.c:766
+#: LYMessages.c:773
+#, c-format
 msgid "Style %d `%s' SGML:%s.  Font %s %.1f point.\n"
 msgstr ""
 
-#: LYMessages.c:767
+#: LYMessages.c:774
+#, c-format
 msgid "\tIndents: first=%.0f others=%.0f, Height=%.1f Desc=%.1f\n"
 msgstr ""
 
-#: LYMessages.c:768
+#: LYMessages.c:775
+#, c-format
 msgid "\tAlign=%d, %d tabs. (%.0f before, %.0f after)\n"
 msgstr ""
 
-#: LYMessages.c:769
+#: LYMessages.c:776
+#, c-format
 msgid "\t\tTab kind=%d at %.0f\n"
 msgstr ""
 
 #. HTTP.c
-#: LYMessages.c:772
+#: LYMessages.c:779
 msgid "Can't proceed without a username and password."
 msgstr ""
 
-#: LYMessages.c:773
+#: LYMessages.c:780
 msgid "Can't retry with authorization!  Contact the server's WebMaster."
 msgstr ""
 
-#: LYMessages.c:774
+#: LYMessages.c:781
 msgid "Can't retry with proxy authorization!  Contact the server's WebMaster."
 msgstr ""
 
-#: LYMessages.c:775
+#: LYMessages.c:782
 msgid "Retrying with proxy authorization information."
 msgstr ""
 
 #. HTWAIS.c
-#: LYMessages.c:778
+#: LYMessages.c:785
 msgid "HTWAIS: Return message too large."
 msgstr ""
 
-#: LYMessages.c:779
+#: LYMessages.c:786
 msgid "Enter WAIS query: "
 msgstr ""
 
 #. Miscellaneous status
-#: LYMessages.c:782
+#: LYMessages.c:789
 msgid "Retrying as HTTP0 request."
 msgstr ""
 
-#: LYMessages.c:783
+#: LYMessages.c:790
+#, c-format
 msgid "Transferred %d bytes"
 msgstr ""
 
-#: LYMessages.c:784
+#: LYMessages.c:791
 msgid "Data transfer complete"
 msgstr ""
 
-#: LYMessages.c:785
+#: LYMessages.c:792
+#, c-format
 msgid "Error processing line %d of %s\n"
 msgstr ""
 
 #. Lynx internal page titles
-#: LYMessages.c:788
+#: LYMessages.c:795
 msgid "Address List Page"
 msgstr ""
 
-#: LYMessages.c:789
+#: LYMessages.c:796
 msgid "Bookmark file"
 msgstr ""
 
-#: LYMessages.c:790
+#: LYMessages.c:797
 msgid "Configuration Definitions"
 msgstr ""
 
-#: LYMessages.c:791
+#: LYMessages.c:798
 msgid "Cookie Jar"
 msgstr ""
 
-#: LYMessages.c:792
+#: LYMessages.c:799
 msgid "Current Key Map"
 msgstr ""
 
-#: LYMessages.c:793
+#: LYMessages.c:800
 msgid "File Management Options"
 msgstr ""
 
-#: LYMessages.c:794
+#: LYMessages.c:801
 msgid "Download Options"
 msgstr ""
 
-#: LYMessages.c:795
+#: LYMessages.c:802
 msgid "History Page"
 msgstr ""
 
-#: LYMessages.c:796
+#: LYMessages.c:803
 msgid "List Page"
 msgstr ""
 
-#: LYMessages.c:797
+#: LYMessages.c:804
 msgid "Lynx.cfg Information"
 msgstr ""
 
-#: LYMessages.c:798
+#: LYMessages.c:805
 msgid "Converted Mosaic Hotlist"
 msgstr ""
 
-#: LYMessages.c:799
+#: LYMessages.c:806
 msgid "Options Menu"
 msgstr ""
 
-#: LYMessages.c:800
+#: LYMessages.c:807
 msgid "File Permission Options"
 msgstr ""
 
-#: LYMessages.c:801
+#: LYMessages.c:808
 msgid "Printing Options"
 msgstr ""
 
-#: LYMessages.c:802
+#: LYMessages.c:809
 msgid "Information about the current document"
 msgstr ""
 
-#: LYMessages.c:803
+#: LYMessages.c:810
 msgid "Your recent statusline messages"
 msgstr ""
 
-#: LYMessages.c:804
+#: LYMessages.c:811
 msgid "Upload Options"
 msgstr ""
 
-#: LYMessages.c:805
+#: LYMessages.c:812
 msgid "Visited Links Page"
 msgstr ""
 
 #. CONFIG_DEF_TITLE subtitles
-#: LYMessages.c:808
+#: LYMessages.c:815
 msgid "See also"
 msgstr ""
 
-#: LYMessages.c:809
+#: LYMessages.c:816
 msgid "your"
 msgstr ""
 
-#: LYMessages.c:810
+#: LYMessages.c:817
 msgid "for runtime options"
 msgstr ""
 
-#: LYMessages.c:811
+#: LYMessages.c:818
 msgid "compile time options"
 msgstr ""
 
-#: LYMessages.c:812
+#: LYMessages.c:819
 msgid "latest release"
 msgstr ""
 
-#: LYMessages.c:813
+#: LYMessages.c:820
 msgid "development version"
 msgstr ""
 
 #. #define AUTOCONF_CONFIG_CACHE
-#: LYMessages.c:815
+#: LYMessages.c:822
 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"
@@ -2541,43 +2662,50 @@ msgid ""
 msgstr ""
 
 #. #define AUTOCONF_LYNXCFG_H
-#: LYMessages.c:819
+#: LYMessages.c:826
 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:824
-msgid "  C)reate  D)ownload  E)dit  F)ull menu  M)odify  R)emove  T)ag  U)pload     \n"
+#: LYMessages.c:831
+msgid ""
+"  C)reate  D)ownload  E)dit  F)ull menu  M)odify  R)emove  T)ag  U)pload     "
+"\n"
 msgstr ""
 
-#: LYMessages.c:825
+#: LYMessages.c:832
 msgid "Failed to obtain status of current link!"
 msgstr ""
 
 #. #define INVALID_PERMIT_URL
-#: LYMessages.c:828
+#: LYMessages.c:835
 msgid "Special URL only valid from current File Permission menu!"
 msgstr ""
 
-#: LYMessages.c:832
+#: LYMessages.c:839
 msgid "External support is currently disabled."
 msgstr ""
 
 #: WWW/Library/Implementation/HTAABrow.c:647
+#, c-format
 msgid "Username for '%s' at %s '%s%s':"
 msgstr ""
 
 #: WWW/Library/Implementation/HTAABrow.c:914
-msgid "This client doesn't know how to compose proxy authorization information for scheme"
+msgid ""
+"This client doesn't know how to compose proxy authorization information for "
+"scheme"
 msgstr ""
 
 #: WWW/Library/Implementation/HTAABrow.c:989
-msgid "This client doesn't know how to compose authorization information for scheme"
+msgid ""
+"This client doesn't know how to compose authorization information for scheme"
 msgstr ""
 
 #: WWW/Library/Implementation/HTAABrow.c:1097
+#, c-format
 msgid "Invalid header '%s%s%s%s%s'"
 msgstr ""
 
@@ -2589,51 +2717,59 @@ msgstr ""
 msgid "Access without authorization denied -- retrying"
 msgstr ""
 
-#: WWW/Library/Implementation/HTAccess.c:644
+#: WWW/Library/Implementation/HTAccess.c:670
 msgid "Access forbidden by rule"
 msgstr ""
 
-#: WWW/Library/Implementation/HTAccess.c:741
+#: WWW/Library/Implementation/HTAccess.c:772
 msgid "Document with POST content not found in cache.  Resubmit?"
 msgstr ""
 
-#: WWW/Library/Implementation/HTAccess.c:975
+#: WWW/Library/Implementation/HTAccess.c:1006
 msgid "Loading incomplete."
 msgstr ""
 
-#: WWW/Library/Implementation/HTAccess.c:1005
-msgid "**** HTAccess: socket or file number returned by obsolete load routine!\n"
+#: WWW/Library/Implementation/HTAccess.c:1036
+msgid ""
+"**** HTAccess: socket or file number returned by obsolete load routine!\n"
 msgstr ""
 
-#: WWW/Library/Implementation/HTAccess.c:1007
-msgid "**** HTAccess: Internal software error.  Please mail lynx_dev@sig.net!\n"
+#: WWW/Library/Implementation/HTAccess.c:1038
+msgid ""
+"**** HTAccess: Internal software error.  Please mail lynx_dev@sig.net!\n"
 msgstr ""
 
-#: WWW/Library/Implementation/HTAccess.c:1008
+#: WWW/Library/Implementation/HTAccess.c:1039
+#, c-format
 msgid "**** HTAccess: Status returned was: %d\n"
 msgstr ""
 
-#: WWW/Library/Implementation/HTAccess.c:1014 src/LYMainLoop.c:6233
+#.
+#. * hack: if we fail in HTAccess.c
+#. * avoid duplicating URL, oh.
+#.
+#: WWW/Library/Implementation/HTAccess.c:1045 src/LYMainLoop.c:6455
 msgid "Can't Access"
 msgstr ""
 
-#: WWW/Library/Implementation/HTAccess.c:1022
+#: WWW/Library/Implementation/HTAccess.c:1053
 msgid "Unable to access document."
 msgstr ""
 
-#: WWW/Library/Implementation/HTFTP.c:707
+#: WWW/Library/Implementation/HTFTP.c:747
+#, c-format
 msgid "Enter password for user %s@%s:"
 msgstr ""
 
-#: WWW/Library/Implementation/HTFTP.c:735
+#: WWW/Library/Implementation/HTFTP.c:775
 msgid "Unable to connect to FTP host."
 msgstr ""
 
-#: WWW/Library/Implementation/HTFTP.c:994
+#: WWW/Library/Implementation/HTFTP.c:1035
 msgid "close master socket"
 msgstr ""
 
-#: WWW/Library/Implementation/HTFTP.c:1034
+#: WWW/Library/Implementation/HTFTP.c:1075
 msgid "socket for master socket"
 msgstr ""
 
@@ -2642,27 +2778,29 @@ msgstr ""
 #. **  knowing if it is symbolic?	I think so since
 #. **  it might be a directory.
 #.
-#: WWW/Library/Implementation/HTFTP.c:1963
+#: WWW/Library/Implementation/HTFTP.c:1524
+#: WWW/Library/Implementation/HTFTP.c:2155
 msgid "Symbolic Link"
 msgstr ""
 
-#: WWW/Library/Implementation/HTFTP.c:2316
+#: WWW/Library/Implementation/HTFTP.c:2508
 msgid "Receiving FTP directory."
 msgstr ""
 
-#: WWW/Library/Implementation/HTFTP.c:2664
+#: WWW/Library/Implementation/HTFTP.c:2861
 msgid "connect for data"
 msgstr ""
 
-#: WWW/Library/Implementation/HTFTP.c:3243
+#: WWW/Library/Implementation/HTFTP.c:3446
 msgid "Receiving FTP file."
 msgstr ""
 
-#: WWW/Library/Implementation/HTFile.c:1562
+#. lines counter
+#: WWW/Library/Implementation/HTFile.c:1611
 msgid "Reading directory..."
 msgstr ""
 
-#: WWW/Library/Implementation/HTFile.c:1644
+#: WWW/Library/Implementation/HTFile.c:1693
 msgid "OK"
 msgstr ""
 
@@ -2686,12 +2824,12 @@ msgstr ""
 msgid "No response from finger server."
 msgstr ""
 
-#. finger is disabled
 #: WWW/Library/Implementation/HTGopher.c:1727
 msgid "Unable to access document!"
 msgstr ""
 
 #: WWW/Library/Implementation/HTNews.c:364
+#, c-format
 msgid "Username for news host '%s':"
 msgstr ""
 
@@ -2704,6 +2842,7 @@ msgid "Username:"
 msgstr ""
 
 #: WWW/Library/Implementation/HTNews.c:448
+#, c-format
 msgid "Password for news host '%s':"
 msgstr ""
 
@@ -2711,17 +2850,18 @@ msgstr ""
 msgid "Change password?"
 msgstr ""
 
-#: WWW/Library/Implementation/HTNews.c:1634
+#: WWW/Library/Implementation/HTNews.c:1639
+#, c-format
 msgid "No matches for: %s"
 msgstr ""
 
-#: WWW/Library/Implementation/HTNews.c:1685
+#: WWW/Library/Implementation/HTNews.c:1690
 msgid ""
 "\n"
 "No articles in this group.\n"
 msgstr ""
 
-#: WWW/Library/Implementation/HTNews.c:1698
+#: WWW/Library/Implementation/HTNews.c:1703
 msgid ""
 "\n"
 "No articles in this range.\n"
@@ -2730,107 +2870,121 @@ msgstr ""
 #.
 #. **	Set window title.
 #.
-#: WWW/Library/Implementation/HTNews.c:1711
+#: WWW/Library/Implementation/HTNews.c:1716
+#, c-format
 msgid "%s,  Articles %d-%d"
 msgstr ""
 
-#: WWW/Library/Implementation/HTNews.c:1732
+#: WWW/Library/Implementation/HTNews.c:1737
 msgid "Earlier articles"
 msgstr ""
 
-#: WWW/Library/Implementation/HTNews.c:1745
+#: WWW/Library/Implementation/HTNews.c:1750
+#, c-format
 msgid ""
 "\n"
 "There are about %d articles currently available in %s, IDs as follows:\n"
 "\n"
 msgstr ""
 
-#: WWW/Library/Implementation/HTNews.c:1804
+#: WWW/Library/Implementation/HTNews.c:1809
 msgid "All available articles in "
 msgstr ""
 
-#: WWW/Library/Implementation/HTNews.c:2015
+#: WWW/Library/Implementation/HTNews.c:2020
 msgid "Later articles"
 msgstr ""
 
-#: WWW/Library/Implementation/HTNews.c:2039
+#: WWW/Library/Implementation/HTNews.c:2044
 msgid "Post to "
 msgstr ""
 
-#: WWW/Library/Implementation/HTNews.c:2216
+#: WWW/Library/Implementation/HTNews.c:2221
 msgid "This client does not contain support for SNEWS URLs."
 msgstr ""
 
-#: WWW/Library/Implementation/HTNews.c:2397
+#: WWW/Library/Implementation/HTNews.c:2402
 msgid "No target for raw text!"
 msgstr ""
 
-#: WWW/Library/Implementation/HTNews.c:2427
+#: WWW/Library/Implementation/HTNews.c:2432
 msgid "Connecting to NewsHost ..."
 msgstr ""
 
-#: WWW/Library/Implementation/HTNews.c:2461
+#: WWW/Library/Implementation/HTNews.c:2466
+#, c-format
 msgid "Could not access %s."
 msgstr ""
 
-#: WWW/Library/Implementation/HTNews.c:2508
+#: WWW/Library/Implementation/HTNews.c:2513
+#, c-format
 msgid "Can't read news info.  News host %.20s responded: %.200s"
 msgstr ""
 
-#: WWW/Library/Implementation/HTNews.c:2704
+#.
+#. **	List available newsgroups. - FM
+#.
+#: WWW/Library/Implementation/HTNews.c:2709
 msgid "Reading list of available newsgroups."
 msgstr ""
 
-#: WWW/Library/Implementation/HTNews.c:2726
+#: WWW/Library/Implementation/HTNews.c:2731
 msgid "Reading list of articles in newsgroup."
 msgstr ""
 
 #.
 #. **	Get an article from a news group. - FM
 #.
-#: WWW/Library/Implementation/HTNews.c:2732
+#: WWW/Library/Implementation/HTNews.c:2737
 msgid "Reading news article."
 msgstr ""
 
-#: WWW/Library/Implementation/HTTCP.c:1201
+#: WWW/Library/Implementation/HTTCP.c:1295
 msgid "Address length looks invalid"
 msgstr ""
 
-#: WWW/Library/Implementation/HTTCP.c:1354
+#: WWW/Library/Implementation/HTTCP.c:1453
+#, c-format
 msgid "Looking up %s."
 msgstr ""
 
-#: WWW/Library/Implementation/HTTCP.c:1364 WWW/Library/Implementation/HTTelnet.c:99
+#. Not HTProgress, so warning won't be overwritten
+#. *  immediately; but not HTAlert, because typically
+#. *  there will be other alerts from the callers. - kw
+#.
+#: WWW/Library/Implementation/HTTCP.c:1463
+#: WWW/Library/Implementation/HTTelnet.c:99
+#, c-format
 msgid "Invalid hostname %s"
 msgstr ""
 
-#: WWW/Library/Implementation/HTTCP.c:1367
+#: WWW/Library/Implementation/HTTCP.c:1466
+#, c-format
 msgid "Unable to locate remote host %s."
 msgstr ""
 
-#: WWW/Library/Implementation/HTTCP.c:1377
+#: WWW/Library/Implementation/HTTCP.c:1476
+#, c-format
 msgid "Making %s connection to %s."
 msgstr ""
 
-#: WWW/Library/Implementation/HTTCP.c:1387
+#: WWW/Library/Implementation/HTTCP.c:1486
 msgid "socket failed."
 msgstr ""
 
-#. USE_FCNTL
-#: WWW/Library/Implementation/HTTCP.c:1406
+#: WWW/Library/Implementation/HTTCP.c:1505
 msgid "Could not make connection non-blocking."
 msgstr ""
 
-#: WWW/Library/Implementation/HTTCP.c:1460
+#: WWW/Library/Implementation/HTTCP.c:1566
 msgid "Connection failed for 180,000 tries."
 msgstr ""
 
-#. USE_FCNTL
-#: WWW/Library/Implementation/HTTCP.c:1594
+#: WWW/Library/Implementation/HTTCP.c:1734
 msgid "Could not restore socket to blocking."
 msgstr ""
 
-#: WWW/Library/Implementation/HTTCP.c:1648
+#: WWW/Library/Implementation/HTTCP.c:1788
 msgid "Socket read failed for 180,000 tries."
 msgstr ""
 
@@ -2842,19 +2996,19 @@ msgstr ""
 msgid "Unable to connect to remote host."
 msgstr ""
 
-#: WWW/Library/Implementation/HTTP.c:603
+#: WWW/Library/Implementation/HTTP.c:612
 msgid "Sending HTTP request."
 msgstr ""
 
-#: WWW/Library/Implementation/HTTP.c:636
+#: WWW/Library/Implementation/HTTP.c:645
 msgid "Unexpected network write error; connection aborted."
 msgstr ""
 
-#: WWW/Library/Implementation/HTTP.c:642
+#: WWW/Library/Implementation/HTTP.c:651
 msgid "HTTP request sent; waiting for response."
 msgstr ""
 
-#: WWW/Library/Implementation/HTTP.c:704
+#: WWW/Library/Implementation/HTTP.c:713
 msgid "Unexpected network read error; connection aborted."
 msgstr ""
 
@@ -2868,7 +3022,7 @@ msgstr ""
 #. **	so we'll deal with them by showing the full
 #. **	header to the user as text/plain. - FM
 #.
-#: WWW/Library/Implementation/HTTP.c:898
+#: WWW/Library/Implementation/HTTP.c:909
 msgid "Got unexpected Informational Status."
 msgstr ""
 
@@ -2879,39 +3033,46 @@ msgstr ""
 #. *  user to do that, and restore the current
 #. *  document. - FM
 #.
-#: WWW/Library/Implementation/HTTP.c:932
+#: WWW/Library/Implementation/HTTP.c:944
 msgid "Request fulfilled.  Reset Content."
 msgstr ""
 
-#: WWW/Library/Implementation/HTTP.c:1022
+#. Not Modified
+#.
+#. *  We didn't send an "If-Modified-Since" header,
+#. *  so this status is inappropriate.  We'll deal
+#. *  with it by showing the full header to the user
+#. *  as text/plain. - FM
+#.
+#: WWW/Library/Implementation/HTTP.c:1034
 msgid "Got unexpected 304 Not Modified status."
 msgstr ""
 
-#: WWW/Library/Implementation/HTTP.c:1091
+#: WWW/Library/Implementation/HTTP.c:1103
 msgid "Redirection of POST content requires user approval."
 msgstr ""
 
-#: WWW/Library/Implementation/HTTP.c:1134
+#: WWW/Library/Implementation/HTTP.c:1146
 msgid "Have POST content.  Treating Permanent Redirection as Temporary.\n"
 msgstr ""
 
-#: WWW/Library/Implementation/HTTP.c:1358
+#: WWW/Library/Implementation/HTTP.c:1370
 msgid "Got redirection with a bad Location header."
 msgstr ""
 
-#: WWW/Library/Implementation/HTTP.c:1457
+#: WWW/Library/Implementation/HTTP.c:1469
 msgid "Got redirection with no Location header."
 msgstr ""
 
-#: WWW/Library/Implementation/HTTP.c:1512
+#: WWW/Library/Implementation/HTTP.c:1524
 msgid "Retrying with access authorization information."
 msgstr ""
 
-#: WWW/Library/Implementation/HTTP.c:1517
+#: WWW/Library/Implementation/HTTP.c:1529
 msgid "Show the 401 message body?"
 msgstr ""
 
-#: WWW/Library/Implementation/HTTP.c:1562
+#: WWW/Library/Implementation/HTTP.c:1574
 msgid "Show the 407 message body?"
 msgstr ""
 
@@ -2920,11 +3081,12 @@ msgstr ""
 #. **	Take a chance and hope there is
 #. **	something to display. - FM
 #.
-#: WWW/Library/Implementation/HTTP.c:1667
+#: WWW/Library/Implementation/HTTP.c:1679
 msgid "Unknown status reply from server!"
 msgstr ""
 
 #: WWW/Library/Implementation/HTTelnet.c:97
+#, c-format
 msgid "remote %s session:"
 msgstr ""
 
@@ -2945,6 +3107,7 @@ msgid "Index "
 msgstr ""
 
 #: WWW/Library/Implementation/HTWAIS.c:473
+#, c-format
 msgid " contains the following %d item%s relevant to \""
 msgstr ""
 
@@ -3050,10 +3213,15 @@ msgstr ""
 msgid "HTWAIS: Request too long."
 msgstr ""
 
+#.
+#. **	Actually do the transaction given by request_message.
+#.
 #: WWW/Library/Implementation/HTWAIS.c:987
 msgid "Fetching WAIS document..."
 msgstr ""
 
+#. display_search_response(target, retrieval_response,
+#. wais_database, keywords);
 #: WWW/Library/Implementation/HTWAIS.c:1026
 msgid "No text was returned!\n"
 msgstr ""
@@ -3078,6 +3246,7 @@ msgstr ""
 msgid "Direct access"
 msgstr ""
 
+#. * Proxy will be used if defined, so let user know that - FM *
 #: WWW/Library/Implementation/HTWSRC.c:346
 msgid " (or via proxy server, if defined)"
 msgstr ""
@@ -3090,135 +3259,139 @@ msgstr ""
 msgid "Host"
 msgstr ""
 
-#: src/GridText.c:385
+#: src/GridText.c:382
 msgid "Memory exhausted, display interrupted!"
 msgstr ""
 
-#: src/GridText.c:390
+#: src/GridText.c:387
 msgid "Memory exhausted, will interrupt transfer!"
 msgstr ""
 
-#: src/GridText.c:2523
+#: src/GridText.c:2504
 msgid " *** MEMORY EXHAUSTED ***"
 msgstr ""
 
-#: src/GridText.c:4005 src/GridText.c:4012 src/LYList.c:260
+#: src/GridText.c:3986 src/GridText.c:3993 src/LYList.c:260
 msgid "unknown field or link"
 msgstr ""
 
-#: src/GridText.c:4021
+#: src/GridText.c:4002
 msgid "text entry field"
 msgstr ""
 
-#: src/GridText.c:4024
+#: src/GridText.c:4005
 msgid "password entry field"
 msgstr ""
 
-#: src/GridText.c:4027
+#: src/GridText.c:4008
 msgid "checkbox"
 msgstr ""
 
-#: src/GridText.c:4030
+#: src/GridText.c:4011
 msgid "radio button"
 msgstr ""
 
-#: src/GridText.c:4033
+#: src/GridText.c:4014
 msgid "submit button"
 msgstr ""
 
-#: src/GridText.c:4036
+#: src/GridText.c:4017
 msgid "reset button"
 msgstr ""
 
-#: src/GridText.c:4039
+#: src/GridText.c:4020
 msgid "popup menu"
 msgstr ""
 
-#: src/GridText.c:4042
+#: src/GridText.c:4023
 msgid "hidden form field"
 msgstr ""
 
-#: src/GridText.c:4045
+#: src/GridText.c:4026
 msgid "text entry area"
 msgstr ""
 
-#: src/GridText.c:4048
+#: src/GridText.c:4029
 msgid "range entry field"
 msgstr ""
 
-#: src/GridText.c:4051
+#: src/GridText.c:4032
 msgid "file entry field"
 msgstr ""
 
-#: src/GridText.c:4054
+#: src/GridText.c:4035
 msgid "text-submit field"
 msgstr ""
 
-#: src/GridText.c:4057
+#: src/GridText.c:4038
 msgid "image-submit button"
 msgstr ""
 
-#: src/GridText.c:4060
+#: src/GridText.c:4041
 msgid "keygen field"
 msgstr ""
 
-#: src/GridText.c:4063
+#: src/GridText.c:4044
 msgid "unknown form field"
 msgstr ""
 
-#: src/GridText.c:8810
+#: src/GridText.c:8879
+#, c-format
 msgid "Submitting %s"
 msgstr ""
 
-#: src/HTAlert.c:158 src/LYShowInfo.c:291
+#: src/HTAlert.c:160 src/LYShowInfo.c:297
 msgid "bytes"
 msgstr ""
 
-#: src/HTAlert.c:162
+#: src/HTAlert.c:164
 msgid "KB"
 msgstr ""
 
-#: src/HTAlert.c:169
+#: src/HTAlert.c:171
+#, c-format
 msgid "Read %ld of %ld %s of data"
 msgstr ""
 
-#: src/HTAlert.c:171
+#: src/HTAlert.c:173
+#, c-format
 msgid "Read %ld %s of data"
 msgstr ""
 
-#: src/HTAlert.c:174
+#: src/HTAlert.c:176
+#, c-format
 msgid ", %ld %s/sec."
 msgstr ""
 
-#: src/HTAlert.c:179
+#: src/HTAlert.c:181
 msgid " (Press 'z' to abort)"
 msgstr ""
 
-#: src/HTAlert.c:208
+#: src/HTAlert.c:210
 msgid "yes"
 msgstr ""
 
-#: src/HTAlert.c:209
+#: src/HTAlert.c:211
 msgid "no"
 msgstr ""
 
-#: src/HTML.c:5828
+#: src/HTML.c:5886
 msgid "Description:"
 msgstr ""
 
-#: src/HTML.c:5833
+#: src/HTML.c:5891
 msgid "(none)"
 msgstr ""
 
-#: src/HTML.c:5837
+#: src/HTML.c:5895
 msgid "Filepath:"
 msgstr ""
 
-#: src/HTML.c:5842
+#: src/HTML.c:5900
 msgid "(unknown)"
 msgstr ""
 
-#: src/HTML.c:7127
+#: src/HTML.c:7194
 msgid "Document has only hidden links.  Use the 'l'ist command."
 msgstr ""
 
@@ -3279,52 +3452,59 @@ msgstr ""
 msgid "Exiting via interrupt:"
 msgstr ""
 
-#: src/LYCookie.c:2145
+#. not used any more - kw
+#: src/LYCookie.c:2218
 msgid "(From Cookie Jar)"
 msgstr ""
 
-#: src/LYCookie.c:2568
+#: src/LYCookie.c:2644
 msgid "(from a previous session)"
 msgstr ""
 
-#.
-#. *	Show the Maximum Gobble Date. - FM
-#.
-#: src/LYCookie.c:2628
+#: src/LYCookie.c:2704
 msgid "Maximum Gobble Date:"
 msgstr ""
 
-#: src/LYCurses.c:787
+#: src/LYCookie.c:2749
+msgid "Internal"
+msgstr ""
+
+#: src/LYCookie.c:2750
+msgid "cookie_domain_flag_set error, aborting program"
+msgstr ""
+
+#: src/LYCurses.c:791
 msgid "Terminal initialisation failed - unknown terminal type?"
 msgstr ""
 
-#: src/LYCurses.c:1030
+#: src/LYCurses.c:1045
 msgid "Terminal ="
 msgstr ""
 
-#: src/LYCurses.c:1035
+#: src/LYCurses.c:1050
 msgid "You must use a vt100, 200, etc. terminal with this program."
 msgstr ""
 
-#: src/LYCurses.c:1113
+#: src/LYCurses.c:1128
 msgid "Your Terminal type is unknown!"
 msgstr ""
 
-#: src/LYCurses.c:1114
+#: src/LYCurses.c:1129
 msgid "Enter a terminal type:"
 msgstr ""
 
-#: src/LYCurses.c:1127
+#: src/LYCurses.c:1142
 msgid "TERMINAL TYPE IS SET TO"
 msgstr ""
 
-#: src/LYCurses.c:1370
+#: src/LYCurses.c:1385
+#, c-format
 msgid ""
 "\n"
 "A Fatal error has occurred in %s Ver. %s\n"
 msgstr ""
 
-#: src/LYCurses.c:1372
+#: src/LYCurses.c:1387
 msgid ""
 "\n"
 "Please notify your system administrator to confirm a bug, and if\n"
@@ -3334,59 +3514,59 @@ msgid ""
 "TRACEBACK if it can be captured, and any other relevant information.\n"
 msgstr ""
 
-#: src/LYDownload.c:503
+#: src/LYDownload.c:515
 msgid "Downloaded link:"
 msgstr ""
 
-#: src/LYDownload.c:508
+#: src/LYDownload.c:520
 msgid "Suggested file name:"
 msgstr ""
 
-#: src/LYDownload.c:513
+#: src/LYDownload.c:525
 msgid "Standard download options:"
 msgstr ""
 
-#: src/LYDownload.c:514
+#: src/LYDownload.c:526
 msgid "Download options:"
 msgstr ""
 
-#: src/LYDownload.c:528
+#: src/LYDownload.c:540
 msgid "Save to disk"
 msgstr ""
 
-#: src/LYDownload.c:530
+#: src/LYDownload.c:542
 msgid "Save to disk disabled."
 msgstr ""
 
-#: src/LYDownload.c:534 src/LYPrint.c:1303
+#: src/LYDownload.c:546 src/LYPrint.c:1309
 msgid "Local additions:"
 msgstr ""
 
-#: src/LYDownload.c:543 src/LYUpload.c:226
+#: src/LYDownload.c:555 src/LYUpload.c:226
 msgid "No Name Given"
 msgstr ""
 
-#: src/LYHistory.c:405
+#: src/LYHistory.c:426
 msgid "You selected:"
 msgstr ""
 
-#: src/LYHistory.c:429 src/LYHistory.c:597
+#: src/LYHistory.c:450 src/LYHistory.c:632
 msgid "(no address)"
 msgstr ""
 
-#: src/LYHistory.c:433
+#: src/LYHistory.c:454
 msgid " (internal)"
 msgstr ""
 
-#: src/LYHistory.c:435
+#: src/LYHistory.c:456
 msgid " (was internal)"
 msgstr ""
 
-#: src/LYHistory.c:524
+#: src/LYHistory.c:554
 msgid " (From History)"
 msgstr ""
 
-#: src/LYHistory.c:561
+#: src/LYHistory.c:596
 msgid "You visited (POSTs, bookmark, menu and list files excluded):"
 msgstr ""
 
@@ -3398,11 +3578,11 @@ msgstr ""
 msgid "Pointer:"
 msgstr ""
 
-#: src/LYLeaks.c:91 src/LYLeaks.c:98 src/LYLeaks.c:137
+#: src/LYLeaks.c:91 src/LYLeaks.c:98 src/LYLeaks.c:136
 msgid "FileName:"
 msgstr ""
 
-#: src/LYLeaks.c:94 src/LYLeaks.c:101 src/LYLeaks.c:140 src/LYLeaks.c:151
+#: src/LYLeaks.c:94 src/LYLeaks.c:101 src/LYLeaks.c:139 src/LYLeaks.c:150
 msgid "LineCount:"
 msgstr ""
 
@@ -3414,15 +3594,15 @@ msgstr ""
 msgid "Contains:"
 msgstr ""
 
-#: src/LYLeaks.c:134
+#: src/LYLeaks.c:133
 msgid "ByteSize:"
 msgstr ""
 
-#: src/LYLeaks.c:148
+#: src/LYLeaks.c:147
 msgid "realloced:"
 msgstr ""
 
-#: src/LYLeaks.c:169
+#: src/LYLeaks.c:170
 msgid "Total memory leakage this run:"
 msgstr ""
 
@@ -3450,426 +3630,459 @@ msgstr ""
 msgid "Visible links"
 msgstr ""
 
-#: src/LYLocal.c:242
+#: src/LYLocal.c:290
+#, c-format
 msgid "Unable to get status of '%s'."
 msgstr ""
 
-#: src/LYLocal.c:274
+#: src/LYLocal.c:324
 msgid "The selected item is not a file or a directory!  Request ignored."
 msgstr ""
 
-#: src/LYLocal.c:301
+#: src/LYLocal.c:354
+#, c-format
 msgid "move %s to %s"
 msgstr ""
 
-#: src/LYLocal.c:322
+#: src/LYLocal.c:375
 msgid "There is already a directory with that name!  Request ignored."
 msgstr ""
 
-#: src/LYLocal.c:324
+#: src/LYLocal.c:377
 msgid "There is already a file with that name!  Request ignored."
 msgstr ""
 
-#: src/LYLocal.c:326
+#: src/LYLocal.c:379
 msgid "The specified name is already in use!  Request ignored."
 msgstr ""
 
-#: src/LYLocal.c:337
+#: src/LYLocal.c:390
 msgid "Destination has different owner!  Request denied."
 msgstr ""
 
-#: src/LYLocal.c:340
+#: src/LYLocal.c:393
 msgid "Destination is not a valid directory!  Request denied."
 msgstr ""
 
-#: src/LYLocal.c:363
-msgid "Remove all tagged files and directories "
+#: src/LYLocal.c:416
+msgid "Remove all tagged files and directories?"
 msgstr ""
 
-#: src/LYLocal.c:384
+#: src/LYLocal.c:437
+#, c-format
 msgid "remove %s"
 msgstr ""
 
-#: src/LYLocal.c:426
+#: src/LYLocal.c:479
 msgid "Enter new location for tagged items: "
 msgstr ""
 
-#: src/LYLocal.c:488
+#: src/LYLocal.c:548
 msgid "Path too long"
 msgstr ""
 
-#: src/LYLocal.c:519
+#: src/LYLocal.c:579
 msgid "Source and destination are the same location - request ignored!"
 msgstr ""
 
-#.
-#. *  Change the name of the file or directory.
-#.
-#: src/LYLocal.c:579
+#: src/LYLocal.c:638
 msgid "Enter new name for directory: "
 msgstr ""
 
-#: src/LYLocal.c:581
+#: src/LYLocal.c:640
 msgid "Enter new name for file: "
 msgstr ""
 
-#: src/LYLocal.c:592 src/LYUpload.c:106
-msgid "Illegal character \"/\" found! Request ignored."
+#: src/LYLocal.c:651
+msgid "Illegal character (path-separator) found! Request ignored."
 msgstr ""
 
-#: src/LYLocal.c:639
+#: src/LYLocal.c:698
 msgid "Enter new location for directory: "
 msgstr ""
 
-#: src/LYLocal.c:641
+#: src/LYLocal.c:700
 msgid "Enter new location for file: "
 msgstr ""
 
-#: src/LYLocal.c:665
-msgid "Unexpected failure - unable to find trailing \"/\""
+#: src/LYLocal.c:726
+msgid "Unexpected failure - unable to find trailing path separator"
 msgstr ""
 
-#: src/LYLocal.c:686
+#: src/LYLocal.c:745
 msgid "Source and destination are the same location!  Request ignored!"
 msgstr ""
 
-#: src/LYLocal.c:733
+#: src/LYLocal.c:791
 msgid "Modify name, location, or permission (n, l, or p): "
 msgstr ""
 
-#: src/LYLocal.c:735
+#: src/LYLocal.c:793
 msgid "Modify name, or location (n or l): "
 msgstr ""
 
 #.
 #. *	Code for changing ownership needed here.
 #.
-#: src/LYLocal.c:761
+#: src/LYLocal.c:823
 msgid "This feature not yet implemented!"
 msgstr ""
 
-#: src/LYLocal.c:779
+#: src/LYLocal.c:841
 msgid "Enter name of file to create: "
 msgstr ""
 
-#: src/LYLocal.c:789 src/LYLocal.c:837
+#: src/LYLocal.c:851 src/LYLocal.c:899
 msgid "Illegal redirection \"//\" found! Request ignored."
 msgstr ""
 
-#: src/LYLocal.c:804
+#: src/LYLocal.c:866
+#, c-format
 msgid "create %s"
 msgstr ""
 
-#: src/LYLocal.c:827
+#: src/LYLocal.c:889
 msgid "Enter name for new directory: "
 msgstr ""
 
-#: src/LYLocal.c:870
+#: src/LYLocal.c:940
 msgid "Create file or directory (f or d): "
 msgstr ""
 
-#: src/LYLocal.c:916
-msgid "Remove '%s' and all of its contents: "
+#: src/LYLocal.c:982
+#, c-format
+msgid "Remove '%s' and all of its contents?"
 msgstr ""
 
-#: src/LYLocal.c:919
-msgid "Remove directory and all of its contents: "
+#: src/LYLocal.c:985
+msgid "Remove directory and all of its contents?"
 msgstr ""
 
-#: src/LYLocal.c:923
-msgid "Remove file '%s': "
+#: src/LYLocal.c:989
+#, c-format
+msgid "Remove file '%s'?"
 msgstr ""
 
-#: src/LYLocal.c:925
-msgid "Remove file: "
+#: src/LYLocal.c:991
+msgid "Remove file?"
 msgstr ""
 
-#: src/LYLocal.c:930
-msgid "Remove symbolic link '%s': "
+#: src/LYLocal.c:996
+#, c-format
+msgid "Remove symbolic link '%s'?"
 msgstr ""
 
-#: src/LYLocal.c:932
-msgid "Remove symbolic link: "
+#: src/LYLocal.c:998
+msgid "Remove symbolic link?"
 msgstr ""
 
-#: src/LYLocal.c:1024
+#: src/LYLocal.c:1094
 msgid "Sorry, don't know how to permit non-UNIX files yet."
 msgstr ""
 
-#: src/LYLocal.c:1057
+#: src/LYLocal.c:1124
 msgid "Unable to open permit options file"
 msgstr ""
 
-#: src/LYLocal.c:1084
+#: src/LYLocal.c:1151
 msgid "Specify permissions below:"
 msgstr ""
 
-#: src/LYLocal.c:1085 src/LYShowInfo.c:173
+#: src/LYLocal.c:1152 src/LYShowInfo.c:179
 msgid "Owner:"
 msgstr ""
 
-#: src/LYLocal.c:1101
+#: src/LYLocal.c:1168
 msgid "Group"
 msgstr ""
 
-#: src/LYLocal.c:1117
+#: src/LYLocal.c:1184
 msgid "Others:"
 msgstr ""
 
-#: src/LYLocal.c:1135
+#: src/LYLocal.c:1202
 msgid "form to permit"
 msgstr ""
 
-#: src/LYLocal.c:1233
+#: src/LYLocal.c:1304
 msgid "Invalid mode format."
 msgstr ""
 
-#: src/LYLocal.c:1237
+#: src/LYLocal.c:1308
 msgid "Invalid syntax format."
 msgstr ""
 
-#: src/LYLocal.c:1356
+#: src/LYLocal.c:1462
 msgid "NULL URL pointer"
 msgstr ""
 
-#: src/LYLocal.c:1441
+#: src/LYLocal.c:1562
 msgid "Warning!  UUDecoded file will exist in the directory you started Lynx."
 msgstr ""
 
-#: src/LYLocal.c:1553
+#: src/LYLocal.c:1674
+#, c-format
 msgid "Executing %s "
 msgstr ""
 
-#: src/LYLocal.c:1556
+#: src/LYLocal.c:1677
 msgid "Executing system command. This might take a while."
 msgstr ""
 
-#: src/LYLocal.c:1601
+#: src/LYLocal.c:1722
 msgid "Unable to open file management menu file."
 msgstr ""
 
-#: src/LYLocal.c:1635
+#: src/LYLocal.c:1753
 msgid "Current directory:"
 msgstr ""
 
-#: src/LYLocal.c:1638 src/LYLocal.c:1656
+#: src/LYLocal.c:1756 src/LYLocal.c:1774
 msgid "Current selection:"
 msgstr ""
 
-#: src/LYLocal.c:1642
+#: src/LYLocal.c:1760
 msgid "Nothing currently selected."
 msgstr ""
 
-#: src/LYLocal.c:1657
+#: src/LYLocal.c:1775
 msgid "tagged item:"
 msgstr ""
 
-#: src/LYLocal.c:1657
+#: src/LYLocal.c:1775
 msgid "tagged items:"
 msgstr ""
 
-#: src/LYLocal.c:1754 src/LYLocal.c:1765
+#: src/LYLocal.c:1874 src/LYLocal.c:1885
 msgid "Illegal filename; request ignored."
 msgstr ""
 
-#: src/LYLocal.c:1806
+#: src/LYLocal.c:2030
 msgid "The selected item is not a directory!  Request ignored."
 msgstr ""
 
-#: src/LYLocal.c:1809
+#. directory not writable
+#: src/LYLocal.c:2034
 msgid "Install in the selected directory not permitted."
 msgstr ""
 
-#: src/LYLocal.c:1813
+#: src/LYLocal.c:2039
 msgid "Just a moment, ..."
 msgstr ""
 
-#: src/LYLocal.c:1843
+#: src/LYLocal.c:2056
+msgid "Error buiding install args"
+msgstr ""
+
+#: src/LYLocal.c:2071 src/LYLocal.c:2103
+#, c-format
+msgid "Source and target are the same: %s"
+msgstr ""
+
+#: src/LYLocal.c:2081 src/LYLocal.c:2113
+#, c-format
+msgid "Already in target directory: %s"
+msgstr ""
+
+#: src/LYLocal.c:2130
 msgid "Installation complete"
 msgstr ""
 
-#: src/LYLocal.c:2013
+#: src/LYLocal.c:2303
 msgid "Temporary URL or list would be too long."
 msgstr ""
 
-#: src/LYLocal.c:2055
+#: src/LYLocal.c:2354
+#, c-format
 msgid "Unable to %s due to system error!"
 msgstr ""
 
-#. !HAVE_WAITPID
 #. error return
-#: src/LYLocal.c:2084
+#: src/LYLocal.c:2383
+#, c-format
 msgid "Probable failure to %s due to system error!"
 msgstr ""
 
-#. VMS
-#: src/LYMail.c:736
+#: src/LYMail.c:769
+#, c-format
 msgid "The link   %s :?: %s \n"
 msgstr ""
 
-#: src/LYMail.c:738
+#: src/LYMail.c:771
+#, c-format
 msgid "called \"%s\"\n"
 msgstr ""
 
-#: src/LYMail.c:739
+#: src/LYMail.c:772
+#, c-format
 msgid "in the file \"%s\" called \"%s\"\n"
 msgstr ""
 
-#: src/LYMail.c:740
+#: src/LYMail.c:773
 msgid "was requested but was not available."
 msgstr ""
 
-#: src/LYMail.c:741
+#: src/LYMail.c:774
 msgid "Thought you might want to know."
 msgstr ""
 
-#: src/LYMail.c:743
+#: src/LYMail.c:776
 msgid "This message was automatically generated by"
 msgstr ""
 
-#: src/LYMail.c:744
+#: src/LYMail.c:777
+#, c-format
 msgid "Lynx ver. %s"
 msgstr ""
 
-#: src/LYMail.c:1345
+#: src/LYMail.c:1378
 msgid "Personal_name: "
 msgstr ""
 
-#: src/LYMail.c:1347
+#: src/LYMail.c:1380
 msgid "X_Personal_name: "
 msgstr ""
 
-#: src/LYMail.c:1350
+#: src/LYMail.c:1383
 msgid "Personal Name: "
 msgstr ""
 
-#: src/LYMain.c:679
+#: src/LYMain.c:705
 msgid "No Winsock found, sorry."
 msgstr ""
 
-#: src/LYMain.c:834
+#: src/LYMain.c:861
 msgid "You MUST define a valid TMP or TEMP area!\n"
 msgstr ""
 
-#: src/LYMain.c:1229
+#: src/LYMain.c:1256
+#, c-format
 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:1245
+#: src/LYMain.c:1272
 msgid ""
 "\n"
 "Lynx character sets not declared.\n"
 "\n"
 msgstr ""
 
-#: src/LYMain.c:1269
+#: src/LYMain.c:1296
 msgid ""
 "\n"
 "Lynx edit map not declared.\n"
 "\n"
 msgstr ""
 
-#: src/LYMain.c:1312
+#: src/LYMain.c:1339
+#, c-format
 msgid ""
 "\n"
 "Lynx file %s is not available.\n"
 "\n"
 msgstr ""
 
-#: src/LYMain.c:1908
+#: src/LYMain.c:1977
 msgid "persistent cookies state will be changed in next session only."
 msgstr ""
 
-#: src/LYMain.c:2554
+#: src/LYMain.c:2651
+#, c-format
 msgid ""
 "\n"
 "%s Version %s (%.*s)\n"
 msgstr ""
 
-#: src/LYMain.c:2566
+#: src/LYMain.c:2663
+#, c-format
 msgid "Built on %s %s %s\n"
 msgstr ""
 
-#: src/LYMain.c:2570
-msgid "Copyrights held by the University of Kansas, CERN, and other contributors.\n"
+#: src/LYMain.c:2667
+msgid ""
+"Copyrights held by the University of Kansas, CERN, and other contributors.\n"
 msgstr ""
 
-#: src/LYMain.c:2572
+#: src/LYMain.c:2669
 msgid "Distributed under the GNU General Public License.\n"
 msgstr ""
 
-#: src/LYMain.c:2574
+#: src/LYMain.c:2671
 msgid ""
 "See http://lynx.browser.org/ and the online help for more information.\n"
 "\n"
 msgstr ""
 
-#: src/LYMain.c:3103
+#: src/LYMain.c:3206
+#, c-format
 msgid "USAGE: %s [options] [file]\n"
 msgstr ""
 
-#: src/LYMain.c:3104
+#: src/LYMain.c:3207
 msgid "Options are:\n"
 msgstr ""
 
-#: src/LYMain.c:3312
+#: src/LYMain.c:3424
+#, c-format
 msgid "%s: Invalid Option: %s\n"
 msgstr ""
 
-#: src/LYMainLoop.c:305 src/LYMainLoop.c:3797
+#: src/LYMainLoop.c:249
+#, c-format
+msgid "Internal error: Invalid mouse link %d!"
+msgstr ""
+
+#: src/LYMainLoop.c:346 src/LYMainLoop.c:4065
 msgid "Entry into main screen"
 msgstr ""
 
-#: src/LYMainLoop.c:1204
+#: src/LYMainLoop.c:1305
 msgid "Reparsing document under current settings..."
 msgstr ""
 
-#: src/LYMainLoop.c:1379 src/LYMainLoop.c:1383
+#: src/LYMainLoop.c:1497 src/LYMainLoop.c:1501
+#, c-format
 msgid "Fatal error - could not open output file %s\n"
 msgstr ""
 
-#: src/LYMainLoop.c:3010
+#: src/LYMainLoop.c:3175
 msgid "Enctype multipart/form-data not yet supported!  Cannot submit."
 msgstr ""
 
 #.
 #. *	Make a name for this new URL.
 #.
-#: src/LYMainLoop.c:3728
+#: src/LYMainLoop.c:3977
 msgid "A URL specified by the user"
 msgstr ""
 
 #.
 #. *  Make a name for this help file.
 #.
-#: src/LYMainLoop.c:3754
+#: src/LYMainLoop.c:4021
 msgid "Help Screen"
 msgstr ""
 
-#: src/LYMainLoop.c:3778
+#: src/LYMainLoop.c:4046
 msgid "System Index"
 msgstr ""
 
-#: src/LYMainLoop.c:5447
+#: src/LYMainLoop.c:5761
 msgid "charset for this document specified explicitely, sorry..."
 msgstr ""
 
-#: src/LYMainLoop.c:6228
+#: src/LYMainLoop.c:6450
 msgid "lynx: Can't access startfile"
 msgstr ""
 
-#: src/LYMainLoop.c:6240
+#: src/LYMainLoop.c:6463
 msgid "lynx: Start file could not be found or is not text/html or text/plain"
 msgstr ""
 
-#: src/LYMainLoop.c:6241
+#: src/LYMainLoop.c:6464
 msgid "      Exiting..."
 msgstr ""
 
@@ -3930,74 +4143,81 @@ msgstr ""
 msgid "B)ookmark file: "
 msgstr ""
 
-#.
-#. * preformatted text follows
-#.
-#: src/LYOptions.c:4143
+#: src/LYOptions.c:2415
+msgid "Left mouse button or return to select, arrow keys to scroll."
+msgstr ""
+
+#: src/LYOptions.c:4154
 msgid "Personal Preferences"
 msgstr ""
 
 #. Cookies: SELECT
-#: src/LYOptions.c:4146
+#: src/LYOptions.c:4157
 msgid "Cookies"
 msgstr ""
 
 #. Editor: INPUT
-#: src/LYOptions.c:4160
+#: src/LYOptions.c:4171
 msgid "Editor"
 msgstr ""
 
-#: src/LYOptions.c:4165
+#. Emacs keys: ON/OFF
+#: src/LYOptions.c:4176
 msgid "Emacs keys"
 msgstr ""
 
-#: src/LYOptions.c:4171
+#. Keypad Mode: SELECT
+#: src/LYOptions.c:4182
 msgid "Keypad mode"
 msgstr ""
 
 #. Mail Address: INPUT
-#: src/LYOptions.c:4201
+#: src/LYOptions.c:4212
 msgid "Personal mail address"
 msgstr ""
 
-#: src/LYOptions.c:4206
+#. Search Type: SELECT
+#: src/LYOptions.c:4217
 msgid "Searching type"
 msgstr ""
 
-#: src/LYOptions.c:4217
+#: src/LYOptions.c:4229
 msgid "Show color"
 msgstr ""
 
 #. Show cursor: ON/OFF
-#: src/LYOptions.c:4256
+#: src/LYOptions.c:4268
 msgid "Show cursor"
 msgstr ""
 
 #. User Mode: SELECT
-#: src/LYOptions.c:4262
+#: src/LYOptions.c:4274
 msgid "User mode"
 msgstr ""
 
 #. VI Keys: ON/OFF
-#: src/LYOptions.c:4268
+#: src/LYOptions.c:4280
 msgid "VI keys"
 msgstr ""
 
 #. Display Character Set: SELECT
-#: src/LYOptions.c:4274
+#: src/LYOptions.c:4286
 msgid "Display character set"
 msgstr ""
 
 #. X Display: INPUT
-#: src/LYOptions.c:4287
+#: src/LYOptions.c:4299
 msgid "X Display"
 msgstr ""
 
-#: src/LYOptions.c:4293
+#.
+#. * Document Layout
+#.
+#: src/LYOptions.c:4305
 msgid "Document Layout"
 msgstr ""
 
-#: src/LYOptions.c:4310
+#: src/LYOptions.c:4322
 msgid "Assumed document character set"
 msgstr ""
 
@@ -4006,94 +4226,93 @@ msgstr ""
 #. * we split the header to make it more readable:
 #. * "CJK mode" for CJK display charsets, and "Raw 8-bit" for others.
 #.
-#: src/LYOptions.c:4327
+#: src/LYOptions.c:4339
 msgid "CJK mode"
 msgstr ""
 
-#: src/LYOptions.c:4329
+#: src/LYOptions.c:4341
 msgid "Raw 8-bit"
 msgstr ""
 
 #. HTML error recovery: SELECT
-#: src/LYOptions.c:4336
+#: src/LYOptions.c:4348
 msgid "HTML error recovery"
 msgstr ""
 
 #. Select Popups: ON/OFF
-#: src/LYOptions.c:4342
+#: src/LYOptions.c:4354
 msgid "Popups for select fields"
 msgstr ""
 
 #. Show Images: SELECT
-#: src/LYOptions.c:4348
+#: src/LYOptions.c:4360
 msgid "Show images"
 msgstr ""
 
 #. Verbose Images: ON/OFF
-#: src/LYOptions.c:4362
+#: src/LYOptions.c:4374
 msgid "Verbose images"
 msgstr ""
 
 #.
 #. * Bookmark Options
 #.
-#: src/LYOptions.c:4370
+#: src/LYOptions.c:4382
 msgid "Bookmark Options"
 msgstr ""
 
-#. Multi-Bookmark Mode: SELECT
-#: src/LYOptions.c:4374
+#: src/LYOptions.c:4386
 msgid "Multi-bookmarks"
 msgstr ""
 
-#: src/LYOptions.c:4391
+#: src/LYOptions.c:4403
 msgid "Review/edit Bookmarks files"
 msgstr ""
 
-#: src/LYOptions.c:4393
+#: src/LYOptions.c:4405
 msgid "Goto multi-bookmark menu"
 msgstr ""
 
-#: src/LYOptions.c:4396
+#: src/LYOptions.c:4408
 msgid "Bookmarks file"
 msgstr ""
 
-#: src/LYOptions.c:4407
+#. FTP sort: SELECT
+#: src/LYOptions.c:4419
 msgid "FTP sort criteria"
 msgstr ""
 
-#: src/LYOptions.c:4414
+#. Local Directory Sort: SELECT
+#: src/LYOptions.c:4426
 msgid "Local directory sort criteria"
 msgstr ""
 
-#: src/LYOptions.c:4422
+#: src/LYOptions.c:4434
 msgid "Show dot files"
 msgstr ""
 
-#. Execution links: SELECT
-#: src/LYOptions.c:4430
+#: src/LYOptions.c:4442
 msgid "Execution links"
 msgstr ""
 
-#. ALLOW_USERS_TO_CHANGE_EXEC_WITHIN_OPTIONS
 #.
 #. * Headers transferred to remote server
 #.
-#: src/LYOptions.c:4451
+#: src/LYOptions.c:4463
 msgid "Headers transferred to remote server"
 msgstr ""
 
 #. Preferred Document Character Set: INPUT
-#: src/LYOptions.c:4454
+#: src/LYOptions.c:4466
 msgid "Preferred document character set"
 msgstr ""
 
 #. Preferred Document Language: INPUT
-#: src/LYOptions.c:4459
+#: src/LYOptions.c:4471
 msgid "Preferred document language"
 msgstr ""
 
-#: src/LYOptions.c:4465
+#: src/LYOptions.c:4477
 msgid "User-Agent header"
 msgstr ""
 
@@ -4101,63 +4320,63 @@ msgstr ""
 msgid "Sending"
 msgstr ""
 
-#: src/LYPrint.c:1261
+#: src/LYPrint.c:1267
 msgid "Document:"
 msgstr ""
 
-#: src/LYPrint.c:1262
+#: src/LYPrint.c:1268
 msgid "Number of lines:"
 msgstr ""
 
-#: src/LYPrint.c:1263
+#: src/LYPrint.c:1269
 msgid "Number of pages:"
 msgstr ""
 
-#: src/LYPrint.c:1264
+#: src/LYPrint.c:1270
 msgid "pages"
 msgstr ""
 
-#: src/LYPrint.c:1264
+#: src/LYPrint.c:1270
 msgid "page"
 msgstr ""
 
-#: src/LYPrint.c:1265
+#: src/LYPrint.c:1271
 msgid "(approximately)"
 msgstr ""
 
-#: src/LYPrint.c:1270
+#: src/LYPrint.c:1276
 msgid "Some print functions have been disabled!"
 msgstr ""
 
-#: src/LYPrint.c:1274
+#: src/LYPrint.c:1280
 msgid "Standard print options:"
 msgstr ""
 
-#: src/LYPrint.c:1275
+#: src/LYPrint.c:1281
 msgid "Print options:"
 msgstr ""
 
-#: src/LYPrint.c:1281
+#: src/LYPrint.c:1287
 msgid "Save to a local file"
 msgstr ""
 
-#: src/LYPrint.c:1283
+#: src/LYPrint.c:1289
 msgid "Save to disk disabled"
 msgstr ""
 
-#: src/LYPrint.c:1289
+#: src/LYPrint.c:1295
 msgid "Mail the file"
 msgstr ""
 
-#: src/LYPrint.c:1295
+#: src/LYPrint.c:1301
 msgid "Print to the screen"
 msgstr ""
 
-#: src/LYPrint.c:1299
+#: src/LYPrint.c:1305
 msgid "Print out on a printer attached to your vt100 terminal"
 msgstr ""
 
-#: src/LYReadCFG.c:382
+#: src/LYReadCFG.c:383
 msgid ""
 "Syntax Error parsing COLOR in configuration file:\n"
 "The line must be of the form:\n"
@@ -4167,245 +4386,256 @@ msgid ""
 "The special strings 'nocolor' or 'default', or\n"
 msgstr ""
 
-#: src/LYReadCFG.c:395
+#: src/LYReadCFG.c:396
 msgid "Offending line:"
 msgstr ""
 
-#: src/LYReadCFG.c:645
-msgid "key remapping of "
+#: src/LYReadCFG.c:649
+#, c-format
+msgid "key remapping of %s to %s failed\n"
+msgstr ""
+
+#: src/LYReadCFG.c:669 src/LYReadCFG.c:682
+#, c-format
+msgid ""
+"setting of line-editor binding for key %s (0x%x) to 0x%x for %s failed\n"
 msgstr ""
 
-#: src/LYReadCFG.c:647
-msgid " failed"
+#: src/LYReadCFG.c:687
+#, c-format
+msgid "setting of line-editor binding for key %s (0x%x) for %s failed\n"
 msgstr ""
 
-#: src/LYReadCFG.c:749
+#: src/LYReadCFG.c:792
+#, c-format
 msgid "Lynx: cannot start, CERN rules file %s is not available\n"
 msgstr ""
 
-#: src/LYReadCFG.c:751
+#: src/LYReadCFG.c:794
 msgid "(no name)"
 msgstr ""
 
-#: src/LYReadCFG.c:1285
+#: src/LYReadCFG.c:1340
+#, c-format
 msgid "More than %d nested lynx.cfg includes -- perhaps there is a loop?!?\n"
 msgstr ""
 
-#: src/LYReadCFG.c:1287
+#: src/LYReadCFG.c:1342
+#, c-format
 msgid "Last attempted include was '%s',\n"
 msgstr ""
 
-#: src/LYReadCFG.c:1288
+#: src/LYReadCFG.c:1343
+#, c-format
 msgid "included from '%s'.\n"
 msgstr ""
 
-#. no absolute path... for lynx.cfg on DOS/Win32
-#: src/LYReadCFG.c:1737 src/LYReadCFG.c:1750 src/LYReadCFG.c:1778
+#: src/LYReadCFG.c:1792 src/LYReadCFG.c:1805 src/LYReadCFG.c:1833
 msgid "The following is read from your lynx.cfg file."
 msgstr ""
 
-#: src/LYReadCFG.c:1738 src/LYReadCFG.c:1751
+#: src/LYReadCFG.c:1793 src/LYReadCFG.c:1806
 msgid "Please read the distribution"
 msgstr ""
 
-#: src/LYReadCFG.c:1744 src/LYReadCFG.c:1754
+#: src/LYReadCFG.c:1799 src/LYReadCFG.c:1809
 msgid "for more comments."
 msgstr ""
 
-#: src/LYReadCFG.c:1760
+#: src/LYReadCFG.c:1815
 msgid "RELOAD THE CHANGES"
 msgstr ""
 
-#: src/LYReadCFG.c:1769
+#: src/LYReadCFG.c:1824
 msgid "Your primary configuration"
 msgstr ""
 
-#: src/LYShowInfo.c:103
+#: src/LYShowInfo.c:109
 msgid "Directory that you are currently viewing"
 msgstr ""
 
-#: src/LYShowInfo.c:109
+#: src/LYShowInfo.c:115
 msgid "Name:"
 msgstr ""
 
-#: src/LYShowInfo.c:110
+#: src/LYShowInfo.c:116
 msgid "URL:"
 msgstr ""
 
-#: src/LYShowInfo.c:123
+#: src/LYShowInfo.c:129
 msgid "Directory that you have currently selected"
 msgstr ""
 
-#: src/LYShowInfo.c:126
+#: src/LYShowInfo.c:132
 msgid "File that you have currently selected"
 msgstr ""
 
-#: src/LYShowInfo.c:130
+#: src/LYShowInfo.c:136
 msgid "Symbolic link that you have currently selected"
 msgstr ""
 
-#: src/LYShowInfo.c:134
+#: src/LYShowInfo.c:140
 msgid "Item that you have currently selected"
 msgstr ""
 
-#: src/LYShowInfo.c:136
+#: src/LYShowInfo.c:142
 msgid "Full name:"
 msgstr ""
 
-#: src/LYShowInfo.c:145
+#: src/LYShowInfo.c:151
 msgid "Unable to follow link"
 msgstr ""
 
-#: src/LYShowInfo.c:147
+#: src/LYShowInfo.c:153
 msgid "Points to file:"
 msgstr ""
 
-#: src/LYShowInfo.c:152
-msgid "Name of owner"
+#: src/LYShowInfo.c:158
+msgid "Name of owner:"
 msgstr ""
 
-#: src/LYShowInfo.c:155
+#: src/LYShowInfo.c:161
 msgid "Group name:"
 msgstr ""
 
-#: src/LYShowInfo.c:158
+#: src/LYShowInfo.c:164
 msgid "File size:"
 msgstr ""
 
-#: src/LYShowInfo.c:164
+#: src/LYShowInfo.c:170
 msgid "Creation date:"
 msgstr ""
 
-#: src/LYShowInfo.c:167
+#: src/LYShowInfo.c:173
 msgid "Last modified:"
 msgstr ""
 
-#: src/LYShowInfo.c:170
+#: src/LYShowInfo.c:176
 msgid "Last accessed:"
 msgstr ""
 
-#: src/LYShowInfo.c:172
+#: src/LYShowInfo.c:178
 msgid "Access Permissions"
 msgstr ""
 
-#. DIRED_SUPPORT
-#: src/LYShowInfo.c:237
+#: src/LYShowInfo.c:243
 msgid "File that you are currently viewing"
 msgstr ""
 
-#: src/LYShowInfo.c:242 src/LYShowInfo.c:348
+#: src/LYShowInfo.c:248 src/LYShowInfo.c:354
 msgid "Linkname:"
 msgstr ""
 
-#: src/LYShowInfo.c:252 src/LYShowInfo.c:264
+#: src/LYShowInfo.c:258 src/LYShowInfo.c:270
 msgid "Charset:"
 msgstr ""
 
-#: src/LYShowInfo.c:270
+#: src/LYShowInfo.c:276
 msgid "Server:"
 msgstr ""
 
-#: src/LYShowInfo.c:273
+#: src/LYShowInfo.c:279
 msgid "Date:"
 msgstr ""
 
-#: src/LYShowInfo.c:276
+#: src/LYShowInfo.c:282
 msgid "Last Mod:"
 msgstr ""
 
-#: src/LYShowInfo.c:282
+#: src/LYShowInfo.c:288
 msgid "&nbsp;Expires:"
 msgstr ""
 
-#: src/LYShowInfo.c:286
+#: src/LYShowInfo.c:292
 msgid "Cache-Control:"
 msgstr ""
 
-#: src/LYShowInfo.c:290
+#: src/LYShowInfo.c:296
 msgid "Content-Length:"
 msgstr ""
 
-#: src/LYShowInfo.c:295
+#: src/LYShowInfo.c:301
 msgid "Language:"
 msgstr ""
 
-#: src/LYShowInfo.c:302
+#: src/LYShowInfo.c:308
 msgid "Post Data:"
 msgstr ""
 
-#: src/LYShowInfo.c:304
+#: src/LYShowInfo.c:310
 msgid "Post Content Type:"
 msgstr ""
 
-#: src/LYShowInfo.c:313
+#: src/LYShowInfo.c:319
 msgid "Owner(s):"
 msgstr ""
 
-#: src/LYShowInfo.c:316
+#: src/LYShowInfo.c:322
 msgid "size:"
 msgstr ""
 
-#: src/LYShowInfo.c:316
+#: src/LYShowInfo.c:322
 msgid "lines"
 msgstr ""
 
-#: src/LYShowInfo.c:319
+#: src/LYShowInfo.c:325
 msgid "mode:"
 msgstr ""
 
-#: src/LYShowInfo.c:321
+#: src/LYShowInfo.c:327
 msgid "forms mode"
 msgstr ""
 
-#: src/LYShowInfo.c:323
+#: src/LYShowInfo.c:329
 msgid "source"
 msgstr ""
 
-#: src/LYShowInfo.c:323
+#: src/LYShowInfo.c:329
 msgid "normal"
 msgstr ""
 
-#: src/LYShowInfo.c:324
+#: src/LYShowInfo.c:330
 msgid ", safe"
 msgstr ""
 
-#: src/LYShowInfo.c:325
-msgid ", internal link"
+#: src/LYShowInfo.c:331
+msgid ", via internal link"
 msgstr ""
 
-#: src/LYShowInfo.c:331
+#: src/LYShowInfo.c:337
 msgid ", no-cache"
 msgstr ""
 
-#: src/LYShowInfo.c:333
+#: src/LYShowInfo.c:339
 msgid ", ISMAP script"
 msgstr ""
 
-#: src/LYShowInfo.c:335
+#: src/LYShowInfo.c:341
 msgid ", bookmark file"
 msgstr ""
 
-#: src/LYShowInfo.c:344
+#: src/LYShowInfo.c:350
 msgid "Link that you currently have selected"
 msgstr ""
 
-#: src/LYShowInfo.c:357
+#: src/LYShowInfo.c:363
 msgid "Method:"
 msgstr ""
 
-#: src/LYShowInfo.c:362
+#: src/LYShowInfo.c:368
 msgid "Enctype:"
 msgstr ""
 
-#: src/LYShowInfo.c:374
+#: src/LYShowInfo.c:380
 msgid "(Form field)"
 msgstr ""
 
-#: src/LYShowInfo.c:389
+#: src/LYShowInfo.c:395
 msgid "No Links on the current page"
 msgstr ""
 
 #: src/LYStyle.c:170
+#, c-format
 msgid ""
 "Syntax Error parsing style in lss file:\n"
 "[%s]\n"
@@ -4427,6 +4657,10 @@ msgstr ""
 msgid "Illegal redirection \"../\" found! Request ignored."
 msgstr ""
 
+#: src/LYUpload.c:106
+msgid "Illegal character \"/\" found! Request ignored."
+msgstr ""
+
 #: src/LYUpload.c:109
 msgid "Illegal redirection using \"~\" found! Request ignored."
 msgstr ""
@@ -4443,10 +4677,25 @@ msgstr ""
 msgid "Upload options:"
 msgstr ""
 
-#: src/LYUtils.c:4899
+#: src/LYUtils.c:2922
+msgid "Unexpected access protocol for this URL scheme."
+msgstr ""
+
+#: src/LYUtils.c:3862
+msgid "No restrictions set.\n"
+msgstr ""
+
+#: src/LYUtils.c:3865
+msgid "Restrictions set:\n"
+msgstr ""
+
+#: src/LYUtils.c:5125
 msgid "Ignoring invalid HOME"
 msgstr ""
 
+#.
+#. *  Header.
+#.
 #: src/LYrcFile.c:565
 msgid ""
 "Lynx User Defaults File\n"
@@ -4482,6 +4731,9 @@ msgid ""
 "date.\n"
 msgstr ""
 
+#.
+#. *  Multiple (sub)bookmark support settings.
+#.
 #: src/LYrcFile.c:603
 msgid ""
 "If sub_bookmarks is not turned \"off\", and multiple bookmarks have\n"
@@ -4519,6 +4771,9 @@ msgid ""
 "   BY_DATE     -- sorts on the date of the file\n"
 msgstr ""
 
+#.
+#. *  Personal mail address.
+#.
 #: src/LYrcFile.c:661
 msgid ""
 "personal_mail_address specifies your personal mail address.  The\n"
@@ -4564,6 +4819,9 @@ msgid ""
 "Otherwise, the server will send the file in it's default language.\n"
 msgstr ""
 
+#.
+#. *  Preferred charset.
+#.
 #: src/LYrcFile.c:714
 msgid ""
 "preferred_charset specifies the character set in MIME notation (e.g.,\n"
@@ -4612,6 +4870,9 @@ msgid ""
 "and the keymap display, respectively.\n"
 msgstr ""
 
+#.
+#. *  EMACS keys.
+#.
 #: src/LYrcFile.c:774
 msgid ""
 "If emacs_keys is to \"on\" then the normal EMACS movement keys:\n"
@@ -4646,6 +4907,9 @@ msgid ""
 "The default can be overridden via the -popup command line toggle.\n"
 msgstr ""
 
+#.
+#. *  Show cursor.
+#.
 #: src/LYrcFile.c:811
 msgid ""
 "show_cursor specifies whether to 'hide' the cursor to the right (and\n"
@@ -4709,6 +4973,9 @@ msgid ""
 "partial_thres=-1 would use the entire screensize\n"
 msgstr ""
 
+#.
+#. *  Line edit mode.
+#.
 #: src/LYrcFile.c:878
 msgid ""
 "lineedit_mode specifies the key binding used for inputting strings in\n"
@@ -4724,6 +4991,9 @@ msgid ""
 "Current lineedit modes are:\n"
 msgstr ""
 
+#.
+#. *  Directory list style.
+#.
 #: src/LYrcFile.c:907
 msgid ""
 "dir_list_styles specifies the directory list style under DIRED_SUPPORT\n"
@@ -4732,6 +5002,9 @@ msgid ""
 "\"DIRECTORIES_FIRST\" lists directories first.\n"
 msgstr ""
 
+#.
+#. *  User mode.
+#.
 #: src/LYrcFile.c:923
 msgid ""
 "user_mode specifies the users level of knowledge with Lynx.  The\n"
@@ -4817,7 +5090,6 @@ msgid ""
 "          you are viewing trusted source information.\n"
 msgstr ""
 
-#. defined(EXEC_LINKS) || defined(EXEC_SCRIPTS)
 #: src/LYrcFile.c:1036
 msgid ""
 "If verbose_images is \"on\", lynx will print the name of the image\n"
diff --git a/src/GridText.c b/src/GridText.c
index 174b29cd..f50cac68 100644
--- a/src/GridText.c
+++ b/src/GridText.c
@@ -1,4 +1,4 @@
-/*		Character grid hypertext object
+/*
 **		===============================
 */
 
@@ -45,6 +45,10 @@
 #include <LYexit.h>
 #include <LYLeaks.h>
 
+#ifdef SH_EX	/* for DEBUG (1997/10/10 (Fri) 07:58:47) */
+#define NOTUSED_BAD_FOR_SCREEN
+#endif
+
 #undef DEBUG_APPCH
 
 #ifdef SOURCE_CACHE
@@ -59,12 +63,15 @@ unsigned int cached_styles[CACHEH][CACHEW];
 
 #endif
 
+#include <LYJustify.h>
+
+
 #ifdef USE_COLOR_STYLE_UNUSED
 void LynxClearScreenCache NOARGS
 {
     int i,j;
 
-    CTRACE(tfp, "flushing cached screen styles\n");
+    CTRACE(tfp, "GridText: flushing cached screen styles\n");
     for (i=0;i<CACHEH;i++)
 	for (j=0;j<CACHEW;j++)
 	    cached_styles[i][j]=s_a;
@@ -92,9 +99,16 @@ struct _HTStream {			/* only know it as object */
 			  ((unsigned char)(ch)&0xc0) == 0x80)
 
 extern BOOL HTPassHighCtrlRaw;
-extern HTkcode kanji_code;
 extern HTCJKlang HTCJK;
 
+#ifdef CJK_EX
+PUBLIC HTkcode last_kcode = NOKANJI;	/* 1997/11/14 (Fri) 09:09:26 */
+extern char *str_kcode(HTkcode code);
+#define CHAR_WIDTH 6
+#else
+#define CHAR_WIDTH 1
+#endif
+
 /*	Exports
 */
 PUBLIC HText * HTMainText = NULL;		/* Equivalent of main window */
@@ -250,6 +264,63 @@ struct _HText {
 
 PRIVATE void HText_AddHiddenLink PARAMS((HText *text, TextAnchor *textanchor));
 
+
+#ifdef EXP_JUSTIFY_ELTS
+PUBLIC BOOL can_justify_here;
+PUBLIC BOOL can_justify_here_saved;
+
+PUBLIC BOOL can_justify_this_line;/* =FALSE if line contains form objects */
+PUBLIC int wait_for_this_stacked_elt;/* -1 if can justify contents of the
+    element on the op of stack. If positive - specifies minimal stack depth
+    plus 1 at which we can justify element (can be MAX_LINE+2 if
+    ok_justify ==FALSE or in psrcview. */
+PUBLIC BOOL form_in_htext;/*to indicate that we are in form (since HTML_FORM is
+  not stacked in the HTML.c */
+#ifdef DEBUG_JUSTIFY
+PUBLIC BOOL can_justify_stack_depth;/* can be 0 or 1 if all code is correct*/
+#endif
+
+
+typedef struct ht_run_info_ {
+    int byte_len;		/*length in bytes*/
+    int cell_len;		/*length in cells*/
+} ht_run_info;
+
+static int justify_start_position;/* this is an index of char from which
+    justification can start (eg after "* " preceeding <li> text) */
+
+static int ht_num_runs;/*the number of runs filled*/
+static ht_run_info ht_runs[MAX_LINE];
+static BOOL this_line_was_splitted;
+static TextAnchor* last_anchor_of_previous_line;
+static int justified_text_map[MAX_LINE]; /* this is a map - for each index i
+    it tells to which position j=justified_text_map[i] in justified text
+    i-th character is mapped - it's used for anchor positions fixup and for
+    color style's positions adjustment. */
+
+PUBLIC void ht_justify_cleanup NOARGS
+{
+    last_anchor_of_previous_line = NULL;
+    this_line_was_splitted = FALSE;
+}
+
+PUBLIC void mark_justify_start_position ARGS1(void*,text)
+{
+    if (text && ((HText*)text)->last_line)
+	justify_start_position = ((HText*)text )->last_line->size;
+}
+
+
+#define REALLY_CAN_JUSTIFY(text) ( (wait_for_this_stacked_elt<0) && \
+	( text->style->alignment == HT_LEFT     || \
+	  text->style->alignment == HT_JUSTIFY) && \
+	HTCJK == NOCJK && \
+	can_justify_here && can_justify_this_line && !form_in_htext )
+
+#endif /* EXP_JUSTIFY_ELTS */
+
+
+
 /*
  *  Boring static variable used for moving cursor across
  */
@@ -288,6 +359,7 @@ PRIVATE int HText_TrueLineSize PARAMS((
 #define CHECK_FREE_MEM
 #endif
 
+
 #ifdef CHECK_FREE_MEM
 
 /*
@@ -546,7 +618,7 @@ PUBLIC HText *	HText_new ARGS1(
     self->LastChar = '\0';
     self->IgnoreExcess = FALSE;
 
-#ifndef PSRC_TEST
+#ifndef USE_PSRC
     if (HTOutputFormat == WWW_SOURCE)
 	self->source = YES;
     else
@@ -855,7 +927,14 @@ PRIVATE int display_line ARGS2(
 		    addch('_');
 		    i++;
 		} else {
+#if (defined(DOSPATH) || defined(WIN_EX)) && !defined(USE_SLANG)
+		    if (LYShowColor == SHOW_COLOR_NEVER)
+			start_bold();
+		    else
+			start_underline();
+#else
 		    start_underline();
+#endif	/* DOSPATH ... */
 		}
 		break;
 
@@ -864,7 +943,14 @@ PRIVATE int display_line ARGS2(
 		    addch('_');
 		    i++;
 		} else {
+#if (defined(DOSPATH) || defined(WIN_EX)) && !defined(USE_SLANG)
+		    if (LYShowColor == SHOW_COLOR_NEVER)
+			stop_bold();
+		    else
+			stop_underline();
+#else
 		    stop_underline();
+#endif	/* DOSPATH ... */
 		}
 		break;
 
@@ -1020,7 +1106,7 @@ PRIVATE void display_title ARGS1(
      */
     StrAllocCopy(title,
 		 (HTAnchor_title(text->node_anchor) ?
-		  HTAnchor_title(text->node_anchor) : ""));
+		  HTAnchor_title(text->node_anchor) : " "));	/* "" -> " " */
 
     /*
      *  There shouldn't be any \n in the title field,
@@ -1073,7 +1159,7 @@ PRIVATE void display_title ARGS1(
      */
     if (HTCJK != NOCJK) {
 	if (*title &&
-	    (tmp = (unsigned char *)calloc(1, (strlen(title) + 1)))) {
+	    (tmp = (unsigned char *)calloc(1, (strlen(title) + 256)))) {
 	    if (kanji_code == EUC) {
 		TO_EUC((unsigned char *)title, tmp);
 	    } else if (kanji_code == SJIS) {
@@ -1092,11 +1178,14 @@ PRIVATE void display_title ARGS1(
     }
     move(0, 0);
     clrtoeol();
+#ifdef CJK_EX
+    addstr(str_kcode(last_kcode));
+#endif
     if (text->top_of_screen > 0 && HText_hasToolbar(text)) {
 	addch('#');
     }
     i = (LYcols - 1) - strlen(percent) - strlen(title);
-    if (i > 0) {
+    if (i >= CHAR_WIDTH) {
 	move(0, i);
     } else {
 	/*
@@ -1104,9 +1193,9 @@ PRIVATE void display_title ARGS1(
 	 *  account the possibility that multibyte
 	 *  characters might be present. - FM
 	 */
-	if (LYcols - 2 >= (int)strlen(percent))
-	    title[((LYcols - 2) - strlen(percent))] = '\0';
-	move(0, 1);
+	if ((i = ((LYcols - 2) - strlen(percent)) - CHAR_WIDTH) >= 0)
+	    title[i] = '\0';
+	move(0, CHAR_WIDTH);
     }
     addstr(title);
     if (percent[0] != '\0')
@@ -1554,7 +1643,7 @@ PRIVATE void display_page ARGS3(
 			    if (link_dest_intl && link_dest_intl != link_dest) {
 
 				CTRACE(tfp,
-				    "display_page: unexpected typed link to %s!\n",
+		    "GridText: display_page: unexpected typed link to %s!\n",
 					    link_dest_intl->parent->address);
 				link_dest_intl = NULL;
 			    }
@@ -1854,7 +1943,17 @@ PRIVATE void split_line ARGS2(
 	 *  of our new line. - FM
 	 */
 	p = prevdata + split;
-	while ((*p == ' ' &&
+	while ((
+#ifdef EXP_JUSTIFY_ELTS
+		/* if justification is allowed for prev line, then raw
+		 * HT_NON_BREAK_SPACE are still present in data[] (they'll be
+		 * substituted at the end of this function with ' ') - VH
+		 */
+		(*p == ' ' || *p == HT_NON_BREAK_SPACE ) &&
+#else
+		(*p == ' ') &&
+#endif
+
 		(HeadTrim || text->first_anchor ||
 		 underline_on || bold_on ||
 		 text->style->alignment != HT_LEFT ||
@@ -1970,7 +2069,16 @@ PRIVATE void split_line ARGS2(
      *  Economize on space.
      */
     while ((previous->size > 0) &&
+#ifdef EXP_JUSTIFY_ELTS
+	    /* if justification is allowed for prev line, then raw
+	     * HT_NON_BREAK_SPACE are still present in data[] (they'll be
+	     * substituted at the end of this function with ' ') - VH
+	     */
+	   ((previous->data[previous->size-1] == ' ') ||
+	    (previous->data[previous->size-1] == HT_NON_BREAK_SPACE)) &&
+#else
 	   (previous->data[previous->size-1] == ' ') &&
+#endif
 	   (ctrl_chars_on_this_line || HeadTrim || text->first_anchor ||
 	    underline_on || bold_on ||
 	    text->style->alignment != HT_LEFT ||
@@ -2089,7 +2197,7 @@ PRIVATE void split_line ARGS2(
 		    (previous->styles[spare - 1].direction == ABS_ON &&
 		     previous->styles[spare - 2].direction == ABS_OFF)
 		       )) {
-	        /*
+		/*
 		 *  Skip pairs of adjacent ON/OFF or OFF/ON changes.
 		 */
 	    spare -= 2;
@@ -2167,8 +2275,13 @@ PRIVATE void split_line ARGS2(
      *  Align left, right or center.
      */
     spare = 0;
-    if (style->alignment == HT_CENTER ||
-	style->alignment == HT_RIGHT) {
+    ctrl_chars_on_previous_line = 0; /* - VH */
+    if (
+#ifdef EXP_JUSTIFY_ELTS
+	this_line_was_splitted ||
+#endif
+	(style->alignment == HT_CENTER ||
+	 style->alignment == HT_RIGHT) ) {
 	/* Calculate spare character positions if needed */
 	for (cp = previous->data; *cp; cp++) {
 	    if (*cp == LY_UNDERLINE_START_CHAR ||
@@ -2359,6 +2472,287 @@ PRIVATE void split_line ARGS2(
 	    }
 	}
     }
+
+#ifdef EXP_JUSTIFY_ELTS
+    /* now perform justification - by VH */
+
+    if (this_line_was_splitted && spare ) {
+	/* this is the only case when we need justification*/
+	char* jp = previous->data + justify_start_position;
+	ht_run_info* r = ht_runs;
+	char c;
+	int total_byte_len = 0, total_cell_len = 0;
+	int d_, r_, i, j, cur_byte_num, *m;
+	HTLine * jline;
+	char *jdata;
+	char *prevdata = previous->data;
+
+	ht_num_runs = 0;
+	r->byte_len = r->cell_len = 0;
+
+	for(; (c = *jp) != 0; ++jp) {
+	    if (c == ' ') {
+		total_byte_len += r->byte_len;
+		total_cell_len += r->cell_len;
+		++r;
+		++ht_num_runs;
+		r->byte_len = r->cell_len = 0;
+		continue;
+	    }
+	    ++r->byte_len;
+	    if ( IsSpecialAttrChar(c) )
+		continue;
+
+	    ++r->cell_len;
+	    if (c == HT_NON_BREAK_SPACE) {
+		*jp = ' ';	/* substitute it */
+		continue;
+	    }
+	    if (text->T.output_utf8 && !isascii(c)) {
+		    int utf_extra = 0;
+		    if ((c & 0xe0) == 0xc0) {
+			utf_extra = 1;
+		    } else if ((c & 0xf0) == 0xe0) {
+			utf_extra = 2;
+		    } else if ((c & 0xf8) == 0xf0) {
+			utf_extra = 3;
+		    } else if ((c & 0xfc) == 0xf8) {
+			utf_extra = 4;
+		    } else if ((c & 0xfe) == 0xfc) {
+			utf_extra = 5;
+		    } else
+			utf_extra = 0;
+		    if ( (int) strlen(jp+1) < utf_extra)
+			utf_extra = 0;
+		    r->byte_len += utf_extra;
+		    jp += utf_extra;
+	    }
+	}
+	total_byte_len += r->byte_len;
+	total_cell_len += r->cell_len;
+	++ht_num_runs;
+
+	if (ht_num_runs != 1) {
+
+	    jline = (HTLine *)LY_CALLOC(1, LINE_SIZE(previous->size+spare));
+	    if (jline == NULL)
+		outofmem(__FILE__, "split_line_1");
+
+	    jdata = jline->data;
+
+	    /*
+	     * we have to spread num_spaces among (ht_num_runs-1) runs - we
+	     * fill justified_text_map in order to apply changes caused by
+	     * justification to anchor data and color styles, and justify
+	     * original string on the fly
+	     */
+	    d_ = spare/(ht_num_runs-1);
+	    r_ = spare % (ht_num_runs-1);
+
+	    m = justified_text_map;
+	    for(jp=previous->data,i=0;i<justify_start_position;++i) {
+		*m++ = i;
+		*jdata++ = ( *prevdata == HT_NON_BREAK_SPACE ? ' ' : *prevdata);
+		++prevdata;
+	    }
+
+	    cur_byte_num = i;
+
+	    for (r = ht_runs; r < ht_runs + ht_num_runs; ++r ) {
+
+		/* copy the reference to run content */
+		for(i=0; i < r->byte_len;  ++i) {
+		    *m++ = cur_byte_num++;
+		    *jdata++ = *prevdata++;
+		}
+		if ( r - ht_runs  == ht_num_runs - 1 ) { /* nop on last run */
+		    *jdata++ = '\0';
+		    break;
+		}
+
+		/* the space that was in original string */
+		*m++ = cur_byte_num++;
+		*jdata++ = ' ';
+		prevdata++;/* skip that space */
+
+		cur_byte_num += j=( d_ + ( r_--  > 0 ) );
+		for (i=0; i<j; ++i)
+		    *jdata++ = ' ';
+	    }
+	    *m++ = justify_start_position + total_cell_len +
+		    spare + ht_num_runs - 1; /*map the end*/
+
+	    text->chars += spare;
+
+	    jline->offset = previous->offset;
+	    jline->size = previous->size + spare;
+	    jline->split_after = previous->split_after;
+	    jline->bullet = previous->bullet;
+	    jline->expansion_line = previous->expansion_line;
+
+	    jline->prev = previous->prev;
+	    jline->next = previous->next;
+	    previous->next->prev = jline;
+	    previous->prev->next = jline;
+
+#if defined(USE_COLOR_STYLE)
+	    jline->numstyles = previous->numstyles;
+
+	    /* now copy and fix colorstyles */
+	    for(i = 0; i < jline->numstyles; ++i) {
+		jline->styles[i].style = previous->styles[i].style;
+		jline->styles[i].direction = previous->styles[i].direction;
+		jline->styles[i].previous = previous->styles[i].previous;
+		jline->styles[i].horizpos = justified_text_map[previous->styles[i].horizpos];
+	    }
+#endif
+	    /* we have to fix anchors*/
+	    {
+		/*a2 is the last anchor on the line preceeding 'previous'*/
+		TextAnchor* a2 = last_anchor_of_previous_line;
+
+		if (!a2)
+		    a2 = text->first_anchor;
+		else if (a2 == text->last_anchor)
+		    a2 = NULL;
+		else
+		    a2 = a2->next; /*1st anchor on line we justify */
+
+		if (a2) {
+		    for (; a2 /*&& a2->line_num == text->Lines-1*/;
+			    last_anchor_of_previous_line = a2, a2 = a2->next) {
+			int oldpos = a2->line_pos,
+			    newpos = justified_text_map[a2->line_pos],
+			    shift = newpos - oldpos;
+
+			if (a2->line_num == text->Lines)
+			    break;/*new line not yet completed*/
+
+			if (a2->line_num == text->Lines-1) {
+			    a2->line_pos = newpos;
+			    a2->start += shift;
+
+			    if (!a2->extent && a2->number &&
+				(a2->link_type & HYPERTEXT_ANCHOR) &&
+				!a2->show_anchor &&
+				a2->number == text->last_anchor_number)
+				/* seems endAnchor wasn't called for it */ {
+				a2 = a2->next; /*don't allow .start to be incremented
+				    by 'spare' once more */
+				break;
+			    }
+
+			    if ( a2->extent + oldpos > (int) previous->size)
+				/*anchor content wrapped to new line */
+				a2->extent += (jline->size - newpos) -
+				    (previous->size - oldpos);
+			    else
+				a2->extent = justified_text_map[oldpos+a2->extent]
+				    - newpos;
+
+			} else {
+			    /* This is the anchor that was started on previous
+			     * line.  Its .line_pos and .start were updated. 
+			     * So we have to update only extent.  If anchor
+			     * text is longer than two lines, we don't bother
+			     * setting it to correct value.
+			     */
+			    if (a2->line_num != text->Lines-2)
+				continue; /* don't bother */
+			    if (!a2->extent && a2->number &&
+				(a2->link_type & HYPERTEXT_ANCHOR) &&
+				!a2->show_anchor &&
+				a2->number == text->last_anchor_number)
+				/* seems endAnchor wasn't called for it */
+				continue;
+			    /* anchor is started at text->Lines-2, and there
+			     * are two cases - either it was wrapped to newline
+			     * or it ended in previous text->Lines-1.
+			     */
+			    {
+				int p2sz = previous->prev->size,
+				    p1sz = previous->size,
+				    onp2sz = p2sz - a2->line_pos,
+				    onp1sz = a2->extent - 1 - onp2sz;
+
+				if (onp1sz >= p1sz)
+				    /* this anchor will be skipped at the next
+				     * split_line here, since its line_num will
+				     * be text->Lines-3
+				     */
+				    a2->extent += spare;
+				else {
+				    a2->extent += justified_text_map[onp1sz-1]
+					 - onp1sz + 1;
+				}
+			    }
+
+			}
+
+		    }
+
+		    /* iterate on anchors in the last line */
+		    for (; a2; a2 = a2->next)
+			a2->start += spare;
+		}
+	    }
+
+	    FREE(previous);
+
+	} else { /* (ht_num_runs==1) */
+	    /* keep maintaining 'last_anchor_of_previous_line' */
+	    TextAnchor* a2 = last_anchor_of_previous_line;
+	    if (!a2)
+		a2 = text->first_anchor;
+	    else if (a2 == text->last_anchor)
+		a2 = NULL;
+	    else
+		a2 = a2->next; /* 1st anchor on line we justify */
+
+	    if (a2)
+		for (; a2 && a2->line_num <= text->Lines-1;
+		    last_anchor_of_previous_line = a2, a2 = a2->next);
+	}
+    } else {
+	if (REALLY_CAN_JUSTIFY(text) ) {
+	    char* p;
+
+	    /* it was permitted to justify line, but this function was called
+	     * to end paragraph - we must subsitute HT_NON_BREAK_SPACEs with
+	     * spaces in previous line
+	     */
+	    if (line->size) {
+		  CTRACE(tfp,"justification: shouldn't happen - new line is not empty!\n");
+	    }
+
+	    for (p=previous->data;*p;++p)
+		if (*p == HT_NON_BREAK_SPACE)
+		    *p = ' ';
+	}
+
+	/* HT_NON_BREAK_SPACEs were subsituted with spaces in
+	   HText_appendCharacter */
+	{
+	    /* keep maintaining 'last_anchor_of_previous_line' */
+	    TextAnchor* a2 = last_anchor_of_previous_line;
+	    if (!a2)
+		a2 = text->first_anchor;
+	    else if (a2 == text->last_anchor)
+		a2 = NULL;
+	    else
+		a2 = a2->next; /*1st anchor on line we justify */
+
+	    if (a2)
+		for (; a2 && a2->line_num <= text->Lines-1;
+		    last_anchor_of_previous_line = a2, a2 = a2->next);
+	}
+    }
+
+	/* cleanup */
+    can_justify_this_line = TRUE;
+    justify_start_position = 0;
+    this_line_was_splitted = FALSE;
+#endif
 } /* split_line */
 
 
@@ -2439,6 +2833,10 @@ PUBLIC void HText_appendCharacter ARGS2(
     int indent;
 
 #ifdef DEBUG_APPCH
+#ifdef CJK_EX
+    static unsigned char save_ch = 0;
+#endif
+
     if (TRACE) {
 	char * special = NULL;  /* make trace a little more readable */
 	switch(ch) {
@@ -2475,8 +2873,28 @@ PUBLIC void HText_appendCharacter ARGS2(
 	    CTRACE(tfp, "add(%s %d special char) %d/%d\n", special, ch,
 		   HTisDocumentSource(), HTOutputFormat != WWW_SOURCE);
 	} else {
-	    CTRACE(tfp, "add(%c) %d/%d\n", ch,
-		   HTisDocumentSource(), HTOutputFormat != WWW_SOURCE);
+#ifdef CJK_EX	/* 1998/08/30 (Sun) 13:26:23 */
+	    if (save_ch == 0) {
+		if (IS_SJIS_HI1(ch) || IS_SJIS_HI2(ch)) {
+		    save_ch = ch;
+		} else {
+		    CTRACE(tfp, "add(%c) %d/%d\n", ch,
+			HTisDocumentSource(), HTOutputFormat != WWW_SOURCE);
+		}
+	    } else {
+		CTRACE(tfp, "add(%c%c) %d/%d\n", save_ch, ch,
+			HTisDocumentSource(), HTOutputFormat != WWW_SOURCE);
+		save_ch = 0;
+	    }
+#else
+	    if (ch < 0x80) {
+		CTRACE(tfp, "add(%c) %d/%d\n", ch,
+		    HTisDocumentSource(), HTOutputFormat != WWW_SOURCE);
+	    } else {
+		CTRACE(tfp, "add(%02x) %d/%d\n", ch,
+		    HTisDocumentSource(), HTOutputFormat != WWW_SOURCE);
+	    }
+#endif	/* CJK_EX */
 	}
     } /* trace only */
 #endif /* DEBUG_APPCH */
@@ -2642,9 +3060,19 @@ PUBLIC void HText_appendCharacter ARGS2(
 		} else {
 		    text->kanji_buf = '\216';
 		    ch |= 0200;
+#ifdef SH_EX
+		    /**** Add Next Line by patakuti ****/
+		    text->permissible_split = (int)text->last_line->size;
+		    {
+			unsigned char hi, low;
+			JISx0201TO0208_EUC(0x8e, ch, &hi, &low);
+			text->kanji_buf = hi;
+			ch = low;
 		}
-		break;
+#endif
 	}
+		break;
+	} /* end switch */
 
 	if (!text->kanji_buf) {
 	    if ((ch & 0200) != 0) {
@@ -2653,7 +3081,8 @@ PUBLIC void HText_appendCharacter ARGS2(
 		 */
 		if ((text->kcode == SJIS) &&
 		    ((unsigned char)ch >= 0xA1) &&
-		    ((unsigned char)ch <= 0xDF)) {
+		    ((unsigned char)ch <= 0xDF))
+		{
 		    unsigned char c = (unsigned char)ch;
 		    unsigned char kb = (unsigned char)text->kanji_buf;
 		    JISx0201TO0208_SJIS(c,
@@ -2661,6 +3090,8 @@ PUBLIC void HText_appendCharacter ARGS2(
 					(unsigned char *)&c);
 		    ch = (char)c;
 		    text->kanji_buf = kb;
+		    /* 1998/01/19 (Mon) 09:06:15 */
+		    text->permissible_split = (int)text->last_line->size;
 		} else {
 		    text->kanji_buf = ch;
 		    /*
@@ -2677,9 +3108,20 @@ PUBLIC void HText_appendCharacter ARGS2(
 	return;
     }
 
+#ifdef CJK_EX	/* MOJI-BAKE Fix! 1997/10/12 -- 10/31 (Fri) 00:22:57 - JH7AYN */
+    if (ch == LY_BOLD_START_CHAR || ch == LY_BOLD_END_CHAR) {
+	text->permissible_split = (int)line->size;	/* Can split here */
+	if (HTCJK == JAPANESE)
+	    text->kcode = NOKANJI;
+    }
+#endif
+
     if (IsSpecialAttrChar(ch) && ch != LY_SOFT_NEWLINE) {
-#ifndef USE_COLOR_STYLE
+#if !defined(USE_COLOR_STYLE) || !defined(NO_DUMP_WITH_BACKSPACES)
 	if (line->size >= (MAX_LINE-1)) return;
+#if defined(USE_COLOR_STYLE) && !defined(NO_DUMP_WITH_BACKSPACES)
+	if (with_backspaces && HTCJK==NOCJK && !text->T.output_utf8) {
+#endif
 	if (ch == LY_UNDERLINE_START_CHAR) {
 	    line->data[line->size++] = LY_UNDERLINE_START_CHAR;
 	    line->data[line->size] = '\0';
@@ -2730,6 +3172,12 @@ PUBLIC void HText_appendCharacter ARGS2(
 		return;
 	    }
 	}
+#if defined(USE_COLOR_STYLE) && !defined(NO_DUMP_WITH_BACKSPACES)
+	} /* if (with_backspaces && HTCJK==HTNOCJK && !text->T.output_utf8) */
+	 else
+	     return;
+#endif
+
 #else
 	return;
 #endif
@@ -2767,6 +3215,15 @@ PUBLIC void HText_appendCharacter ARGS2(
     if (ch == HT_EN_SPACE)
 	ch = ' ';
 
+#ifdef SH_EX	/* 1997/11/01 (Sat) 12:08:54 */
+    if (ch == 0x0b) {	/* ^K ??? */
+	ch = '\r';
+    }
+    if (ch == 0x1a) {	/* ^Z ??? */
+	ch = '\r';
+    }
+#endif
+
     /*
      *  I'm going to cheat here in a BIG way.  Since I know that all
      *  \r's will be trapped by HTML_put_character I'm going to use
@@ -2898,6 +3355,10 @@ check_IgnoreExcess:
 					     1 : 0))) >= (LYcols - 1)) {
 
 	if (style->wordWrap && HTOutputFormat != WWW_SOURCE) {
+#ifdef EXP_JUSTIFY_ELTS
+	    if (REALLY_CAN_JUSTIFY(text))
+		this_line_was_splitted=TRUE;
+#endif
 	    split_line(text, text->permissible_split);
 	    if (ch == ' ') return;	/* Ignore space causing split */
 
@@ -2916,7 +3377,14 @@ check_IgnoreExcess:
 		 *  For normal stuff like pre let's go ahead and
 		 *  wrap so the user can see all of the text.
 		 */
-		new_line(text);
+
+		if ( (dump_output_immediately|| (crawl && traversal) )
+		     && dont_wrap_pre) {
+		    if ((int)line->size >= (int)(MAX_LINE-1))
+			new_line(text);
+		} else
+		    new_line(text);
+
 	}
     } else if ((int)line->size >= (int)(MAX_LINE-1)) {
 	/*
@@ -2928,18 +3396,93 @@ check_IgnoreExcess:
     /*
      *  Insert normal characters.
      */
-    if (ch == HT_NON_BREAK_SPACE) {
+    if (ch == HT_NON_BREAK_SPACE
+#ifdef EXP_JUSTIFY_ELTS
+     && !REALLY_CAN_JUSTIFY(text)
+#endif
+     )
 	ch = ' ';
-    }
+    /* we leave raw HT_NON_BREAK_SPACE otherwise (we'll substitute it later) */
 
     if (ch & 0x80)
 	text->have_8bit_chars = YES;
 
+    /*
+     * Kanji charactor handling.
+     */
     {
 	HTFont font = style->font;
 	unsigned char hi, lo, tmp[2];
 
 	line = text->last_line; /* May have changed */
+
+#ifdef CJK_EX	/* 1997/11/14 (Fri) 09:10:03 */
+	if (HTCJK != NOCJK && text->kanji_buf) {
+	    hi = (unsigned char)text->kanji_buf;
+	    lo = (unsigned char)ch;
+
+	    if (HTCJK == JAPANESE) {
+		if (text->kcode == NOKANJI)
+		{
+		    if (IS_SJIS(hi, lo, text->in_sjis) && IS_EUC(hi, lo)) {
+			text->kcode = NOKANJI;
+		    } else if (IS_SJIS(hi, lo, text->in_sjis)) {
+			text->kcode = SJIS;
+		    } else if (IS_EUC(hi, lo)) {
+			text->kcode = EUC;
+		    }
+		}
+
+		switch (kanji_code) {
+		case EUC:
+		    if (text->kcode == SJIS) {
+			SJIS_TO_EUC1(hi, lo, tmp);
+			line->data[line->size++] = tmp[0];
+			line->data[line->size++] = tmp[1];
+		    } else if (text->kcode == EUC) {
+			JISx0201TO0208_EUC(hi, lo, &hi, &lo);
+			line->data[line->size++] = hi;
+			line->data[line->size++] = lo;
+		    }
+		    break;
+
+		case SJIS:
+		    if (last_kcode != SJIS && text->kcode == EUC)
+		    {
+			EUC_TO_SJIS1(hi, lo, tmp);
+			line->data[line->size++] = tmp[0];
+			line->data[line->size++] = tmp[1];
+		    } else {
+			/* text->kcode == (SJIS or NOKANJI) */
+#ifdef CJK_EX	/* 1998/01/20 (Tue) 16:46:34 */
+			if (last_kcode == EUC) {
+			    if (lo == 0) {	/* BAD EUC code */
+				hi = '=';
+				lo = '=';
+			    } else if (hi == 0x8e) {
+				text->kcode = NOKANJI;
+				JISx0201TO0208_EUC(hi, lo, &hi, &lo);
+				EUC_TO_SJIS1(hi, lo, tmp);
+				hi = tmp[0];
+				lo = tmp[1];
+			    }
+			}
+#endif
+			line->data[line->size++] = hi;
+			line->data[line->size++] = lo;
+		    }
+		    break;
+
+		default:
+		    break;
+		}
+	    } else {
+		line->data[line->size++] = hi;
+		line->data[line->size++] = lo;
+	    }
+	    text->kanji_buf = 0;
+	}
+#else
 	if (HTCJK != NOCJK && text->kanji_buf) {
 	    hi = (unsigned char)text->kanji_buf, lo = (unsigned char)ch;
 	    if (HTCJK == JAPANESE && text->kcode == NOKANJI) {
@@ -2971,7 +3514,9 @@ check_IgnoreExcess:
 		line->data[line->size++] = lo;
 	    }
 	    text->kanji_buf = 0;
-	} else if (HTCJK != NOCJK) {
+	}
+#endif
+	else if (HTCJK != NOCJK) {
 	    line->data[line->size++] = (kanji_code != NOKANJI) ?
 							    ch :
 					  (font & HT_CAPITALS) ?
@@ -3113,7 +3658,7 @@ PUBLIC int HText_beginAnchor ARGS3(
      */
     if ((a->number > 0) &&
 	(keypad_mode == LINKS_ARE_NUMBERED ||
-	 keypad_mode == LINKS_AND_FORM_FIELDS_ARE_NUMBERED)) {
+	 keypad_mode == LINKS_AND_FIELDS_ARE_NUMBERED)) {
 	char saved_lastchar = text->LastChar;
 	int saved_linenum = text->Lines;
 	sprintf(marker,"[%d]", a->number);
@@ -3163,7 +3708,7 @@ PUBLIC void HText_endAnchor ARGS2(
 	}
     }
 
-    CTRACE(tfp, "HText_endAnchor: number:%d link_type:%d\n",
+    CTRACE(tfp, "GridText:HText_endAnchor: number:%d link_type:%d\n",
 			a->number, a->link_type);
     if (a->link_type == INPUT_ANCHOR) {
 	/*
@@ -3181,7 +3726,7 @@ PUBLIC void HText_endAnchor ARGS2(
 	int i, j, k, l;
 	BOOL remove_numbers_on_empty =
 	    ((keypad_mode == LINKS_ARE_NUMBERED ||
-	      keypad_mode == LINKS_AND_FORM_FIELDS_ARE_NUMBERED) &&
+	      keypad_mode == LINKS_AND_FIELDS_ARE_NUMBERED) &&
 	     (text->hiddenlinkflag != HIDDENLINKS_MERGE ||
 	      (LYNoISMAPifUSEMAP &&
 	       !(text->node_anchor && text->node_anchor->bookmark) &&
@@ -3672,8 +4217,7 @@ PUBLIC void HText_endAppend ARGS1(
     while (text->last_line->data[0] == '\0' && text->Lines > 2) {
 	HTLine *next_to_the_last_line = text->last_line->prev;
 
-
-	CTRACE(tfp, "GridText: Removing bottom blank line: %s\n",
+	CTRACE(tfp, "GridText: Removing bottom blank line: `%s'\n",
 			    text->last_line->data);
 	/*
 	 *  line_ptr points to the first line.
@@ -3683,7 +4227,7 @@ PUBLIC void HText_endAppend ARGS1(
 	FREE(text->last_line);
 	text->last_line = next_to_the_last_line;
 	text->Lines--;
-	CTRACE(tfp, "GridText: New bottom line: %s\n",
+	CTRACE(tfp, "GridText: New bottom line: `%s'\n",
 			    text->last_line->data);
     }
 
@@ -3733,7 +4277,7 @@ PUBLIC void HText_trimHightext ARGS2(
 	return;
 
     CTRACE(tfp, "Gridtext: Entering HText_trimHightext %s\n",
-	        final ? "(final)" : "(partial)");
+		final ? "(final)" : "(partial)");
 
     /*
      *  Get the first line.
@@ -3825,8 +4369,7 @@ re_parse:
 	}
 	anchor_ptr->start += cur_shift;
 
-	CTRACE(tfp, "anchor text: '%s'\n",
-					   line_ptr->data);
+	CTRACE(tfp, "anchor text: '%s'\n", line_ptr->data);
 	/*
 	 *  If the link begins with an end of line and we have more
 	 *  lines, then start the highlighting on the next line. - FM
@@ -5582,6 +6125,11 @@ PUBLIC void print_wwwfile_to_fd ARGS2(
     register int i;
     int first = TRUE;
     HTLine * line;
+#ifndef NO_DUMP_WITH_BACKSPACES
+    HText* text = HTMainText;
+    BOOL in_b=FALSE,in_u=FALSE,
+	bs=text && with_backspaces && HTCJK==NOCJK && !text->T.output_utf8;
+#endif
 
     if (!HTMainText)
 	return;
@@ -5612,6 +6160,17 @@ PUBLIC void print_wwwfile_to_fd ARGS2(
 	 */
 	for (i = 0; line->data[i] != '\0'; i++) {
 	    if (!IsSpecialAttrChar(line->data[i])) {
+#ifndef NO_DUMP_WITH_BACKSPACES
+		if (in_b) {
+		    fputc(line->data[i], fp);
+		    fputc('\b',fp);
+		    fputc(line->data[i], fp);
+		} else if (in_u) {
+		    fputc('_',fp);
+		    fputc('\b',fp);
+		    fputc(line->data[i], fp);
+		} else
+#endif
 		fputc(line->data[i], fp);
 	    } else if (line->data[i] == LY_SOFT_HYPHEN &&
 		line->data[i + 1] == '\0') { /* last char on line */
@@ -5636,6 +6195,27 @@ PUBLIC void print_wwwfile_to_fd ARGS2(
 			break;
 		}
 	    }
+#ifndef NO_DUMP_WITH_BACKSPACES
+	    else if (bs) {
+		switch (line->data[i]) {
+		    case LY_UNDERLINE_START_CHAR:
+			if (!in_b)
+			    in_u = TRUE; /*favor bold over underline*/
+			break;
+		    case LY_UNDERLINE_END_CHAR:
+			in_u = FALSE;
+			break;
+		    case LY_BOLD_START_CHAR:
+			if (in_u)
+			    in_u = FALSE; /* turn it off*/
+			in_b = TRUE;
+			break;
+		    case LY_BOLD_END_CHAR:
+			in_b = FALSE;
+			break;
+		}
+	    }
+#endif
 	}
 
 	if (line == HTMainText->last_line)
@@ -5663,6 +6243,12 @@ PUBLIC void print_crawl_to_fd ARGS3(
     register int i;
     int first = TRUE;
     HTLine * line;
+#ifndef NO_DUMP_WITH_BACKSPACES
+    HText* text = HTMainText;
+    BOOL in_b=FALSE,in_u=FALSE,
+	bs=text && with_backspaces && HTCJK==NOCJK && !text->T.output_utf8;
+#endif
+
 
     if (!HTMainText)
 	return;
@@ -5704,6 +6290,28 @@ PUBLIC void print_crawl_to_fd ARGS3(
 		    fputc('-', fp);
 		}
 	     }
+#ifndef NO_DUMP_WITH_BACKSPACES
+	    else if (bs) {
+		switch (line->data[i]) {
+		    case LY_UNDERLINE_START_CHAR:
+			if (!in_b)
+			    in_u = TRUE; /*favor bold over underline*/
+			break;
+		    case LY_UNDERLINE_END_CHAR:
+			in_u = FALSE;
+			break;
+		    case LY_BOLD_START_CHAR:
+			if (in_u)
+			    in_u = FALSE; /* turn it off*/
+			in_b = TRUE;
+			break;
+		    case LY_BOLD_END_CHAR:
+			in_b = FALSE;
+			break;
+		}
+	    }
+#endif
+
 	}
 
 	if (line == HTMainText->last_line) {
@@ -5717,7 +6325,7 @@ PUBLIC void print_crawl_to_fd ARGS3(
      */
     if ((nolist == FALSE) &&
 	(keypad_mode == LINKS_ARE_NUMBERED ||
-	 keypad_mode == LINKS_AND_FORM_FIELDS_ARE_NUMBERED)) {
+	 keypad_mode == LINKS_AND_FIELDS_ARE_NUMBERED)) {
 	printlist(fp,FALSE);
     }
 
@@ -6969,7 +7577,7 @@ PRIVATE char * HText_skipOptionNumPrefix ARGS1(
     /*
      *  Check if we are in the correct keypad mode.
      */
-    if (keypad_mode == LINKS_AND_FORM_FIELDS_ARE_NUMBERED) {
+    if (keypad_mode == LINKS_AND_FIELDS_ARE_NUMBERED) {
 	/*
 	 *  Skip the option number embedded in the option name so the
 	 *  extra chars won't mess up cgi scripts processing the value.
@@ -7057,7 +7665,7 @@ PUBLIC char * HText_setLastOptionValue ARGS7(
 	cp++;
     if (HTCurSelectGroupType == F_RADIO_TYPE &&
 	LYSelectPopups &&
-	keypad_mode == LINKS_AND_FORM_FIELDS_ARE_NUMBERED) {
+	keypad_mode == LINKS_AND_FIELDS_ARE_NUMBERED) {
 	/*
 	 *  Collapse any space between the popup option
 	 *  prefix and actual value. - FM
@@ -7162,6 +7770,10 @@ PUBLIC char * HText_setLastOptionValue ARGS7(
 	if (HTCJK != NOCJK) {
 	    if (cp &&
 		(tmp = (unsigned char *)calloc(1, strlen(cp)+1))) {
+#ifdef SH_EX
+		if (tmp == NULL)
+		    outofmem(__FILE__, "HText_setLastOptionValue");
+#endif
 		if (kanji_code == EUC) {
 		    TO_EUC((unsigned char *)cp, tmp);
 		    val_cs = current_char_set;
@@ -7296,7 +7908,7 @@ PUBLIC int HText_beginInput ARGS3(
     unsigned char *tmp = NULL;
     int i, j;
 
-    CTRACE(tfp,"Entering HText_beginInput\n");
+    CTRACE(tfp, "GridText: Entering HText_beginInput\n");
 
     if (a == NULL || f == NULL)
 	outofmem(__FILE__, "HText_beginInput");
@@ -7380,6 +7992,10 @@ PUBLIC int HText_beginInput ARGS3(
 	StrAllocCopy(IValue, I->value);
     if (IValue && HTCJK != NOCJK) {
 	if ((tmp = (unsigned char *)calloc(1, (strlen(IValue) + 1)))) {
+#ifdef SH_EX
+	    if (tmp == NULL)
+		outofmem(__FILE__, "HText_beginInput");
+#endif
 	    if (kanji_code == EUC) {
 		TO_EUC((unsigned char *)IValue, tmp);
 		I->value_cs = current_char_set;
@@ -7643,13 +8259,13 @@ PUBLIC int HText_beginInput ARGS3(
 	    break;
 
 	default:
-	    if (keypad_mode == LINKS_AND_FORM_FIELDS_ARE_NUMBERED)
+	    if (keypad_mode == LINKS_AND_FIELDS_ARE_NUMBERED)
 		a->number = ++(text->last_anchor_number);
 	    else
 		a->number = 0;
 	    break;
     }
-    if (keypad_mode == LINKS_AND_FORM_FIELDS_ARE_NUMBERED && a->number > 0) {
+    if (keypad_mode == LINKS_AND_FIELDS_ARE_NUMBERED && a->number > 0) {
 	char marker[16];
 
 	if (f->type != F_OPTION_LIST_TYPE)
@@ -7698,7 +8314,7 @@ PUBLIC int HText_beginInput ARGS3(
 	     *  If we are numbering form links, take that into
 	     *  account as well. - FM
 	     */
-	    if (keypad_mode == LINKS_AND_FORM_FIELDS_ARE_NUMBERED)
+	    if (keypad_mode == LINKS_AND_FIELDS_ARE_NUMBERED)
 		MaximumSize -= ((a->number/10) + 3);
 	    if (f->size > MaximumSize)
 		f->size = MaximumSize;
@@ -8254,9 +8870,9 @@ PUBLIC int HText_SubmitForm ARGS4(
 		    CTRACE(tfp, "I'd submit %s (from %s), but you've not finished it\n", form_ptr->value, form_ptr->name);
 		    name_used = (form_ptr->name ? form_ptr->name : "");
 		    val_used = (form_ptr->value ? form_ptr->value : "");
- 		    break;
+		    break;
 #endif
- 
+
 		    /*  fall through  */
 		case F_RADIO_TYPE:
 		case F_CHECKBOX_TYPE:
@@ -8491,7 +9107,7 @@ PUBLIC int HText_SubmitForm ARGS4(
 			cdisp_name_startpos = strlen(escaped1);
 			StrAllocCat(escaped1, name_used);
 			StrAllocCat(escaped1, "; filename=\"");
-			StrAllocCat(escaped1, val_used); 
+			StrAllocCat(escaped1, val_used);
 			StrAllocCat(escaped1, "\"");
 			if (MultipartContentType) {
 			    StrAllocCat(escaped1, MultipartContentType);
@@ -8768,7 +9384,7 @@ PUBLIC int HText_SubmitForm ARGS4(
 		    } else {
 			/*
 			 *  This is a continuation of a previous textarea
-			 *  add %0a (\n) and the escaped string.
+			 *  add %0d%0a (\r\n) and the escaped string.
 			 */
 			if (escaped2[0] != '\0') {
 			    if (previous_blanks) {
@@ -8780,7 +9396,7 @@ PUBLIC int HText_SubmitForm ARGS4(
 			    } else if (Boundary) {
 				HTSprintf(&query, "%s\r\n", escaped2);
 			    } else {
-				HTSprintf(&query, "%%0a%s", escaped2);
+				HTSprintf(&query, "%%0d%%0a%s", escaped2);
 			    }
 			} else {
 			    if (PlainText) {
@@ -8788,7 +9404,7 @@ PUBLIC int HText_SubmitForm ARGS4(
 			    } else if (Boundary) {
 				StrAllocCat(previous_blanks, "\r\n");
 			    } else {
-				StrAllocCat(previous_blanks, "%0a");
+				StrAllocCat(previous_blanks, "%0d%0a");
 			    }
 			}
 		    }
@@ -8872,7 +9488,7 @@ PUBLIC int HText_SubmitForm ARGS4(
 	StrAllocCopy(query, "");
     }
     FREE(previous_blanks);
-	
+
     CTRACE(tfp, "QUERY (%d) >> \n%s\n", strlen(query), query);
 
     if (submit_item->submit_method == URL_MAIL_METHOD) {
@@ -9227,9 +9843,12 @@ PUBLIC void HText_setKcode ARGS3(
     **  appropriately. - FM
     */
     if (!strcmp(charset, "shift_jis") ||
-	!strcmp(charset, "x-shift-jis")) {
+	!strcmp(charset, "x-sjis") ||		/* 1997/11/28 (Fri) 18:11:33 */
+	!strcmp(charset, "x-shift-jis"))
+    {
 	text->kcode = SJIS;
     } else if ((p_in && (p_in->enc == UCT_ENC_CJK)) ||
+	       !strcmp(charset, "x-euc") ||	/* 1997/11/28 (Fri) 18:11:24 */
 	       !strcmp(charset, "euc-jp") ||
 	       !strncmp(charset, "x-euc-", 6) ||
 	       !strcmp(charset, "iso-2022-jp") ||
@@ -9248,7 +9867,11 @@ PUBLIC void HText_setKcode ARGS3(
 	**  If we get to here, it's not CJK, so disable that if
 	**  it is enabled.  But only if we are quite sure. - FM & kw
 	*/
+#ifdef CJK_EX
+	last_kcode = text->kcode = NOKANJI;
+#else
 	text->kcode = NOKANJI;
+#endif
 	if (HTCJK != NOCJK) {
 	    if (!p_in || p_in->enc != UCT_ENC_CJK)
 		HTCJK = NOCJK;
@@ -9830,7 +10453,7 @@ PRIVATE void insert_new_textarea_anchor ARGS2(
     l->numstyles       = htline->numstyles;
 #endif
     strcpy (l->data,     htline->data);
-    if (keypad_mode == LINKS_AND_FORM_FIELDS_ARE_NUMBERED) {
+    if (keypad_mode == LINKS_AND_FIELDS_ARE_NUMBERED) {
 	a->number++;
 	increment_tagged_htline (l, a, &lx, &curr_tag, 1, CHOP);
     }
@@ -9883,10 +10506,10 @@ PRIVATE void update_subsequent_anchors ARGS4(
     HTLine     *htline = start_htline;
 
     int form_chars_added = (start_anchor->input_field->size + 1) * n;
-    int         line_adj = 0;
-    int         tag_adj  = 0;
-    int         lx       = 0;
-    int      hang        = 0;  /* for HANG detection of a nasty intermittent */
+    int		line_adj = 0;
+    int		tag_adj	 = 0;
+    int		lx	 = 0;
+    int	     hang	 = 0;  /* for HANG detection of a nasty intermittent */
     int      hang_detect = 100000;  /* ditto */
 
 
@@ -9902,7 +10525,7 @@ PRIVATE void update_subsequent_anchors ARGS4(
      */
     anchor = start_anchor->next;   /* begin updating with the NEXT anchor */
     while (anchor) {
-	if ((keypad_mode == LINKS_AND_FORM_FIELDS_ARE_NUMBERED) &&
+	if ((keypad_mode == LINKS_AND_FIELDS_ARE_NUMBERED) &&
 	    (anchor->number != 0))
 	    anchor->number += n;
 	anchor->line_num  += n;
@@ -9940,7 +10563,7 @@ PRIVATE void update_subsequent_anchors ARGS4(
      *   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) {
+    if (keypad_mode == LINKS_AND_FIELDS_ARE_NUMBERED) {
 	anchor = start_anchor->next;
 	while (htline != HTMainText->last_line->next) {
 
@@ -10897,6 +11520,21 @@ PUBLIC void HTMark_asSource NOARGS
 }
 #endif
 
+#ifdef CJK_EX
+PUBLIC HTkcode HText_getKcode ARGS1(
+      HText *,	      text)
+{
+    return text->kcode;
+}
+
+PUBLIC void HText_updateKcode ARGS2(
+      HText *,	      text,
+      HTkcode,	      kcode)
+{
+    text->kcode = kcode;
+}
+#endif
+
 PUBLIC int HTMainText_Get_UCLYhndl NOARGS
 {
     return (HTMainText ? HTMainText->node_anchor->UCStages->s[0].C.UChndl : 0);
diff --git a/src/GridText.h b/src/GridText.h
index a26f709a..b8705e7a 100644
--- a/src/GridText.h
+++ b/src/GridText.h
@@ -47,6 +47,13 @@
 #define NOCHOP 0
 #define CHOP   1
 
+#define TABSTOP 8
+#define SPACES  "        "  /* must be at least TABSTOP spaces long */
+#define SPLAT   '.'
+
+#define NOCHOP 0
+#define CHOP   1
+
 /* just for information:
 US-ASCII control characters <32 which are not defined in Unicode standard
 =00	U+0000	NULL
@@ -286,4 +293,14 @@ extern void HTMark_asSource NOPARAMS;
 
 extern int HTMainText_Get_UCLYhndl NOPARAMS;
 
+#ifdef CJK_EX
+
+#include <HTCJK.h>
+extern HTkcode last_kcode;
+
+extern HTkcode HText_getKcode PARAMS((HText * text));
+extern void HText_updateKcode PARAMS((HText * text, HTkcode kcode));
+
+#endif
+
 #endif /* LYGRIDTEXT_H */
diff --git a/src/HTAlert.c b/src/HTAlert.c
index 29abf7c1..0730e8a5 100644
--- a/src/HTAlert.c
+++ b/src/HTAlert.c
@@ -22,6 +22,10 @@
 
 #include <LYLeaks.h>
 
+#if _WIN_CC
+#include <HTParse.h>
+#endif
+
 /*	Issue a message about a problem.		HTAlert()
 **	--------------------------------
 */
@@ -106,6 +110,53 @@ PUBLIC void HTUserMsg2 ARGS2(
     }
 }
 
+#ifdef WIN_EX		/* 1997/10/28 (Tue) 17:19:43 */
+
+#define MAX_LEN	512
+
+void ws_title(CONST char *str)
+{
+    char buff[MAX_LEN];
+    char *p;
+    int len;
+
+#define TITLE_CUT 32
+
+    p = (char *)str;
+    len = strlen(p);
+    if (len > (MAX_LEN - 1)) {
+	strncpy(buff, p, (MAX_LEN - 1));
+	len = MAX_LEN - 1;
+	buff[MAX_LEN - 1] = '\0';
+    } else {
+	strcpy(buff, p);
+    }
+
+    if (len > LYcols) {
+	buff[TITLE_CUT] = '.';
+	buff[TITLE_CUT+1] = '.';
+	strcpy(buff + TITLE_CUT + 2, (buff + len) - LYcols + TITLE_CUT + 1);
+    }
+    if (strchr(buff, '%')) {
+	HTUnEscape(buff);
+    }
+
+    p = buff;
+    while (*p++) {
+	if (*p == '\r') {
+	    *p = '\0';
+	    break;
+	} else if (*p ==  '\n') {
+	    *p = '\0';
+	    break;
+	}
+    }
+
+    /* Quick hack. buff is SJIS only ??? */
+    SetConsoleTitle(buff);
+}
+#endif
+
 /*	Issue a progress message.			HTProgress()
 **	-------------------------
 */
@@ -115,6 +166,12 @@ PUBLIC void HTProgress ARGS1(
     statusline(Msg);
     LYstore_message(Msg);
     CTRACE(tfp, "%s\n", Msg);
+#if defined(SH_EX) && defined(WIN_EX)	/* 1997/10/11 (Sat) 12:51:02 */
+    {
+	if (debug_delay != 0)
+	    Sleep(debug_delay);	/* XXX msec */
+    }
+#endif
 }
 
 /*	Issue a read-progress message.			HTReadProgress()
@@ -124,6 +181,67 @@ PUBLIC void HTReadProgress ARGS2(
 	long,		bytes,
 	long,		total)
 {
+#ifdef WIN_EX	/* 1998/07/08 (Wed) 16:09:47 */
+
+#include <sys/timeb.h>
+#define	kb_units 1024L
+    static double now, first, last;
+    static long bytes_last;
+
+    double transfer_rate;
+    char line[80];
+    struct timeb tb;
+    char *units = "bytes";
+
+    ftime(&tb);
+    now = tb.time + (double)tb.millitm / 1000;
+
+    if (bytes == 0) {
+	first = last = now;
+	bytes_last = bytes;
+    } else if ((bytes > 0) && (now > first)) {
+	transfer_rate = (double)bytes / (now - first);   /* bytes/sec */
+
+	if (now != last) {
+	    last = now;
+	    bytes_last = bytes;
+	}
+	if (total >= kb_units || bytes >= kb_units) {
+	    if (total > 0)
+		total /= 1024;
+	    bytes /= 1024;
+	    units = "KB";
+	}
+
+	if (total >  0)
+	    sprintf (line, "Read %3d%%, %ld of %ld %s.",
+		(int) (bytes * 100 / total), bytes, total, units);
+	else
+	    sprintf (line, "Read %ld %s of data.", bytes, units);
+
+	if (transfer_rate > 0.0) {
+	    int n;
+	    n = strlen(line);
+	    if (LYshow_kb_rate) {
+		sprintf (line + n, " %6.2lf KB/sec.", transfer_rate / 1024.0);
+	    } else {
+		int t_rate;
+
+		t_rate = (int)transfer_rate;
+		if (t_rate < 1000)
+		    sprintf (line + n, " %6d bytes/sec.", t_rate);
+		else
+		    sprintf (line + n, " %6d,%03d bytes/sec.", 
+					t_rate / 1000, t_rate % 1000);
+	    }
+	}
+	if (total <  0) {
+	    if (total < -1)
+		strcat(line, " (Press 'z' to abort)");
+	}
+	_HTProgress(line);
+    }
+#else
     static long kb_units = 1024;
     static time_t first, last;
     static long bytes_last;
@@ -186,6 +304,7 @@ PUBLIC void HTReadProgress ARGS2(
 	    CTRACE(tfp, "%s\n", line);
 	}
     }
+#endif
 }
 
 PRIVATE BOOL conf_cancelled = NO; /* used by HTConfirm only - kw */
diff --git a/src/HTFWriter.c b/src/HTFWriter.c
index 7211c3ef..fd1f4bd5 100644
--- a/src/HTFWriter.c
+++ b/src/HTFWriter.c
@@ -13,6 +13,11 @@
 #include <HTFWriter.h>
 #include <HTSaveToFile.h>
 
+#if _WIN_CC
+#include <HTParse.h>
+extern int exec_command(char * cmd, int wait_flag); /* xsystem.c */
+#endif
+
 #include <HTFormat.h>
 #include <UCDefs.h>
 #include <HTAlert.h>
@@ -80,7 +85,8 @@ struct _HTStream {
 */
 PRIVATE void HTFWriter_put_character ARGS2(HTStream *, me, char, c)
 {
-    putc(c, me->fp);
+    if (me->fp)
+	putc(c, me->fp);
 }
 
 /*	String handling
@@ -90,7 +96,8 @@ PRIVATE void HTFWriter_put_character ARGS2(HTStream *, me, char, c)
 */
 PRIVATE void HTFWriter_put_string ARGS2(HTStream *, me, CONST char*, s)
 {
-    fputs(s, me->fp);
+    if (me->fp)
+	fputs(s, me->fp);
 }
 
 /*	Buffer write.  Buffers can (and should!) be big.
@@ -98,7 +105,8 @@ PRIVATE void HTFWriter_put_string ARGS2(HTStream *, me, CONST char*, s)
 */
 PRIVATE void HTFWriter_write ARGS3(HTStream *, me, CONST char*, s, int, l)
 {
-    fwrite(s, 1, l, me->fp);
+    if (me->fp)
+	fwrite(s, 1, l, me->fp);
 }
 
 
@@ -119,8 +127,14 @@ PRIVATE void HTFWriter_free ARGS1(HTStream *, me)
     char *addr = NULL;
     int status;
     BOOL use_gzread = NO;
+#ifdef WIN_EX
+    HANDLE cur_handle;
+
+    cur_handle = GetForegroundWindow();
+#endif
 
-    fflush(me->fp);
+    if (me->fp)
+	fflush(me->fp);
     if (me->end_command) {		/* Temp file */
 	LYCloseTempFP(me->fp);
 #ifdef VMS
@@ -294,16 +308,29 @@ PRIVATE void HTFWriter_free ARGS1(HTStream *, me)
 			     *	Tell user what's happening. - FM
 			     */
 			    HTProgress(me->end_command);
+#ifndef WIN_EX
 			    stop_curses();
+#endif
 			}
+#ifdef _WIN_CC
+			exec_command(me->end_command, FALSE);
+#else
 			LYSystem(me->end_command);
-
+#endif
 			if (me->remove_command) {
 			    /* NEVER REMOVE THE FILE unless during an abort!!!*/
 			    FREE(me->remove_command);
 			}
-			if (!dump_output_immediately)
+			if (!dump_output_immediately) {
+#ifdef WIN_EX
+			    if (focus_window) {
+				HTInfoMsg("Set focus1");
+				status = SetForegroundWindow(cur_handle);
+			    }
+#else
 			    start_curses();
+#endif
+			}
 		    } else
 		    status = HTLoadFile(addr,
 					me->anchor,
@@ -337,16 +364,30 @@ PRIVATE void HTFWriter_free ARGS1(HTStream *, me)
 		 *  Tell user what's happening. - FM
 		 */
 		_HTProgress(me->end_command);
+#ifndef WIN_EX
 		stop_curses();
+#endif
 	    }
+#ifdef _WIN_CC
+	    exec_command(me->end_command, FALSE);
+#else
 	    LYSystem(me->end_command);
+#endif
 
 	    if (me->remove_command) {
 		/* NEVER REMOVE THE FILE unless during an abort!!!*/
 		FREE(me->remove_command);
 	    }
-	    if (!dump_output_immediately)
+	    if (!dump_output_immediately) {
+#ifdef WIN_EX
+		if (focus_window) {
+		    HTInfoMsg("Set focus2");
+		    status = SetForegroundWindow(cur_handle);
+		}
+#else
 		start_curses();
+#endif
+	    }
 	} else {
 	    /*
 	     *	It's a file we saved to disk for handling
@@ -356,6 +397,16 @@ PRIVATE void HTFWriter_free ARGS1(HTStream *, me)
 		/* NEVER REMOVE THE FILE unless during an abort!!!*/
 		FREE(me->remove_command);
 	    }
+	    if (!dump_output_immediately) {
+#ifdef WIN_EX
+		if (focus_window) {
+		    HTInfoMsg("Set focus3");
+		    status = SetForegroundWindow(cur_handle);
+		}
+#else
+	        start_curses();
+#endif
+	    }
 	}
 	FREE(me->end_command);
     }
@@ -466,7 +517,6 @@ PUBLIC HTStream* HTSaveAndExecute ARGS3(
 	LYCancelledFetch = TRUE;
 	return(NULL);
     }
-
 #if defined(EXEC_LINKS) || defined(EXEC_SCRIPTS)
     if (pres->quality == 999.0) { /* exec link */
 	if (dump_output_immediately) {
@@ -510,6 +560,56 @@ PUBLIC HTStream* HTSaveAndExecute ARGS3(
     if (LYCachedTemp(fnam, &(anchor->FileCache))) {
 	me->fp = LYNewBinFile (fnam);
     } else {
+#if defined(WIN_EX) && !defined(__CYGWIN__)	/* 1998/01/04 (Sun) */
+	if (!strncmp(anchor->address,"file://localhost",16)) {
+
+	    /* 1998/01/23 (Fri) 17:38:26 */
+	    extern char windows_drive[];
+	    unsigned char *cp, *view_fname;
+
+#define IS_SJIS_HI1(hi) ((0x81<=hi)&&(hi<=0x9F))	/* 1st lev. */
+#define IS_SJIS_HI2(hi) ((0xE0<=hi)&&(hi<=0xEF))	/* 2nd lev. */
+
+	    me->fp = NULL;
+
+	    view_fname = fnam + 3;
+	    strcpy(view_fname, anchor->address + 17);
+	    HTUnEscape(view_fname);
+
+	    if (strchr(view_fname, ':')==NULL) {
+		fnam[0] = windows_drive[0];
+		fnam[1] = windows_drive[1];
+		fnam[2] = '/';
+		view_fname = fnam;
+	    }
+
+	    /* 1998/04/21 (Tue) 11:04:16 */
+	    cp = view_fname;
+	    while (*cp) {
+		if (IS_SJIS_HI1(*cp) || IS_SJIS_HI2(*cp)) {
+		    cp += 2;
+		    continue;
+		} else if (*cp == '/') {
+		    *cp = '\\';
+		}
+		cp++;
+	    }
+	    if (strchr(view_fname, ' '))
+		view_fname = quote_pathname(view_fname);
+
+	    StrAllocCopy(me->viewer_command, pres->command);
+
+	    me->end_command = (char *)calloc (
+			(strlen (pres->command) + 10 + strlen(view_fname))
+				 * sizeof (char),1);
+	    if (me->end_command == NULL)
+		outofmem(__FILE__, "HTSaveAndExecute");
+	    sprintf(me->end_command, pres->command, view_fname);
+	    me->remove_command = NULL;
+
+	    return me;
+	}
+#endif
 	/*
 	 *  Check for a suffix.
 	 *  Save the file under a suitably suffixed name.
@@ -521,8 +621,10 @@ PUBLIC HTStream* HTSaveAndExecute ARGS3(
 	} else if (!strcasecomp(pres->rep->name,
 				"application/octet-stream")) {
 	    suffix = ".bin";
-	} else if ((suffix = HTFileSuffix(pres->rep, anchor->content_encoding)) == 0
-		   || *suffix != '.') {
+	} else if (
+	(suffix = HTFileSuffix(pres->rep, anchor->content_encoding)) == 0
+		   || *suffix != '.')
+	{
 	    suffix = HTML_SUFFIX;
 	}
 	me->fp = LYOpenTemp(fnam, suffix, "wb");
diff --git a/src/HTInit.c b/src/HTInit.c
index b5f39fb7..6a82af9a 100644
--- a/src/HTInit.c
+++ b/src/HTInit.c
@@ -49,10 +49,10 @@ PUBLIC void HTFormatInit NOARGS
   HTSetPresentation("image/x-xbm",      XLoadImageCommand,  1.0, 3.0, 0.0, 0);
   HTSetPresentation("image/x-xbitmap",  XLoadImageCommand,  1.0, 3.0, 0.0, 0);
   HTSetPresentation("image/x-png",      XLoadImageCommand,  2.0, 3.0, 0.0, 0);
-  HTSetPresentation("image/png",	XLoadImageCommand,  1.0, 3.0, 0.0, 0);
+  HTSetPresentation("image/png",        XLoadImageCommand,  1.0, 3.0, 0.0, 0);
   HTSetPresentation("image/x-rgb",      XLoadImageCommand,  1.0, 3.0, 0.0, 0);
   HTSetPresentation("image/x-tiff",     XLoadImageCommand,  2.0, 3.0, 0.0, 0);
-  HTSetPresentation("image/tiff",	XLoadImageCommand,  1.0, 3.0, 0.0, 0);
+  HTSetPresentation("image/tiff",       XLoadImageCommand,  1.0, 3.0, 0.0, 0);
   HTSetPresentation("image/jpeg",       XLoadImageCommand,  1.0, 3.0, 0.0, 0);
   HTSetPresentation("video/mpeg",       "mpeg_play %s &",   1.0, 3.0, 0.0, 0);
 
@@ -62,9 +62,9 @@ PUBLIC void HTFormatInit NOARGS
 #ifdef EXEC_SCRIPTS
  /* set quality to 999.0 for protected exec applications */
 #ifndef VMS
- HTSetPresentation("application/x-csh",	"csh %s", 999.0, 3.0, 0.0, 0);
- HTSetPresentation("application/x-sh",	"sh %s",  999.0, 3.0, 0.0, 0);
- HTSetPresentation("application/x-ksh",	"ksh %s", 999.0, 3.0, 0.0, 0);
+ HTSetPresentation("application/x-csh", "csh %s", 999.0, 3.0, 0.0, 0);
+ HTSetPresentation("application/x-sh",  "sh %s",  999.0, 3.0, 0.0, 0);
+ HTSetPresentation("application/x-ksh", "ksh %s", 999.0, 3.0, 0.0, 0);
 #else
  HTSetPresentation("application/x-VMS_script",	"@%s", 999.0, 3.0, 0.0, 0);
 #endif /* not VMS */
@@ -153,7 +153,7 @@ PUBLIC void HTFormatInit NOARGS
  /*
   *  Load the local maps.
   */
- if ((fp = fopen(personal_type_map,"r")) != NULL) {
+ if ((fp = fopen(personal_type_map, TXT_R)) != NULL) {
      fclose(fp);
      /* These should override everything else. */
      HTLoadTypesConfigFile(personal_type_map);
@@ -376,7 +376,7 @@ PRIVATE int ProcessMailcapEntry ARGS2(
 		/* no support for now.  What does this do anyways? */
 		/* ExceptionalNewline(mc->contenttype, atoi(eq)); */
 	    } else if (eq && !strcmp(arg, "q")) {
-	        mc->quality = atof(eq);
+	        mc->quality = (float)atof(eq);
 		if (mc->quality > 0.000 && mc->quality < 0.001)
 		    mc->quality = 0.001;
 	    } else if (eq && !strcmp(arg, "mxb")) {
@@ -624,7 +624,7 @@ PRIVATE int ProcessMailcapFile ARGS1(
 
     CTRACE(tfp, "ProcessMailcapFile: Loading file '%s'.\n",
 		file);
-    if ((fp = fopen(file, "r")) == NULL) {
+    if ((fp = fopen(file, TXT_R)) == NULL) {
 	CTRACE(tfp, "ProcessMailcapFile: Could not open '%s'.\n",
 		    file);
 	return(-1 == 0);
@@ -755,6 +755,8 @@ PUBLIC void HTFileInit NOARGS
 
     HTSetSuffix(".bz2",		"application/x-bzip2", "binary", 1.0);
 
+    HTSetSuffix(".bz2",		"application/x-bzip2", "binary", 1.0);
+
     HTSetSuffix(".uu",		"application/x-UUencoded", "8bit", 1.0);
 
     HTSetSuffix(".hqx",		"application/x-Binhex", "8bit", 1.0);
@@ -909,7 +911,7 @@ PUBLIC void HTFileInit NOARGS
     /* These should override the default extensions as necessary. */
     HTLoadExtensionsConfigFile(global_extension_map);
 
-    if ((fp = fopen(personal_extension_map,"r")) != NULL) {
+    if ((fp = fopen(personal_extension_map, TXT_R)) != NULL) {
 	fclose(fp);
 	/* These should override everything else. */
 	HTLoadExtensionsConfigFile(personal_extension_map);
@@ -997,7 +999,7 @@ PRIVATE int HTLoadExtensionsConfigFile ARGS1(
 
     CTRACE(tfp, "HTLoadExtensionsConfigFile: Loading file '%s'.\n", fn);
 
-    if ((f = fopen(fn,"r")) == NULL) {
+    if ((f = fopen(fn, TXT_R)) == NULL) {
 	CTRACE(tfp, "HTLoadExtensionsConfigFile: Could not open '%s'.\n", fn);
 	return count;
     }
diff --git a/src/HTML.c b/src/HTML.c
index 4849b24b..6fda07e9 100644
--- a/src/HTML.c
+++ b/src/HTML.c
@@ -78,6 +78,8 @@
 #include <HTAccess.h>
 #endif
 
+#include <LYJustify.h>
+
 #include <LYexit.h>
 #include <LYLeaks.h>
 
@@ -226,6 +228,10 @@ PRIVATE void change_paragraph_style ARGS2(HTStructured *, me, HTStyle *,style)
 */
 PUBLIC void HTML_put_character ARGS2(HTStructured *, me, char, c)
 {
+#ifdef CJK_EX
+    static unsigned char save_ch1 = 0;
+    static unsigned char save_ch2 = 0;
+#endif
     /*
      *	Ignore all non-MAP content when just
      *	scanning a document for MAPs. - FM
@@ -406,7 +412,27 @@ PUBLIC void HTML_put_character ARGS2(HTStructured *, me, char, c)
 	    } else {
 		me->inP = TRUE;
 		me->inLABEL = FALSE;
+#ifdef CJK_EX
+		if (last_kcode == EUC) {
+		    if (save_ch1 && !save_ch2) {
+			if ((unsigned char)c & 0x80) {
+			    save_ch2 = c;
+			}
+			HText_appendCharacter(me->text, save_ch1);
+			HText_appendCharacter(me->text, save_ch2);
+			save_ch1 = save_ch2 = '\0';
+		    } else if ((unsigned char)c & 0x80) {
+			save_ch1 = c;
+			save_ch2 = '\0';
+		    } else {
+			HText_appendCharacter(me->text, c);
+		    }
+		} else {
+		    HText_appendCharacter(me->text, c);
+		}
+#else
 		HText_appendCharacter(me->text, c);
+#endif
 		me->in_word = YES;
 	    }
 	}
@@ -446,7 +472,7 @@ PUBLIC void HTML_put_string ARGS2(HTStructured *, me, CONST char *, s)
 	StrAllocCopy(translated_string,s);
 	TRANSLATE_AND_UNESCAPE_ENTITIES(&translated_string, TRUE, FALSE);
 	s = (CONST char *) translated_string;
-    };
+    }
 #endif
 
     switch (me->sp[0].tag_number) {
@@ -707,8 +733,14 @@ PRIVATE void HTMLSRC_apply_markup ARGS4(
 }
 #  define START TRUE
 #  define STOP FALSE
+
+#ifdef __STDC__
 #  define PSRCSTART(x)	HTMLSRC_apply_markup(me,HTL_##x,START,tag_charset)
 #  define PSRCSTOP(x)  HTMLSRC_apply_markup(me,HTL_##x,STOP,tag_charset)
+#else
+#  define PSRCSTART(x)	HTMLSRC_apply_markup(me,HTL_/**/x,START,tag_charset)
+#  define PSRCSTOP(x)  HTMLSRC_apply_markup(me,HTL_/**/x,STOP,tag_charset)
+#endif
 
 #  define PUTC(x) HTML_put_character(me,x)
 #  define PUTS(x) HTML_put_string(me,x)
@@ -1207,7 +1239,7 @@ PRIVATE void HTML_start_element ARGS6(
 		 */
 /*  lss and css has different syntax - lynx shouldn't try to
     parse them now (it tries to parse them as lss, so it exits with
-    error message the 1st non-empty line) - HVV
+    error message on the 1st non-empty line) - VH
 */
 #ifndef USE_COLOR_STYLE
 		if (!strcasecomp(value[HTML_LINK_REL], "StyleSheet") ||
@@ -1591,6 +1623,7 @@ PRIVATE void HTML_start_element ARGS6(
 				NULL,			/* Tag */
 				href,			/* Addresss */
 				INTERN_LT);		/* Type */
+	    CAN_JUSTIFY_PUSH(FALSE);
 	    LYEnsureSingleSpace(me);
 	    if (me->inUnderline == FALSE)
 		HText_appendCharacter(me->text, LY_UNDERLINE_START_CHAR);
@@ -1609,6 +1642,7 @@ PRIVATE void HTML_start_element ARGS6(
 		HText_appendCharacter(me->text, LY_BOLD_END_CHAR);
 	    HText_endAnchor(me->text, 0);
 	    LYEnsureSingleSpace(me);
+	    CAN_JUSTIFY_POP;
 	} else {
 	    CHECK_ID(HTML_FRAME_ID);
 	}
@@ -1662,6 +1696,7 @@ PRIVATE void HTML_start_element ARGS6(
 				href,			/* Addresss */
 				INTERN_LT);		/* Type */
 	    LYEnsureDoubleSpace(me);
+	    CAN_JUSTIFY_PUSH_F
 	    LYResetParagraphAlignment(me);
 	    if (me->inUnderline == FALSE)
 		HText_appendCharacter(me->text, LY_UNDERLINE_START_CHAR);
@@ -1669,6 +1704,7 @@ PRIVATE void HTML_start_element ARGS6(
 	    if (me->inUnderline == FALSE)
 		HText_appendCharacter(me->text, LY_UNDERLINE_END_CHAR);
 	    HTML_put_character(me, ' ');
+
 	    me->in_word = NO;
 	    CHECK_ID(HTML_IFRAME_ID);
 	    HText_beginAnchor(me->text, me->inUnderline, me->CurrentA);
@@ -1680,6 +1716,7 @@ PRIVATE void HTML_start_element ARGS6(
 		HText_appendCharacter(me->text, LY_BOLD_END_CHAR);
 	    HText_endAnchor(me->text, 0);
 	    LYEnsureSingleSpace(me);
+	    CAN_JUSTIFY_POP;
 	} else {
 	    CHECK_ID(HTML_IFRAME_ID);
 	}
@@ -2014,6 +2051,7 @@ PRIVATE void HTML_start_element ARGS6(
 	}
 	UPDATE_STYLE;
 
+	CANT_JUSTIFY_THIS_LINE
 	if (present[HTML_TAB_ALIGN] && value[HTML_TAB_ALIGN] &&
 	    (strcasecomp(value[HTML_TAB_ALIGN], "left") ||
 	     !(present[HTML_TAB_TO] || present[HTML_TAB_INDENT]))) {
@@ -2069,6 +2107,7 @@ PRIVATE void HTML_start_element ARGS6(
 	     *	or right, just add a collapsible space, otherwise, add the
 	     *	appropriate number of spaces. - FM
 	     */
+
 	    if (target < column ||
 		target > HText_getMaximumColumn(me->text)) {
 		HTML_put_character(me, ' ');
@@ -2273,8 +2312,10 @@ PRIVATE void HTML_start_element ARGS6(
 	    if (me->inUnderline == FALSE)
 		HText_appendCharacter(me->text, LY_UNDERLINE_END_CHAR);
 	    HTML_put_character(me, ' ');
+	    CAN_JUSTIFY_START;
 	    FREE(note);
 	}
+	CAN_JUSTIFY_START;
 	me->inLABEL = TRUE;
 	me->in_word = NO;
 	me->inP = FALSE;
@@ -2305,6 +2346,7 @@ PRIVATE void HTML_start_element ARGS6(
 	}
 	UPDATE_STYLE;	  /* update to the new style */
 	CHECK_ID(HTML_DL_ID);
+
 	break;
 
     case HTML_DLC:
@@ -2693,6 +2735,7 @@ PRIVATE void HTML_start_element ARGS6(
 		HText_setLastChar(me->text, ' ');
 	    }
 	}
+	CAN_JUSTIFY_START;
 	me->in_word = NO;
 	me->inP = FALSE;
 	break;
@@ -2731,6 +2774,7 @@ PRIVATE void HTML_start_element ARGS6(
 	if (me->inUnderline == FALSE)
 	    HText_appendCharacter(me->text, LY_UNDERLINE_END_CHAR);
 	HTML_put_character(me, ' ');
+	CAN_JUSTIFY_START
 	me->inLABEL = TRUE;
 	me->in_word = NO;
 	me->inP = FALSE;
@@ -2923,17 +2967,20 @@ PRIVATE void HTML_start_element ARGS6(
 					    me->inUnderline, me->CurrentA);
 	if (me->inBoldA == TRUE && me->inBoldH == FALSE)
 	    HText_appendCharacter(me->text, LY_BOLD_START_CHAR);
-#ifdef NOTUSED_FOTEMODS
+#if defined(NOTUSED_FOTEMODS) || !defined(NO_EMPTY_HREFLESS_A)
 	/*
 	 *  Close an HREF-less NAMED-ed now if we aren't making their
 	 *  content bold, and let the check in HTML_end_element() deal
 	 *  with any dangling end tag this creates. - FM
 	 */
-	if (href == NULL && me->inBoldA == FALSE) {
-	    SET_SKIP_STACK(HTML_A);
-	    HTML_end_element(me, HTML_A, &include);
-	}
-#endif /* NOTUSED_FOTEMODS */
+# ifndef NO_EMPTY_HREFLESS_A
+	if (force_empty_hrefless_a)
+# endif
+	    if (href == NULL && me->inBoldA == FALSE) {
+		SET_SKIP_STACK(HTML_A);
+		HTML_end_element(me, HTML_A, include);
+	    }
+#endif /* NOTUSED_FOTEMODS || !defined(NO_EMPTY_HREFLESS_A)*/
 	FREE(href);
 	break;
 
@@ -4192,6 +4239,7 @@ PRIVATE void HTML_start_element ARGS6(
 	if (me->inUnderline == FALSE)
 	    HText_appendCharacter(me->text, LY_UNDERLINE_END_CHAR);
 	HTML_put_character(me, ' ');
+	CAN_JUSTIFY_START;
 
 	if (me->inFIG)
 	    /*
@@ -4223,6 +4271,7 @@ PRIVATE void HTML_start_element ARGS6(
 	if (me->inUnderline == FALSE)
 	    HText_appendCharacter(me->text, LY_UNDERLINE_END_CHAR);
 	HTML_put_character(me, ' ');
+	CAN_JUSTIFY_START
 
 	if (me->inFIG)
 	    /*
@@ -4271,6 +4320,7 @@ PRIVATE void HTML_start_element ARGS6(
 	     *	Set to know we are in a new form.
 	     */
 	    me->inFORM = TRUE;
+	    EMIT_IFDEF_EXP_JUSTIFY_ELTS(form_in_htext=TRUE;)
 
 	    if (present && present[HTML_FORM_ACCEPT_CHARSET]) {
 		accept_cs = value[HTML_FORM_ACCEPT_CHARSET] ?
@@ -4593,7 +4643,9 @@ PRIVATE void HTML_start_element ARGS6(
 	    BOOL HaveSRClink = FALSE;
 	    char* ImageSrc = NULL;
 	    BOOL IsSubmitOrReset = FALSE;
-
+#ifdef CJK_EX
+	    HTkcode kcode = 0;
+#endif
 	    /* init */
 	    I.align=NULL; I.accept=NULL; I.checked=NO; I.class=NULL;
 	    I.disabled=NO; I.error=NULL; I.height= NULL; I.id=NULL;
@@ -5032,6 +5084,12 @@ PRIVATE void HTML_start_element ARGS6(
 		for (; chars > 0; chars--)
 		    HTML_put_character(me, '_');
 	    } else {
+#ifdef CJK_EX
+		if (HTCJK != NOCJK) {
+		    kcode = HText_getKcode(me->text);
+		    HText_updateKcode(me->text, kanji_code);
+		}
+#endif
 		if (me->sp[0].tag_number == HTML_PRE ||
 		    !me->sp->style->freeFormat) {
 		    /*
@@ -5071,6 +5129,10 @@ PRIVATE void HTML_start_element ARGS6(
 		    while (i < chars)
 			HTML_put_character(me, HT_NON_BREAK_SPACE);
 		}
+#ifdef CJK_EX
+		if (HTCJK != NOCJK)
+		    HText_updateKcode(me->text, kcode);
+#endif
 	    }
 	    HText_setIgnoreExcess(me->text, FALSE);
 	    FREE(ImageSrc);
@@ -5383,7 +5445,7 @@ PRIVATE void HTML_start_element ARGS6(
 	     */
 	    if (HTCurSelectGroupType == F_RADIO_TYPE &&
 		LYSelectPopups &&
-		keypad_mode == LINKS_AND_FORM_FIELDS_ARE_NUMBERED) {
+		keypad_mode == LINKS_AND_FIELDS_ARE_NUMBERED) {
 		char marker[8];
 		int opnum = HText_getOptionNum(me->text);
 
@@ -5430,10 +5492,27 @@ PRIVATE void HTML_start_element ARGS6(
 	if (present && present[HTML_TABLE_ALIGN] &&
 	    value[HTML_TABLE_ALIGN] && *value[HTML_TABLE_ALIGN]) {
 	    if (!strcasecomp(value[HTML_TABLE_ALIGN], "center")) {
+#ifdef SH_EX	/* 1998/10/09 (Fri) 15:20:09 */
+		if (no_table_center) {
+		    me->DivisionAlignments[me->Division_Level] = HT_LEFT;
+		    change_paragraph_style(me, styles[HTML_DLEFT]);
+		    UPDATE_STYLE;
+		    me->current_default_alignment =
+				styles[HTML_DLEFT]->alignment;
+		} else {
+		    me->DivisionAlignments[me->Division_Level] = HT_CENTER;
+		    change_paragraph_style(me, styles[HTML_DCENTER]);
+		    UPDATE_STYLE;
+		    me->current_default_alignment =
+					styles[HTML_DCENTER]->alignment;
+		}
+#else
 		me->DivisionAlignments[me->Division_Level] = HT_CENTER;
 		change_paragraph_style(me, styles[HTML_DCENTER]);
 		UPDATE_STYLE;
 		me->current_default_alignment = styles[HTML_DCENTER]->alignment;
+
+#endif
 	    } else if (!strcasecomp(value[HTML_TABLE_ALIGN], "right")) {
 		me->DivisionAlignments[me->Division_Level] = HT_RIGHT;
 		change_paragraph_style(me, styles[HTML_DRIGHT]);
@@ -5491,9 +5570,18 @@ PRIVATE void HTML_start_element ARGS6(
 	    me->sp->style->alignment = me->current_default_alignment;
 	}
 	if (present && present[HTML_TR_ALIGN] && value[HTML_TR_ALIGN]) {
+#ifdef SH_EX
+	    if (!strcasecomp(value[HTML_TR_ALIGN], "center") &&
+		!(me->List_Nesting_Level >= 0 && !me->inP))
+		if (no_table_center)
+		    me->sp->style->alignment = HT_LEFT;
+		else
+		    me->sp->style->alignment = HT_CENTER;
+#else
 	    if (!strcasecomp(value[HTML_TR_ALIGN], "center") &&
 		!(me->List_Nesting_Level >= 0 && !me->inP))
 		me->sp->style->alignment = HT_CENTER;
+#endif
 	    else if (!strcasecomp(value[HTML_TR_ALIGN], "right") &&
 		!(me->List_Nesting_Level >= 0 && !me->inP))
 		me->sp->style->alignment = HT_RIGHT;
@@ -5593,7 +5681,8 @@ PRIVATE void HTML_start_element ARGS6(
 
     if (HTML_dtd.tags[ElementNumber].contents != SGML_EMPTY) {
 	if (me->skip_stack > 0) {
-	    CTRACE(tfp, "HTML:begin_element: internal call (level %d), leaving on stack - %s\n",
+	    CTRACE(tfp,
+    "HTML:begin_element: internal call (level %d), leaving on stack - `%s'\n",
 			me->skip_stack, me->sp->style->name);
 	    me->skip_stack--;
 	    return;
@@ -5619,6 +5708,11 @@ PRIVATE void HTML_start_element ARGS6(
 	(me->sp)--;
 	me->sp[0].style = me->new_style;	/* Stack new style */
 	me->sp[0].tag_number = ElementNumber;
+#ifdef EXP_JUSTIFY_ELTS
+	if (wait_for_this_stacked_elt<0 &&
+		HTML_dtd.tags[ElementNumber].can_justify==FALSE)
+	    wait_for_this_stacked_elt=me->stack - me->sp;
+#endif
     }
 
 #if defined(USE_COLOR_STYLE)
@@ -5672,6 +5766,7 @@ PRIVATE void HTML_end_element ARGS3(
     int i = 0;
     char *temp = NULL, *cp = NULL;
     BOOL BreakFlag = FALSE;
+    EMIT_IFDEF_EXP_JUSTIFY_ELTS(BOOL reached_awaited_stacked_elt=FALSE;)
 
 #ifdef USE_PSRC
     if (psrc_view && !sgml_in_psrc_was_initialized) {
@@ -5793,6 +5888,10 @@ PRIVATE void HTML_end_element ARGS3(
 	     */
 	    return;
 	} else if (me->sp < (me->stack + MAX_NESTING - 1)) {
+#ifdef EXP_JUSTIFY_ELTS
+	    if (wait_for_this_stacked_elt==me->stack-me->sp)
+		reached_awaited_stacked_elt=TRUE;
+#endif
 	    (me->sp)++;
 	    CTRACE(tfp, "HTML:end_element[%d]: Popped style off stack - %s\n",
 			(int) STACKLEVEL(me),
@@ -5802,8 +5901,13 @@ PRIVATE void HTML_end_element ARGS3(
   "Stack underflow error!  Tried to pop off more styles than exist in stack\n");
 	}
     }
-    if (BreakFlag == TRUE)
+    if (BreakFlag == TRUE) {
+#ifdef EXP_JUSTIFY_ELTS
+	    if (reached_awaited_stacked_elt)
+		wait_for_this_stacked_elt=-1;
+#endif
 	return;
+    }
 
     /*
      *	Check for unclosed TEXTAREA. - FM
@@ -6587,6 +6691,7 @@ End_Object:
 		me->inBadHTML = TRUE;
 	    }
 	}
+	EMIT_IFDEF_EXP_JUSTIFY_ELTS(form_in_htext=FALSE;)
 
 	/*
 	 *  Check if we still have a SELECT element open.
@@ -7026,6 +7131,11 @@ End_Object:
 	break;
 
     } /* switch */
+
+#ifdef EXP_JUSTIFY_ELTS
+	    if (reached_awaited_stacked_elt)
+		wait_for_this_stacked_elt=-1;
+#endif
 #ifdef USE_COLOR_STYLE
 #if !OPT_SCN
     TrimColorClass(HTML_dtd.tags[element_number].name,
@@ -7122,15 +7232,17 @@ PRIVATE void HTML_free ARGS1(HTStructured *, me)
 	    CTRACE(tfp,"HTML_free: Ending underline\n");
 	}
 	if (me->inA) {
-	    HTML_end_element(me, HTML_A, &include);
+	    HTML_end_element(me, HTML_A, (char **)&include);
 	    me->inA = FALSE;
+	    if (TRACE)
+		fprintf(stderr,"HTML_free: Ending HTML_A\n");
 	}
 	if (me->inFONT) {
-	    HTML_end_element(me, HTML_FONT, &include);
+	    HTML_end_element(me, HTML_FONT, (char **)&include);
 	    me->inFONT = FALSE;
 	}
 	if (me->inFORM) {
-	    HTML_end_element(me, HTML_FORM, &include);
+	    HTML_end_element(me, HTML_FORM, (char **)&include);
 	    me->inFORM = FALSE;
 	}
 	if (me->option.size > 0) {
@@ -7720,6 +7832,19 @@ PUBLIC HTStructured* HTML_new ARGS3(
 		     me->outUCLYhndl, me->outUCI);
 #endif
 
+#ifdef EXP_JUSTIFY_ELTS
+    wait_for_this_stacked_elt = !ok_justify
+#  ifdef USE_PSRC
+	|| psrc_view
+#  endif
+	? MAX_NESTING+2 /*some unreachable value*/ : -1;
+    can_justify_here = TRUE;
+    can_justify_this_line = TRUE;
+    form_in_htext = FALSE;
+
+    ht_justify_cleanup();
+#endif
+
     me->target = stream;
     if (stream)
 	me->targetClass = *stream->isa;			/* Copy pointers */
@@ -8064,7 +8189,29 @@ PRIVATE char * MakeNewTitle ARGS2(CONST char **, value, int, src_type)
     } else {
 	StrAllocCat(newtitle, ptr + 1);
     }
+#ifdef SH_EX	/* 1998/04/02 (Thu) 16:02:00 */
+
+    /* for proxy server 1998/12/19 (Sat) 11:53:30 */
+    if (stricmp(newtitle + 1, "internal-gopher-menu") == 0) {
+	StrAllocCopy(newtitle, "+");
+    } else if (stricmp(newtitle + 1, "internal-gopher-unknown") == 0) {
+	StrAllocCopy(newtitle, " ");
+    } else {
+	/* normal title */
+	ptr = strrchr(newtitle, '.');
+	if (ptr) {
+	  if (stricmp(ptr, ".gif") == 0)
+	    *ptr = '\0';
+	  else if (stricmp(ptr, ".jpg") == 0)
+	    *ptr = '\0';
+	  else if (stricmp(ptr, ".jpeg") == 0)
+	    *ptr = '\0';
+	}
+	StrAllocCat(newtitle, "]");
+    }
+#else
     StrAllocCat(newtitle, "]");
+#endif
     return newtitle;
 }
 
@@ -8091,7 +8238,7 @@ PRIVATE char * MakeNewMapValue ARGS2(CONST char **, value, CONST char*, mapstr)
 
     StrAllocCopy(newtitle, "[");
     StrAllocCat(newtitle,mapstr); /* ISMAP or USEMAP */
-    if ( verbose_img ) {
+    if ( verbose_img && value[HTML_IMG_SRC] && *value[HTML_IMG_SRC] ) {
 	StrAllocCat(newtitle,":");
 	ptr = strrchr(value[HTML_IMG_SRC], '/');
 	if (!ptr) {
diff --git a/src/LYBookmark.c b/src/LYBookmark.c
index 5c4de52e..50ad92bd 100644
--- a/src/LYBookmark.c
+++ b/src/LYBookmark.c
@@ -11,6 +11,7 @@
 #include <LYCharSets.h>  /* need for LYHaveCJKCharacterSet */
 #include <LYCurses.h>
 #include <GridText.h>
+#include <HTCJK.h>
 
 #ifdef VMS
 #include <nam.h>
@@ -24,6 +25,8 @@ PUBLIC char *MBM_A_subdescript[MBM_V_MAXFILES+1];
 PRIVATE BOOLEAN is_mosaic_hotlist = FALSE;
 PRIVATE char * convert_mosaic_bookmark_file PARAMS((char *filename_buffer));
 
+extern HTCJKlang HTCJK;
+
 PRIVATE void
 show_bookmark_not_defined NOARGS
 {
@@ -93,7 +96,7 @@ PUBLIC char * get_bookmark_filename ARGS1(
 		    BookmarkPage);
     CTRACE(tfp, "\nget_bookmark_filename: SEEKING %s\n   AS %s\n\n",
 		BookmarkPage, filename_buffer);
-    if ((fp = fopen(filename_buffer,"r")) != NULL) {
+    if ((fp = fopen(filename_buffer, TXT_R)) != NULL) {
 	goto success;
     }
 
@@ -147,7 +150,7 @@ PRIVATE char * convert_mosaic_bookmark_file ARGS1(
 	return ("");
     }
 
-    if ((fp = fopen(filename_buffer, "r")) == NULL)
+    if ((fp = fopen(filename_buffer, TXT_R)) == NULL)
 	return ("");  /* should always open */
 
     fprintf(nfp,"<head>\n<title>%s</title>\n</head>\n",MOSAIC_BOOKMARK_TITLE);
@@ -162,6 +165,11 @@ PRIVATE char * convert_mosaic_bookmark_file ARGS1(
 	    endline = &buf[strlen(buf)-1];
 	    if(*endline == '\n')
 		*endline = '\0';
+#ifdef DOSPATH	/* 1998/01/10 (Sat) 15:41:35 */
+	    endline = strchr(buf, '\r');
+	    if (endline == NULL)
+		*endline = '\0';
+#endif
 	    if((line % 2) == 0) { /* even lines */
 		if(*buf != '\0') {
 		    strtok(buf," "); /* kill everything after the space */
@@ -200,6 +208,7 @@ PUBLIC void save_bookmark_link ARGS2(
     char *bookmark_URL = NULL;
     char filename_buffer[LY_MAXPATH];
     char string_buffer[BUFSIZ];
+    char tmp_buffer[BUFSIZ];
     char *Address = NULL;
     char *Title = NULL;
     int i, c;
@@ -269,7 +278,21 @@ PUBLIC void save_bookmark_link ARGS2(
      *	Allow user to change the title. - FM
      */
     do {
-	LYstrncpy(string_buffer, title, sizeof(string_buffer)-1);
+	if (HTCJK == JAPANESE) {
+	    switch(kanji_code) {
+	    case EUC:
+		TO_EUC(title, tmp_buffer);
+		break;
+	    case SJIS:
+		TO_SJIS(title, tmp_buffer);
+		break;
+	    default:
+		break;
+	    }
+	    LYstrncpy(string_buffer, tmp_buffer, sizeof(string_buffer)-1);
+	} else {
+	    LYstrncpy(string_buffer, title, sizeof(string_buffer)-1);
+	}
 	convert_to_spaces(string_buffer, FALSE);
 	LYMBM_statusline(TITLE_PROMPT);
 	LYgetstr(string_buffer, VISIBLE, sizeof(string_buffer), NORECALL);
@@ -290,7 +313,22 @@ PUBLIC void save_bookmark_link ARGS2(
      *  from display character set which may need changing.
      *  Do NOT convert any 8-bit chars if we have CJK display. - LP
      */
-    StrAllocCopy(Title, string_buffer);
+    if (HTCJK == JAPANESE) {
+	switch(kanji_code) {	/* 1997/11/22 (Sat) 09:28:00 */
+	case EUC:
+	    TO_EUC(string_buffer, tmp_buffer);
+	    break;
+	case SJIS:
+	    TO_SJIS(string_buffer, tmp_buffer);
+	    break;
+	default:
+	    TO_JIS(string_buffer, tmp_buffer);
+	    break;
+	}
+	StrAllocCopy(Title, tmp_buffer);
+    } else {
+	StrAllocCopy(Title, string_buffer);
+    }
     LYEntify(&Title, TRUE);
     if (UCSaveBookmarksInUnicode &&
 	have8bit(Title) && (!LYHaveCJKCharacterSet)) {
@@ -334,8 +372,21 @@ PUBLIC void save_bookmark_link ARGS2(
      */
     if (first_time) {
 	fprintf(fp,"<head>\n");
+#if defined(SH_EX) && !defined(_WINDOWS)	/* 1997/12/11 (Thu) 19:13:40 */
+	if (HTCJK != JAPANESE)
+	    LYAddMETAcharsetToFD(fp, -1);
+	else
+	    fprintf(fp, "<META %s %s>\n",
+		    "http-equiv=\"content-type\"",
+		    "conetnt=\"text/html;charset=iso-2022-jp\""); 
+#else
 	LYAddMETAcharsetToFD(fp, -1);
+#endif	/* !_WINDOWS */
 	fprintf(fp,"<title>%s</title>\n</head>\n", BOOKMARK_TITLE);
+#ifdef _WINDOWS
+	fprintf(fp,
+	    gettext("     You can delete links by the 'R' key<br>\n<ol>\n"));
+#else
 	fprintf(fp, "%s<br>\n%s\n\n<!--\n%s\n-->\n\n<p>\n<ol>",
 		    gettext("\
      You can delete links using the remove bookmark command.  It is usually\n\
@@ -349,6 +400,7 @@ Note: if you edit this file manually\n\
       you should not change the format within the lines\n\
       or add other HTML markup.\n\
       Make sure any bookmark link is saved as a single line."));
+#endif	/* _WINDOWS */
     }
 
     /*
@@ -423,8 +475,10 @@ PUBLIC void remove_bookmark_link ARGS2(
 #else
     char filename_buffer[LY_MAXPATH];
     char newfile[LY_MAXPATH];
+#ifdef UNIX
     struct stat stat_buf;
     mode_t mode;
+#endif /* UNIX */
 #endif /* VMS */
     char homepath[LY_MAXPATH];
 
@@ -437,7 +491,7 @@ PUBLIC void remove_bookmark_link ARGS2(
 		    cur_bookmark_page);
     CTRACE(tfp, "\nremove_bookmark_link: SEEKING %s\n   AS %s\n\n",
 		cur_bookmark_page, filename_buffer);
-    if ((fp = fopen(filename_buffer, "r")) == NULL) {
+    if ((fp = fopen(filename_buffer, TXT_R)) == NULL) {
 	HTAlert(BOOKMARK_OPEN_FAILED_FOR_DEL);
 	return;
     }
@@ -535,12 +589,20 @@ PUBLIC void remove_bookmark_link ARGS2(
 	 *  Check if this is the case and do something appropriate.
 	 *  Used to be ODD_RENAME
 	 */
-#ifdef _WINDOWS
+#if defined(_WINDOWS) || defined(WIN_EX)
+#if defined(WIN_EX)
+	if (GetLastError() == ERROR_NOT_SAME_DEVICE)
+#else /* !_WIN_CC */
 	if (errno == ENOTSAM)
-#else
-	if (errno == EXDEV)
-#endif /* WINDOWS */
+#endif /* _WIN_CC */
 	{
+	    if (rename(newfile, filename_buffer) != 0) {
+		if (LYCopyFile(newfile, filename_buffer) == 0)
+		    remove(newfile);
+	    }
+	}
+#else
+	if (errno == EXDEV) {
 	    static CONST char MV_FMT[] = "%s %s %s";
 	    char *buffer = 0;
 	    HTAddParam(&buffer, MV_FMT, 1, MV_PATH);
@@ -551,6 +613,7 @@ PUBLIC void remove_bookmark_link ARGS2(
 	    FREE(buffer);
 	    return;
 	}
+#endif /* _WINDOWS */
 #endif /* !VMS */
 
 #ifdef VMS
diff --git a/src/LYCgi.c b/src/LYCgi.c
index 9e0bfce0..375206a6 100644
--- a/src/LYCgi.c
+++ b/src/LYCgi.c
@@ -238,8 +238,15 @@ PRIVATE int LYLoadCGI ARGS4(
 	PERROR("stat() failed");
 	status = -4;
 
-    } else if (!(S_ISREG(stat_buf.st_mode) &&
-		 stat_buf.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH))) {
+    } else
+#ifdef _WINDOWS	/* 1998/01/14 (Wed) 09:16:04 */
+    if (!(S_ISREG(stat_buf.st_mode) &&
+		 stat_buf.st_mode & (S_IXUSR))) 
+#else
+    if (!(S_ISREG(stat_buf.st_mode) &&
+		 stat_buf.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH))) 
+#endif
+    {
 	/*
 	 *  Not a runnable file, See if we can load it using "file:" code.
 	 */
diff --git a/src/LYCharSets.c b/src/LYCharSets.c
index 8890f9df..5924a4f8 100644
--- a/src/LYCharSets.c
+++ b/src/LYCharSets.c
@@ -484,7 +484,7 @@ PUBLIC void HTMLSetCharacterHandling ARGS1(int,i)
     }
 #endif /* USE_SLANG */
 
-    ena_csi((LYlowest_eightbit[current_char_set] > 155));
+    ena_csi((BOOLEAN)(LYlowest_eightbit[current_char_set] > 155));
 
     /* some diagnostics */
     if (TRACE) {
diff --git a/src/LYCharSets.h b/src/LYCharSets.h
index 1f21db0f..ea132684 100644
--- a/src/LYCharSets.h
+++ b/src/LYCharSets.h
@@ -14,6 +14,9 @@
 extern BOOLEAN LYHaveCJKCharacterSet;
 extern BOOLEAN DisplayCharsetMatchLocale;
 
+#include <HTCJK.h>
+extern HTkcode kanji_code;
+
 /*
  *  currently active character set (internal handler)
  */
diff --git a/src/LYCharUtils.c b/src/LYCharUtils.c
index 5e15c2a2..aef1862e 100644
--- a/src/LYCharUtils.c
+++ b/src/LYCharUtils.c
@@ -43,7 +43,6 @@ extern BOOL HTPassEightBitRaw;
 extern BOOL HTPassEightBitNum;
 extern BOOL HTPassHighCtrlRaw;
 extern BOOL HTPassHighCtrlNum;
-extern HTkcode kanji_code;
 extern HTCJKlang HTCJK;
 
 /*
@@ -65,6 +64,12 @@ PUBLIC void LYEntify ARGS2(
     char *p = *str;
     char *q = NULL, *cp = NULL;
     int amps = 0, lts = 0, gts = 0;
+#ifdef CJK_EX
+    enum _state
+        { S_text, S_esc, S_dollar, S_paren,
+          S_nonascii_text, S_dollar_paren } state = S_text;
+    int in_sjis = 0;
+#endif
 
     if (p == NULL || *p == '\0')
 	return;
@@ -113,6 +118,88 @@ PUBLIC void LYEntify ARGS2(
     if ((cp = q) == NULL)
 	outofmem(__FILE__, "LYEntify");
     for (p = *str; *p; p++) {
+#ifdef CJK_EX
+	if (HTCJK != NOCJK) {
+	    switch(state) {
+		case S_text:
+		    if (*p == '\033') {
+			state = S_esc;
+			*q++ = *p;
+			continue;
+                    }
+                    break;
+
+		case S_esc:
+		    if (*p == '$') {
+			state = S_dollar;
+			*q++ = *p;
+			continue;
+		    } else if (*p == '(') {
+			state = S_paren;
+			*q++ = *p;
+			continue;
+		    } else {
+			state = S_text;
+			*q++ = *p;
+			continue;
+		    }
+
+		case S_dollar:
+		    if (*p == '@' || *p == 'B' || *p == 'A') {
+			state = S_nonascii_text;
+			*q++ = *p;
+			continue;
+		    } else if (*p == '(') {
+			state = S_dollar_paren;
+			*q++ = *p;
+			continue;
+		    } else {
+			state = S_text;
+			*q++ = *p;
+			continue;
+		    }
+
+		case S_dollar_paren:
+		    if (*p == 'C') {
+			state = S_nonascii_text;
+			*q++ = *p;
+			continue;
+		    } else {
+			state = S_text;
+			*q++ = *p;
+			continue;
+		    }
+
+		case S_paren:
+		    if (*p == 'B' || *p == 'J' || *p =='T') {
+			state = S_text;
+			*q++ = *p;
+			continue;
+		    } else if (*p == 'I') {
+			state = S_nonascii_text;
+			*q++ = *p;
+			continue;
+		    }
+
+		case S_nonascii_text:
+		    if (*p == '\033') 
+			state = S_esc;
+		    *q++ = *p;
+		    continue;
+
+		default:
+		    break;
+	    }
+	    if (*(p+1) != '\0' &&
+		(IS_EUC((unsigned char)*p, (unsigned char)*(p+1)) ||
+		 IS_SJIS((unsigned char)*p, (unsigned char)*(p+1), in_sjis) ||
+		 IS_BIG5((unsigned char)*p, (unsigned char)*(p+1)))) {
+		*q++ = *p++;
+		*q++ = *p;
+		continue;
+	    }
+	}
+#endif
 	if (*p == '&') {
 	    *q++ = '&';
 	    *q++ = 'a';
@@ -133,6 +220,7 @@ PUBLIC void LYEntify ARGS2(
 	    *q++ = *p;
 	}
     }
+    *q = '\0';
     FREE(*str);
     *str = cp;
 }
@@ -1632,6 +1720,10 @@ PRIVATE char ** LYUCFullyTranslateString_1 ARGS9(
     enum _parsing_what
 	{ P_text, P_utf8, P_hex, P_decimal, P_named
 	} what = P_text;
+#ifdef CJK_EX	/* 1997/12/12 (Fri) 18:08:48 */
+    static unsigned char sjis_1st = '\0';
+    unsigned char sjis_str[3];
+#endif
 
     /*
     **	Make sure we have a non-empty string. - FM
@@ -1732,6 +1824,24 @@ PRIVATE char ** LYUCFullyTranslateString_1 ARGS9(
 	switch(state) {
 	case S_text:
 	    code = (unsigned char)(*p);
+#ifdef CJK_EX	/* 1997/12/13 (Sat) 14:41:53 */
+	    if (HTCJK == JAPANESE && last_kcode == SJIS) {
+		if (sjis_1st == '\0' && (IS_SJIS_HI1(code)||IS_SJIS_HI2(code))){
+		    sjis_1st = (unsigned char)code;
+		} else if (sjis_1st && IS_SJIS_LO(code)) {
+		    sjis_1st = '\0';
+		} else {
+		    if (0xA1 <= code && code <= 0xDF) {
+		        sjis_str[2] = '\0';
+			JISx0201TO0208_SJIS((unsigned char)code, 
+						sjis_str, sjis_str + 1);
+			REPLACE_STRING(sjis_str);
+			p++;
+			continue;
+		    }
+		}
+	    }
+#endif
 	    if (*p == '\033') {
 		if ((HTCJK != NOCJK && !hidden) || stype != st_HTML) {
 		    state = S_esc;
@@ -1850,7 +1960,7 @@ PRIVATE char ** LYUCFullyTranslateString_1 ARGS9(
 			state = S_got_outchar;
 			break;
 		    } else {
-			*p = 160;
+			*(unsigned char *)p = (unsigned char)160;
 			code = 160;
 			if (LYCharSet_UC[cs_to].enc == UCT_ENC_8859 ||
 			    (LYCharSet_UC[cs_to].like8859 & UCT_R_8859SPECL)) {
@@ -1859,7 +1969,7 @@ PRIVATE char ** LYUCFullyTranslateString_1 ARGS9(
 			}
 		    }
 		} else if ((*p) == LY_SOFT_HYPHEN) {
-		    *p = 173;
+		    *(unsigned char *)p = (unsigned char)173;
 		    code = 173;
 		    if (LYCharSet_UC[cs_to].enc == UCT_ENC_8859 ||
 			(LYCharSet_UC[cs_to].like8859 & UCT_R_8859SPECL)) {
diff --git a/src/LYCookie.c b/src/LYCookie.c
index e93b27f2..a3640e32 100644
--- a/src/LYCookie.c
+++ b/src/LYCookie.c
@@ -2028,7 +2028,11 @@ PUBLIC void LYLoadCookies ARGS1 (
 	};
     time_t expires;
 
+#ifdef DOSPATH	/* 1998/12/19 (Sat) 08:10:57 */
+    cookie_handle = fopen(cookie_file, "rt+");
+#else
     cookie_handle = fopen(cookie_file, "r+");
+#endif
     if (!cookie_handle)
 	return;
 
diff --git a/src/LYCurses.c b/src/LYCurses.c
index 666d96b6..679c2f99 100644
--- a/src/LYCurses.c
+++ b/src/LYCurses.c
@@ -198,7 +198,7 @@ PUBLIC void VMSbox ARGS3(
     wmove(win, 0, 0);
     waddstr(win, "\033)0\016l");
     for (i = 1; i < width; i++)
-       waddch(win, 'q');
+	waddch(win, 'q');
     waddch(win, 'k');
     for (i = 1; i < height-1; i++) {
 	wmove(win, i, 0);
@@ -209,7 +209,7 @@ PUBLIC void VMSbox ARGS3(
     wmove(win, i, 0);
     waddch(win, 'm');
     for (i = 1; i < width; i++)
-       waddch(win, 'q');
+	waddch(win, 'q');
     waddstr(win, "j\017");
 }
 #else
@@ -328,8 +328,8 @@ PUBLIC void curses_w_style ARGS3(
 #if !OMIT_SCN_KEEPING
 	bucket* ds= (style == NOSTYLE ? &nostyle_bucket : &hashStyles[style]);
 #else
-        bucket* ds= (style == NOSTYLE ?      &nostyle_bucket :
-                (style== SPECIAL_STYLE ? &special_bucket :&hashStyles[style]) );
+	bucket* ds= (style == NOSTYLE ?	     &nostyle_bucket :
+		(style== SPECIAL_STYLE ? &special_bucket :&hashStyles[style]) );
 #endif
 
 
@@ -375,12 +375,12 @@ PUBLIC void curses_w_style ARGS3(
 		last_styles[last_colorattr_ptr++] = getattrs(stdscr);
 		/* don't cache style changes for active links */
 #if OMIT_SCN_KEEPING
-                /* since we don't compute the hcode
-                  to stack off in HTML.c, we don't know whether this style is
-                  configured. So, we shouldn't simply return on stacking on on
-                  unconfigured styles, we should push curr attrs on stack. -HV
-                */
-                if (!ds->name) return;
+		/* since we don't compute the hcode to stack off in HTML.c, we
+		 * don't know whether this style is configured.  So, we
+		 * shouldn't simply return on stacking on on unconfigured
+		 * styles, we should push curr attrs on stack.  -HV
+		 */
+		if (!ds->name) return;
 #endif
 		if (style != s_alink)
 		{
@@ -397,7 +397,7 @@ PUBLIC void curses_w_style ARGS3(
 			CTRACE(tfp, "CACHED: <%s> @(%d,%d)\n", ds->name, YP, XP);
 			if (win==stdscr) cached_styles[YP][XP]=style;
 		}
-                LYAttrset(win, ds->color, ds->mono);
+		LYAttrset(win, ds->color, ds->mono);
 		return;
 	}
 }
@@ -490,7 +490,7 @@ PRIVATE void LYsetWAttr ARGS1(WINDOW *, win)
 	int offs = 1;
 	static int NoColorVideo = -1;
 
-#ifdef UNIX
+#if defined(UNIX) && !defined(PDCURSES)
 	if (NoColorVideo < 0) {
 		NoColorVideo = tigetnum("ncv");
 	}
@@ -545,9 +545,9 @@ PRIVATE void lynx_map_color ARGS1(int, n)
 	for (m = 0; m <= 16; m += 8) {
 	    int pair = n + m + 1;
 	    if (pair < COLOR_PAIRS)
-		init_pair(pair,
-		    lynx_color_pairs[pair].fg,
-		    lynx_color_pairs[pair].bg);
+		init_pair((short)pair,
+		    (short)lynx_color_pairs[pair].fg,
+		    (short)lynx_color_pairs[pair].bg);
 	}
 	if (n == 0 && LYShowColor >= SHOW_COLOR_ON)
 	    bkgd(COLOR_BKGD | ' ');
@@ -602,9 +602,9 @@ PRIVATE void lynx_init_colors NOARGS
 	    for (m = 0; m <= 16; m += 8) {
 		int pair = n + m + 1;
 		if (pair < COLOR_PAIRS)
-		    init_pair(pair,
-			lynx_color_pairs[pair].fg,
-			lynx_color_pairs[pair].bg);
+		    init_pair((short)pair,
+			(short)lynx_color_pairs[pair].fg,
+			(short)lynx_color_pairs[pair].bg);
 	    }
 	    if (n == 0 && LYShowColor >= SHOW_COLOR_ON)
 		bkgd(COLOR_BKGD | ' ');
@@ -653,9 +653,9 @@ PUBLIC void start_curses NOARGS
 	if (LYUseMouse)
 	    lynx_enable_mouse (1);
 
-    } else
+    } else {
 	sock_init();
-
+    }
     LYCursesON = TRUE;
     CTRACE(tfp, "start_curses: done.\n");
     clear();
@@ -677,7 +677,9 @@ PUBLIC void start_curses NOARGS
     }
 
     if (slinit == 0) {
+#if !defined(USE_KEYMAPS)
 	SLtt_get_terminfo();
+#endif
 #if defined(__DJGPP__) && !defined(DJGPP_KEYHANDLER)
 	SLkp_init ();
 #endif /* __DJGPP__ && !DJGPP_KEYHANDLER */
@@ -737,7 +739,11 @@ PUBLIC void start_curses NOARGS
 #endif /* VMS || UNIX */
     }
 #ifdef __DJGPP__
+#ifdef WATT32
+    _eth_init();
+#else
     else sock_init();
+#endif /* WATT32 */
 #endif /* __DJGPP__ */
 
     slinit = 1;
@@ -825,7 +831,7 @@ PUBLIC void start_curses NOARGS
 	if (has_colors()) {
 	    lynx_has_color = TRUE;
 	    start_color();
-#if HAVE_USE_DEFAULT_COLORS
+#if HAVE_USE_DEFAULT_COLORS && !defined(PDCURSES)
 	    if (use_default_colors() == OK) {
 		default_fg = DEFAULT_COLOR;
 		default_bg = DEFAULT_COLOR;
@@ -875,19 +881,19 @@ PUBLIC void start_curses NOARGS
     fflush(stderr);
 #endif /* USE_SLANG */
 
-#ifdef _WINDOWS
+#if defined(WIN_EX)
     clear();
 #endif
 
     LYCursesON = TRUE;
     CTRACE(tfp, "start_curses: done.\n");
-}
+}  /* end of start_curses() */
 
 
 PUBLIC void lynx_enable_mouse ARGS1(int,state)
 {
 
-#ifdef __BORLANDC__
+#if defined(WIN_EX)
 /* modify lynx_enable_mouse() for pdcurses configuration so that mouse support
    is disabled unless -use_mouse is specified.  This is ifdef'd with
    __BORLANDC__ for the time being (WB).
@@ -911,7 +917,7 @@ PUBLIC void lynx_enable_mouse ARGS1(int,state)
 #else
 
 #ifdef NCURSES_MOUSE_VERSION
-#if defined(__BORLANDC__) && defined(__PDCURSES__)
+#if defined(WIN_EX) && defined(PDCURSES)
     if (state)
     {
 	SetConsoleMode(hConIn, ENABLE_MOUSE_INPUT | ENABLE_WINDOW_INPUT);
@@ -945,23 +951,27 @@ PUBLIC void lynx_enable_mouse ARGS1(int,state)
 		  NULL);
     } else
 	mousemask(0, NULL);
-#endif /* __BORLANDC__ and __PDCURSES__ */
+#endif /* _WIN_CC and PDCURSES */
 #endif /* NCURSES_MOUSE_VERSION */
 
 #if defined(DJGPP) && !defined(USE_SLANG)
     if (state)
 	mouse_set(BUTTON1_CLICKED | BUTTON2_CLICKED | BUTTON3_CLICKED);
 #endif
-#endif				       /* NOT USE_SLANG_MOUSE */
+#endif				/* NOT USE_SLANG_MOUSE */
 }
 
 PUBLIC void stop_curses NOARGS
 {
     echo();
-#ifdef DJGPP
+#ifdef __DJGPP__
+#ifdef WATT32
+    _eth_release();
+#else
     sock_exit();
-#endif
-#if defined (DOSPATH) && !defined(USE_SLANG)
+#endif /* WATT32 */
+#endif /* __DJGPP__ */
+#if defined(DOSPATH) && !(defined(USE_SLANG) || _WIN_CC)
     clrscr();
 #else
 
@@ -971,8 +981,18 @@ PUBLIC void stop_curses NOARGS
      */
     if(LYCursesON == TRUE)	{
 	 lynx_enable_mouse (0);
+#ifndef WIN_EX	/* @@@ */
 	 endwin();	/* stop curses */
+#endif
+    }
+#ifdef SH_EX
+    {
+	int i;
+	for (i=0; i <= 3; i++) {
+	    fprintf(stdout, "\r\n");
+	}
     }
+#endif
 
     fflush(stdout);
 #endif /* DJGPP */
@@ -1177,6 +1197,14 @@ PUBLIC BOOLEAN setup ARGS1(
     LYlines = LINES;
     LYcols = COLS;
 #endif /* HAVE_SIZECHANGE && !USE_SLANG && USE_NOTDEFINED */
+#if defined(WIN_EX) && defined(NOTDEFINED)
+    {
+	extern int current_codepage;	/* PDCurses lib. */
+
+	if (current_codepage == 932)
+	    LYcols = COLS - 1;
+    }
+#endif
     if (LYlines <= 0)
 	LYlines = 24;
     if (LYcols <= 0)
@@ -1765,10 +1793,16 @@ PUBLIC void lynx_force_repaint NOARGS
 
 PUBLIC void lynx_start_title_color NOARGS
 {
+#ifdef SH_EX
+    start_reverse();
+#endif
 }
 
 PUBLIC void lynx_stop_title_color NOARGS
 {
+#ifdef SH_EX
+    stop_reverse();
+#endif
 }
 
 PUBLIC void lynx_start_link_color ARGS2(
diff --git a/src/LYCurses.h b/src/LYCurses.h
index 51c116e1..3b252afa 100644
--- a/src/LYCurses.h
+++ b/src/LYCurses.h
@@ -71,6 +71,10 @@
 #undef PENDIN
 #endif
 
+#if defined(_MSC_VER)
+#undef MOUSE_MOVED	/* conflict between PDCURSES and _WIN32 */
+#endif /* _MSC_VER */
+
 #ifdef HAVE_CONFIG_H
 # ifdef HAVE_NCURSES_H
 #  include <ncurses.h>
@@ -81,7 +85,11 @@
 #   ifdef HAVE_JCURSES_H
 #    include <jcurses.h>	/* sony_news */
 #   else
-#    include <curses.h>		/* default */
+#    ifdef PDCURSES
+#     include <pdcurses.h>	/* for PDCurses */
+#    else
+#     include <curses.h>	/* default */
+#    endif
 #   endif
 #  endif
 # endif
@@ -315,8 +323,13 @@ extern int  lynx_chg_color PARAMS((int, int, int));
 #ifdef UNDERLINE_LINKS
 #define start_bold()		LYaddAttr(A_UNDERLINE)
 #define stop_bold()		LYsubAttr(A_UNDERLINE)
+#ifdef __CYGWIN__	/* 1999/02/25 (Thu) 01:09:45 */
+#define start_underline()	/* LYaddAttr(A_BOLD) */
+#define stop_underline()	/* LYsubAttr(A_BOLD) */
+#else
 #define start_underline()	LYaddAttr(A_BOLD)
 #define stop_underline()	LYsubAttr(A_BOLD)
+#endif /* __CYGWIN__ */
 #else /* not UNDERLINE_LINKS: */
 #define start_bold()		LYaddAttr(A_BOLD)
 #define stop_bold()		LYsubAttr(A_BOLD)
@@ -327,6 +340,7 @@ extern int  lynx_chg_color PARAMS((int, int, int));
 #endif /* USE_COLOR_STYLE */
 #define stop_underline()	LYsubAttr(A_UNDERLINE)
 #endif /* UNDERLINE_LINKS */
+
 #if defined(SNAKE) && defined(HP_TERMINAL)
 #define start_reverse()		LYaddWAttr(stdscr, A_DIM)
 #define wstart_reverse(a)	LYaddWAttr(a, A_DIM)
@@ -338,6 +352,7 @@ extern int  lynx_chg_color PARAMS((int, int, int));
 #define stop_reverse()		LYsubAttr(A_REVERSE)
 #define wstop_reverse(a)	LYsubWAttr(a, A_REVERSE)
 #endif /* SNAKE && HP_TERMINAL */
+
 #endif /* VMS */
 
 #else /* Not FANCY_CURSES: */
@@ -403,7 +418,7 @@ extern void lynx_stop_all_colors NOPARAMS;
  * Note:  EMX has no corresponding variable like _fmode on DOS, but it does
  * have setmode.
  */
-#if defined(_WINDOWS) || defined(DJGPP) || defined(__EMX__)
+#if defined(_WINDOWS) || defined(DJGPP) || defined(__EMX__) || defined(WIN_EX)
 #define SetOutputMode(mode) setmode(fileno(stdout), mode)
 #else
 #define SetOutputMode(mode) /* nothing */
diff --git a/src/LYDownload.c b/src/LYDownload.c
index 5b079b32..78b1a4cb 100644
--- a/src/LYDownload.c
+++ b/src/LYDownload.c
@@ -88,7 +88,7 @@ PUBLIC void LYDownload ARGS1(
 	goto failed;
     }
 
-#ifdef DIRED_SUPPORT
+#if defined(DIRED_SUPPORT)
     /* FIXME: use HTLocalName */
     if (!strncmp(file, "file://localhost", 16))
 #ifdef __DJGPP__
@@ -102,6 +102,14 @@ PUBLIC void LYDownload ARGS1(
     else if (!strncmp(file, "file:", 5))
 	file += 5;
     HTUnEscape(file);
+#else
+#if defined(_WINDOWS)	/* 1997/10/15 (Wed) 16:27:38 */
+    if (!strncmp(file, "file://localhost/", 17))
+	file += 17;
+    else if (!strncmp(file, "file:/", 6))
+	file += 6;
+    HTUnEscape(file);
+#endif /* _WINDOWS */
 #endif /* DIRED_SUPPORT */
 
     if ((method = (char *)strstr(Line, "Method=")) == NULL)
@@ -403,7 +411,11 @@ check_recall:
 		if (!strncasecomp(buffer, "nl:", 3) ||
 		    !strncasecomp(buffer, "/nl/", 4))
 #else
+#if defined(DOSPATH)	/* 1997/10/15 (Wed) 16:41:30 */
+		if (!strcmp(buffer, "nul"))
+#else
 		if (!strcmp(buffer, "/dev/null"))
+#endif /* DOSPATH */
 #endif /* VMS */
 		{
 		    goto cancelled;
@@ -490,10 +502,10 @@ PUBLIC int LYdownload_options ARGS2(
     change_sug_filename(sug_filename);
 
     if (LYReuseTempfiles) {
-	fp0 = LYOpenTempRewrite(tempfile, HTML_SUFFIX, "w");
+	fp0 = LYOpenTempRewrite(tempfile, HTML_SUFFIX, "wb");
     } else {
 	LYRemoveTemp(tempfile);
-	fp0 = LYOpenTemp(tempfile, HTML_SUFFIX, "w");
+	fp0 = LYOpenTemp(tempfile, HTML_SUFFIX, "wb");
     }
     if (fp0 == NULL) {
 	HTAlert(CANNOT_OPEN_TEMP);
@@ -526,7 +538,7 @@ PUBLIC int LYdownload_options ARGS2(
 	    : gettext("Download options:"));
 
     if (!no_disk_save && !child_lynx) {
-#ifdef DIRED_SUPPORT
+#if defined(DIRED_SUPPORT)
 	/*
 	 *  Disable save to disk option for local files.
 	 */
diff --git a/src/LYEdit.c b/src/LYEdit.c
index 8e2ab7a9..65d7c495 100644
--- a/src/LYEdit.c
+++ b/src/LYEdit.c
@@ -45,6 +45,9 @@ PUBLIC int edit_current_file ARGS3(
     char *colon, *number_sign;
     char position[80];
     FILE *fp;
+#ifdef __CYGWIN__
+    unsigned char temp_buff[LY_MAXPATH];
+#endif
 
     /*
      *  If its a remote file then we can't edit it.
@@ -67,25 +70,41 @@ PUBLIC int edit_current_file ARGS3(
      *
      * On VMS, only try the path.
      */
-#if !defined (VMS) && !defined (DOSPATH) && !defined (__EMX__)
+#if defined (VMS) || defined (DOSPATH) || defined (__EMX__)
+    filename = HTParse(newfile, "", PARSE_PATH+PARSE_PUNCTUATION);
+    HTUnEscape(filename);
+    StrAllocCopy(filename, HTSYS_name(filename));
+    if ((fp = fopen(filename, "r")) == NULL)
+    {
+#ifdef SH_EX
+	HTUserMsg2(COULD_NOT_EDIT_FILE, filename);
+#else
+	HTAlert(COULD_NOT_ACCESS_FILE);
+#endif
+	CTRACE(tfp, "filename: '%s'\n", filename);
+	goto done;
+    }
+#else	/* !(VMS || !DOSPATH || !__EMX__) == UNIX */
+#ifdef SH_EX	/* Speed Up! */
+    if (strncmp(newfile, "file://localhost/", 16) == 0)
+	colon = newfile + 16;
+    else
+	colon = strchr(newfile, ':');
+#else
     colon = strchr(newfile, ':');
+#endif
     StrAllocCopy(filename, (colon + 1));
     HTUnEscape(filename);
     if ((fp = fopen(filename, "r")) == NULL) {
 	FREE(filename);
-#endif /* !VMS */
 	filename = HTParse(newfile, "", PARSE_PATH+PARSE_PUNCTUATION);
 	HTUnEscape(filename);
-	StrAllocCopy(filename, HTSYS_name(filename));
-	if ((fp = fopen(filename, "r")) == NULL)
-	{
+	if ((fp = fopen(HTSYS_name(filename), "r")) == NULL) {
 	    HTAlert(COULD_NOT_ACCESS_FILE);
-	    CTRACE(tfp, "filename: '%s'\n", filename);
 	    goto done;
 	}
-#if !defined (VMS) && !defined (DOSPATH) && !defined (__EMX__)
     }
-#endif /* !VMS */
+#endif /* !(VMS || !DOSPATH || !__EMX__) */
     fclose(fp);
 
 #if defined(VMS) || defined(CANT_EDIT_UNWRITABLE_FILES)
@@ -132,8 +151,40 @@ PUBLIC int edit_current_file ARGS3(
 	HTAddParam(&command, format, params++, filename);
 	HTEndParam(&command, format, params);
 #endif
-    } else {
+    }
+#ifdef DOSPATH
+    else if (strncmp(editor, "VZ", 2)==0) {
+    	/* for Vz editor */
+	format = "%s %s -%s";
+	HTAddXpand(&command, format, params++, editor);
+	HTAddParam(&command, format, params++, HTDOS_short_name(filename));
+	HTAddParam(&command, format, params++, position);
+	HTEndParam(&command, format, params);
+    } else if (strncmp(editor, "edit", 4)==0) {
+    	/* for standard editor */
+	HTAddXpand(&command, format, params++, editor);
+	HTAddParam(&command, format, params++, HTDOS_short_name(filename));
+	HTEndParam(&command, format, params);
+    }
+#endif
+    else {
+#ifdef _WINDOWS
+	if (strchr(editor, ' '))
+	    HTAddXpand(&command, format, params++, HTDOS_short_name(editor));
+	else
+	    HTAddXpand(&command, format, params++, editor);
+#else
+#if defined(__CYGWIN__) && defined(DOSPATH)
+	if (strchr(editor, ' ')) {
+	    cygwin_conv_to_full_posix_path(HTDOS_short_name(editor), temp_buff);
+	    HTAddXpand(&command, format, params++, temp_buff);
+	} else {
+	    HTAddXpand(&command, format, params++, editor);
+	}
+#else
 	HTAddXpand(&command, format, params++, editor);
+#endif /* __CYGWIN__ */
+#endif
 	HTAddParam(&command, format, params++, filename);
 	HTEndParam(&command, format, params);
     }
diff --git a/src/LYEditmap.c b/src/LYEditmap.c
index 8a947ac4..504f9bf7 100644
--- a/src/LYEditmap.c
+++ b/src/LYEditmap.c
@@ -47,7 +47,11 @@ LYE_NOP,        LYE_ENTER,      LYE_FORWW,      LYE_ABORT,
 LYE_BACKW,      LYE_NOP,        LYE_DELN,       LYE_NOP,
 /* ^P           XON             ^R              XOFF    */
 
+#ifdef WIN_EX
+LYE_UPPER,      LYE_ERASE,      LYE_LKCMD,      LYE_PASTE,
+#else
 LYE_UPPER,      LYE_ERASE,      LYE_LKCMD,      LYE_NOP,
+#endif
 /* ^T           ^U              ^V              ^W      */
 
 LYE_ERASE,      LYE_NOP,        LYE_NOP,        LYE_NOP,
@@ -88,8 +92,12 @@ LYE_CHAR,       LYE_CHAR,       LYE_CHAR,       LYE_CHAR,
 LYE_CHAR,       LYE_CHAR,       LYE_CHAR,       LYE_CHAR,
 LYE_CHAR,       LYE_CHAR,       LYE_CHAR,       LYE_CHAR,
 LYE_CHAR,       LYE_CHAR,       LYE_CHAR,       LYE_CHAR,
+#ifdef CJK_EX	/* 1997/11/03 (Mon) 20:30:54 */
+LYE_CHAR,       LYE_CHAR,       LYE_CHAR,       LYE_CHAR,
+#else
 LYE_CHAR,       LYE_CHAR,       LYE_CHAR,       LYE_AIX,
 /*                                               97 AIX    */
+#endif
 LYE_CHAR,       LYE_CHAR,       LYE_CHAR,       LYE_CHAR,
 LYE_CHAR,       LYE_CHAR,       LYE_CHAR,       LYE_CHAR,
 
@@ -276,7 +284,7 @@ LYE_NOP,        LYE_BOL,        LYE_BACK,       LYE_ABORT,
 LYE_DELN,       LYE_EOL,        LYE_FORW,       LYE_ABORT,
 /* ^D           ^E              ^F              ^G      */
 
-LYE_DELP,       LYE_ENTER,      LYE_ENTER,      LYE_DELEL,
+LYE_DELP,       LYE_ENTER,      LYE_ENTER,      LYE_DELNW, /* LYE_DELEL,*/
 /* bs           tab             nl              ^K      */
 
 LYE_NOP,        LYE_ENTER,      LYE_FORWW,      LYE_ABORT,
@@ -285,7 +293,11 @@ LYE_NOP,        LYE_ENTER,      LYE_FORWW,      LYE_ABORT,
 LYE_BACKW,      LYE_NOP,        LYE_DELPW,      LYE_NOP,
 /* ^P           XON             ^R              XOFF    */
 
+#ifdef WIN_EX
+LYE_DELNW,      LYE_ERASE,      LYE_LKCMD,      LYE_PASTE,
+#else
 LYE_DELNW,      LYE_ERASE,      LYE_LKCMD,      LYE_NOP,
+#endif
 /* ^T           ^U              ^V              ^W      */
 
 LYE_DELBL,      LYE_NOP,        LYE_NOP,        LYE_NOP,
@@ -326,8 +338,12 @@ LYE_CHAR,       LYE_CHAR,       LYE_CHAR,       LYE_CHAR,
 LYE_CHAR,       LYE_CHAR,       LYE_CHAR,       LYE_CHAR,
 LYE_CHAR,       LYE_CHAR,       LYE_CHAR,       LYE_CHAR,
 LYE_CHAR,       LYE_CHAR,       LYE_CHAR,       LYE_CHAR,
+#ifdef CJK_EX	/* 1997/11/03 (Mon) 20:30:54 */
+LYE_CHAR,       LYE_CHAR,       LYE_CHAR,       LYE_CHAR,
+#else
 LYE_CHAR,       LYE_CHAR,       LYE_CHAR,       LYE_AIX,
 /*                                               97 AIX    */
+#endif
 LYE_CHAR,       LYE_CHAR,       LYE_CHAR,       LYE_CHAR,
 LYE_CHAR,       LYE_CHAR,       LYE_CHAR,       LYE_CHAR,
 
diff --git a/src/LYExtern.c b/src/LYExtern.c
index 5fb37840..0f8a1c4f 100644
--- a/src/LYExtern.c
+++ b/src/LYExtern.c
@@ -25,7 +25,120 @@
 #include <LYLeaks.h>
 #include <LYCurses.h>
 
-void run_external ARGS1(char *, cmd)
+
+#ifdef WIN_EX
+/* 1997/10/15 (Wed) 17:39:50 */
+
+#ifndef PATH_MAX
+#define PATH_MAX	1024
+#endif
+
+#define STRING_MAX	512
+
+/* ASCII char -> HEX digit */
+#define ASC2HEXD(x) (((x) >= '0' && (x) <= '9') ?               \
+		     ((x) - '0') : (toupper(x) - 'A' + 10))
+
+
+/* Decodes the forms %xy in a URL to the character the hexadecimal
+   code of which is xy. xy are hexadecimal digits from
+   [0123456789ABCDEF] (case-insensitive). If x or y are not hex-digits
+   or '%' is near '\0', the whole sequence is inserted literally. */
+
+
+static char *decode_string(char *s)
+{
+    char *save_s;
+    char *p = s;
+
+    save_s = s;
+    for (; *s; s++, p++) {
+	if (*s != '%')
+	    *p = *s;
+	else {
+	    /* Do nothing if at the end of the string. Or if the chars
+	       are not hex-digits. */
+	    if (!*(s + 1) || !*(s + 2)
+		|| !(isxdigit(*(s + 1)) && isxdigit(*(s + 2)))) {
+		*p = *s;
+		continue;
+	    }
+	    *p = (ASC2HEXD(*(s + 1)) << 4) + ASC2HEXD(*(s + 2));
+	    s += 2;
+	}
+    }
+    *p = '\0';
+    return save_s;
+}
+#endif	/* WIN_EX */
+
+#ifndef STRING_MAX
+#define	STRING_MAX 512
+#endif
+
+/* 1997/11/10 (Mon) 14:26:10 */
+PUBLIC char *string_short ARGS2(
+	char *,		str,
+	int,		cut_pos)
+{
+    char buff[STRING_MAX];
+    static char s_str[STRING_MAX];
+    char *p;
+    int len;
+
+    p = str;
+    len = strlen(p);
+
+    if (len > STRING_MAX) {
+	strncpy(buff, p, STRING_MAX - 1);
+	buff[STRING_MAX - 1] = '\0';
+	len = STRING_MAX - 1;
+    } else {
+	strcpy(buff, p);
+    }
+    if (len > (LYcols - 10)) {
+	buff[cut_pos] = '.';
+	buff[cut_pos + 1] = '.';
+	strcpy(buff + cut_pos + 2, (buff + len) - (LYcols - 10) + cut_pos + 1);
+    }
+    strcpy(s_str, buff);
+    return (s_str);
+}
+
+#ifdef WIN_EX
+/*
+ *  Quote the path to make it safe for shell command processing.
+ *
+ *  We use a simple technique which involves quoting the entire
+ *  string using single quotes, escaping the real single quotes
+ *  with double quotes. This may be gross but it seems to work.
+ */
+PUBLIC char * quote_pathname ARGS1(
+	char *, 	pathname)
+{
+    size_t n = 0;
+    char * result;
+
+    if (strchr(pathname, ' ') != NULL) {
+	n = strlen(pathname);
+	result = (char *)malloc(n + 3);
+	if (result == NULL)
+	    outofmem(__FILE__, "quote_pathname");
+	result[0] = '"';
+	strcpy(result + 1, pathname);
+	result[n+1] = '"';
+	result[n+2] = '\0';
+    } else {
+	result = strdup(pathname);
+	if (result == NULL)
+	    outofmem(__FILE__, "quote_pathname");
+    }
+    return result;
+}
+#endif /* WIN_EX */
+
+#if 0	/* old version */
+void run_external_ ARGS1(char *, cmd)
 {
     char *the_command = 0;
     lynx_html_item_type *ext = 0;
@@ -56,4 +169,221 @@ void run_external ARGS1(char *, cmd)
 
     return;
 }
-#endif /* USE_EXTERNALS */
+#endif
+
+
+void run_external ARGS1(char *, c)
+{
+#ifdef WIN_EX
+    HANDLE handle;
+    int stat;
+    char pram_string[PATH_MAX];
+    int redraw_flag;
+    extern int xsystem(char *cmd);
+#endif
+    char command[1024];
+    lynx_html_item_type *externals2 = 0;
+
+    if (externals == NULL)
+	return;
+
+#ifdef WIN_EX			/* 1998/01/26 (Mon) 09:16:13 */
+    if (c == NULL) {
+	HTInfoMsg("Not exist external command");
+	return;
+    }
+#endif
+
+    for (externals2 = externals; externals2 != NULL;
+	 externals2 = externals2->next) {
+
+#ifdef WIN_EX
+	handle = GetForegroundWindow();
+	CTRACE(tfp, "EXTERNAL: '%s' <==> '%s'\n", externals2->name, c);
+#endif
+	if (externals2->command != 0
+	  && !strncasecomp(externals2->name, c, strlen(externals2->name)))
+	{
+	    char *cp;
+
+	    if (no_externals && !externals2->always_enabled) {
+		HTUserMsg(EXTERNALS_DISABLED);
+		return;
+	    }
+	    /*  Too dangerous to leave any URL that may come along unquoted.
+	     *  They often contain '&', ';', and '?' chars, and who knows
+	     *  what else may occur.
+	     *  Prevent spoofing of the shell.
+	     *  Dunno how this needs to be modified for VMS or DOS. - kw
+	     */
+#if (defined(VMS) || defined(DOSPATH) || defined(__EMX__)) && !defined(WIN_EX)
+	    sprintf(command, externals2->command, c);
+#else	/* Unix or DOS/Win: */
+#if defined(WIN_EX)
+	    if (*c != '\"' && strchr(c, ' ') != NULL) {
+		cp = quote_pathname(c);
+		sprintf(command, externals2->command, cp);
+		FREE(cp);
+	    } else {
+		strcpy(pram_string, c);
+		decode_string(pram_string);
+		c = pram_string;
+
+		/* mailto: */
+		if (strnicmp("mailto:", c, 7) == 0) {
+		    sprintf(command, externals2->command, c + 7);
+		}
+		/* telnet:// */
+		else if (strnicmp("telnet://", c, 9) == 0) {
+		    char host[STRING_MAX];
+		    int last_pos;
+
+		    strcpy(host, c + 9);
+		    last_pos = strlen(host) - 1;
+		    if (last_pos > 1 && host[last_pos] == '/')
+			host[last_pos] = '\0';
+
+		    sprintf(command, externals2->command, host);
+		}
+		/* file:// */
+		else if (strnicmp("file://localhost/", c, 17) == 0) {
+		    extern char windows_drive[];
+		    char e_buff[PATH_MAX], *p;
+
+		    p = c + 17;
+		    if (strchr(p, ':') == NULL) {
+			sprintf(e_buff, "%s/%s", windows_drive, p);
+		    } else {
+			strcpy(e_buff, p);
+		    }
+		    p = strrchr(e_buff, '.');
+		    if (p) {
+			p = strchr(p, '#');
+			if (p) {
+			    *p = '\0';
+			}
+		    }
+		    if (*e_buff != '\"' && strchr(e_buff, ' ') != NULL) {
+			p = quote_pathname(e_buff);
+			strcpy(e_buff, p);
+			FREE(p);
+		    }
+
+		    /* Less ==> short filename,
+		     * less ==> long filename
+		     */
+		    if (isupper(externals2->command[0])) {
+			sprintf(command,
+				externals2->command, HTDOS_short_name(e_buff));
+		    } else {
+			sprintf(command, externals2->command, e_buff);
+		    }
+		} else {
+		    sprintf(command, externals2->command, c);
+		}
+	    }
+#else	/* Unix */
+	    cp = HTQuoteParameter(c);
+	    sprintf(command, externals2->command, cp);
+	    FREE(cp);
+#endif
+#endif	/* VMS */
+
+	    if (*command != '\0') {
+#ifdef WIN_EX			/* 1997/10/17 (Fri) 14:07:50 */
+		int len;
+		char buff[PATH_MAX];
+
+		CTRACE(tfp, "Lynx EXTERNAL: '%s'\n", command);
+#ifdef WIN_GUI			/* 1997/11/06 (Thu) 14:17:15 */
+		stat = MessageBox(handle, command,
+				  "Lynx (EXTERNAL COMMAND EXEC)",
+		       MB_ICONQUESTION | MB_SETFOREGROUND | MB_OKCANCEL);
+		if (stat == IDCANCEL) {
+		    return;
+		}
+#else
+		stat = HTConfirm(string_short(command, 40));
+		if (stat == NO) {
+		    return;
+		}
+#endif
+
+		len = strlen(command);
+		if (len > 255) {
+		    sprintf(buff, "Lynx: command line too long (%d > 255)", len);
+#ifdef WIN_GUI			/* 1997/11/06 (Thu) 14:17:02 */
+		    MessageBox(handle, buff,
+			       "Lynx (EXTERNAL COMMAND EXEC)",
+			  MB_ICONEXCLAMATION | MB_SETFOREGROUND | MB_OK);
+		    SetConsoleTitle("Lynx for Win32");
+#else
+		    stat = HTConfirm(string_short(buff, 40));
+#endif
+		    return;
+		} else {
+		    SetConsoleTitle(command);
+		}
+#endif
+
+#ifdef WIN_EX
+		if (strnicmp(command, "start ", 6) == 0)
+		    redraw_flag = FALSE;
+		else
+		    redraw_flag = TRUE;
+
+		if (redraw_flag) {
+		    stop_curses();
+		    fflush(stdout);
+		}
+#else
+		HTUserMsg(command);
+		stop_curses();
+#endif
+
+		/* command running. */
+#ifdef WIN_EX			/* 1997/10/17 (Fri) 14:07:50 */
+#ifdef __CYGWIN__
+		stat = system(command);
+#else
+		stat = xsystem(command);
+#endif
+		if (stat != 0) {
+		    sprintf(buff,
+			    "EXEC code = %04x (%2d, %2d)\r\n"
+			    "'%s'",
+			    stat, (stat / 256), (stat & 0xff),
+			    command);
+#ifdef SH_EX	/* WIN_GUI for ERROR only */
+		    MessageBox(handle, buff,
+			       "Lynx (EXTERNAL COMMAND EXEC)",
+			       MB_ICONSTOP | MB_SETFOREGROUND | MB_OK);
+#else
+		    stat = HTConfirm(string_short(buff, 40));
+#endif		/* 1 */
+		}
+#else	/* Not WIN_EX */
+		LYSystem(command);
+#endif	/* WIN_EX */
+
+#if defined(WIN_EX)
+		SetConsoleTitle("Lynx for Win32");
+#endif
+
+#ifdef WIN_EX
+		if (redraw_flag) {
+		    fflush(stdout);
+		    start_curses();
+		}
+#else
+		fflush(stdout);
+		start_curses();
+#endif
+	    }
+	    return;
+	} /* end if */
+    } /* end-for */
+
+    return;
+}
+#endif	/* USE_EXTERNALS */
diff --git a/src/LYExtern.h b/src/LYExtern.h
index 094f4ddc..66b49b21 100644
--- a/src/LYExtern.h
+++ b/src/LYExtern.h
@@ -6,5 +6,6 @@
 #endif /* LYSTRUCTS_H */
 
 void run_external PARAMS((char * c));
+char *string_short PARAMS((char * str, int cut_pos));
 
 #endif /* EXTERNALS_H */
diff --git a/src/LYForms.c b/src/LYForms.c
index 2f12576f..574a857a 100644
--- a/src/LYForms.c
+++ b/src/LYForms.c
@@ -130,8 +130,8 @@ PUBLIC int change_form_link ARGS7(
 		c = 23;	 /* CTRL-W refresh without clearok */
 	    else
 #endif /* FANCY_CURSES || USE_SLANG */
-                c = 12;  /* CTRL-L for repaint */
-            break;
+		c = 12;	 /* CTRL-L for repaint */
+	    break;
 
 	case F_RADIO_TYPE:
 	    if (form->disabled == YES)
@@ -327,6 +327,9 @@ PRIVATE int form_getstr ARGS2(
     BOOL HaveMaxlength = FALSE;
     int action, repeat;
     int last_xlkc = -1;
+#ifdef SUPPORT_MULTIBYTE_EDIT
+    BOOL refresh = TRUE;
+#endif
 
     EditFieldData MyEdit;
     BOOLEAN Edited = FALSE;		/* Value might be updated? */
@@ -420,6 +423,16 @@ again:
 	get_mouse_link();		/* Reset mouse_link. */
 
 	ch = LYgetch_for(FOR_INPUT);
+#ifdef SUPPORT_MULTIBYTE_EDIT
+#ifdef WIN_EX
+	if (!refresh && (EditBinding(ch) != LYE_CHAR))
+	    goto again;
+#else
+	if (!refresh &&
+	    (EditBinding(ch) != LYE_CHAR) && (EditBinding(ch) != LYE_AIX))
+	    goto again;
+#endif
+#endif /* SUPPORT_MULTIBYTE_EDIT */
 #ifdef VMS
 	if (HadVMSInterrupt) {
 	    HadVMSInterrupt = FALSE;
@@ -427,9 +440,23 @@ again:
 	}
 #endif /* VMS */
 #  ifdef NCURSES_MOUSE_VERSION
-	if (ch != -1 && (ch&LKC_ISLAC))	/* already lynxactioncode? */
+	if (ch != -1 && (ch & LKC_ISLAC)) /* already lynxactioncode? */
 	    break;	/* @@@ maybe move these 2 lines outside ifdef -kw */
 	if (ch == MOUSE_KEY) {		/* Need to process ourselves */
+#if defined(WIN_EX)
+	    int curx, cury;
+
+	    request_mouse_pos();
+	    LYGetYX(cury, curx);
+	    if (MOUSE_Y_POS == cury) {
+		repeat = MOUSE_X_POS - curx;
+		if (repeat < 0) {
+		    ch = LTARROW;
+		    repeat = - repeat;
+		} else
+		    ch = RTARROW;
+	    }
+#else
 	    MEVENT	event;
 	    int curx, cury;
 
@@ -442,7 +469,9 @@ again:
 		    repeat = - repeat;
 		} else
 		    ch = RTARROW;
-	    } else {
+	    }
+#endif /* WIN_EX */
+	    else {
 		/*  Mouse event passed to us as MOUSE_KEY, and apparently
 		 *  not on this field's line?  Something is not as it
 		 *  should be...
@@ -466,6 +495,7 @@ again:
 	}
 	if (peek_mouse_link() != -1)
 	    break;
+
 	action = EditBinding(ch);
 	if ((action & LYE_DF) && !(action & LYE_FORM_LAC)) {
 	    last_xlkc = ch;
@@ -473,6 +503,7 @@ again:
 	} else {
 	    last_xlkc = -1;
 	}
+
 	if (action == LYE_SETM1) {
 	    /*
 	     *  Set flag for modifier 1.
@@ -510,9 +541,61 @@ again:
 #endif /* VMS */
 	    break;
 	}
+
+#if defined(WIN_EX)	/* 1998/10/01 (Thu) 19:19:22 */
+
+#define FORM_PASTE_MAX	8192
+
+	if (action == LYE_PASTE) {
+	    unsigned char buff[FORM_PASTE_MAX];
+	    int i, len;
+
+	    len = get_clip(buff, FORM_PASTE_MAX);
+
+	    if (len > 0) {
+		i = 0;
+		while ((ch = buff[i]) != '\0') {
+
+		    if (ch == '\r') {
+			i++;
+			continue;
+		    }
+		    if (ch == '\n') {
+			i++;
+			len = strlen(buff + i);
+			if (len > 0) {
+			    put_clip(buff + i);
+			}
+			break;
+		    }
+
+		    LYLineEdit(&MyEdit, ch, TRUE);
+
+		    if (MyEdit.strlen >= max_length) {
+			HaveMaxlength = TRUE;
+		    } else if (HaveMaxlength &&
+			       MyEdit.strlen < max_length) {
+			HaveMaxlength = FALSE;
+			_statusline(ENTER_TEXT_ARROWS_OR_TAB);
+		    }
+		    i++;
+		}
+		if (strcmp(value, MyEdit.buffer) != 0) {
+		    Edited = TRUE;
+		}
+		LYRefreshEdit(&MyEdit);
+
+	    } else {
+		HTInfoMsg("Clipboard empty or Not text data.");
+		return(DO_NOTHING);
+	    }
+	    break;
+	}
+#else
 	if (action == LYE_AIX &&
 	    (HTCJK == NOCJK && LYlowest_eightbit[current_char_set] > 0x97))
 	    break;
+#endif
 	if (action == LYE_TAB) {
 	    ch = (int)('\t');
 	    break;
@@ -522,6 +605,13 @@ again:
 	}
 	if (LKC_TO_LAC(keymap,ch) == LYK_REFRESH)
 	    break;
+#ifdef SH_EX
+/* ASATAKU emacskey hack 1997/08/26 (Tue) 09:19:23 */
+	if (emacs_keys &&
+	    (EditBinding(ch) == LYE_FORWW || EditBinding(ch) == LYE_BACKW))
+	    goto breakfor;
+/* ASATAKU emacskey hack */
+#endif
 	switch (ch) {
 #ifdef NOTDEFINED	/* The first four are mapped to LYE_FORM_PASS now */
 	    case DNARROW:
@@ -539,7 +629,7 @@ again:
 	     *  Left arrrow in column 0 deserves special treatment here,
 	     *  else you can get trapped in a form without submit button!
 	     */
-	    case LTARROW:
+	    case LTARROW:	/* 1999/04/14 (Wed) 15:01:33 */
 		if (MyEdit.pos == 0 && repeat == -1) {
 		    int c = YES;    /* Go back immediately if no changes */
 		    if (strcmp(MyEdit.buffer, value)) {
@@ -564,8 +654,23 @@ again:
 		 */
 		if (repeat < 0)
 		    repeat = 1;
-		while (repeat--)
+		while (repeat--) {
+#ifndef SUPPORT_MULTIBYTE_EDIT
 		    LYLineEdit(&MyEdit, ch, TRUE);
+#else /* SUPPORT_MULTIBYTE_EDIT */
+		    if (LYLineEdit(&MyEdit, ch, TRUE) == 0) {
+			if (HTCJK != NOCJK && (0x80 <= ch)
+			&& (ch <= 0xfe) && refresh)
+			    refresh = FALSE;
+			else
+			    refresh = TRUE;
+		    } else {
+			if (!refresh) {
+			    LYEdit1(&MyEdit, 0, LYE_DELP, TRUE);
+			}
+		    }
+#endif /* SUPPORT_MULTIBYTE_EDIT */
+		}
 		if (MyEdit.strlen >= max_length) {
 		    HaveMaxlength = TRUE;
 		} else if (HaveMaxlength &&
@@ -576,11 +681,14 @@ again:
 		if (strcmp(value, MyEdit.buffer)) {
 		    Edited = TRUE;
 		}
+#ifdef SUPPORT_MULTIBYTE_EDIT
+		if (refresh)
+#endif
 		LYRefreshEdit(&MyEdit);
 		LYSetLastTFPos(MyEdit.pos);
 	}
     }
-#ifdef NOTDEFINED
+#if defined(NOTDEFINED) || defined(SH_EX)
 breakfor:
 #endif /* NOTDEFINED */
     if (Edited) {
@@ -705,7 +813,7 @@ PRIVATE int get_popup_option_number ARGS2(
 PRIVATE void paddstr ARGS3(
 	WINDOW *,	the_window,
 	int,		width,
-	char *, 	the_string)
+	char *,		the_string)
 {
     width -= strlen(the_string);
     waddstr(the_window, the_string);
@@ -869,10 +977,10 @@ PRIVATE int popup_options ARGS7(
 #ifdef PDCURSES
     keypad(form_window, TRUE);
 #endif /* PDCURSES */
-#ifdef NCURSES
+#if defined(NCURSES)
     LYsubwindow(form_window);
 #endif
-#if defined(HAVE_GETBKGD) /* not defined in ncurses 1.8.7 */
+#if defined(HAVE_GETBKGD) && !defined(PDCURSES)/* not defined in ncurses 1.8.7 */
     wbkgd(form_window, getbkgd(stdscr));
     wbkgdset(form_window, getbkgd(stdscr));
 #endif
@@ -895,9 +1003,9 @@ PRIVATE int popup_options ARGS7(
 					  : 1;
 /*
  * OH!  I LOVE GOTOs! hack hack hack
- *        07-11-94 GAB
+ *	  07-11-94 GAB
  *      MORE hack hack hack
- *        09-05-94 FM
+ *	  09-05-94 FM
  */
 redraw:
     opt_ptr = list;
@@ -975,9 +1083,17 @@ redraw:
 	SLsmg_refresh();
 #else
 	wmove(form_window, ((i + 1) - window_offset), 2);
+#if defined(WIN_EX)	/* FIX */
+	wattron(form_window, A_REVERSE);
+#else
 	wstart_reverse(form_window);
+#endif
 	paddstr(form_window, width, opt_ptr->name);
+#if defined(WIN_EX)	/* FIX */
+	wattroff(form_window, A_REVERSE);
+#else
 	wstop_reverse(form_window);
+#endif
 	/*
 	 *  If LYShowCursor is ON, move the cursor to the left
 	 *  of the current option, so that blind users, who are
@@ -1679,7 +1795,7 @@ restore_popup_statusline:
     }
 #ifndef USE_SLANG
     delwin(form_window);
-#ifdef NCURSES
+#if defined(NCURSES)
     LYsubwindow(0);
 #endif
 #endif /* !USE_SLANG */
diff --git a/src/LYGlobalDefs.h b/src/LYGlobalDefs.h
index 9148285e..2bbe13f1 100644
--- a/src/LYGlobalDefs.h
+++ b/src/LYGlobalDefs.h
@@ -88,7 +88,7 @@ extern char *LYCgiDocumentRoot;  /* DOCUMENT_ROOT in the lynxcgi env */
 /* Values to which keypad_mode can be set */
 #define NUMBERS_AS_ARROWS 0
 #define LINKS_ARE_NUMBERED 1
-#define LINKS_AND_FORM_FIELDS_ARE_NUMBERED 2
+#define LINKS_AND_FIELDS_ARE_NUMBERED 2
 
 #define HIDDENLINKS_MERGE	0
 #define HIDDENLINKS_SEPARATE	1
@@ -384,6 +384,19 @@ extern BOOLEAN LYPrependCharsetToSource;
 extern BOOLEAN LYQuitDefaultYes;
 extern BOOLEAN LYNonRestartingSIGWINCH;
 extern BOOLEAN LYReuseTempfiles;
+extern BOOLEAN dont_wrap_pre;
+
+#ifdef EXP_JUSTIFY_ELTS
+extern BOOL ok_justify;
+#endif
+
+#ifndef NO_DUMP_WITH_BACKSPACES
+extern BOOLEAN with_backspaces;
+#endif
+
+#ifndef NO_EMPTY_HREFLESS_A
+extern BOOL force_empty_hrefless_a;
+#endif
 
 #ifndef VMS
 extern BOOLEAN LYNoCore;
@@ -392,4 +405,34 @@ extern BOOLEAN restore_sigpipe_for_children;
 
 extern int HTNoDataOK;		/* HT_NO_DATA-is-ok hack */
 
+#ifdef WIN_EX
+/* LYMain.c */
+extern int lynx_timeout;
+extern BOOLEAN system_is_NT;
+extern BOOLEAN focus_window;
+#endif /* _WINDOWS */
+
+#ifdef SH_EX
+extern BOOLEAN show_cfg;
+extern BOOLEAN mail_is_blat;
+extern BOOLEAN no_table_center;
+extern int     debug_delay;
+#endif
+
+#if !defined(__CYGWIN__) && defined(__CYGWIN32__)
+#define __CYGWIN__
+
+#define	cygwin_conv_to_full_win32_path(p, q) \
+	cygwin32_conv_to_full_win32_path(p, q)
+
+#define	cygwin_conv_to_full_posix_path(p, q) \
+	cygwin32_conv_to_full_posix_path(p, q)
+#endif
+
+#if defined(__CYGWIN__)
+extern void cygwin_conv_to_full_win32_path(char *posix, char *dos);
+extern void cygwin_conv_to_full_posix_path(char *dos, char *posix);
+extern int setmode(int handle, int amode);
+#endif
+
 #endif /* LYGLOBALDEFS_H */
diff --git a/src/LYJump.c b/src/LYJump.c
index 5b185d0c..7bb03e8b 100644
--- a/src/LYJump.c
+++ b/src/LYJump.c
@@ -9,6 +9,10 @@
 
 #include <LYLeaks.h>
 
+#ifdef _WINDOWS
+#include <stdlib.h>	/* bsearch() */
+#endif
+
 #ifdef VMS
 #include <fab.h>
 #endif /* VMS */
diff --git a/src/LYJustify.h b/src/LYJustify.h
new file mode 100644
index 00000000..fb800bc2
--- /dev/null
+++ b/src/LYJustify.h
@@ -0,0 +1,75 @@
+/* Justification for lynx - implemented by Vlad Harchev <hvv@hippo.ru>
+   11 July 1999
+*/
+
+#ifndef LYJUSTIFY_H
+#define LYJUSTIFY_H
+
+#include <HTUtils.h>
+
+#ifdef EXP_JUSTIFY_ELTS
+
+extern BOOL ok_justify;
+extern BOOL can_justify_here;
+extern BOOL can_justify_here_saved;
+
+extern BOOL can_justify_this_line;
+extern int wait_for_this_stacked_elt;
+extern BOOL form_in_htext;
+
+/*disabled by default*/
+/*#define DEBUG_JUSTIFY*/
+#ifdef DEBUG_JUSTIFY
+extern BOOL can_justify_stack_depth;/* can be 0 or 1 if all code is correct*/
+#  define CAN_JUSTIFY_STACK_INC ++can_justify_stack_depth;\
+	assert(can_justify_stack_depth < 2 && can_justify_stack_depth >=0 );
+#  define CAN_JUSTIFY_STACK_DEC --can_justify_stack_depth;\
+	assert(can_justify_stack_depth < 2 && can_justify_stack_depth >=0 );
+#else
+#  define CAN_JUSTIFY_STACK_INC /* nothing */
+#  define CAN_JUSTIFY_STACK_DEC /* nothing */
+#endif
+
+#define CAN_JUSTIFY_PUSH(x) can_justify_here_saved=can_justify_here;\
+	can_justify_here=(x); CAN_JUSTIFY_STACK_INC
+#define CAN_JUSTIFY_POP can_justify_here=can_justify_here_saved;\
+	CAN_JUSTIFY_STACK_INC
+#define CAN_JUSTIFY_SET(x) can_justify_here=(x);
+
+/*
+ * This is used to indicate that starting from the current offset in current
+ * line justification can take place (in order the gap between some prefix and
+ * the word not to be enlarged.
+ * For example, when forming OL,
+ *     1.21 foo
+ * 	   ^justification can start here so that gap between 1.21 and "foo"
+ *	   will not be enlarged.
+ * This is a macro (that uses 'me').
+ */
+#define CAN_JUSTIFY_START  mark_justify_start_position(me->text);
+#define CANT_JUSTIFY_THIS_LINE can_justify_this_line=FALSE;
+#define EMIT_IFDEF_EXP_JUSTIFY_ELTS(x) x
+    /*defined in order not to wrap single line of code  into #ifdef/#endif */
+
+extern void ht_justify_cleanup NOPARAMS;
+extern void mark_justify_start_position PARAMS((void* text));
+
+#else /* ! EXP_JUSTIFY_ELTS */
+
+/*
+ * define empty macros so that they can be used without wrapping them in
+ * #ifdef EXP_JUSTIFY_ELTS/#endif
+ */
+
+#define CAN_JUSTIFY_PUSH(x)
+#define CAN_JUSTIFY_POP
+#define CAN_JUSTIFY_SET(x)
+#define CAN_JUSTIFY_START
+#define CANT_JUSTIFY_THIS_LINE
+#define EMIT_IFDEF_EXP_JUSTIFY_ELTS(x)
+
+#endif /* EXP_JUSTIFY_ELTS */
+
+#define CAN_JUSTIFY_PUSH_F CAN_JUSTIFY_PUSH(FALSE)
+
+#endif /* LYJUSTIFY_H */
diff --git a/src/LYKeymap.c b/src/LYKeymap.c
index be169559..32a2e0eb 100644
--- a/src/LYKeymap.c
+++ b/src/LYKeymap.c
@@ -18,7 +18,7 @@
 #ifdef EXP_KEYBOARD_LAYOUT
 PUBLIC int current_layout = 0;  /* Index into LYKbLayouts[]   */
 
-PUBLIC unsigned short * LYKbLayouts[]={
+PUBLIC LYKeymap_t * LYKbLayouts[]={
 	kb_layout_rot13,
 	kb_layout_jcuken,
 	kb_layout_yawerty
@@ -70,11 +70,19 @@ LYK_ABORT,          LYK_END,        LYK_NEXT_PAGE,     0,
 LYK_HISTORY,    LYK_FASTFORW_LINK,  LYK_ACTIVATE,  LYK_COOKIE_JAR,
 /* bs */            /* ht */        /* nl */       /* ^K */
 
+#ifdef SH_EX	/* 1998/10/02 (Fri) 08:48:44 */
+LYK_CHG_KCODE,    LYK_ACTIVATE,     LYK_DOWN_TWO,      0,
+/* ^L */            /* cr */        /* ^N */       /* ^O */
+
+LYK_UP_TWO,       LYK_CHG_CENTER,   LYK_RELOAD,    LYK_TO_CLIPBOARD,
+/* ^P */            /* XON */       /* ^R */       /* ^S */
+#else
 LYK_REFRESH,      LYK_ACTIVATE,     LYK_DOWN_TWO,      0,
 /* ^L */            /* cr */        /* ^N */       /* ^O */
 
 LYK_UP_TWO,             0,          LYK_RELOAD,        0,
 /* ^P */            /* XON */       /* ^R */       /* XOFF */
+#endif
 
 LYK_TRACE_TOGGLE,       0,        LYK_SWITCH_DTD,  LYK_REFRESH,
 /* ^T */            /* ^U */        /* ^V */       /* ^W */
@@ -753,6 +761,11 @@ PRIVATE struct rmap revmap[] = {
 { "UPLOAD",		"upload from your computer to the current directory" },
 { "INSTALL",		"install file or tagged files into a system area" },
 #endif /* DIRED_SUPPORT */
+#ifdef SH_EX		/* 1999/01/01 (Fri) 01:18:12 */
+{ "CHANGE_CENTER",	"toggle center alignment in HTML TABLE" },
+{ "TO_CLIPBOARD",	"link's URL to Clip Board" },
+{ "CHANGE_KCODE",	"Change Kanji code" },
+#endif
 #endif /* VMS */
 { NULL,			"" }
 };
@@ -899,11 +912,11 @@ PUBLIC int lkcstring_to_lkc ARGS1(
 	   }
 #endif
 #endif
-       } 
-       if (c < -1)
-	   return (-1);
-       else
-	   return c;
+	}
+	if (c < -1)
+	    return (-1);
+	else
+	    return c;
 }
 
 PRIVATE int LYLoadKeymap ARGS4 (
@@ -1022,7 +1035,7 @@ PUBLIC void set_vms_keys NOARGS
       keymap['$'+1] = LYK_SHELL;
 }
 
-static char saved_vi_keys[4];
+static LYKeymap_t saved_vi_keys[4];
 static BOOLEAN did_vi_keys;
 
 PUBLIC void set_vi_keys NOARGS
@@ -1052,7 +1065,7 @@ PUBLIC void reset_vi_keys NOARGS
       did_vi_keys = FALSE;
 }
 
-static char saved_emacs_keys[4];
+static LYKeymap_t saved_emacs_keys[4];
 static BOOLEAN did_emacs_keys;
 
 PUBLIC void set_emacs_keys NOARGS
@@ -1082,7 +1095,7 @@ PUBLIC void reset_emacs_keys NOARGS
       did_emacs_keys = FALSE;
 }
 
-static char saved_number_keys[9];
+static LYKeymap_t saved_number_keys[9];
 static BOOLEAN did_number_keys;
 
 PUBLIC void set_numbers_as_arrows NOARGS
diff --git a/src/LYKeymap.h b/src/LYKeymap.h
index 036e4c60..518864fe 100644
--- a/src/LYKeymap.h
+++ b/src/LYKeymap.h
@@ -32,7 +32,7 @@ extern LYKeymap_t keymap[KEYMAP_SIZE]; /* main keymap matrix */
 
 #ifdef EXP_KEYBOARD_LAYOUT
 extern int current_layout;
-extern unsigned short * LYKbLayouts[];
+extern LYKeymap_t * LYKbLayouts[];
 extern char * LYKbLayoutNames[];
 extern int LYSetKbLayout PARAMS((char *layout_id));
 #endif
@@ -58,9 +58,9 @@ extern LYKeymap_t key_override[];
 
 
 /*  Convert lynxkeycode to lynxactioncode.  Modifiers are dropped.  */
-#define LKC_TO_LAC(ktab,c) (((c)==-1) ? ktab[0] : \
-			    ((c)&LKC_ISLAC) ? ((c)&LAC_MASK) : \
-			    ktab[((c)&LKC_MASK)+1])
+#define LKC_TO_LAC(ktab,c) (((c) == -1) ? ktab[0] : \
+			    ((c) & LKC_ISLAC) ? ((c) & LAC_MASK) : \
+			    ktab[((c) & LKC_MASK) + 1])
 
 
 /*  Mask lynxactioncode as a lynxkeycode.  */
@@ -197,6 +197,12 @@ typedef enum {
 #define LYK_TAG_LINK      LYK_UNKNOWN
 #endif /* DIRED_SUPPORT */
 
+#ifdef SH_EX
+  , LYK_CHG_CENTER
+  , LYK_TO_CLIPBOARD
+  , LYK_CHG_KCODE
+#endif /* SH_EX */
+
 } LYKeymapCodes;
 
 
diff --git a/src/LYList.c b/src/LYList.c
index f1e111ff..368e5a8c 100644
--- a/src/LYList.c
+++ b/src/LYList.c
@@ -125,7 +125,7 @@ PUBLIC int showlist ARGS2(
 	     *	right in connection with always treating this file as
 	     *	HIDDENLINKS_MERGE in GridText.c - kw
 	     */
-	    if (keypad_mode == LINKS_AND_FORM_FIELDS_ARE_NUMBERED) {
+	    if (keypad_mode == LINKS_AND_FIELDS_ARE_NUMBERED) {
 		HText_FormDescNumber(cnt, (char **)&desc);
 		fprintf(fp0,
 		"<li><a id=%d href=\"#%d\">form field</a> = <em>%s</em>\n",
@@ -288,7 +288,7 @@ PUBLIC void printlist ARGS2(
 		 *  the list page match the numbering in the original document,
 		 *  but won't create a forward link to the form. - FM && LE
 		 */
-		if (keypad_mode == LINKS_AND_FORM_FIELDS_ARE_NUMBERED) {
+		if (keypad_mode == LINKS_AND_FIELDS_ARE_NUMBERED) {
 		    HText_FormDescNumber(cnt, (char **)&desc);
 		    fprintf(fp, "%4d. form field = %s\n", cnt, desc);
 		}
diff --git a/src/LYLocal.c b/src/LYLocal.c
index 7409535a..58eacbfb 100644
--- a/src/LYLocal.c
+++ b/src/LYLocal.c
@@ -348,6 +348,11 @@ PRIVATE BOOLEAN ok_localname ARGS2(char*, dst, CONST char*, src)
 PRIVATE int move_file ARGS2(char *, source, char *, target)
 {
     int code;
+#ifdef WIN_EX	/* 1999/01/02 (Sat) 23:24:20 */
+    if ((code = rename(source, target)) != 0)
+	if ((code = LYCopyFile(source, target)) >= 0)
+	    code = remove(source);
+#else
     char *msg = 0;
     char *args[5];
 
@@ -358,6 +363,7 @@ PRIVATE int move_file ARGS2(char *, source, char *, target)
     args[3] = (char *) 0;
     code = (LYExecv(MV_PATH, args, msg) <= 0) ? -1 : 1;
     FREE(msg);
+#endif
     return code;
 }
 
@@ -2318,7 +2324,7 @@ PRIVATE int LYExecv ARGS3(
 	char **,	argv,
 	char *, 	msg)
 {
-#if defined(VMS) || defined(_WINDOWS)
+#if defined(VMS) || defined(SH_EX) || defined(_WINDOWS)
     CTRACE(tfp, "LYExecv:  Called inappropriately!\n");
     return(0);
 #else
diff --git a/src/LYMail.c b/src/LYMail.c
index 37764eab..1112eb2e 100644
--- a/src/LYMail.c
+++ b/src/LYMail.c
@@ -27,6 +27,90 @@ BOOLEAN term_letter;	/* Global variable for async i/o. */
 PRIVATE void terminate_letter  PARAMS((int sig));
 PRIVATE void remove_tildes PARAMS((char *string));
 
+#ifdef _WINDOWS
+#define system(p) xsystem(p)	/* 1998/06/05 (Fri) 21:53:30 */
+#endif
+
+#ifdef SH_EX	/* 1999/01/03 (Sun) 22:00:47 */
+
+extern BOOLEAN mail_is_blat;
+
+/*
+syntax:
+Blat <filename> -t <recipient> [optional switches (see below)]
+
+<filename>    : file with the message body
+-t <recipient>: recipient list (comma separated)
+-s <subj>     : subject line
+-f <sender>   : overrides the default sender address (must be known to server)
+-i <addr>     : a 'From:' address, not necessarily known to the SMTP server.
+-c <recipient>: carbon copy recipient list (comma separated)
+-b <recipient>: blind carbon copy recipient list (comma separated)
+-h            : displays this help.
+-mime         : MIME Quoted-Printable Content-Transfer-Encoding.
+-q            : supresses *all* output.
+-server <addr>: overrides the default SMTP server to be used.
+
+*/
+
+static char bl_cmd_file[512];
+
+PRIVATE void blat_clean()
+{
+    if (bl_cmd_file[0]) {
+	bl_cmd_file[0] = '\0';
+    }
+}
+
+PRIVATE char *blat_cmd(
+	char *mail_cmd,
+	char *filename,
+	char *address,
+	char *subject,
+	char *ccaddr,
+	char *mail_addr
+)
+{
+    FILE *fp;
+    static char b_cmd[512];
+#ifdef __CYGWIN__
+    char dosname[LY_MAXPATH];
+#endif
+
+    if ((fp = LYOpenTemp(bl_cmd_file, ".blt", "w")) == NULL) {
+	HTAlert(FORM_MAILTO_FAILED);
+	return NULL;
+    }
+
+#ifdef __CYGWIN__
+    cygwin_conv_to_full_win32_path(filename, dosname);
+    fprintf(fp, "%s\n", dosname);
+#else
+    fprintf(fp, "%s\n", filename);
+#endif
+    fprintf(fp, "-t\n%s\n", address);
+    if (subject)
+	fprintf(fp, "-s\n%s\n", subject);
+    if (mail_addr && strlen(mail_addr) > 0) {
+	fprintf(fp, "-f\n%s\n", mail_addr);
+    }
+    if (ccaddr && strlen(ccaddr) > 0) {
+	fprintf(fp, "-c\n%s\n", ccaddr);
+    }
+    fclose(fp);
+
+#ifdef __CYGWIN__
+    cygwin_conv_to_full_win32_path(bl_cmd_file, dosname);
+    sprintf(b_cmd, "%s \"@%s\"", mail_cmd, dosname);
+#else
+    sprintf(b_cmd, "%s @%s", mail_cmd, bl_cmd_file);
+#endif
+
+    return b_cmd;
+}
+
+#endif	/* SH_EX */
+
 /* HTUnEscape with control-code nuking */
 PRIVATE void SafeHTUnEscape ARGS1(
 	char *,	string)
@@ -53,8 +137,8 @@ PRIVATE void SafeHTUnEscape ARGS1(
 **  mailform() sends form content to the mailto address(es). - FM
 */
 PUBLIC void mailform ARGS4(
-	CONST char *, 	mailto_address,
-	CONST char *, 	mailto_subject,
+	CONST char *, 	mailto_address GCC_UNUSED,
+	CONST char *, 	mailto_subject GCC_UNUSED,
 	CONST char *, 	mailto_content,
 	CONST char *, 	mailto_type)
 {
@@ -62,23 +146,26 @@ PUBLIC void mailform ARGS4(
     char *address = NULL;
     char *ccaddr = NULL;
     char *keywords = NULL;
-    char *searchpart = NULL;
-    char *cp = NULL, *cp0 = NULL, *cp1 = NULL;
+    char *cp = NULL;
     char subject[80];
-    char self[80];
     char cmd[512];
-    int len, i, ch;
-#if defined(VMS) || defined(DOSPATH)
-    char my_tmpfile[LY_MAXPATH];
-    char *command = NULL;
+    int len, i;
 #ifdef VMS
     char *address_ptr1, *address_ptr2;
-    BOOLEAN first = TRUE;
-#endif
     BOOLEAN isPMDF = FALSE;
-    char hdrfile[LY_MAXPATH];
+    BOOLEAN first = TRUE;
     FILE *hfd;
+    char hdrfile[LY_MAXPATH];
+#endif
+#if defined(VMS) || defined(DOSPATH) || defined(SH_EX)
+    int ch;
+    char self[80];
+    char *searchpart = NULL;
+    char *cp0 = NULL, *cp1 = NULL;
+    char *command = NULL;
+    char my_tmpfile[LY_MAXPATH];
 
+#ifdef VMS
     if (!strncasecomp(system_mail, "PMDF SEND", 9)) {
 	isPMDF = TRUE;
     }
@@ -334,7 +421,7 @@ PUBLIC void mailform ARGS4(
 	}
     }
 
-#if defined(VMS) || defined(DOSPATH)
+#if defined(VMS) || defined(DOSPATH) || defined(SH_EX)
     if ((fd = LYOpenTemp(my_tmpfile, ".txt", "w")) == NULL) {
 	HTAlert(FORM_MAILTO_FAILED);
 	FREE(address);
@@ -342,6 +429,8 @@ PUBLIC void mailform ARGS4(
 	FREE(keywords);
 	return;
     }
+#endif
+#ifdef VMS
     if (isPMDF) {
 	if ((hfd = LYOpenTemp(hdrfile, ".txt", "w")) == NULL) {
 	    HTAlert(FORM_MAILTO_FAILED);
@@ -352,7 +441,6 @@ PUBLIC void mailform ARGS4(
 	    return;
 	}
     }
-#ifdef VMS
     if (isPMDF) {
 	if (mailto_type && *mailto_type) {
 	    fprintf(hfd, "Mime-Version: 1.0\n");
@@ -369,6 +457,22 @@ PUBLIC void mailform ARGS4(
 	 */
 	fprintf(fd, "X-Content-Type: %s\n\n", mailto_type);
     }
+#else	/* !VMS (DOS) */
+#ifdef SH_EX
+    if (mail_is_blat) {
+	if (strlen(subject) > 70)
+	    subject[70] = '\0';
+    } else {
+	if (mailto_type && *mailto_type) {
+	    fprintf(fd, "Mime-Version: 1.0\n");
+	    fprintf(fd, "Content-Type: %s\n", mailto_type);
+	}
+	fprintf(fd,"To: %s\n", address);
+	if (personal_mail_address && *personal_mail_address)
+	    fprintf(fd,"From: %s\n", personal_mail_address);
+	remove_tildes(self);
+	fprintf(fd,"Subject: %.70s\n\n", subject);
+    }
 #else
     if (mailto_type && *mailto_type) {
 	fprintf(fd, "Mime-Version: 1.0\n");
@@ -379,9 +483,10 @@ PUBLIC void mailform ARGS4(
 	fprintf(fd,"From: %s\n", personal_mail_address);
     remove_tildes(self);
     fprintf(fd,"Subject: %.70s\n\n", subject);
+#endif	/* SH_EX */
 #endif
 
-#else
+#else	/* !(defined(VMS) || defined(DOSPATH) || defined(SH_EX)) */
     sprintf(cmd, "%s %s", system_mail, system_mail_flags);
     if ((fd = popen(cmd, "w")) == NULL) {
 	HTAlert(FORM_MAILTO_FAILED);
@@ -438,11 +543,11 @@ PUBLIC void mailform ARGS4(
     if (len)
 	fprintf(fd, "%s\n", &mailto_content[i]);
 
-#ifdef UNIX
+#if defined(UNIX) && !defined(__CYGWIN__)
     pclose(fd);
     sleep(MessageSecs);
 #endif /* UNIX */
-#if defined(VMS) || defined(DOSPATH)
+#if defined(VMS) || defined(DOSPATH) || defined(SH_EX)
     LYCloseTempFP(fd);
 #ifdef VMS
     /*
@@ -554,25 +659,51 @@ PUBLIC void mailform ARGS4(
 
     stop_curses();
     printf("%s\n\n$ %s\n\n%s", SENDING_FORM_CONTENT, command, PLEASE_WAIT);
-    LYSystem(command);
+    LYSystem(command);	/* Mail (VMS) */
     FREE(command);
     sleep(AlertSecs);
     start_curses();
     LYRemoveTemp(my_tmpfile);
     LYRemoveTemp(hdrfile);
 #else /* DOSPATH */
+#ifdef SH_EX	/* 1998/05/04 (Mon) 22:18:44 */
+    if (mail_is_blat) {
+	StrAllocCopy(command,
+		blat_cmd(
+		    system_mail,
+		    my_tmpfile,
+		    address,
+		    subject,
+		    ccaddr,
+		    personal_mail_address
+		)
+	);
+    } else {
+	/* for sendmail.exe */
+	StrAllocCopy(command, system_mail);
+	StrAllocCat(command, " -t \"");
+	StrAllocCat(command, address);
+	StrAllocCat(command, "\" -F ");
+	StrAllocCat(command, my_tmpfile);
+    }
+#else	/* !SH_EX */
     StrAllocCopy(command, system_mail);
     StrAllocCat(command, " -t \"");
     StrAllocCat(command, address);
     StrAllocCat(command, "\" -F ");
     StrAllocCat(command, my_tmpfile);
+#endif
     stop_curses();
     printf("%s\n\n$ %s\n\n%s", SENDING_FORM_CONTENT, command, PLEASE_WAIT);
-    LYSystem(command);
+    LYSystem(command);	/* Mail sending form content (DOS/Windows) */
     FREE(command);
     sleep(MessageSecs);
     start_curses();
     LYRemoveTemp(my_tmpfile);
+#ifdef SH_EX
+    if (mail_is_blat)
+	blat_clean();
+#endif /* SH_EX */
 #endif
 #endif /* VMS */
 
@@ -599,16 +730,21 @@ PUBLIC void mailmsg ARGS4(
 #ifdef ALERTMAIL
     BOOLEAN skip_parsing = FALSE;
 #endif
-#if defined(VMS) || defined(DOSPATH)
+#if defined(DOSPATH) || defined(WIN_EX)
+    char *ccaddr;
+    char subject[128];
+#endif
+#if defined(VMS) || defined(DOSPATH) || defined(WIN_EX)
     char my_tmpfile[LY_MAXPATH];
-    char *command = NULL;
+#endif
 #ifdef VMS
     char *address_ptr1, *address_ptr2;
     BOOLEAN first = TRUE;
-#endif
     BOOLEAN isPMDF = FALSE;
     char hdrfile[LY_MAXPATH];
     FILE *hfd;
+    char *command = NULL;
+    BOOLEAN first = TRUE;
 
     CTRACE(tfp, "mailmsg(%d, \"%s\", \"%s\", \"%s\")\n", cur,
 	owner_address?owner_address:"<nil>",
@@ -618,7 +754,7 @@ PUBLIC void mailmsg ARGS4(
     if (!strncasecomp(system_mail, "PMDF SEND", 9)) {
 	isPMDF = TRUE;
     }
-#endif /* VMS || DOSPATH */
+#endif /* VMS */
 
 #ifdef ALERTMAIL
     if (owner_address == NULL) {
@@ -721,17 +857,15 @@ PUBLIC void mailmsg ARGS4(
 	address[(strlen(address) - 1)] = '\0';
     if (*address == '\0') {
 	FREE(address);
-	CTRACE(tfp, "mailmsg: No address in '%s'.\n",
-		    owner_address);
+	CTRACE(tfp, "mailmsg: No address in '%s'.\n", owner_address);
 	return;
     }
 
-#ifdef UNIX
+#if defined(UNIX) && !defined(__CYGWIN__)
     HTSprintf0(&cmd, "%s %s", system_mail, system_mail_flags);
     if ((fd = popen(cmd, "w")) == NULL) {
 	FREE(address);
-	CTRACE(tfp, "mailmsg: '%s' failed.\n",
-		    cmd);
+	CTRACE(tfp, "mailmsg: '%s' failed.\n", cmd);
 	return;
     }
 
@@ -743,17 +877,16 @@ PUBLIC void mailmsg ARGS4(
     fprintf(fd, "X-URL: %s\n", filename);
     fprintf(fd, "X-Mailer: Lynx, Version %s\n\n", LYNX_VERSION);
 #endif /* UNIX */
-#if defined(VMS) || defined(DOSPATH)
+#if defined(VMS) || defined(DOSPATH) || defined(WIN_EX)
     if ((fd = LYOpenTemp(my_tmpfile, ".txt", "w")) == NULL) {
-	CTRACE(tfp, "mailmsg: Could not fopen '%s'.\n",
-		    my_tmpfile);
+	CTRACE(tfp, "mailmsg: Could not fopen '%s'.\n", my_tmpfile);
 	FREE(address);
 	return;
     }
+#ifdef VMS
     if (isPMDF) {
 	if ((hfd = LYOpenTemp(hdrfile, ".txt", "w")) == NULL) {
-	    CTRACE(tfp, "mailmsg: Could not fopen '%s'.\n",
-			hdrfile);
+	    CTRACE(tfp, "mailmsg: Could not fopen '%s'.\n", hdrfile);
 	    FREE(address);
 	    return;
 	}
@@ -764,7 +897,11 @@ PUBLIC void mailmsg ARGS4(
 	fprintf(fd, "X-URL: %s\n", filename);
 	fprintf(fd, "X-Mailer: Lynx, Version %s\n\n", LYNX_VERSION);
     }
+#else
+    sprintf(subject, "Lynx Error in %.56s", filename);
+    ccaddr = personal_mail_address;
 #endif /* VMS */
+#endif /* VMS || DOSPATH */
 
     fprintf(fd, gettext("The link   %s :?: %s \n"),
 		links[cur].lname, links[cur].target);
@@ -776,16 +913,16 @@ PUBLIC void mailmsg ARGS4(
     fprintf(fd, "%s\n", gettext("This message was automatically generated by"));
     fprintf(fd, gettext("Lynx ver. %s"), LYNX_VERSION);
     if ((LynxSigFile != NULL) &&
-	(fp = fopen(LynxSigFile, "r")) != NULL) {
+	(fp = fopen(LynxSigFile, TXT_R)) != NULL) {
 	fputs("-- \n", fd);
 	while (LYSafeGets(&cmd, fp) != NULL)
 	    fputs(cmd, fd);
 	fclose(fp);
     }
-#ifdef UNIX
+#if defined(UNIX) && !defined(__CYGWIN__)
     pclose(fd);
 #endif /* UNIX */
-#if defined(VMS) || defined(DOSPATH)
+#if defined(VMS) || defined(DOSPATH) || defined(WIN_EX)
     LYCloseTempFP(fd);
 #ifdef VMS
     if (isPMDF) {
@@ -838,10 +975,10 @@ PUBLIC void mailmsg ARGS4(
 	HTSprintf0(&cmd, mail_adrs, address_ptr1);
 	StrAllocCat(command, cmd);
 	first = FALSE;
-	address_ptr1 = address_ptr2;
+  	address_ptr1 = address_ptr2;
     } while (address_ptr1 != NULL);
 
-    LYSystem(command);
+    LYSystem(command);	/* VMS */
     FREE(command);
     FREE(cmd);
     LYRemoveTemp(my_tmpfile);
@@ -849,14 +986,33 @@ PUBLIC void mailmsg ARGS4(
 	LYRemoveTemp(hdrfile);
     }
 #else /* DOSPATH */
-    StrAllocCopy(command, system_mail);
-    StrAllocCat(command, " -t \"");
-    StrAllocCat(command, address);
-    StrAllocCat(command, "\" -F ");
-    StrAllocCat(command, my_tmpfile);
-    LYSystem(command);
+#ifdef SH_EX
+    if (mail_is_blat)
+	strcpy(cmd,
+		blat_cmd(
+		    system_mail,
+		    my_tmpfile,
+		    address,
+		    subject,
+		    ccaddr,
+		    personal_mail_address
+		)
+	);
+    else
+	sprintf(cmd, "%s -t \"%s\" -F %s", system_mail, address, my_tmpfile);
+#else /* !SH_EX */
+    sprintf(cmd, "%s -t \"%s\" -F %s", system_mail, address, my_tmpfile);
+#endif /* SH_EX */
+    LYSystem(cmd);	/* Mail (DOS/Windows) */
+
+#if 0	/* Not SH_EX */
     FREE(command);
+#endif
     LYRemoveTemp(my_tmpfile);
+#ifdef SH_EX
+    if (mail_is_blat)
+	blat_clean();
+#endif
 #endif
 #endif /* VMS */
 
@@ -901,10 +1057,10 @@ PUBLIC void reply_by_mail ARGS4(
     int i, len;
     int c = 0;	/* user input */
     char my_tmpfile[LY_MAXPATH], cmd[512];
-#ifdef DOSPATH
+#if defined(DOSPATH) || defined(WIN_EX)
     char tmpfile2[LY_MAXPATH];
 #endif
-#if defined(DOSPATH) || defined(VMS)
+#if defined(DOSPATH) || defined(WIN_EX) || defined(VMS)
     char *command = NULL;
 #endif
 #ifndef NO_ANONYMOUS_EMAIL
@@ -922,7 +1078,7 @@ PUBLIC void reply_by_mail ARGS4(
 	isPMDF = TRUE;
     }
 #else
-    char buf[512];
+    char buf[4096];	/* 512 */
     char *header = NULL;
     int n;
 #endif /* VMS */
@@ -1249,7 +1405,7 @@ PUBLIC void reply_by_mail ARGS4(
 	}
 #endif /* NO_ANONYMOUS_MAIL */
     }
-#else /* Unix: */
+#else /* Unix/DOS/Windows */
     /*
      *	Put the To: line in the header.
      */
@@ -1483,6 +1639,12 @@ PUBLIC void reply_by_mail ARGS4(
 #ifdef VMS
     sprintf(subject, "%.70s", user_input);
 #else
+#ifdef SH_EX
+    if (mail_is_blat)
+	sprintf(subject, "%.70s", user_input);
+#else	/* @@@ */
+    sprintf(subject, "%.70s", user_input);
+#endif
     StrAllocCat(header, "Subject: ");
     StrAllocCat(header, user_input);
     StrAllocCat(header, "\n");
@@ -1529,7 +1691,7 @@ PUBLIC void reply_by_mail ARGS4(
 	}
     }
 
-#ifdef DOSPATH
+#if defined(DOSPATH) || defined(SH_EX)
     if (*address) {
 	StrAllocCat(header, "To: ");
 	StrAllocCat(header, address);
@@ -1610,7 +1772,7 @@ PUBLIC void reply_by_mail ARGS4(
 	sprintf(user_input, "%s%s %s", editor, editor_arg, my_tmpfile);
 	_statusline(SPAWNING_EDITOR_FOR_MAIL);
 	stop_curses();
-	if (LYSystem(user_input)) {
+	if (LYSystem(user_input)) {	/* Spawn Editor */
 	    start_curses();
 	    HTAlert(ERROR_SPAWNING_EDITOR);
 	} else {
@@ -1708,7 +1870,7 @@ PUBLIC void reply_by_mail ARGS4(
 	goto cleanup;
     }
     if ((body == NULL && LynxSigFile != NULL) &&
-	(fp = fopen(LynxSigFile, "r")) != NULL) {
+	(fp = fopen(LynxSigFile, TXT_R)) != NULL) {
 	LYStatusLine = (LYlines - 1);
 	if (term_letter) {
 	    _user_message(APPEND_SIG_FILE, LynxSigFile);
@@ -1721,7 +1883,7 @@ PUBLIC void reply_by_mail ARGS4(
 	}
 	LYStatusLine = -1;
 	if (c == YES) {
-	    if ((fd = fopen(my_tmpfile, "a")) != NULL) {
+	    if ((fd = fopen(my_tmpfile, TXT_A)) != NULL) {
 		char *buffer = NULL;
 		fputs("-- \n", fd);
 		while (LYSafeGets(&buffer, fp) != NULL) {
@@ -1847,18 +2009,18 @@ PUBLIC void reply_by_mail ARGS4(
 
     stop_curses();
     printf("%s\n\n$ %s\n\n%s", SENDING_COMMENT, command, PLEASE_WAIT);
-    LYSystem(command);
+    LYSystem(command);	/* SENDING COMMENT (VMS) */
     FREE(command);
     sleep(AlertSecs);
     start_curses();
     goto cleandown;
-#else /* not VMS: */
+#else /* Unix/DOS/Windows */
     /*
      *	Send the tmpfile into sendmail.
      */
     _statusline(SENDING_YOUR_MSG);
     sprintf(cmd, "%s %s", system_mail, system_mail_flags);
-#ifdef DOSPATH
+#if defined(DOSPATH) || defined(WIN_EX)
     if ((fp = LYOpenTemp(tmpfile2, ".txt", "w")) == NULL) {
 	HTAlert(MAILTO_URL_TEMPOPEN_FAILED);
 	return;
@@ -1871,33 +2033,64 @@ PUBLIC void reply_by_mail ARGS4(
 	goto cleanup;
     }
 #endif /* DOSPATH */
-    fd = fopen(my_tmpfile, "r");
+    fd = fopen(my_tmpfile, TXT_R);
     if (fd == NULL) {
 	HTInfoMsg(COMMENT_REQUEST_CANCELLED);
 	pclose(fp);
 	goto cleanup;
     }
+#ifdef SH_EX
+    if (!mail_is_blat)
+	fputs(header, fp);
+#else
     fputs(header, fp);
-    while ((n = fread(buf, 1, sizeof(buf), fd)) != 0)
+#endif
+    while ((n = fread(buf, 1, sizeof(buf), fd)) != 0) {
 	fwrite(buf, 1, n, fp);
-#ifdef DOSPATH
+    }
+#if defined(DOSPATH) || defined(SH_EX)
+#ifdef SH_EX	/* 1998/05/04 (Mon) 22:40:35 */
+    if (mail_is_blat) {
+	StrAllocCopy(command,
+		blat_cmd(
+		    system_mail,
+		    tmpfile2,
+		    address,
+		    subject,
+		    ccaddr,
+		    personal_mail_address
+		)
+	);
+    } else {
+	StrAllocCopy(command, system_mail);
+	StrAllocCat(command, " -t \"");
+	StrAllocCat(command, address);
+	StrAllocCat(command, "\" -F ");
+	StrAllocCat(command, tmpfile2);
+    }
+#else /* DOSPATH */
     StrAllocCopy(command, system_mail);
     StrAllocCat(command, " -t \"");
     StrAllocCat(command, address);
     StrAllocCat(command, "\" -F ");
     StrAllocCat(command, tmpfile2);
+#endif	/* SH_EX */
     LYCloseTempFP(fp);	/* Close the tmpfile. */
     stop_curses();
     printf("%s\n\n$ %s\n\n%s", SENDING_COMMENT, command, PLEASE_WAIT);
-    LYSystem(command);
+    LYSystem(command);	/* SENDING COMMENT (DOS/Windows/Unix) */
     FREE(command);
     sleep(MessageSecs);
     start_curses();
     LYRemoveTemp(tmpfile2);	/* Delete the tmpfile. */
-#else
-    pclose(fp);
+#ifdef SH_EX
+    if (mail_is_blat)
+	blat_clean();
 #endif
-    LYCloseTempFP(fd); /* Close the tmpfile. */
+#else /* !DOSPATH */
+    pclose(fp);
+#endif	/* DOSPATH */
+    fclose(fd); /* Close the tmpfile. */
 
     CTRACE(tfp, "%s\n", cmd);
 #endif /* VMS */
@@ -1907,21 +2100,24 @@ PUBLIC void reply_by_mail ARGS4(
      */
 cleanup:
     signal(SIGINT, cleanup_sig);
-#if !defined(VMS) && !defined(DOSPATH)
+#if !defined(VMS) && !defined(DOSPATH) || defined(SH_EX)
     FREE(header);
 #endif /* !VMS */
 
-#if defined(VMS) || defined(DOSPATH)
+#if defined(VMS)
 cleandown:
 #endif /* VMS */
     term_letter = FALSE;
 #ifdef VMS
     FREE(command);
+    while (LYRemoveTemp(my_tmpfile) == 0)
+	;		 /* Delete the tmpfile(s). */
     if (isPMDF) {
-	LYRemoveTemp(hdrfile);
+	LYRemoveTemp(hdrfile); /* Delete the hdrfile. */
     }
+#else
+    LYRemoveTemp(my_tmpfile);  /* Delete the tmpfile. */
 #endif /* VMS */
-    LYRemoveTemp(my_tmpfile);
     FREE(address);
     FREE(ccaddr);
     FREE(keywords);
@@ -1934,7 +2130,7 @@ PRIVATE void terminate_letter ARGS1(int,sig GCC_UNUSED)
     term_letter = TRUE;
     /* Reassert the AST */
     signal(SIGINT, terminate_letter);
-#if defined(VMS) || defined(DOSPATH)
+#if defined(VMS) || defined(DOSPATH) || defined(WIN_EX)
     /*
      *	Refresh the screen to get rid of the "interrupt" message.
      */
diff --git a/src/LYMain.c b/src/LYMain.c
index 1c7f6c87..84a9ab1c 100644
--- a/src/LYMain.c
+++ b/src/LYMain.c
@@ -275,6 +275,34 @@ PUBLIC BOOLEAN local_host_only = FALSE;
 PUBLIC BOOLEAN override_no_download = FALSE;
 PUBLIC BOOLEAN show_dotfiles = FALSE; /* From rcfile if no_dotfiles is false */
 PUBLIC BOOLEAN LYforce_HTML_mode = FALSE;
+
+#ifdef WIN_EX
+#undef SYSTEM_MAIL
+#undef SYSTEM_MAIL_FLAGS
+#define SYSTEM_MAIL		"BLATJ"
+#define SYSTEM_MAIL_FLAGS	""
+PUBLIC BOOLEAN focus_window = FALSE;	/* 1998/10/05 (Mon) 17:18:42 */
+PUBLIC char windows_drive[4];		/* 1998/01/13 (Tue) 21:13:24 */
+#endif
+
+#ifdef _WINDOWS
+#define	TIMEOUT	180		/* 1998/03/30 (Mon) 14:50:44 */
+PUBLIC int lynx_timeout = TIMEOUT;
+PUBLIC CRITICAL_SECTION critSec_DNS;	/* 1998/09/03 (Thu) 22:01:56 */
+PUBLIC CRITICAL_SECTION critSec_READ;	/* 1998/09/03 (Thu) 22:01:56 */
+#endif /* _WINDOWS */
+
+#if defined(WIN_EX)
+PUBLIC BOOLEAN system_is_NT = FALSE;
+#endif
+
+#ifdef SH_EX
+PUBLIC BOOLEAN show_cfg = FALSE;
+PUBLIC BOOLEAN mail_is_blat = TRUE;
+PUBLIC int     debug_delay = 0;		/* 1998/10/06 (Tue) 08:41:20 */
+PUBLIC BOOLEAN no_table_center = FALSE;	/* 1998/10/09 (Fri) 15:12:49 */
+#endif /* SH_EX */
+
 PUBLIC char *editor = NULL;	/* the name of the current editor */
 PUBLIC char *jumpfile = NULL;	/* the name of the default jumps file */
 PUBLIC char *jumpprompt = NULL; /* the default jumps prompt */
@@ -401,6 +429,19 @@ PUBLIC BOOLEAN LYPreparsedSource = FALSE;	/* Show source as preparsed?	 */
 PUBLIC BOOLEAN LYPrependBaseToSource = TRUE;
 PUBLIC BOOLEAN LYPrependCharsetToSource = TRUE;
 PUBLIC BOOLEAN LYQuitDefaultYes = QUIT_DEFAULT_YES;
+PUBLIC BOOLEAN dont_wrap_pre = FALSE;
+
+#ifdef EXP_JUSTIFY_ELTS
+PUBLIC BOOL ok_justify = TRUE;
+#endif
+
+#ifndef NO_DUMP_WITH_BACKSPACES
+PUBLIC BOOLEAN with_backspaces = FALSE;
+#endif
+
+#ifndef NO_EMPTY_HREFLESS_A
+PUBLIC BOOL force_empty_hrefless_a = FALSE;
+#endif
 
 #ifdef DISP_PARTIAL
 PUBLIC BOOLEAN display_partial_flag = TRUE; /* Display document during download */
@@ -440,6 +481,12 @@ PRIVATE HTList *LYStdinArgs = NULL;
 #define EXTENDED_STARTFILE_RECALL 1
 #endif
 
+#ifndef OPTNAME_ALLOW_DASHES
+/* if set, then will allow dashes and underscores to be used interchangeable
+   in commandline option's names - VH */
+#define OPTNAME_ALLOW_DASHES 1
+#endif
+
 #if EXTENDED_OPTION_LOGIC
 PRIVATE BOOLEAN no_options_further=FALSE; /* set to TRUE after '--' argument */
 #endif
@@ -480,6 +527,20 @@ PRIVATE void reset_break(void)
 }
 #endif /* __DJGPP__ */
 
+#if defined(WIN_EX)
+PUBLIC int is_windows_nt(void)
+{
+    DWORD version;
+
+    version = GetVersion();
+    if ((version & 0x80000000) == 0)
+    	return 1;
+    else
+    	return 0;
+}
+#endif
+
+
 #ifdef LY_FIND_LEAKS
 PRIVATE void free_lynx_globals NOARGS
 {
@@ -661,7 +722,18 @@ PRIVATE int argcmp ARGS2(
 	char*,		what)
 {
     if (str[0] == '-' && str[1] == '-' ) ++str;
+#if !OPTNAME_ALLOW_DASHES
     return strcmp(str,what);
+#else
+    ++str; ++what; /*skip leading dash in both strings*/
+    {
+	int l1 = strlen(str);
+	int l2 = strlen(what);
+	if (l1 != l2)
+	    return 1; /* this function simulates strcmp!*/
+	return !strn_dash_equ(str, what, l2);
+    }
+#endif
 }
 
 PRIVATE int argncmp ARGS2(
@@ -669,7 +741,12 @@ PRIVATE int argncmp ARGS2(
 	char*,		what)
 {
     if (str[0] == '-' && str[1] == '-' ) ++str;
+#if OPTNAME_ALLOW_DASHES
     return strncmp(str, what, strlen(what));
+#else
+    ++str; ++what; /*skip leading dash in both strings*/
+    return !strn_dash_equ(str, what, strlen(what));
+#endif
 }
 
 /*
@@ -704,11 +781,35 @@ PUBLIC int main ARGS2(
 	{
 	    printf(gettext("No Winsock found, sorry."));
 	    sleep(5);
-	    return;
+	    return 1;
 	}
     }
+
+    /* 1998/09/03 (Thu) 22:02:32 */
+    InitializeCriticalSection(&critSec_DNS);
+    InitializeCriticalSection(&critSec_READ);
+
 #endif /* _WINDOWS */
 
+#if defined(__CYGWIN__) && defined(DOSPATH)
+    if (strcmp(ttyname(fileno(stdout)), "/dev/conout") != 0) {
+	printf("please \"$CYGWIN=notty\"\n");
+	exit(0);
+    }
+#endif
+
+#if defined(WIN_EX)
+    /* 1997/10/19 (Sun) 21:40:54 */
+    system_is_NT = is_windows_nt();
+
+    /* 1998/01/13 (Tue) 21:13:47 */
+    GetWindowsDirectory(filename, sizeof filename);
+    windows_drive[0] = filename[0];
+    windows_drive[1] = filename[1];
+    windows_drive[2] = '\0';
+#endif
+
+
 #ifdef __DJGPP__
     if (LY_get_ctrl_break() == 0) {
 	LY_set_ctrl_break(TRUE);
@@ -740,6 +841,12 @@ PUBLIC int main ARGS2(
      *	Set up the argument list.
      */
     pgm = argv[0];
+    cp = NULL;
+#ifdef DOSPATH
+    if ((cp = strrchr(pgm, '\\')) != NULL) {
+	pgm = cp + 1;
+    } else if (cp == NULL)
+#endif
     if ((cp = strrchr(pgm, '/')) != NULL) {
 	pgm = cp + 1;
     }
@@ -751,6 +858,11 @@ PUBLIC int main ARGS2(
 	if (argncmp(argv[i], "-help") == 0) {
 	    parse_arg(&argv[i], &i);
 	}
+#ifdef SH_EX
+	if (strncmp(argv[i], "-show_cfg", 9) == 0) {
+	    show_cfg = TRUE;
+	}
+#endif
     }
 
 #ifdef LY_FIND_LEAKS
@@ -849,9 +961,9 @@ PUBLIC int main ARGS2(
 #endif
 #if defined (DOSPATH) || defined (__EMX__)
     else if ((cp = getenv("TEMP")) != NULL)
-	StrAllocCopy(lynx_temp_space, HTDOS_name(cp));
+	StrAllocCopy(lynx_temp_space, HTSYS_name(cp));
     else if ((cp = getenv("TMP")) != NULL)
-	StrAllocCopy(lynx_temp_space, HTDOS_name(cp));
+	StrAllocCopy(lynx_temp_space, HTSYS_name(cp));
 #endif
     else
 #ifdef TEMP_SPACE
@@ -1190,7 +1302,14 @@ PUBLIC int main ARGS2(
     /*
      *	Set up the TRACE log path, and logging if appropriate. - FM
      */
-    LYAddPathToHome(LYTraceLogPath = malloc(LY_MAXPATH), LY_MAXPATH, "Lynx.trace");
+#ifdef FNAMES_8_3
+    LYAddPathToHome(LYTraceLogPath =
+		malloc(LY_MAXPATH), LY_MAXPATH, "LY-TRACE.LOG");
+#else
+    LYAddPathToHome(LYTraceLogPath =
+		malloc(LY_MAXPATH), LY_MAXPATH, "Lynx.trace");
+#endif
+
     LYOpenTraceLog();
 
     /*
@@ -1346,7 +1465,7 @@ PUBLIC int main ARGS2(
     }
 #endif /* USE_HASH */
 
-#if USE_COLOR_TABLE
+#ifdef USE_COLOR_TABLE
     /*
      *	Set up default foreground and background colors.
      */
@@ -1541,6 +1660,13 @@ PUBLIC int main ARGS2(
 #endif /* SYSLOG_REQUESTED_URLS */
 #endif /* !VMS */
 
+#ifdef SH_EX
+    if (show_cfg) {
+	cleanup();
+	exit(0);
+    }
+#endif
+
 #ifdef USE_SLANG
     if (LYShowColor >= SHOW_COLOR_ON &&
 	!(Lynx_Color_Flags & SL_LYNX_USE_COLOR)) {
@@ -1773,7 +1899,7 @@ PUBLIC int main ARGS2(
 	ftp_ok = !no_inside_ftp && !no_outside_ftp && ftp_ok;
 	rlogin_ok = !no_inside_rlogin && !no_outside_rlogin && rlogin_ok;
 #else
-	CTRACE(tfp,"LYMain.c: User in Local domain\n");
+	CTRACE(tfp,"LYMain: User in Local domain\n");
 	telnet_ok = !no_inside_telnet && telnet_ok;
 #ifndef DISABLE_NEWS
 	news_ok = !no_inside_news && news_ok;
@@ -1782,7 +1908,7 @@ PUBLIC int main ARGS2(
 	rlogin_ok = !no_inside_rlogin && rlogin_ok;
 #endif /* !HAVE_UTMP || VMS */
     } else {
-	CTRACE(tfp,"LYMain.c: User in REMOTE domain\n");
+	CTRACE(tfp,"LYMain: User in REMOTE domain\n");
 	telnet_ok = !no_outside_telnet && telnet_ok;
 #ifndef DISABLE_NEWS
 	news_ok = !no_outside_news && news_ok;
@@ -1832,7 +1958,7 @@ PUBLIC int main ARGS2(
 	if (!nolist &&
 	    !crawl &&		/* For -crawl it has already been done! */
 	    (keypad_mode == LINKS_ARE_NUMBERED ||
-	     keypad_mode == LINKS_AND_FORM_FIELDS_ARE_NUMBERED))
+	     keypad_mode == LINKS_AND_FIELDS_ARE_NUMBERED))
 	    printlist(stdout,FALSE);
 #ifdef EXP_PERSISTENT_COOKIES
 	/*
@@ -1856,7 +1982,13 @@ PUBLIC int main ARGS2(
 	cache_tag_styles();
 #endif
 
-	ena_csi((LYlowest_eightbit[current_char_set] > 155));
+#ifndef NO_DUMP_WITH_BACKSPACES
+	if (with_backspaces) {
+	    /* we should warn about this somehow (nop for now) -VH */
+	    with_backspaces = FALSE;
+	}
+#endif
+	ena_csi((BOOLEAN)(LYlowest_eightbit[current_char_set] > 155));
 	LYOpenCloset();
 	status = mainloop();
 	LYCloseCloset();
@@ -2671,6 +2803,22 @@ static int version_fun ARGS1(
 	  "See http://lynx.browser.org/ and the online help for more information.\n\n"
 	  ));
 
+#ifdef SH_EX
+#ifdef __CYGWIN__
+    printf("Compiled by CYGWIN (%s %s).\n", __DATE__, __TIME__);
+#else
+#ifdef __BORLANDC__
+    printf("Compiled by Borland C++ (%s %s).\n", __DATE__, __TIME__);
+#else
+#ifdef _MSC_VER
+    printf("Compiled by Microsoft Visual C++ (%s %s).\n", __DATE__, __TIME__);
+#else
+    printf("Compiled at (%s %s).\n", __DATE__, __TIME__);
+#endif /* _MSC_VER */
+#endif /* __BORLANDC__ */
+#endif /* __CYGWIN__ */
+#endif /* SH_EX */
+
     SetOutputMode( O_BINARY );
 
     exit(0);
@@ -2744,6 +2892,12 @@ static Parse_Args_Type Arg_Table [] =
       "case",		SET_ARG,		&case_sensitive,
       "enable case sensitive user searching"
    ),
+#ifdef SH_EX
+   PARSE_SET(
+      "center",		TOGGLE_ARG,	&no_table_center,
+      "Toggle center alignment in HTML TABLE"
+   ),
+#endif
    PARSE_STR(
       "cfg",		IGNORE_ARG|NEED_NEXT_ARG,	0,
       "=FILENAME\nspecifies a lynx.cfg file other than the default"
@@ -2785,10 +2939,20 @@ with -dump, format output as with -traversal, but to stdout"
       "incremental display stages with MessageSecs delay"
    ),
 #endif
+#ifdef SH_EX
+   PARSE_SET(
+      "delay",		NEED_INT_ARG,		&debug_delay,
+      "=NNN\nset the NNN msec delay at statusline message"
+   ),
+#endif
    PARSE_FUN(
       "display",	NEED_FUNCTION_ARG,	display_fun,
       "=DISPLAY\nset the display variable for X exec'ed programs"
    ),
+   PARSE_SET(
+      "dont_wrap_pre",	SET_ARG,		&dont_wrap_pre,
+      "inhibit wrapping of text in <pre> when -dump'ing and -crawl'ing"
+   ),
    PARSE_FUN(
       "dump",		FUNCTION_ARG,		dump_output_fun,
       "dump the first file to stdout and exit"
@@ -2844,6 +3008,12 @@ keys (may be incompatible with some curses packages)"
       "from",		TOGGLE_ARG,		&LYNoFromHeader,
       "toggle transmissions of From headers"
    ),
+#ifndef NO_EMPTY_HREFLESS_A
+   PARSE_SET(
+      "force_empty_hrefless_a",	SET_ARG,	&force_empty_hrefless_a,
+      "force HREF-less 'A' elements to be empy (close them as soon as they are seen)"
+   ),
+#endif
 #if !defined(NO_OPTION_FORMS) && !defined(NO_OPTION_MENU)
    PARSE_SET(
       "forms_options",	TOGGLE_ARG,		&LYUseFormsOptions,
@@ -2890,6 +3060,12 @@ keys (may be incompatible with some curses packages)"
       "ismap",		TOGGLE_ARG,		&LYNoISMAPifUSEMAP,
       "toggles inclusion of ISMAP links when client-side\nMAPs are present"
    ),
+#ifdef EXP_JUSTIFY_ELTS
+   PARSE_SET(
+      "justify",	SET_ARG,		&ok_justify,
+      "do justification of text"
+   ),
+#endif
    PARSE_INT(
       "link",		NEED_INT_ARG,		&ccount,
       "=NUMBER\nstarting count for lnk#.dat files produced by -crawl"
@@ -2913,6 +3089,8 @@ keys (may be incompatible with some curses packages)"
       "toggles minimal versus valid comment parsing"
    ),
 #ifndef DISABLE_NEWS
+#endif
+#ifndef DISABLE_NEWS
    PARSE_FUN(
       "newschunksize",	NEED_FUNCTION_ARG,	newschunksize_fun,
       "=NUMBER\nnumber of articles in chunked news listings"
@@ -2922,6 +3100,12 @@ keys (may be incompatible with some curses packages)"
       "=NUMBER\nmaximum news articles in listings before chunking"
    ),
 #endif
+#ifdef SH_EX
+   PARSE_SET(
+      "noblat",		TOGGLE_ARG,		&mail_is_blat,
+      "select mail tool (`BLAT' ==> `sendmail')"
+   ),
+#endif
    PARSE_FUN(
       "nobrowse",	FUNCTION_ARG,		nobrowse_fun,
       "disable directory browsing"
@@ -3026,7 +3210,8 @@ to visualize how lynx behaves with invalid HTML"
    ),
    PARSE_SET(
       "raw",		UNSET_ARG,		&LYUseDefaultRawMode,
-      "toggles default setting of 8-bit character translations\nor CJK mode for the startup character set"
+      "toggles default setting of 8-bit character translations\n\
+or CJK mode for the startup character set"
    ),
    PARSE_SET(
       "realm",		SET_ARG,		&check_realm,
@@ -3054,6 +3239,12 @@ with the PREV_DOC command or from the History List"
       "selective",	FUNCTION_ARG,		selective_fun,
       "require .www_browsable files to browse directories"
    ),
+#ifdef SH_EX
+   PARSE_SET(
+      "show_cfg",	SET_ARG,		&show_cfg,
+      "Show `LYNX.CFG' setting"
+   ),
+#endif
    PARSE_SET(
       "show_cursor",	TOGGLE_ARG,		&LYUseDefShoCur,
       "toggles hiding of the cursor in the lower right corner"
@@ -3099,6 +3290,12 @@ treated '>' as a co-terminator for double-quotes and tags"
       "tlog",		IGNORE_ARG,		0,
       "toggles use of a Lynx Trace Log for the current session"
    ),
+#ifdef _WINDOWS
+   PARSE_SET(
+      "timeout",	SET_ARG,		&lynx_timeout,
+      "set TCP/IP timeout"
+   ),
+#endif
    PARSE_SET(
       "trace",		IGNORE_ARG,		0,
       "turns on Lynx trace mode"
@@ -3141,6 +3338,12 @@ treated '>' as a co-terminator for double-quotes and tags"
       "width",		NEED_FUNCTION_ARG,	width_fun,
       "=NUMBER\nscreen width for formatting of dumps (default is 80)"
    ),
+#ifndef NO_DUMP_WITH_BACKSPACES
+   PARSE_SET(
+      "with_backspaces",	SET_ARG,		&with_backspaces,
+      "emit backspaces in output if -dumping or -crawling (like 'man' does)"
+   ),
+#endif
    {NULL, 0, 0, NULL}
 };
 
@@ -3277,6 +3480,9 @@ static int arg_eqs_parse ARGS3(
 		    return 0;
 		}
 	    } else {
+#if OPTNAME_ALLOW_DASHES
+		if (!(*a == '_' && *b == '-'))
+#endif
 		return 0;
 	    }
 	}
@@ -3317,6 +3523,18 @@ PRIVATE void parse_arg ARGS2(
 #endif
 	StrAllocCopy(startfile, arg_name);
 	LYTrimStartfile(startfile);
+#ifdef _WINDOWS	/* 1998/01/14 (Wed) 20:11:17 */
+	HTUnEscape(startfile);
+	{
+	    char *p;
+
+	    p = startfile;
+	    while (*p++) {
+		if (*p == '|')
+		    *p = ':';
+	    }
+	}
+#endif
 	return;
     }
 #if EXTENDED_OPTION_LOGIC
@@ -3487,6 +3705,19 @@ Do NOT mail the core file if one was generated.\r\n");
 	if (sig != 0) {
 	    fprintf(stderr, "\r\n\
 Lynx now exiting with signal:  %d\r\n\r\n", sig);
+#ifdef WIN_EX	/* 1998/08/09 (Sun) 09:58:25 */
+	{
+	    char *msg;
+	    switch (sig) {
+	    case SIGABRT:	msg = "SIGABRT";	break;
+	    case SIGFPE:	msg = "SIGFPE";		break;
+	    case SIGILL:	msg = "SIGILL";		break;
+	    case SIGSEGV:	msg = "SIGSEGV";	break;
+	    default:		msg = "Not-def";	break;
+	    }
+	    fprintf(stderr, "signal code = %s\n", msg);
+	}
+#endif
 	}
 
 	/*
diff --git a/src/LYMainLoop.c b/src/LYMainLoop.c
index 47ac1d67..3d7a737f 100644
--- a/src/LYMainLoop.c
+++ b/src/LYMainLoop.c
@@ -39,6 +39,107 @@
 #include <LYMainLoop.h>
 #include <LYPrettySrc.h>
 
+#if defined(CJK_EX)	/* 1999/05/25 (Tue) 11:10:45 */
+#include <HTCJK.h>
+extern HTCJKlang HTCJK;
+extern char *string_short(char *str, int cut_pos);	/* LYExtern.c */
+
+#define CHARSET_TRANS 14	/* "Transparent" in LYCharSets.c */
+
+PRIVATE char *str_sjis(char *to, char *from)
+{
+    if (!LYRawMode) {
+	strcpy(to, from);
+    } else if (last_kcode == EUC) {
+	EUC_TO_SJIS(from, to);
+    } else if (last_kcode == SJIS) {
+	strcpy(to, from);
+    } else {
+	TO_SJIS(from, to);
+    }
+    return to;
+}
+
+PUBLIC char *str_kcode(HTkcode code)
+{
+    char *p;
+    static char buff[8];
+
+    if (current_char_set == CHARSET_TRANS) {
+	    p = "THRU";
+    } else {
+	if (!LYRawMode) {
+	    p = "RAW";
+	} else {
+	    switch (code) {
+	    case NOKANJI:
+		p = "AUTO";
+		break;
+
+	    case EUC:
+		p = "EUC+";
+		break;
+
+	    case SJIS:
+		p = "SJIS";
+		break;
+
+	    case JIS:
+		p = " JIS";
+		break;
+
+	    default:
+		p = " ???";
+		break;
+	    }
+	}
+    }
+
+#ifdef SH_EX	/* 1999/05/25 (Tue) 11:12:05 */
+    if (no_table_center) {
+	buff[0] = '!';
+	strcpy(buff + 1, p);
+    } else {
+	strcpy(buff, p);
+    }
+#else
+    strcpy(buff, p);
+#endif
+
+    return buff;
+}
+
+
+PUBLIC void set_ws_title(char * str)
+{
+#ifdef WIN_EX
+    SetConsoleTitle(str);
+#endif
+}
+
+/* 1998/10/30 (Fri) 10:06:47 */
+
+#define NOT_EQU	1
+
+PRIVATE int str_n_cmp(const char *p, const char *q, int n)
+{
+    if (n == 0)
+	return 0;
+    
+    if (p == NULL)
+	return NOT_EQU;
+
+    if (q == NULL)
+	return NOT_EQU;
+
+    return strncmp(p, q, n);
+}
+
+#undef strncmp
+#define	strncmp(p, q, r)	str_n_cmp(p, q, r)
+
+#endif	/* SH_EX */
+
 #ifdef USE_EXTERNALS
 #include <LYExtern.h>
 #endif
@@ -239,9 +340,9 @@ PRIVATE int do_change_link ARGS1(
     int mouse_tmp = get_mouse_link();
     /* If yes, use it as the link */
     if (mouse_tmp != -1) {
-	if (curdoc.link >= 0 && curdoc.link < nlinks &&
-	    curdoc.link != mouse_tmp) {
-	highlight(OFF, curdoc.link, prev_target);
+	if (curdoc.link >= 0 && curdoc.link < nlinks
+	 && curdoc.link != mouse_tmp) {
+	    highlight(OFF, curdoc.link, prev_target);
 	}
 	if (mouse_tmp < 0 || mouse_tmp >= nlinks) {
 	    char *msgtmp = NULL;
@@ -268,6 +369,15 @@ PRIVATE int do_change_link ARGS1(
 
 int mainloop NOARGS
 {
+#if defined(SH_EX)	/* 1997/10/08 (Wed) 14:52:06 */
+#undef	STRING_MAX
+#define	STRING_MAX	4096
+    char title_buff[STRING_MAX];
+    char temp_buff[STRING_MAX];
+
+#define	BUFF_MAX	1024
+    char sjis_buff[BUFF_MAX];
+#endif
     int c = 0, real_c = 0, old_c = 0;
     int cmd = LYK_DO_NOTHING, real_cmd = LYK_DO_NOTHING;
     int getresult;
@@ -1155,22 +1265,22 @@ try_again:
 	     *  WINDOW structures are already filled based on the old size.
 	     *  So we notify the ncurses library directly here. - kw
 	     */
-#ifdef NCURSES_VERSION		/* FIXME: check for specific version? */
+#if defined(NCURSES_VERSION) && !defined(PDCURSES) /* FIXME: check for specific version? */
 	    resizeterm(LYlines, LYcols);
 #else
-		stop_curses();
-		start_curses();
-		clear();
+	    stop_curses();
+	    start_curses();
+	    clear();
 #endif
-		refresh_screen = TRUE; /* to force a redraw */
-		if (HTMainText)	/* to REALLY force it... - kw */
-		    HText_setStale(HTMainText);
-		recent_sizechange = FALSE;
-		if (user_mode == NOVICE_MODE) {
-		    display_lines = LYlines-4;
-		} else {
-		    display_lines = LYlines-2;
-		}
+	    refresh_screen = TRUE; /* to force a redraw */
+	    if (HTMainText)	/* to REALLY force it... - kw */
+		HText_setStale(HTMainText);
+	    recent_sizechange = FALSE;
+	    if (user_mode == NOVICE_MODE) {
+		display_lines = LYlines-4;
+	    } else {
+		display_lines = LYlines-2;
+	    }
 	}
 
 	if (www_search_result != -1) {
@@ -1446,6 +1556,74 @@ try_again:
 
 	}
 
+#if defined(SH_EX)	/* 1997/10/08 (Wed) 14:52:06 */
+	if (nlinks > 0) {
+	    char *p = "LYNX (unknown link type)";
+
+	    /* Show the URL & kanji code . */
+	    if (strlen(links[curdoc.link].lname) == 0) {
+
+	       if (links[curdoc.link].type == WWW_FORM_LINK_TYPE)
+
+		    switch(links[curdoc.link].form->type) {
+		    case F_TEXT_SUBMIT_TYPE:
+		    case F_SUBMIT_TYPE:
+		    case F_IMAGE_SUBMIT_TYPE:
+			p = "[SUBMIT]";
+			break;
+		    case F_PASSWORD_TYPE:
+			p = "Password";
+			break;
+		    case F_OPTION_LIST_TYPE:
+			p = "Option list";
+			break;
+		    case F_CHECKBOX_TYPE:
+			p = "Check box";
+			break;
+		    case F_RADIO_TYPE:
+			p = "[Radio]";
+			break;
+		    case F_RESET_TYPE:
+			p = "[Reset]";
+			break;
+		    case F_TEXT_TYPE:
+			p = "Text input";
+			break;
+		    case F_TEXTAREA_TYPE:
+			p = "Text input lines";
+			break;
+		    default:
+			break;
+		    }
+		    set_ws_title(p);
+	    } else {
+		if (user_mode == ADVANCED_MODE) {
+		    p = curdoc.title;
+		} else {
+		    p = links[curdoc.link].lname;
+		}
+
+		if (strlen(p) < 500) {
+		    strcpy(temp_buff, p);
+		    if (strchr(temp_buff, '%')) {
+			HTUnEscape(temp_buff);
+		    }
+		    str_sjis(sjis_buff, temp_buff);
+		    SetConsoleTitle(string_short(sjis_buff, 10));
+		}
+	    }
+	} else {
+	    if (strlen(curdoc.address) < 1000) {
+		if (user_mode == ADVANCED_MODE) {
+		    str_sjis(temp_buff, curdoc.title);
+		} else {
+		    strcpy(temp_buff, curdoc.address);
+		}
+		set_ws_title(HTUnEscape(temp_buff));
+	    }
+	}
+#endif /* SH_EX */
+
 	/*
 	 *  Report unread or new mail, if appropriate.
 	 */
@@ -1749,6 +1927,11 @@ new_keyboard_input:
 	    } /* right link not NULL or link to another site*/
 	} /* traversal */
 
+#ifdef WIN_EX
+	if (c == DO_NOTHING)
+	    cmd = LYK_DO_NOTHING;
+	else 
+#endif
 	cmd = LKC_TO_LAC(keymap,c);  /* adds 1 to map EOF to 0 */
 
 #if defined(DIRED_SUPPORT) && defined(OK_OVERRIDE)
@@ -1778,9 +1961,9 @@ new_cmd:  /*
 		
 		show_main_statusline(links[curdoc.link]);
 	    else if (more)
-		_statusline(MOREHELP);
+		HTInfoMsg(MOREHELP);
 	    else
-		_statusline(HELP);
+		HTInfoMsg(HELP);
 	    show_help = TRUE;
 
 	    if (TRACE) {
@@ -2071,6 +2254,18 @@ new_cmd:  /*
 	    LYforce_no_cache = TRUE;
 	    break;
 
+#ifdef SH_EX		/* 1999/01/01 (Fri) */
+	case LYK_CHG_CENTER:	/* ^Q */
+
+	    if (no_table_center) {
+		no_table_center = FALSE;
+		HTInfoMsg("TABLE center enable.");
+	    } else {
+		no_table_center = TRUE;
+		HTInfoMsg("TABLE center disable.");
+	    }
+	    /* goto RELOAD */
+#endif
 	case LYK_RELOAD:  /* control-R to reload and refresh */
 	    /*
 	     *	Check if this is a reply from a POST, and if so,
@@ -2448,6 +2643,43 @@ new_cmd:  /*
 	    }
 	    break;
 
+#if defined(SH_EX) && defined(DOSPATH)	/*1997/12/22 (Mon) 09:28:56 */
+	case LYK_TO_CLIPBOARD:	/* ^S */
+	    {
+		if (put_clip(links[curdoc.link].lname) == 0) {
+		    HTInfoMsg("URL to Clip Borad.");
+		} else {
+		    HTInfoMsg("Current URL is empty.");
+		}
+	    }
+	    break;
+#endif
+
+#if defined(CJK_EX) && defined(SH_EX)	/* 1999/02/25 (Thu) 15:29:05 */
+	case LYK_CHG_KCODE:	/* ^L */
+	    if (LYRawMode && (HTCJK == JAPANESE)) {
+		switch(last_kcode) {
+		case NOKANJI:
+		    last_kcode = SJIS;
+		    break;
+		case SJIS:
+		    last_kcode = EUC;
+		    break;
+		case EUC:
+		    last_kcode = NOKANJI;
+		    break;
+		default:
+		    break;
+		}
+	    }
+	    move(0, 0);
+	    lynx_start_title_color ();
+	    addstr(str_kcode(last_kcode));
+	    lynx_stop_title_color ();
+
+	    break;
+#endif
+
 	case LYK_REFRESH:
 	   refresh_screen = TRUE;
 	   lynx_force_repaint();
@@ -3045,7 +3277,7 @@ new_cmd:  /*
 		}
 	    } /* fall through to LYK_ACTIVATE */
 
-	case LYK_ACTIVATE:			/* follow a link */
+	case LYK_ACTIVATE:	/* follow a link */
 	case LYK_SUBMIT:	/* follow a link, submit TEXT_SUBMIT input */
 	    if (do_change_link(prev_target) == -1) {
 		LYforce_no_cache = FALSE;
@@ -3739,6 +3971,37 @@ new_cmd:  /*
 	    }
 
 check_recall:
+#ifdef WIN_EX	/* 1998/10/11 (Sun) 10:41:05 */
+	    {
+		int len;
+		char last_2, last_1, last;
+
+		len = strlen(user_input_buffer);
+
+		if (len >= 3) {
+
+		    last_2 = user_input_buffer[len - 3];
+		    last_1 = user_input_buffer[len - 2];
+		    last = user_input_buffer[len - 1];
+
+		    if (last_2 == '/' && isalpha(last_1) && last == ':')
+			LYAddHtmlSep0(user_input_buffer);
+
+		} else if (len == 2) {
+		    if (user_input_buffer[1] == ':') {
+			if (isalpha(user_input_buffer[0]))
+			    LYAddHtmlSep0(user_input_buffer);
+			else {
+			    HTUserMsg2(WWW_ILLEGAL_URL_MESSAGE,
+			    			user_input_buffer);
+			    strcpy(user_input_buffer, temp);
+			    FREE(temp);
+			    break;
+			}
+		    }
+		}
+	    }
+#endif
 	    /*
 	     *	Get rid of leading spaces (and any other spaces).
 	     */
@@ -4042,6 +4305,11 @@ check_goto_URL:
 			}
 
 		} else {
+#ifdef CJK_EX	/* 1997/12/13 (Sat) 15:20:18 */
+		    if (HTCJK == JAPANESE) {
+			last_kcode = NOKANJI;	/* AUTO */
+		    }
+#endif
 		    StrAllocCopy(newdoc.address, indexfile);
 		    StrAllocCopy(newdoc.title, gettext("System Index")); /* name it */
 		    FREE(newdoc.post_data);
@@ -4596,6 +4864,15 @@ if (!LYUseFormsOptions) {
 	    }
 
 	    /*
+	     *  If we're in a forms TEXTAREA, invoke the editor on it.
+	     */
+	    if (links[curdoc.link].type       == WWW_FORM_LINK_TYPE &&
+		links[curdoc.link].form->type == F_TEXTAREA_TYPE)   {
+	       cmd = LYK_EDIT_TEXTAREA;
+	       goto new_cmd;
+	    }
+
+	    /*
 	     *  If we're in a forms TEXT type, tell user the request
 	     *  is bogus (though in reality, without this trap, if the
 	     *  document with the TEXT field is local, the editor *would*
@@ -5389,6 +5666,11 @@ check_add_bookmark_to_self:
 			refresh_screen = TRUE;
 		    break;
 		}
+#if defined(CJK_EX)	/* 1997/12/13 (Sat) 15:20:18 */
+		if (HTCJK == JAPANESE) {
+		    last_kcode = NOKANJI;	/* AUTO */
+		}
+#endif
 		LYforce_no_cache = TRUE;  /*force the document to be reloaded*/
 		StrAllocCopy(newdoc.title, BOOKMARK_TITLE);
 		StrAllocCopy(newdoc.bookmark, BookmarkPage);
@@ -5409,11 +5691,15 @@ check_add_bookmark_to_self:
 	    }
 	    break;
 
-	case LYK_SHELL:  /* shell escape */
+	case LYK_SHELL:  /* (!) shell escape */
 	    if (!no_shell) {
 		stop_curses();
 		printf("%s\r\n", SPAWNING_MSG);
+#if defined(__CYGWIN_) && defined(DOSPATH)
+		Cygwin_Shell();
+#else
 		LYSystem(LYSysShell());
+#endif
 		start_curses();
 		refresh_screen = TRUE;	/* for an HText_pageDisplay() */
 	    } else {
@@ -6409,9 +6695,9 @@ PRIVATE void show_main_statusline ARGS1(
 	_statusline(buf);
     } else if (more) {
 	if (user_mode == NOVICE_MODE)
-		_statusline(MORE);
+	    _statusline(MORE);
 	else
-		_statusline(MOREHELP);
+	    _statusline(MOREHELP);
     } else {
 	_statusline(HELP);
     }
diff --git a/src/LYNews.c b/src/LYNews.c
index 1b27f644..538f1287 100644
--- a/src/LYNews.c
+++ b/src/LYNews.c
@@ -25,6 +25,10 @@
 BOOLEAN term_message = FALSE;
 PRIVATE void terminate_message  PARAMS((int sig));
 
+#ifdef CJK_EX	/* 1998/05/15 (Fri) 09:10:38 */
+extern HTCJKlang HTCJK;
+#endif
+
 PRIVATE BOOLEAN message_has_content ARGS1(
     CONST char *,		filename)
 {
@@ -213,6 +217,23 @@ PUBLIC char *LYNewsPost ARGS2(
 	 *  Add the default subject.
 	 */
 	kp = LYSkipCBlanks(kp);
+#ifdef CJK_EX	/* 1998/05/15 (Fri) 09:10:38 */
+	if (HTCJK == JAPANESE) {
+	    CJKinput[0] = '\0';
+	    switch(kanji_code) {
+	    case EUC:
+		TO_EUC(kp, CJKinput);
+		kp = CJKinput;
+		break;
+	    case SJIS:
+		TO_SJIS(kp, CJKinput);
+		kp = CJKinput;
+		break;
+	    default:
+		break;
+	    }
+	}
+#endif
 	if (strncasecomp(kp, "Re:", 3)) {
 	    strcat(user_input, "Re: ");
 	}
@@ -238,8 +259,9 @@ PUBLIC char *LYNewsPost ARGS2(
     } else if (((org = getenv("NEWS_ORGANIZATION")) != NULL) &&
 	       *org != '\0') {
 	StrAllocCat(cp, org);
-#ifndef VMS
-    } else if ((fp = fopen("/etc/organization", "r")) != NULL) {
+    }
+#ifdef UNIX
+    else if ((fp = fopen("/etc/organization", "r")) != NULL) {
 	char *buffer = 0;
 	if (LYSafeGets(&buffer, fp) != NULL) {
 	    if ((org = strchr(buffer, '\n')) != NULL) {
@@ -251,8 +273,31 @@ PUBLIC char *LYNewsPost ARGS2(
 	}
 	FREE(buffer);
 	fclose(fp);
-#endif /* !VMS */
     }
+#else
+#ifdef _WINDOWS	/* 1998/05/14 (Thu) 17:47:01 */
+    else {
+	char *p, fname[256];
+
+	strcpy(fname, LynxSigFile);
+	p = strrchr(fname, '/');
+	if (p) {
+	    strcpy(p + 1, "LYNX_ETC.TXT");
+	    if ((fp = fopen(fname, TXT_R)) != NULL) {
+		if (fgets(user_input, sizeof(user_input), fp) != NULL) {
+		    if ((org = strchr(user_input, '\n')) != NULL) {
+			*org = '\0';
+		    }
+		    if (user_input[0] != '\0') {
+			StrAllocCat(cp, user_input);
+		    }
+		}
+		fclose(fp);
+	    }
+	}
+    }
+#endif /* _WINDOWS */
+#endif /* !UNIX */
     LYstrncpy(user_input, cp, (sizeof(user_input) - 16));
     FREE(cp);
     addstr(gettext("\n\n Please provide or edit the Organization: header\n"));
@@ -375,7 +420,7 @@ PUBLIC char *LYNewsPost ARGS2(
 	clear();  /* clear the screen */
 	goto cleanup;
     }
-    if ((LynxSigFile != NULL) && (fp = fopen(LynxSigFile, "r")) != NULL) {
+    if ((LynxSigFile != NULL) && (fp = fopen(LynxSigFile, TXT_R)) != NULL) {
 	char *msg = NULL;
 	HTSprintf0(&msg, APPEND_SIG_FILE, LynxSigFile);
 
@@ -406,7 +451,7 @@ PUBLIC char *LYNewsPost ARGS2(
      *  use the temp file as is. - FM
      */
     if (CJKfile[0] != '\0') {
-	if ((fd = fopen(my_tempfile, "r")) != NULL) {
+	if ((fd = fopen(my_tempfile, TXT_R)) != NULL) {
 	    char *buffer = NULL;
 	    while (LYSafeGets(&buffer, fd) != NULL) {
 		TO_JIS((unsigned char *)buffer,
diff --git a/src/LYOptions.c b/src/LYOptions.c
index 7bc6e1d0..3028c965 100644
--- a/src/LYOptions.c
+++ b/src/LYOptions.c
@@ -1683,15 +1683,15 @@ draw_options:
 
 	    case '>':	/* Save current options to RC file. */
 		if (!no_option_save) {
-		    _statusline(SAVING_OPTIONS);
+		    HTInfoMsg(SAVING_OPTIONS);
 		    if (save_rc()) {
 			LYrcShowColor = LYChosenShowColor;
-			_statusline(OPTIONS_SAVED);
+			HTInfoMsg(OPTIONS_SAVED);
 		    } else {
 			HTAlert(OPTIONS_NOT_SAVED);
 		    }
 		} else {
-		    _statusline(R_TO_RETURN_TO_LYNX);
+		    HTInfoMsg(R_TO_RETURN_TO_LYNX);
 		    /*
 		     *	Change response so that we don't exit
 		     *	the options menu.
@@ -1706,9 +1706,9 @@ draw_options:
 
 	    default:
 		if (!no_option_save) {
-		    _statusline(SAVE_OR_R_TO_RETURN_TO_LYNX);
+		    HTInfoMsg(SAVE_OR_R_TO_RETURN_TO_LYNX);
 		} else {
-		    _statusline(R_TO_RETURN_TO_LYNX);
+		    HTInfoMsg(R_TO_RETURN_TO_LYNX);
 		}
 	}  /* end switch */
     }  /* end while */
@@ -2023,13 +2023,13 @@ draw_bookmark_list:
 	 */
 	if (response == '>') {
 	    if (!no_option_save) {
-		_statusline(SAVING_OPTIONS);
+		HTInfoMsg(SAVING_OPTIONS);
 		if (save_rc())
-		    _statusline(OPTIONS_SAVED);
+		    HTInfoMsg(OPTIONS_SAVED);
 		else
 		    HTAlert(OPTIONS_NOT_SAVED);
 	    } else {
-		_statusline(R_TO_RETURN_TO_LYNX);
+		HTInfoMsg(R_TO_RETURN_TO_LYNX);
 		/*
 		 *  Change response so that we don't exit
 		 *  the options menu.
@@ -2372,7 +2372,7 @@ PUBLIC int popup_choice ARGS7(
 		lx = 1;
 	}
     }
-	
+
     /*
      *	Set up the overall window, including the boxing characters ('*'),
      *	if it all fits.  Otherwise, set up the widest window possible. - FM
@@ -2393,7 +2393,7 @@ PUBLIC int popup_choice ARGS7(
 #ifdef NCURSES
     LYsubwindow(form_window);
 #endif
-#if defined(HAVE_GETBKGD) /* not defined in ncurses 1.8.7 */
+#if defined(HAVE_GETBKGD) && !defined(PDCURSES)/* not defined in ncurses 1.8.7 */
     wbkgd(form_window, getbkgd(stdscr));
     wbkgdset(form_window, getbkgd(stdscr));
 #endif
@@ -2525,9 +2525,17 @@ redraw:
 #else
 	wmove(form_window, ((i + 1) - window_offset), 2);
 	waddstr(form_window, Cnum);
+#if defined(WIN_EX)	/* 1997/10/18 (Sat) 00:10:51 */
+	wattron(form_window, A_REVERSE);
+#else
 	wstart_reverse(form_window);
+#endif
 	waddstr(form_window, Cptr[i]);
+#if defined(WIN_EX)	/* 1997/10/18 (Sat) 00:10:58 */
+	wattroff(form_window, A_REVERSE);
+#else
 	wstop_reverse(form_window);
+#endif
 	/*
 	 *  If LYShowCursor is ON, move the cursor to the left
 	 *  of the current choice, so that blind users, who are
@@ -3267,7 +3275,7 @@ static char * keypad_mode_string	= "keypad_mode";
 static OptValues keypad_mode_values[]	= {
 	{ NUMBERS_AS_ARROWS,  "Numbers act as arrows", "number_arrows" },
 	{ LINKS_ARE_NUMBERED, "Links are numbered",    "links_numbered" },
-	{ LINKS_AND_FORM_FIELDS_ARE_NUMBERED,
+	{ LINKS_AND_FIELDS_ARE_NUMBERED,
 			      "Links and form fields are numbered",
 			      "links_and_forms" },
 	{ 0, 0, 0 }};
@@ -3299,12 +3307,14 @@ static char * vi_keys_string		= "vi_keys";
 /*
  * Document Layout
  */
+#ifndef SH_EX	/* 1999/01/19 (Tue) */
 static char * DTD_recovery_string      = "DTD";
 static OptValues DTD_type_values[] = {
 	/* Old_DTD variable */
 	{ TRUE,		    "relaxed (TagSoup mode)",	 "tagsoup" },
 	{ FALSE,	    "strict (SortaSGML mode)",	 "sortasgml" },
 	{ 0, 0, 0 }};
+#endif
 static char * select_popups_string     = "select_popups";
 static char * images_string            = "images";
 static char * images_ignore_all_string  = "ignore";
@@ -3690,6 +3700,7 @@ PUBLIC int postoptions ARGS1(
 	    case_sensitive = code;
 	}
 
+#ifndef SH_EX	/* 1999/01/19 (Tue) */
 	/* HTML error tolerance: SELECT */
 	if (!strcmp(data[i].tag, DTD_recovery_string)
 	 && GetOptValues(DTD_type_values, data[i].value, &code)) {
@@ -3699,6 +3710,7 @@ PUBLIC int postoptions ARGS1(
 		need_reload = TRUE;
 	    }
 	}
+#endif
 
 	/* Select Popups: ON/OFF */
 	if (!strcmp(data[i].tag, select_popups_string)
@@ -3895,7 +3907,7 @@ PUBLIC int postoptions ARGS1(
 	/*
 	 * charset settings: the order is essential here.
 	 */
-       if (display_char_set_old != current_char_set) {
+	if (display_char_set_old != current_char_set) {
 		/*
 		 *  Set the LYUseDefaultRawMode value and character
 		 *  handling if LYRawMode was changed. - FM
@@ -3906,7 +3918,7 @@ PUBLIC int postoptions ARGS1(
 	if (assume_char_set_changed) {
 		LYRawMode = (UCLYhndl_for_unspec == current_char_set);
 	    }
-       if (raw_mode_old != LYRawMode || assume_char_set_changed) {
+	if (raw_mode_old != LYRawMode || assume_char_set_changed) {
 		/*
 		 *  Set the raw 8-bit or CJK mode defaults and
 		 *  character set if changed. - FM
@@ -3924,10 +3936,10 @@ PUBLIC int postoptions ARGS1(
     FREE(newdoc->post_data);
     FREE(data);
     if (save_all) {
-	_statusline(SAVING_OPTIONS);
+	HTInfoMsg(SAVING_OPTIONS);
 	if (save_rc()) {
 	    LYrcShowColor = LYChosenShowColor;
-	    _statusline(OPTIONS_SAVED);
+	    HTInfoMsg(OPTIONS_SAVED);
 	} else {
 	    HTAlert(OPTIONS_NOT_SAVED);
 	}
@@ -3941,7 +3953,7 @@ PUBLIC int postoptions ARGS1(
     CTRACE(tfp, "                            need_reload = %s\n",
                     need_reload ? "TRUE" : "FALSE");
     CTRACE(tfp, "                            need_end_reload = %s\n",
-                    need_end_reload ? "TRUE" : "FALSE");
+		    need_end_reload ? "TRUE" : "FALSE");
 
     /*  Options menu was pushed before postoptions(), so pop-up. */
     LYpop(newdoc);
@@ -4344,11 +4356,13 @@ PRIVATE int gen_options ARGS1(
     PutOptValues(fp0, LYRawMode, bool_values);
     EndSelect(fp0);
 
+#ifndef SH_EX	/* 1999/01/19 (Tue) */
     /* HTML error recovery: SELECT */
     PutLabel(fp0, gettext("HTML error recovery"));
     BeginSelect(fp0, DTD_recovery_string);
     PutOptValues(fp0, Old_DTD, DTD_type_values);
     EndSelect(fp0);
+#endif
 
     /* Select Popups: ON/OFF */
     PutLabel(fp0, gettext("Popups for select fields"));
diff --git a/src/LYPrint.c b/src/LYPrint.c
index 489e88ae..9a80ede4 100644
--- a/src/LYPrint.c
+++ b/src/LYPrint.c
@@ -21,6 +21,10 @@
 #define CancelPrint(msg) HTInfoMsg(msg); goto done
 #define CannotPrint(msg) HTAlert(msg); goto done
 
+#ifdef WIN_EX
+static BOOLEAN mail_is_blat = FALSE;
+#endif
+
 /*
  *  printfile prints out the current file minus the links and targets
  *  to a variety of places
@@ -362,7 +366,7 @@ check_recall:
      */
     CTRACE(tfp, "LYPrint: filename is %s, action is `%c'\n", buffer, c);
 
-#if HAVE_POPEN
+#if HAVE_POPEN || !defined(__CYGWIN__)
     if (*buffer == '|') {
 	if (no_shell) {
 	    HTUserMsg(SPAWNING_DISABLED);
@@ -435,11 +439,11 @@ check_recall:
 	}
     }
 
-    print_wwwfile_to_fd(outfile_fp,0);
+    print_wwwfile_to_fd(outfile_fp, 0);	/* FILE */
     if (keypad_mode)
 	printlist(outfile_fp,FALSE);
 
-#if HAVE_POPEN
+#if HAVE_POPEN || !defined(__CYGWIN__)
     if (LYIsPipeCommand(buffer))
 	pclose(outfile_fp);
     else
@@ -476,7 +480,7 @@ PRIVATE void send_file_to_mail ARGS3(
     char hdrfile[LY_MAXPATH];
     char my_temp[LY_MAXPATH];
 #endif
-#ifdef DOSPATH
+#if defined(DOSPATH) || defined(WIN_EX)
     char my_temp[LY_MAXPATH];
 #endif
 
@@ -615,11 +619,12 @@ PRIVATE void send_file_to_mail ARGS3(
     } else if (!isPMDF) {
 	fprintf(outfile_fp, "X-URL: %s\n\n", newdoc->address);
     }
-    print_wwwfile_to_fd(outfile_fp, 0);
+    print_wwwfile_to_fd(outfile_fp, 0);	/* MAIL */
     if (keypad_mode)
 	printlist(outfile_fp, FALSE);
     LYCloseTempFP(outfile_fp);
 
+    buffer = NULL;
     if (isPMDF) {
 	/*
 	 * For PMDF, put the subject in the header file and close it.  - FM
@@ -651,6 +656,9 @@ PRIVATE void send_file_to_mail ARGS3(
     }
 
     stop_curses();
+#ifdef SH_EX
+    SetOutputMode(O_TEXT);
+#endif
     printf(MAILING_FILE);
     LYSystem(buffer);
     sleep(AlertSecs);
@@ -658,9 +666,9 @@ PRIVATE void send_file_to_mail ARGS3(
     if (isPMDF)
 	LYRemoveTemp(hdrfile);
     LYRemoveTemp(my_temp);
-#else /* Unix or DOS */
+#else /* !VMS (Unix or DOS) */
 
-#ifdef DOSPATH
+#if defined(DOSPATH) || defined(WIN_EX)
     outfile_fp = LYOpenTemp(my_temp, ".txt", "w");
 #else
     HTSprintf0(&buffer, "%s %s", system_mail, system_mail_flags);
@@ -758,25 +766,37 @@ PRIVATE void send_file_to_mail ARGS3(
 		"<!-- X-URL: %s -->\n<BASE HREF=\"%s\">\n\n",
 		newdoc->address, content_base);
     }
-    print_wwwfile_to_fd(outfile_fp, 0);
+    print_wwwfile_to_fd(outfile_fp, 0);	/* MAIL */
     if (keypad_mode)
 	printlist(outfile_fp, FALSE);
 
-#ifdef DOSPATH
-    HTSprintf0(&buffer, "%s -t \"%s\" -F %s", system_mail, user_response, my_temp);
+#if defined(WIN_EX)	/* 1998/08/17 (Mon) 16:29:49 */
+    buffer = NULL;
+    if (mail_is_blat)
+	HTSprintf0(&buffer, "%s %s -t \"%s\"",
+		system_mail, my_temp, user_response);
+    else
+	HTSprintf0(&buffer, "%s -t \"%s\" -F %s",
+			system_mail, user_response, my_temp);
     LYCloseTempFP(outfile_fp);	/* Close the tmpfile. */
     stop_curses();
+#ifdef SH_EX
+    SetOutputMode(O_TEXT);
+#endif
     printf("%s\n\n$ %s\n\n%s", gettext("Sending"), buffer, PLEASE_WAIT);
     LYSystem(buffer);
     sleep(MessageSecs);
     start_curses();
+#ifdef SH_EX
+    SetOutputMode( O_BINARY );
+#endif
     LYRemoveTemp(my_temp); /* Delete the tmpfile. */
 #else
     pclose(outfile_fp);
 #endif
 #endif /* VMS */
 
-done:
+done:	/* send_file_to_mail() */
     FREE(buffer);
     FREE(subject);
     return;
@@ -816,7 +836,7 @@ PRIVATE void send_file_to_printer ARGS4(
 		"<!-- X-URL: %s -->\n<BASE HREF=\"%s\">\n\n",
 		newdoc->address, content_base);
     }
-    print_wwwfile_to_fd(outfile_fp, 0);
+    print_wwwfile_to_fd(outfile_fp, 0);	/* PRINTER */
     if (keypad_mode)
 	printlist(outfile_fp, FALSE);
 
@@ -877,17 +897,34 @@ check_again:
 	if (!strncasecomp(my_file, "nl:", 3) ||
 	    !strncasecomp(my_file, "/nl/", 4))
 #else
+#if defined(DOSPATH)	/* 1997/10/15 (Wed) 16:41:30 */
+	if (!strcmp(my_file, "nul"))
+#else
 	if (!strcmp(my_file, "/dev/null"))
+#endif /* DOSPATH */
 #endif /* VMS */
 	{
 	    CancelPrint(PRINT_REQUEST_CANCELLED);
 	}
 	HTAddSugFilename(my_file);
     }
+#ifdef SH_EX	/* 1999/01/04 (Mon) 09:37:03 */
+    else {
+	my_file[0] = '\0';
+    }
 
     HTAddParam (&the_command, cur_printer->command, 1, my_temp);
+    if (my_file[0]) {
+	HTAddParam (&the_command, cur_printer->command, 2, my_file);
+	HTEndParam (&the_command, cur_printer->command, 3);
+    } else {
+	HTEndParam (&the_command, cur_printer->command, 2);
+    }
+#else
+    HTAddParam (&the_command, cur_printer->command, 1, my_temp);
     HTAddParam (&the_command, cur_printer->command, 2, my_file);
     HTEndParam (&the_command, cur_printer->command, 2);
+#endif
 
     /*
      * Move the cursor to the top of the screen so that output from system'd
@@ -897,6 +934,9 @@ check_again:
 
     stop_curses();
     CTRACE(tfp, "command: %s\n", the_command);
+#ifdef SH_EX
+    SetOutputMode( O_TEXT );
+#endif
     printf(PRINTING_FILE);
     /*
      * Set various bits of document information as environment variables, for
@@ -926,10 +966,15 @@ check_again:
 #ifndef VMS
     signal(SIGINT, cleanup_sig);
 #endif /* !VMS */
+#ifdef SH_EX
+    fprintf(stdout," Print job complite.\n");
+    fflush(stdout);
+    SetOutputMode( O_BINARY );
+#endif
     sleep(MessageSecs);
     start_curses();
 
-done:
+done:	/* send_file_to_printer() */
     return;
 }
 
@@ -955,6 +1000,10 @@ PRIVATE void send_file_to_screen ARGS3(
     outfile_fp = stdout;
 
     stop_curses();
+#ifdef SH_EX
+    SetOutputMode( O_TEXT );
+#endif
+
 #ifndef VMS
     signal(SIGINT, SIG_IGN);
 #endif /* !VMS */
@@ -972,7 +1021,7 @@ PRIVATE void send_file_to_screen ARGS3(
     }
     if (Lpansi)
 	printf("\033[5i");
-    print_wwwfile_to_fd(outfile_fp, 0);
+    print_wwwfile_to_fd(outfile_fp, 0);	/* SCREEN */
     if (keypad_mode)
 	printlist(outfile_fp, FALSE);
 
@@ -996,9 +1045,13 @@ PRIVATE void send_file_to_screen ARGS3(
 	HadVMSInterrupt = FALSE;
 #endif /* VMS */
     }
+#ifdef SH_EX
+    fprintf(stdout,"\n");
+    SetOutputMode( O_BINARY );
+#endif
     start_curses();
 
-done:
+done:	/* send_file_to_screen() */
     return;
 }
 
diff --git a/src/LYReadCFG.c b/src/LYReadCFG.c
index 5a535ffc..68c5450c 100644
--- a/src/LYReadCFG.c
+++ b/src/LYReadCFG.c
@@ -332,7 +332,7 @@ static CONST char *Color_Strings[16] =
     "white"
 };
 
-#ifdef DOSPATH
+#if defined(DOSPATH) || defined(WIN_EX)
 /*
  * PDCurses (and possibly some other implementations) use a non-ANSI set of
  * codes for colors.
@@ -898,7 +898,7 @@ static int viewer_fun ARGS1(
 }
 
 static int nonrest_sigwinch_fun ARGS1(
-	char *, 	value)
+	char *,		value)
 {
     if (!strncasecomp(value, "XWINDOWS", 8)) {
 	LYNonRestartingSIGWINCH = (LYgetXDisplay() != NULL);
@@ -957,8 +957,13 @@ static int parse_html_src_spec ARGS3(
     return 0;
 }
 
+#ifdef __STDC__
 #define defHTSRC_parse_fun(x) static int html_src_set_##x ARGS1( char*,str) \
  { parse_html_src_spec(HTL_##x,str,#x); return 0; }
+#else
+#define defHTSRC_parse_fun(x) static int html_src_set_/**/x ARGS1( char*,str) \
+ { parse_html_src_spec(HTL_/**/x,str,"x"); return 0; }
+#endif
 
 defHTSRC_parse_fun(comm)
 defHTSRC_parse_fun(tag)
@@ -1006,8 +1011,14 @@ static int read_htmlsrc_tagname_xform ARGS1( char*,str)
 }
 
 
+#ifdef __STDC__
 #define defHTSRC_option(x) \
     PARSE_FUN( "htmlsrc_" #x ,CONF_FUN, html_src_set_##x),
+#else
+#define defHTSRC_option(x) \
+    PARSE_FUN( "htmlsrc_" #x ,CONF_FUN, html_src_set_/**/x),
+    /*                    ^^ (cannot adapt to K&R) */
+#endif
 
 #endif
 
@@ -1066,7 +1077,13 @@ static Config_Type Config_Table [] =
      PARSE_ADD("external", CONF_ADD_ITEM, externals),
 #endif
      PARSE_ENV("finger_proxy", CONF_ENV, 0 ),
+#if defined(_WINDOWS)	/* 1998/10/05 (Mon) 17:34:15 */
+     PARSE_SET("focus_window", CONF_BOOL, &focus_window),
+#endif
      PARSE_SET("force_8bit_toupper", CONF_BOOL, &UCForce8bitTOUPPER),
+#ifndef NO_EMPTY_HREFLESS_A
+     PARSE_SET("force_empty_hrefless_a", CONF_BOOL, &force_empty_hrefless_a),
+#endif
      PARSE_SET("force_ssl_cookies_secure", CONF_BOOL, &LYForceSSLCookiesSecure),
 #if !defined(NO_OPTION_FORMS) && !defined(NO_OPTION_MENU)
      PARSE_SET("forms_options", CONF_BOOL, &LYUseFormsOptions),
@@ -1079,7 +1096,7 @@ static Config_Type Config_Table [] =
      PARSE_STR("helpfile", CONF_STR, &helpfile),
      PARSE_SET("historical_comments", CONF_BOOL, &historical_comments),
 
-#ifdef USE_PSRC
+#if defined(USE_PSRC) && defined(__STDC__)
 
      defHTSRC_option(abracket)
      defHTSRC_option(attrib)
@@ -1110,6 +1127,9 @@ static Config_Type Config_Table [] =
      PARSE_STR("jump_prompt", CONF_STR, &jumpprompt),
      PARSE_SET("jumpbuffer", CONF_BOOL, &jump_buffer),
      PARSE_FUN("jumpfile", CONF_FUN, jumpfile_fun),
+#ifdef EXP_JUSTIFY_ELTS
+     PARSE_SET("justify", CONF_BOOL, &ok_justify),
+#endif
 #ifdef EXP_KEYBOARD_LAYOUT
      PARSE_FUN("keyboard_layout", CONF_FUN, keyboard_layout_fun),
 #endif
@@ -1143,7 +1163,7 @@ static Config_Type Config_Table [] =
      PARSE_SET("make_pseudo_alts_for_inlines", CONF_BOOL, &pseudo_inline_alts),
      PARSE_INT("messagesecs", CONF_INT, &MessageSecs),
      PARSE_SET("minimal_comments", CONF_BOOL, &minimal_comments),
-     PARSE_SET("multi_bookmark_support", CONF_BOOL, &LYMultiBookmarks),
+     PARSE_INT("multi_bookmark_support", CONF_BOOL, &LYMultiBookmarks),
      PARSE_SET("ncr_in_bookmarks", CONF_BOOL, &UCSaveBookmarksInUnicode),
 #ifndef DISABLE_NEWS
      PARSE_FUN("news_chunk_size", CONF_FUN, news_chunk_size_fun),
@@ -1155,6 +1175,9 @@ static Config_Type Config_Table [] =
      PARSE_ENV("nntp_proxy", CONF_ENV, 0),
      PARSE_ENV("nntpserver", CONF_ENV2, 0), /* actually NNTPSERVER */
 #endif
+#ifdef SH_EX
+     PARSE_SET("no_table_center", CONF_BOOL, &no_table_center),
+#endif
      PARSE_SET("no_dot_files", CONF_BOOL, &no_dotfiles),
      PARSE_SET("no_file_referer", CONF_BOOL, &no_filereferer),
 #ifndef VMS
@@ -1208,6 +1231,9 @@ static Config_Type Config_Table [] =
      PARSE_STR("system_mail", CONF_STR, &system_mail),
      PARSE_STR("system_mail_flags", CONF_STR, &system_mail_flags),
      PARSE_SET("tagsoup", CONF_BOOL, &Old_DTD),
+#if defined(_WINDOWS)
+     PARSE_INT("timeout", CONF_INT, &lynx_timeout),
+#endif
 #ifdef EXEC_LINKS
      PARSE_DEF("trusted_exec", CONF_ADD_TRUSTED, EXEC_PATH),
 #endif
@@ -1262,7 +1288,7 @@ PUBLIC void free_lynx_cfg NOARGS
 		    unsetenv(name);
 # else
 		    if (putenv(name))
-		    	break;
+			break;
 # endif
 #endif
 		}
@@ -1355,7 +1381,7 @@ PRIVATE void do_read_cfg ARGS5(
 	strcat(mypath, cfg_filename+1);
 	cfg_filename = mypath;
     }
-    if ((fp = fopen(cfg_filename,"r")) == 0) {
+    if ((fp = fopen(cfg_filename, TXT_R)) == 0) {
 	CTRACE(tfp,"lynx.cfg file not found as %s\n",cfg_filename);
 	return;
     }
@@ -1364,6 +1390,13 @@ PRIVATE void do_read_cfg ARGS5(
     /*
      *	Process each line in the file.
      */
+#ifdef SH_EX
+    if (show_cfg) {
+	time_t t;
+	time(&t);
+	printf("### Lynx %s, at %s", LYNX_VERSION, ctime(&t));
+    }
+#endif
     while (LYSafeGets(&buffer, fp) != 0) {
 	char *name, *value;
 	char *cp;
@@ -1415,6 +1448,10 @@ PRIVATE void do_read_cfg ARGS5(
 	    /* lynx ignores unknown keywords */
 	    continue;
 	}
+#ifdef SH_EX
+	if (show_cfg)
+	    printf("%s:%s\n", name, value);
+#endif
 
 	if ( allowed && (*allowed)[ tbl-Config_Table ] ) {
 	    if (fp0 == NULL)
@@ -1484,7 +1521,7 @@ PRIVATE void do_read_cfg ARGS5(
 
 	case CONF_INCLUDE: {
 	    /* include another file */
-	    optidx_set_t cur_set,anded_set;
+	    optidx_set_t cur_set, anded_set;
 	    optidx_set_t* resultant_set = NULL;
 	    char* p1, *p2, savechar;
 	    BOOL any_optname_found = FALSE;
@@ -1558,10 +1595,10 @@ PRIVATE void do_read_cfg ARGS5(
 	    }
 
 #ifndef NO_CONFIG_INFO
-	    /* 
+	    /*
 	     * Now list the opts that are allowed in included file.  If all
 	     * opts are allowed, then emit nothing, else emit an effective set
-	     * of allowed options in <ul>.  Option names will be uppercased. 
+	     * of allowed options in <ul>.  Option names will be uppercased.
 	     * FIXME:  uppercasing option names can be considered redundant.
 	     */
 	    if (fp0 != 0  &&  !no_lynxcfg_xinfo && resultant_set) {
diff --git a/src/LYStrings.c b/src/LYStrings.c
index 01981de5..a26e4c58 100644
--- a/src/LYStrings.c
+++ b/src/LYStrings.c
@@ -32,6 +32,14 @@ extern unsigned short *LYKbLayout;
 extern BOOL HTPassHighCtrlRaw;
 extern HTCJKlang HTCJK;
 
+#ifdef SUPPORT_MULTIBYTE_EDIT
+#define IS_KANA(c)	(0xa0 <= c && c <= 0xdf)
+#endif
+
+#if defined(WIN_EX)
+#define BUTTON_CTRL	0	/* Quick hack */
+#endif
+
 /*Allowing the user to press tab when entering URL to get the closest
   match in the closet*/
 #define LYClosetSize 100
@@ -59,14 +67,14 @@ static int mouse_link = -1;
 
 static int have_levent;
 
-#ifdef NCURSES_MOUSE_VERSION
+#if defined(NCURSES_MOUSE_VERSION) && !defined(WIN_EX)
 static MEVENT levent;
 #endif
 
 /* Return the value of mouse_link */
 PUBLIC int peek_mouse_levent NOARGS
 {
-#ifdef NCURSES_MOUSE_VERSION
+#if defined(NCURSES_MOUSE_VERSION) && !defined(WIN_EX)
     if (have_levent > 0) {
 	ungetmouse(&levent);
 	have_levent--;
@@ -99,13 +107,70 @@ PUBLIC int fancy_mouse ARGS3(
     int *,	position)
 {
     int cmd = LYK_DO_NOTHING;
-#ifdef NCURSES_MOUSE_VERSION
+#if defined(NCURSES_MOUSE_VERSION)
 #ifndef getbegx
 #define getbegx(win) ((win)->_begx)
 #endif
 #ifndef getbegy
 #define getbegy(win) ((win)->_begy)
 #endif
+
+#if defined(WIN_EX)	/* 1998/12/05 (Sat) 08:10:42 */
+
+    request_mouse_pos();
+
+    if (BUTTON_STATUS(1)
+      && (MOUSE_X_POS >= getbegx(win)
+      && (MOUSE_X_POS < (getbegx(win) + getmaxx(win))))) {
+	int mypos = MOUSE_Y_POS - getbegy(win);
+	int delta = mypos - row;
+
+	if (mypos+1 == getmaxy(win)) {
+	    /* At the decorative border: scroll forward */
+	    if (BUTTON_STATUS(1) & BUTTON1_TRIPLE_CLICKED)
+		cmd = LYK_END;
+	    else if (BUTTON_STATUS(1) & BUTTON1_DOUBLE_CLICKED)
+		cmd = LYK_NEXT_PAGE;
+	    else
+		cmd = LYK_NEXT_LINK;
+	} else if (mypos >= getmaxy(win)) {
+	    if (BUTTON_STATUS(1) & (BUTTON1_DOUBLE_CLICKED | BUTTON1_TRIPLE_CLICKED))
+		cmd = LYK_END;
+	    else
+		cmd = LYK_NEXT_PAGE;
+	} else if (mypos == 0) {
+	    /* At the decorative border: scroll back */
+	    if (BUTTON_STATUS(1) & BUTTON1_TRIPLE_CLICKED)
+		cmd = LYK_HOME;
+	    else if (BUTTON_STATUS(1) & BUTTON1_DOUBLE_CLICKED)
+		cmd = LYK_PREV_PAGE;
+	    else
+		cmd = LYK_PREV_LINK;
+	} else if (mypos < 0) {
+	    if (BUTTON_STATUS(1) & (BUTTON1_DOUBLE_CLICKED | BUTTON1_TRIPLE_CLICKED))
+		cmd = LYK_HOME;
+	    else
+		cmd = LYK_PREV_PAGE;
+#ifdef KNOW_HOW_TO_TOGGLE
+	} else if (BUTTON_STATUS(1) & (BUTTON_CTRL)) {
+	    cur_selection += delta;
+	    cmd = LYX_TOGGLE;
+#endif
+	} else if (BUTTON_STATUS(1) & (BUTTON_ALT | BUTTON_SHIFT | BUTTON_CTRL)) {
+	    /* Probably some unrelated activity, such as selecting some text. 
+	     * Select, but do nothing else.
+	     */
+	    *position += delta;
+	    cmd = -1;
+	} else {
+	    /* No scrolling or overflow checks necessary. */
+	    *position += delta;
+	    cmd = LYK_ACTIVATE;
+	}
+    } else if (BUTTON_STATUS(1) & (BUTTON3_CLICKED | BUTTON3_DOUBLE_CLICKED | BUTTON3_TRIPLE_CLICKED)) {
+	cmd = LYK_QUIT;
+    }
+#else
     MEVENT	event;
 
     getmouse(&event);
@@ -186,6 +251,7 @@ PUBLIC int fancy_mouse ARGS3(
     } else if (event.bstate & (BUTTON3_CLICKED | BUTTON3_DOUBLE_CLICKED | BUTTON3_TRIPLE_CLICKED)) {
 	cmd = LYK_QUIT;
     }
+#endif	/* _WINDOWS */
 #endif
     return cmd;
 }
@@ -518,8 +584,10 @@ PRIVATE WINDOW *my_subwindow;
 
 PUBLIC void LYsubwindow ARGS1(WINDOW *, param)
 {
+#if !defined(WIN_EX)
     if ((my_subwindow = param) != 0)
 	keypad(param, TRUE);
+#endif
 }
 #endif
 
@@ -614,11 +682,18 @@ static SLKeyMap_List_Type *Keymap_List;
  * the CSI logic and other special cases for VMS, NCSA telnet, etc.
  */
 #ifdef USE_SLANG
-#define DEFINE_KEY(string,lynx,curses) {string,lynx}
+# ifdef VMS
+#  define EXTERN_KEY(string,string1,lynx,curses) {string,lynx}
+# else
+#  define EXTERN_KEY(string,string1,lynx,curses) {string1,lynx}
+# endif
+# define INTERN_KEY(string,lynx,curses)          {string,lynx}
 #else
-#define DEFINE_KEY(string,lynx,curses) {string,curses}
+#define INTERN_KEY(string,lynx,curses)           {string,curses}
+#define EXTERN_KEY(string,string1,lynx,curses)   {string,curses}
 #endif
 
+
 typedef struct
 {
    char *string;
@@ -628,22 +703,22 @@ Keysym_String_List;
 
 static Keysym_String_List Keysym_Strings [] =
 {
-    DEFINE_KEY( "UPARROW",	UPARROW,	KEY_UP ),
-    DEFINE_KEY( "DNARROW",	DNARROW,	KEY_DOWN ),
-    DEFINE_KEY( "RTARROW",	RTARROW,	KEY_RIGHT ),
-    DEFINE_KEY( "LTARROW",	LTARROW,	KEY_LEFT ),
-    DEFINE_KEY( "PGDOWN",	PGDOWN,		KEY_NPAGE ),
-    DEFINE_KEY( "PGUP",		PGUP,		KEY_PPAGE ),
-    DEFINE_KEY( "HOME",		HOME,		KEY_HOME ),
-    DEFINE_KEY( "END",		END_KEY,	KEY_END ),
-    DEFINE_KEY( "F1",		F1,		KEY_F(1) ),
-    DEFINE_KEY( "DO_KEY",	DO_KEY,		KEY_F(16) ),
-    DEFINE_KEY( "FIND_KEY",	FIND_KEY,	KEY_FIND ),
-    DEFINE_KEY( "SELECT_KEY",	SELECT_KEY,	KEY_SELECT ),
-    DEFINE_KEY( "INSERT_KEY",	INSERT_KEY,	KEY_IC ),
-    DEFINE_KEY( "REMOVE_KEY",	REMOVE_KEY,	KEY_DC ),
-    DEFINE_KEY( "DO_NOTHING",	DO_NOTHING,	DO_NOTHING|LKC_ISLKC ),
-    DEFINE_KEY( NULL, 		-1,		ERR )
+    INTERN_KEY( "UPARROW",	UPARROW,	KEY_UP ),
+    INTERN_KEY( "DNARROW",	DNARROW,	KEY_DOWN ),
+    INTERN_KEY( "RTARROW",	RTARROW,	KEY_RIGHT ),
+    INTERN_KEY( "LTARROW",	LTARROW,	KEY_LEFT ),
+    INTERN_KEY( "PGDOWN",	PGDOWN,		KEY_NPAGE ),
+    INTERN_KEY( "PGUP",		PGUP,		KEY_PPAGE ),
+    INTERN_KEY( "HOME",		HOME,		KEY_HOME ),
+    INTERN_KEY( "END",		END_KEY,	KEY_END ),
+    INTERN_KEY( "F1",		F1,		KEY_F(1) ),
+    INTERN_KEY( "DO_KEY",	DO_KEY,		KEY_F(16) ),
+    INTERN_KEY( "FIND_KEY",	FIND_KEY,	KEY_FIND ),
+    INTERN_KEY( "SELECT_KEY",	SELECT_KEY,	KEY_SELECT ),
+    INTERN_KEY( "INSERT_KEY",	INSERT_KEY,	KEY_IC ),
+    INTERN_KEY( "REMOVE_KEY",	REMOVE_KEY,	KEY_DC ),
+    INTERN_KEY( "DO_NOTHING",	DO_NOTHING,	DO_NOTHING|LKC_ISLKC ),
+    INTERN_KEY( NULL, 		-1,		ERR )
 };
 
 #ifdef NCURSES_VERSION
@@ -1008,26 +1083,26 @@ PRIVATE int read_keymap_file NOARGS
 PRIVATE void setup_vtXXX_keymap NOARGS
 {
     static Keysym_String_List table[] = {
-	DEFINE_KEY( "\033[A",	UPARROW,	KEY_UP ),
-	DEFINE_KEY( "\033OA",	UPARROW,	KEY_UP ),
-	DEFINE_KEY( "\033[B",	DNARROW,	KEY_DOWN ),
-	DEFINE_KEY( "\033OB",	DNARROW,	KEY_DOWN ),
-	DEFINE_KEY( "\033[C",	RTARROW,	KEY_RIGHT ),
-	DEFINE_KEY( "\033OC",	RTARROW,	KEY_RIGHT ),
-	DEFINE_KEY( "\033[D",	LTARROW,	KEY_LEFT ),
-	DEFINE_KEY( "\033OD",	LTARROW,	KEY_LEFT ),
-	DEFINE_KEY( "\033[1~",	FIND_KEY,	KEY_FIND ),
-	DEFINE_KEY( "\033[2~",	INSERT_KEY,	KEY_IC ),
-	DEFINE_KEY( "\033[3~",	REMOVE_KEY,	KEY_DC ),
-	DEFINE_KEY( "\033[4~",	SELECT_KEY,	KEY_SELECT ),
-	DEFINE_KEY( "\033[5~",	PGUP,		KEY_PPAGE ),
-	DEFINE_KEY( "\033[6~",	PGDOWN,		KEY_NPAGE ),
-	DEFINE_KEY( "\033[8~",	END_KEY,	KEY_END ),
-	DEFINE_KEY( "\033[7~",	HOME,		KEY_HOME),
-	DEFINE_KEY( "\033[28~",	F1,		KEY_F(1) ),
-	DEFINE_KEY( "\033OP",	F1,		KEY_F(1) ),
-	DEFINE_KEY( "\033[OP",	F1,		KEY_F(1) ),
-	DEFINE_KEY( "\033[29~",	DO_KEY,		KEY_F(16) ),
+	EXTERN_KEY( "\033[A",	"^(ku)", UPARROW,	KEY_UP ),
+	EXTERN_KEY( "\033OA",	"^(ku)", UPARROW,	KEY_UP ),
+	EXTERN_KEY( "\033[B",	"^(kd)", DNARROW,	KEY_DOWN ),
+	EXTERN_KEY( "\033OB",	"^(kd)", DNARROW,	KEY_DOWN ),
+	EXTERN_KEY( "\033[C",	"^(kr)", RTARROW,	KEY_RIGHT ),
+	EXTERN_KEY( "\033OC",	"^(kr)", RTARROW,	KEY_RIGHT ),
+	EXTERN_KEY( "\033[D",	"^(kl)", LTARROW,	KEY_LEFT ),
+	EXTERN_KEY( "\033OD",	"^(kl)", LTARROW,	KEY_LEFT ),
+	EXTERN_KEY( "\033[1~",	"^(@0)", FIND_KEY,	KEY_FIND ),
+	EXTERN_KEY( "\033[2~",	"^(kI)", INSERT_KEY,	KEY_IC ),
+	EXTERN_KEY( "\033[3~",	"^(kD)", REMOVE_KEY,	KEY_DC ),
+	EXTERN_KEY( "\033[4~",	"^(*6)", SELECT_KEY,	KEY_SELECT ),
+	EXTERN_KEY( "\033[5~",	"^(kP)", PGUP,		KEY_PPAGE ),
+	EXTERN_KEY( "\033[6~",	"^(kN)", PGDOWN,	KEY_NPAGE ),
+	EXTERN_KEY( "\033[8~",	"^(@7)", END_KEY,	KEY_END ),
+	EXTERN_KEY( "\033[7~",	"^(kh)", HOME,		KEY_HOME),
+	EXTERN_KEY( "\033[28~",	"^(k1)", F1,		KEY_F(1) ),
+	EXTERN_KEY( "\033OP",	"^(k1)", F1,		KEY_F(1) ),
+	EXTERN_KEY( "\033[OP",	"^(k1)", F1,		KEY_F(1) ),
+	EXTERN_KEY( "\033[29~",	"^(F6)", DO_KEY,	KEY_F(16) ),
     };
     size_t n;
     for (n = 0; n < TABLESIZE(table); n++)
@@ -1040,6 +1115,11 @@ PUBLIC int lynx_initialize_keymaps NOARGS
     int i;
     char keybuf[2];
 
+    /* The escape sequences may contain embedded termcap strings.  Make
+     * sure the library is initialized for that.
+     */
+    SLtt_get_terminfo();
+
     if (NULL == (Keymap_List = SLang_create_keymap ("Lynx", NULL)))
 	return -1;
 
@@ -1529,6 +1609,26 @@ re_read:
 	case KEY_RIGHT: 	   /* ... */
 	   c = RTARROW;
 	   break;
+#if defined(SH_EX) && defined(DOSPATH)	/* for NEC PC-9800 1998/08/30 (Sun) 21:50:35 */
+	case KEY_C2:
+	   c = DNARROW;
+	   break;
+	case KEY_A2:
+	   c = UPARROW;
+	   break;
+	case KEY_B1:
+	   c = LTARROW;
+	   break;
+	case KEY_B3:
+	   c = RTARROW;
+	   break;
+	case PAD0:	 	   /* PC-9800 Ins */
+	   c = INSERT_KEY;
+	   break;
+	case PADSTOP:	   	   /* PC-9800 DEL */
+	   c = REMOVE_KEY;
+	   break;
+#endif /* SH_EX */
 	case KEY_HOME:		   /* Home key (upward+left arrow) */
 	   c = HOME;
 	   break;
@@ -1694,7 +1794,7 @@ re_read:
 		getmouse(&event);	/* Completely ignore event - kw */
 		c = DO_NOTHING;
 	    } else {
-#ifndef DOSPATH
+#if !defined(WIN_EX)
 		MEVENT event;
 		int err;
 		int lac = LYK_UNKNOWN;
@@ -1759,17 +1859,101 @@ re_read:
 		    c = MOUSE_KEY;
 		}
 #else /* pdcurses version */
+
+	/* _WINDOWS 1997/10/18 (Sat) 19:41:59 */
+
+#define H_CMD_AREA	6
+#define HIST_CMD_2	12
+#define V_CMD_AREA	1
+
+		int left,right;
+		extern BOOLEAN system_is_NT;
+		/* yes, I am assuming that my screen will be a certain width. */
+
+		int tick_count;
+		char *p = NULL;
+		char mouse_info[128];
+		static int old_click = 0;	/* [m Sec] */
+
+		left = H_CMD_AREA;
+		right = (LYcols - H_CMD_AREA);
 		c = -1;
 		mouse_link = -1;
-		request_mouse_pos();
-		if (BUTTON_STATUS(1) & BUTTON_CLICKED) {
-		    c = set_clicked_link(MOUSE_X_POS, MOUSE_Y_POS,FOR_PANEL,1);
-		} else if (BUTTON_STATUS(3) & BUTTON_CLICKED) {
-		    c = LAC_TO_LKC(LYK_PREV_DOC);
+
+		if (system_is_NT) {
+		/* for Windows NT */
+		  request_mouse_pos();
+
+		  if (BUTTON_STATUS(1) & BUTTON_CLICKED) {
+			if (MOUSE_Y_POS > (LYlines - V_CMD_AREA)) {
+			    /* Screen BOTTOM */
+			    if (MOUSE_X_POS < left) {
+				c = LTARROW;	p = "<-";
+			    } else if (MOUSE_X_POS < HIST_CMD_2) {
+				c = RTARROW;	p = "->";
+			    } else if (MOUSE_X_POS > right) {
+				c = 'z';		p = "Cancel";
+			    } else {
+				c = PGDOWN;		p = "PGDOWN";
+			    }
+			} else if (MOUSE_Y_POS < V_CMD_AREA) {
+			    /* Screen TOP */
+			    if (MOUSE_X_POS < left) {
+				c = LTARROW;	p = "<-";
+			    } else if (MOUSE_X_POS < HIST_CMD_2) {
+				c = RTARROW;	p = "->";
+			    } else if (MOUSE_X_POS > right) {
+				c = 'z';		p = "Cancel";
+			    } else {
+				c = PGUP;		p = "PGUP";
+			    }
+			} else {
+			    c = set_clicked_link(MOUSE_X_POS, MOUSE_Y_POS, FOR_PANEL);
+			}
+		    }
+		} else {
+		/* for Windows 95 */
+		    tick_count = GetTickCount();
+
+		    /* Guard Mouse button miss click */
+		    if ((tick_count - old_click) < 700) {
+			c = DO_NOTHING;
+			break;
+		    } else {
+			old_click = tick_count;
+		    }
+		    request_mouse_pos();
+		    if (MOUSE_Y_POS > (LYlines - V_CMD_AREA)) {
+			/* Screen BOTTOM */
+			if (MOUSE_X_POS < left) {
+			    c = LTARROW;	p = "<-";
+			} else if (MOUSE_X_POS < HIST_CMD_2) {
+			    c = RTARROW;	p = "->";
+			} else if (MOUSE_X_POS > right) {
+			    c = '\b';		p = "History";
+			} else {
+			    c = PGDOWN;		p = "PGDOWN";
+			}
+		    } else if (MOUSE_Y_POS < V_CMD_AREA) {
+			/* Screen TOP */
+			if (MOUSE_X_POS < left) {
+			    c = LTARROW;	p = "<-";
+			} else if (MOUSE_X_POS < HIST_CMD_2) {
+			    c = RTARROW;	p = "->";
+			} else if (MOUSE_X_POS > right) {
+			    c = 'z';		p = "Cancel";
+			} else {
+			    c = PGUP;		p = "PGUP";
+			}
+		    } else {
+			c = set_clicked_link(MOUSE_X_POS, MOUSE_Y_POS, FOR_PANEL);
+		    }
 		}
-#endif /* DOSPATH */
-/*		if (c < 0)
-		    c = 0; */
+		if (p && c != -1) {
+		    sprintf(mouse_info, "Mouse = 0x%x, [%s]", c, p);
+		    SetConsoleTitle(mouse_info);
+		}
+#endif /* !(WIN_EX) */
 		if ((c+1) >= KEYMAP_SIZE && (c&LKC_ISLAC))
 		    return(c);
 	    }
@@ -1906,22 +2090,48 @@ PUBLIC int LYgetch NOARGS
  * Convert a null-terminated string to lowercase
  */
 PUBLIC void LYLowerCase ARGS1(
-	char *, 	buffer)
+    unsigned char *, 	buffer)
 {
     size_t i;
     for (i = 0; buffer[i]; i++)
+#ifdef SUPPORT_MULTIBYTE_EDIT	/* 1998/11/23 (Mon) 17:04:55 */
+    {
+	if (buffer[i] & 0x80) {
+	    if (IS_KANA(buffer[i])) {
+		continue;
+	    }
+	    i++;
+	} else {
+	    buffer[i] = TOLOWER(buffer[i]);
+	}
+    }
+#else
 	buffer[i] = TOLOWER(buffer[i]);
+#endif
 }
 
 /*
  * Convert a null-terminated string to uppercase
  */
 PUBLIC void LYUpperCase ARGS1(
-	char *, 	buffer)
+unsigned char *, 	buffer)
 {
     size_t i;
     for (i = 0; buffer[i]; i++)
+#ifdef SUPPORT_MULTIBYTE_EDIT	/* 1998/11/23 (Mon) 17:05:10 */
+    {
+	if (buffer[i] & 0x80) {
+	    if (IS_KANA(buffer[i])) {
+		continue;
+	    }
+	    i++;
+	} else {
+	    buffer[i] = TOUPPER(buffer[i]);
+	}
+    }
+#else
 	buffer[i] = TOUPPER(buffer[i]);
+#endif
 }
 
 /*
@@ -2110,6 +2320,36 @@ PUBLIC void LYSetupEdit ARGS4(
     }
 }
 
+#ifdef SUPPORT_MULTIBYTE_EDIT
+
+PRIVATE int prev_pos ARGS2(
+	EDREC *,	edit,
+	int,		pos)
+{
+    int i = 0;
+
+    if (pos <= 0)
+	return 0;
+    if (HTCJK == NOCJK)
+	return (pos - 1);
+    else {
+	while (i < pos - 1) {
+	    int c;
+	    c = Buf[i];
+	    
+	    if (!(isascii(c) || IS_KANA(c))) {
+		i++;
+	    }
+	    i++;
+	}
+	if (i == pos)
+	    return (i - 2);
+	else
+	    return i;
+    }
+}
+#endif /* SUPPORT_MULTIBYTE_EDIT */
+
 PUBLIC int LYEdit1 ARGS4(
 	EDREC *,	edit,
 	int,		ch,
@@ -2139,6 +2379,7 @@ PUBLIC int LYEdit1 ARGS4(
 	map_active = ~map_active;
 	break;
 #endif
+#ifndef CJK_EX
     case LYE_AIX:
 	/*
 	 *  Hex 97.
@@ -2148,6 +2389,7 @@ PUBLIC int LYEdit1 ARGS4(
 	 */
 	 if (HTCJK == NOCJK && LYlowest_eightbit[current_char_set] > 0x97)
 	     return(ch);
+#endif
     case LYE_CHAR:
 #ifdef EXP_KEYBOARD_LAYOUT
 	if (map_active && ch < 128 && ch >= 0 &&
@@ -2197,12 +2439,16 @@ PUBLIC int LYEdit1 ARGS4(
 	    Buf[length+1]='\0';
 	    Buf[Pos] = (unsigned char) ch;
 	    Pos++;
-	} else if (maxMessage) {
+	} else {
+	    if (maxMessage) {
 	    _statusline(MAXLEN_REACHED_DEL_OR_MOV);
 	}
+	    return(ch);
+	}
 	break;
 
     case LYE_BACKW:
+#ifndef SUPPORT_MULTIBYTE_EDIT
 	/*
 	 *  Backword.
 	 *  Definition of word is very naive: 1 or more a/n characters.
@@ -2211,16 +2457,58 @@ PUBLIC int LYEdit1 ARGS4(
 	    Pos--;
 	while (Pos &&  isalnum(Buf[Pos-1]))
 	    Pos--;
+#else /* SUPPORT_MULTIBYTE_EDIT */
+	/*
+	 *  Backword.
+	 *  Definition of word is very naive: 1 or more a/n characters,
+	 *  or 1 or more multibyte character.
+	 */
+	{
+	    int pos0;
+
+	    pos0 = prev_pos(edit, Pos);
+	    while (Pos &&
+		   (HTCJK == NOCJK || isascii(Buf[pos0])) &&
+		   !isalnum(Buf[pos0])) {
+		Pos = pos0;
+		pos0 = prev_pos(edit, Pos);
+	    }
+	    if (HTCJK != NOCJK && !isascii(Buf[pos0])) {
+		while (Pos && !isascii(Buf[pos0])) {
+		    Pos = pos0;
+		    pos0 = prev_pos(edit, Pos);
+		}
+	    } else {
+		while (Pos && isascii(Buf[pos0]) && isalnum(Buf[pos0])) {
+		    Pos = pos0;
+		    pos0 = prev_pos(edit, Pos);
+		}
+	    }
+	}
+#endif /* SUPPORT_MULTIBYTE_EDIT */
 	break;
 
     case LYE_FORWW:
 	/*
 	 *  Word forward.
 	 */
+#ifndef SUPPORT_MULTIBYTE_EDIT
 	while (isalnum(Buf[Pos]))
 	    Pos++;   /* '\0' is not a/n */
 	while (!isalnum(Buf[Pos]) && Buf[Pos])
 	    Pos++ ;
+#else /* SUPPORT_MULTIBYTE_EDIT */
+	if (HTCJK != NOCJK && !isascii(Buf[Pos])) {
+	    while (!isascii(Buf[Pos]))
+		Pos += 2;
+	} else {
+	    while (isascii(Buf[Pos]) && isalnum(Buf[Pos]))
+		Pos++;	/* '\0' is not a/n */
+	}
+	while ((HTCJK == NOCJK || isascii(Buf[Pos])) &&
+	       !isalnum(Buf[Pos]) && Buf[Pos])
+	    Pos++;
+#endif /* SUPPORT_MULTIBYTE_EDIT */
 	break;
 
     case LYE_ERASE:
@@ -2283,7 +2571,7 @@ PUBLIC int LYEdit1 ARGS4(
 	}
 	break;
 
-    case LYE_DELEL:
+    case LYE_DELEL:	/* @@@ */
 	/*
 	 *  Delete from current cursor position thru EOL.
 	 */
@@ -2303,6 +2591,10 @@ PUBLIC int LYEdit1 ARGS4(
 	 */
 	if (Pos >= length)
 	    break;
+#ifdef SUPPORT_MULTIBYTE_EDIT
+	if (HTCJK != NOCJK && !isascii(Buf[Pos]))
+	    Pos++;
+#endif
 	Pos++;
 	/* fall through - DO NOT RELOCATE the LYE_DELN case wrt LYE_DELP */
 
@@ -2310,6 +2602,7 @@ PUBLIC int LYEdit1 ARGS4(
 	/*
 	 *  Delete preceding character.
 	 */
+#ifndef SUPPORT_MULTIBYTE_EDIT
 	if (length == 0 || Pos == 0)
 	    break;
 #ifdef ENHANCED_LINEEDIT
@@ -2320,6 +2613,23 @@ PUBLIC int LYEdit1 ARGS4(
 	for (i = Pos; i < length; i++)
 	    Buf[i] = Buf[i+1];
 	i--;
+#else /* SUPPORT_MULTIBYTE_EDIT */
+	{
+	    int offset = 1;
+	    int pos0 = Pos;
+
+	    if (length == 0 || Pos == 0)
+		break;
+	    if (HTCJK != NOCJK) {
+		Pos = prev_pos(edit, pos0);
+		offset = pos0 - Pos;
+	    } else
+		Pos--;
+	    for (i = Pos; i < length; i++)
+		Buf[i] = Buf[i + offset];
+	    i -= offset;
+	}
+#endif /* SUPPORT_MULTIBYTE_EDIT */
 	Buf[i] = 0;
 	break;
 
@@ -2327,16 +2637,33 @@ PUBLIC int LYEdit1 ARGS4(
 	/*
 	 *  Move cursor to the right.
 	 */
+#ifndef SUPPORT_MULTIBYTE_EDIT
 	if (Pos < length)
 	    Pos++;
+#else /* SUPPORT_MULTIBYTE_EDIT */
+	if (Pos < length) {
+	    Pos++;
+	    if (HTCJK != NOCJK && !isascii(Buf[Pos-1]))
+		Pos++;
+	}
+#endif /* SUPPORT_MULTIBYTE_EDIT */
 	break;
 
     case LYE_BACK:
 	/*
 	 *  Left-arrow move cursor to the left.
 	 */
+#ifndef SUPPORT_MULTIBYTE_EDIT
 	if (Pos > 0)
 	    Pos--;
+#else /* SUPPORT_MULTIBYTE_EDIT */
+	if (Pos > 0) {
+	    if (HTCJK != NOCJK)
+		Pos = prev_pos(edit, Pos);
+	    else
+		Pos--;
+	}
+#endif /* SUPPORT_MULTIBYTE_EDIT */
 	break;
 
 #ifdef ENHANCED_LINEEDIT
@@ -2449,6 +2776,10 @@ PUBLIC void LYRefreshEdit ARGS1(
     int padsize;
     char *str;
     char buffer[3];
+#ifdef SUPPORT_MULTIBYTE_EDIT
+    int begin_multi = 0;
+    int end_multi = 0;
+#endif /* SUPPORT_MULTIBYTE_EDIT */
 
     buffer[0] = buffer[1] = buffer[2] = '\0';
     if (!edit->dirty || (DspWdth == 0))
@@ -2473,16 +2804,52 @@ PUBLIC void LYRefreshEdit ARGS1(
  *   data entry at low baudrates.
  */
     if ((DspStart + DspWdth) <= length)
+#ifndef SUPPORT_MULTIBYTE_EDIT
 	if (Pos >= (DspStart + DspWdth) - Margin)
 	    DspStart=(Pos - DspWdth) + Margin;
+#else /* SUPPORT_MULTIBYTE_EDIT */
+	if (Pos >= (DspStart + DspWdth) - Margin) {
+	    if (HTCJK != NOCJK) {
+		int tmp = (Pos - DspWdth) + Margin;
+
+		while (DspStart < tmp) {
+		    if (!isascii(Buf[DspStart]))
+			DspStart++;
+		    DspStart++;
+		}
+	    } else
+		DspStart=(Pos - DspWdth) + Margin;
+	}
+#endif /* SUPPORT_MULTIBYTE_EDIT */
 
     if (Pos < DspStart + Margin) {
+#ifndef SUPPORT_MULTIBYTE_EDIT
+	DspStart = Pos - Margin;
+	if (DspStart < 0)
+	    DspStart = 0;
+#else /* SUPPORT_MULTIBYTE_EDIT */
+	if (HTCJK != NOCJK) {
+	    int tmp = Pos - Margin;
+
+	    DspStart = 0;
+	    while (DspStart < tmp) {
+		if (!isascii(Buf[DspStart]))
+		    DspStart++;
+		DspStart++;
+	    }
+	} else {
 	DspStart = Pos - Margin;
 	if (DspStart < 0)
 	    DspStart = 0;
     }
+#endif /* SUPPORT_MULTIBYTE_EDIT */
+    }
 
     str = &Buf[DspStart];
+#ifdef SUPPORT_MULTIBYTE_EDIT
+    if (HTCJK != NOCJK && !isascii(str[0]))
+	begin_multi = 1;
+#endif /* SUPPORT_MULTIBYTE_EDIT */
 
     nrdisplayed = length-DspStart;
     if (nrdisplayed > DspWdth)
@@ -2515,15 +2882,29 @@ PUBLIC void LYRefreshEdit ARGS1(
 		    !(LYCharSet_UC[current_char_set].like8859
 		      & UCT_R_8859SPECL))))) {
 		addch(' ');
+#ifdef SUPPORT_MULTIBYTE_EDIT
+		end_multi = 0;
+#endif /* SUPPORT_MULTIBYTE_EDIT */
 	    } else {
 		/* For CJK strings, by Masanobu Kimura */
 		if (HTCJK != NOCJK && !isascii(buffer[0])) {
+#ifndef SUPPORT_MULTIBYTE_EDIT
 		    if (i < (nrdisplayed - 1))
 			buffer[1] = str[++i];
+#else /* SUPPORT_MULTIBYTE_EDIT */
+		    if (i < (nrdisplayed - 1)) {
+			buffer[1] = str[++i];
+			end_multi = 1;
+		    } else
+			end_multi = 0;
+#endif /* SUPPORT_MULTIBYTE_EDIT */
 		    addstr(buffer);
 		    buffer[1] = '\0';
 		} else {
 		    addstr(buffer);
+#ifdef SUPPORT_MULTIBYTE_EDIT
+		    end_multi = 0;
+#endif /* SUPPORT_MULTIBYTE_EDIT */
 		}
 	    }
     }
@@ -2540,16 +2921,39 @@ PUBLIC void LYRefreshEdit ARGS1(
      */
     if (edit->panon) {
 	if ((DspStart + nrdisplayed) < length) {
+#ifndef SUPPORT_MULTIBYTE_EDIT
 	    move(edit->sy, edit->sx+nrdisplayed-1);
 	    addch('}');
+#else /* SUPPORT_MULTIBYTE_EDIT */
+	    if (end_multi) {
+		move(edit->sy, edit->sx+nrdisplayed-2);
+		addstr(" }");
+	    } else {
+		move(edit->sy, edit->sx+nrdisplayed-1);
+		addch('}');
+	}
+#endif /* SUPPORT_MULTIBYTE_EDIT */
 	}
 	if (DspStart) {
 	    move(edit->sy, edit->sx);
+#ifndef SUPPORT_MULTIBYTE_EDIT
+	    addch('{');
+#else /* SUPPORT_MULTIBYTE_EDIT */
+	    if (begin_multi)
+		addstr("{ ");
+	    else
 	    addch('{');
+#endif /* SUPPORT_MULTIBYTE_EDIT */
 	}
     }
 
     move(edit->sy, edit->sx + Pos - DspStart);
+#ifdef SUPPORT_MULTIBYTE_EDIT
+#if (!USE_SLANG && !defined(USE_MULTIBYTE_CURSES))
+    if (HTCJK != NOCJK)
+	lynx_force_repaint();
+#endif /* !USE_SLANG && !defined(USE_MULTIBYTE_CURSES) */
+#endif /* SUPPORT_MULTIBYTE_EDIT */
     refresh();
 }
 
@@ -2567,6 +2971,9 @@ PUBLIC int LYgetstr ARGS4(
     int last_xlkc = -1;
     EditFieldData MyEdit;
     char *res;
+#ifdef SUPPORT_MULTIBYTE_EDIT
+    BOOL refresh = TRUE;
+#endif /* SUPPORT_MULTIBYTE_EDIT */
 
     LYGetYX(y, x);		/* Use screen from cursor position to eol */
     MaxStringSize = (bufsize < sizeof(MyEdit.buffer)) ?
@@ -2576,8 +2983,25 @@ PUBLIC int LYgetstr ARGS4(
 
     for (;;) {
 again:
+#ifndef SUPPORT_MULTIBYTE_EDIT
 	LYRefreshEdit(&MyEdit);
+#else /* SUPPORT_MULTIBYTE_EDIT */
+	if (refresh)
+	    LYRefreshEdit(&MyEdit);
+#endif /* SUPPORT_MULTIBYTE_EDIT */
 	ch = LYgetch_for(FOR_PROMPT);
+#ifdef SUPPORT_MULTIBYTE_EDIT 
+#ifdef CJK_EX	/* for SJIS code */
+	if (!refresh
+	 && (EditBinding(ch) != LYE_CHAR))
+	    goto again;
+#else
+	if (!refresh
+	 && (EditBinding(ch) != LYE_CHAR)
+	 && (EditBinding(ch) != LYE_AIX))
+	    goto again;
+#endif
+#endif /* SUPPORT_MULTIBYTE_EDIT */
 #ifdef VMS
 	if (term_letter || term_options ||
 #ifndef DISABLE_NEWS
@@ -2607,8 +3031,10 @@ again:
 		ch |= LKC_MOD3;
 	    last_xlkc = -1;	/* consumed */
 	}
+#ifndef WIN_EX
 	if (LKC_TO_LAC(keymap,ch) == LYK_REFRESH)
 	    goto again;
+#endif
 	xlec = EditBinding(ch);
 	if ((xlec & LYE_DF) && !(xlec & LYE_FORM_LAC)) {
 	    last_xlkc = ch;
@@ -2644,6 +3070,8 @@ again:
 		ch = '\0';
 	    }
 	    break;
+
+#ifndef CJK_EX	/* 1997/11/03 (Mon) 20:13:45 */
 	case LYE_AIX:
 	    /*
 	     *	Hex 97.
@@ -2653,10 +3081,12 @@ again:
 	     */
 	    if (ch != '\t' &&
 		(HTCJK != NOCJK ||
-		 LYlowest_eightbit[current_char_set] <= 0x97)) {
+		 LYlowest_eightbit[current_char_set] <= 0x97))
+	    {
 		LYLineEdit(&MyEdit,ch, FALSE);
 		break;
 	    }
+#endif
 	case LYE_ENTER:
 	    /*
 	     *	Terminate the string and return.
@@ -2665,6 +3095,32 @@ again:
 	    LYAddToCloset(MyEdit.buffer);
 	    return(ch);
 
+#if defined(WIN_EX)
+	/* 1998/10/01 (Thu) 15:05:49 */
+
+#define PASTE_MAX	512
+
+	case LYE_PASTE:
+	    {
+		unsigned char buff[PASTE_MAX];
+		int i, len;
+
+		len = get_clip(buff, PASTE_MAX);
+
+		if (len > 0) {
+		    i = 0;
+		    while ((ch = buff[i]) != '\0') {
+			if (ch == '\r' || ch == '\n')
+			    break;
+			if (ch >= ' ')
+			    LYLineEdit(&MyEdit, ch, FALSE);
+			i++;
+		    }
+		}
+		break;
+	    }
+#endif
+
 	case LYE_ABORT:
 	    /*
 	     *	Control-C or Control-G aborts.
@@ -2698,7 +3154,20 @@ again:
 		break;
 	    }
 
+#ifndef SUPPORT_MULTIBYTE_EDIT
 	    LYLineEdit(&MyEdit, ch, FALSE);
+#else /* SUPPORT_MULTIBYTE_EDIT */
+	    if (LYLineEdit(&MyEdit, ch, FALSE) == 0) {
+		if (refresh && HTCJK != NOCJK && (0x81 <= ch) && (ch <= 0xfe))
+		    refresh = FALSE;
+		else
+		    refresh = TRUE;
+	    } else {
+		if (!refresh) {
+		    LYEdit1(&MyEdit, 0, LYE_DELP, FALSE);
+		}
+	    }
+#endif /* SUPPORT_MULTIBYTE_EDIT */
 	}
     }
 }
@@ -2824,6 +3293,63 @@ PUBLIC char * LYno_attr_char_case_strstr ARGS2(
     return(NULL);
 }
 
+PUBLIC void LYOpenCloset NOARGS
+{
+    /* We initialize the list-looka-like, i.e., the Closet */
+    int i = 0;
+    while(i < LYClosetSize){
+	LYCloset[i] = NULL;
+	i = i + 1;
+    }
+    LYClosetTop = 0;
+}
+
+PUBLIC void LYCloseCloset NOARGS
+{
+    int i = 0;
+
+    /* Clean up the list-looka-like, i.e., the Closet */
+    while (i < LYClosetSize){
+	FREE(LYCloset[i]);
+	i = i + 1;
+    }
+}
+
+/*
+ * Strategy:  We begin at the top and search downwards.  We return the first
+ * match, i.e., the newest since we search from the top.  This should be made
+ * more intelligent, but works for now.
+ */
+PRIVATE char * LYFindInCloset ARGS1(char*, base)
+{
+    int shelf;
+    unsigned len = strlen(base);
+
+    shelf = (LYClosetTop - 1 + LYClosetSize) % LYClosetSize;
+
+    while (LYCloset[shelf] != NULL){
+	if (!strncmp(base, LYCloset[shelf], len)) {
+	    return(LYCloset[shelf]);
+	}
+	shelf = (shelf - 1 + LYClosetSize) % LYClosetSize;
+    }
+    return(0);
+}
+
+PRIVATE int LYAddToCloset ARGS1(char*, str)
+{
+    unsigned len = strlen(str);
+
+    LYCloset[LYClosetTop] = malloc(len+1);
+    if (!LYCloset[LYClosetTop])
+	outofmem(__FILE__, "LYAddToCloset");
+    strcpy(LYCloset[LYClosetTop], str);
+
+    LYClosetTop = (LYClosetTop + 1) % LYClosetSize;
+    FREE(LYCloset[LYClosetTop]);
+    return(1);
+}
+
 /*
  *  LYno_attr_char_strstr will find the first occurrence of the
  *  string pointed to by tarptr in the string pointed to by chptr.
@@ -3161,63 +3687,6 @@ PUBLIC char * LYno_attr_mbcs_strstr ARGS5(
     return(NULL);
 }
 
-PUBLIC void LYOpenCloset NOARGS
-{
-    /* We initialize the list-looka-like, i.e., the Closet */
-    int i = 0;
-    while(i < LYClosetSize){
-	LYCloset[i] = NULL;
-	i = i + 1;
-    }
-    LYClosetTop = 0;
-}
-
-PUBLIC void LYCloseCloset NOARGS
-{
-    int i = 0;
-
-    /* Clean up the list-looka-like, i.e., the Closet */
-    while (i < LYClosetSize){
-	FREE(LYCloset[i]);
-	i = i + 1;
-    }
-}
-
-/*
- * Strategy:  We begin at the top and search downwards.  We return the first
- * match, i.e., the newest since we search from the top.  This should be made
- * more intelligent, but works for now.
- */
-PRIVATE char * LYFindInCloset ARGS1(char*, base)
-{
-    int shelf;
-    unsigned len = strlen(base);
-
-    shelf = (LYClosetTop - 1 + LYClosetSize) % LYClosetSize;
-
-    while (LYCloset[shelf] != NULL){
-	if (!strncmp(base, LYCloset[shelf], len)) {
-	    return(LYCloset[shelf]);
-	}
-	shelf = (shelf - 1 + LYClosetSize) % LYClosetSize;
-    }
-    return(0);
-}
-
-PRIVATE int LYAddToCloset ARGS1(char*, str)
-{
-    unsigned len = strlen(str);
-
-    LYCloset[LYClosetTop] = malloc(len+1);
-    if (!LYCloset[LYClosetTop])
-	outofmem(__FILE__, "LYAddToCloset");
-    strcpy(LYCloset[LYClosetTop], str);
-
-    LYClosetTop = (LYClosetTop + 1) % LYClosetSize;
-    FREE(LYCloset[LYClosetTop]);
-    return(1);
-}
-
 /*
  *  Allocate a new copy of a string, and returns it.
  */
@@ -3386,9 +3855,9 @@ PUBLIC int UPPER8 ARGS2(int,ch1, int,ch2)
 	charset_in  = current_char_set;  /* display character set */
 	charset_out = UCGetLYhndl_byMIME("us-ascii");
 
-	uck1 = UCTransCharStr(replace_buf1, sizeof(replace_buf1), ch1,
+	uck1 = UCTransCharStr(replace_buf1, sizeof(replace_buf1), (char)ch1,
 			      charset_in, charset_out, YES);
-	uck2 = UCTransCharStr(replace_buf2, sizeof(replace_buf2), ch2,
+	uck2 = UCTransCharStr(replace_buf2, sizeof(replace_buf2), (char)ch2,
 			      charset_in, charset_out, YES);
 
 	if ((uck1 > 0) && (uck2 > 0))  /* both replacement strings found */
diff --git a/src/LYStrings.h b/src/LYStrings.h
index 33e38a67..c61ab0c7 100644
--- a/src/LYStrings.h
+++ b/src/LYStrings.h
@@ -237,15 +237,19 @@ typedef struct _EditFieldData {
 #define LYE_FORM_LAC 0x1000       /* Flag to pass lynxactioncode given by
 				     lower bits.  Doesn't fit in a char! */
 
+#if defined(WIN_EX)
+#define LYE_PASTE (LYE_AIX +1)	  /* ClipBoard to Lynx	   */
+#endif
+
 #if defined(USE_KEYMAPS)
 extern int lynx_initialize_keymaps NOPARAMS;
 extern int map_string_to_keysym PARAMS((char * src, int *lec));
 #endif
 
 extern void LYLowerCase PARAMS((
-	char *		buffer));
+	unsigned char *	buffer));
 extern void LYUpperCase PARAMS((
-	char *		buffer));
+	unsigned char *	buffer));
 extern void LYRemoveBlanks PARAMS((
 	char *		buffer));
 extern char * LYSkipBlanks PARAMS((
diff --git a/src/LYStyle.c b/src/LYStyle.c
index a2accfb8..062c2715 100644
--- a/src/LYStyle.c
+++ b/src/LYStyle.c
@@ -1,6 +1,6 @@
 /* character level styles for Lynx
  * (c) 1996 Rob Partington -- donated to the Lyncei (if they want it :-)
- * $Id: LYStyle.c,v 1.21 1999/05/28 14:18:50 tom Exp $
+ * $Id: LYStyle.c,v 1.22 1999/07/14 16:44:55 tom Exp $
  */
 #include <HTUtils.h>
 #include <HTML.h>
@@ -22,6 +22,7 @@
 #include <LYexit.h>
 #include <LYLeaks.h>
 #include <LYStrings.h>
+#include <LYUtils.h>
 
 #ifdef USE_COLOR_STYLE
 
@@ -404,7 +405,7 @@ PUBLIC int style_readFromFile ARGS1(char*, file)
     CTRACE(tfp, "CSS:Reading styles from file: %s\n", file ? file : "?!? empty ?!?");
     if (file == NULL || *file == '\0')
 	return -1;
-    fh = fopen(file, "r");
+    fh = fopen(file, TXT_R);
     if (!fh)
     {
 	/* this should probably be an alert or something */
diff --git a/src/LYTraversal.c b/src/LYTraversal.c
index 04c18154..6af29e1c 100644
--- a/src/LYTraversal.c
+++ b/src/LYTraversal.c
@@ -37,7 +37,7 @@ PUBLIC BOOLEAN lookup ARGS1(char *,target)
     char *line = NULL;
     int result = FALSE;
 
-    if ((ifp = fopen(TRAVERSE_FILE,"r")) == NULL) {
+    if ((ifp = fopen(TRAVERSE_FILE, TXT_R)) == NULL) {
 	if ((ifp = LYNewTxtFile(TRAVERSE_FILE)) == NULL) {
 	    exit_with_perror(CANNOT_OPEN_TRAV_FILE);
 	} else {
@@ -144,7 +144,7 @@ PUBLIC BOOLEAN lookup_reject ARGS1(char *,target)
     int len;
     int result = FALSE;
 
-    if ((ifp = fopen(TRAVERSE_REJECT_FILE,"r")) == NULL){
+    if ((ifp = fopen(TRAVERSE_REJECT_FILE, TXT_R)) == NULL){
 	return(FALSE);
     }
 
diff --git a/src/LYUtils.c b/src/LYUtils.c
index 73ff1bf3..84b4037f 100644
--- a/src/LYUtils.c
+++ b/src/LYUtils.c
@@ -21,6 +21,16 @@
 #include <HTFile.h>
 #endif
 
+#if _WIN_CC
+extern int exec_command(char * cmd, int wait_flag); /* xsystem.c */
+#endif
+
+#ifdef _WINDOWS	/* 1998/04/30 (Thu) 19:04:25 */
+#define GETPID()	(getpid() & 0xffff)
+#else
+#define GETPID()	getpid()
+#endif /* _WINDOWS */
+
 #ifdef DJGPP_KEYHANDLER
 #include <bios.h>
 #endif /* DJGPP_KEYHANDLER */
@@ -94,7 +104,6 @@ extern int BSDselect PARAMS((int nfds, fd_set * readfds, fd_set * writefds,
 
 #define COPY_COMMAND "%s %s %s"
 
-extern HTkcode kanji_code;
 extern BOOLEAN LYHaveCJKCharacterSet;
 extern HTCJKlang HTCJK;
 
@@ -1840,6 +1849,9 @@ PUBLIC void statusline ARGS1(
     unsigned char *temp = NULL;
     int max_length, len, i, j;
     unsigned char k;
+    char *p;
+    char text_buff[256];
+    int text_len;
 
     if (text == NULL)
 	return;
@@ -1860,6 +1872,25 @@ PUBLIC void statusline ARGS1(
     }
     mustshow = FALSE;
 
+    /* "LYNXDOWNLOAD://Method=-1/File=%s/SugFile=%s%s\">Save to disk</a>\n" */
+    /* 1997/12/23 (Tue) 15:58:58 */
+    text_len = strlen(text);
+    if (text_len < 256) {
+	strcpy(text_buff, text);
+    } else {
+	strncpy(text_buff, text, 255);
+	text_buff[255] = '\0';
+	p = strchr(text_buff, '\n');
+	if (p)
+	    p= '\0';
+    }
+    if (strncmp(text, "LYNXDOWNLOAD:", 13) == 0) {
+	p = strstr(text + 13, "SugFile=");
+	if (p != NULL) {
+	    strcpy(text_buff, p + 3);
+	}
+    }
+
     /*
      *	Deal with any CJK escape sequences and Kanji if we have a CJK
      *	character set selected, otherwise, strip any escapes.  Also,
@@ -1867,21 +1898,28 @@ PUBLIC void statusline ARGS1(
      */
     max_length = ((LYcols - 2) < (int)sizeof(buffer))
 		? (LYcols - 2) : (int)sizeof(buffer)-1;
-    if ((text[0] != '\0') &&
+    if ((text_buff[0] != '\0') &&
 	(LYHaveCJKCharacterSet)) {
 	/*
 	 *  Translate or filter any escape sequences. - FM
 	 */
-	if ((temp = (unsigned char *)calloc(1, strlen(text) + 1)) == NULL)
+	if ((temp = (unsigned char *)calloc(1, strlen(text_buff) + 1)) == NULL)
 	    outofmem(__FILE__, "statusline");
 	if (kanji_code == EUC) {
-	    TO_EUC((CONST unsigned char *)text, temp);
+	    TO_EUC((CONST unsigned char *)text_buff, temp);
 	} else if (kanji_code == SJIS) {
-	    TO_SJIS((CONST unsigned char *)text, temp);
+#ifdef CJK_EX
+	    if (!LYRawMode || last_kcode == SJIS)
+		strcpy(temp, text_buff);
+	    else
+		TO_SJIS((CONST unsigned char *)text_buff, temp);
+#else
+	    strcpy(temp, text_buff);
+#endif
 	} else {
-	    for (i = 0, j = 0; text[i]; i++) {
-		if (text[i] != CH_ESC) {  /* S/390 -- gil -- 2119 */
-		    temp[j++] = text[i];
+	    for (i = 0, j = 0; text_buff[i]; i++) {
+		if (text_buff[i] != CH_ESC) {  /* S/390 -- gil -- 2119 */
+		    temp[j++] = text_buff[i];
 		}
 	    }
 	    temp[j] = '\0';
@@ -1922,9 +1960,9 @@ PUBLIC void statusline ARGS1(
 	 *  code added here for determining the displayed string length,
 	 *  as we do above for CJK. - FM
 	 */
-	for (i = 0, len = 0; text[i] != '\0' && len < max_length; i++) {
-	    if (text[i] != CH_ESC) {  /* S/390 -- gil -- 2136 */
-		buffer[len++] = text[i];
+	for (i = 0, len = 0; text_buff[i] != '\0' && len < max_length; i++) {
+	    if (text_buff[i] != CH_ESC) {  /* S/390 -- gil -- 2119 */
+		buffer[len++] = text_buff[i];
 	    }
 	}
 	buffer[len] = '\0';
@@ -1950,6 +1988,7 @@ PUBLIC void statusline ARGS1(
 	move(LYlines-1, 0);
     }
     clrtoeol();
+
     if (text != NULL && text[0] != '\0') {
 #ifdef HAVE_UTF8_STATUSLINES
 	if (LYCharSet_UC[current_char_set].enc == UCT_ENC_UTF8) {
@@ -2024,7 +2063,6 @@ PUBLIC void noviceline ARGS1(
     clrtoeol();
     addstr(NOVICE_LINE_ONE);
     clrtoeol();
-
 #if defined(DIRED_SUPPORT ) && defined(OK_OVERRIDE)
     if (lynx_edit_mode && !no_dired_support)
        addstr(DIRED_NOVICELINE);
@@ -2148,6 +2186,7 @@ PUBLIC int HTCheckForInterrupt NOARGS
     if (DontCheck())
 	return((int)FALSE);
 
+#ifndef _WINDOWS	/* 1998/03/30 (Mon) 17:07:41 */
 #ifdef USE_SLANG
     /** No keystroke was entered
 	Note that this isn't taking possible SOCKSification
@@ -2176,13 +2215,14 @@ PUBLIC int HTCheckForInterrupt NOARGS
 		     &socket_timeout);
 
     /** Suspended? **/
-    if ((ret == -1) && (errno == EINTR))
+    if ((ret == -1) && (SOCKET_ERRNO == EINTR))
 	 return((int)FALSE);
 
     /** No keystroke was entered? **/
     if (!FD_ISSET(0,&readfds))
 	 return((int)FALSE);
 #endif /* USE_SLANG */
+#endif /* !_WINDOWS */
 
 #if defined (DOSPATH) && defined (NCURSES)
     nodelay(stdscr,TRUE);
@@ -2359,7 +2399,7 @@ PUBLIC BOOLEAN LYisRootPath ARGS1(
      && isalpha(path[0])
      && path[1] == ':'
      && LYIsPathSep(path[2]))
-    	return TRUE;
+	return TRUE;
 #endif
     return ((strlen(path) == 1) && LYIsPathSep(path[0]));
 }
@@ -3039,6 +3079,7 @@ extern char *ttyname PARAMS((int fd));
 PUBLIC BOOLEAN inlocaldomain NOARGS
 {
 #if ! HAVE_UTMP
+    CTRACE(tfp, "LYUtils: inlocaldomain() not support.\n");
     return(TRUE);
 #else
     int n;
@@ -3293,11 +3334,19 @@ PUBLIC void change_sug_filename ARGS1(
     if (temp == NULL)
 	outofmem(__FILE__, "change_sug_filename");
     cp = wwwName(lynx_temp_space);
+#ifdef FNAMES_8_3
+    if (LYIsHtmlSep(*cp)) {
+	sprintf(temp, "file://localhost%s%04x", cp, GETPID());
+    } else {
+	sprintf(temp, "file://localhost/%s%04x", cp, GETPID());
+    }
+#else
     if (LYIsHtmlSep(*cp)) {
 	sprintf(temp, "file://localhost%s%d", cp, (int)getpid());
     } else {
 	sprintf(temp, "file://localhost/%s%d", cp, (int)getpid());
     }
+#endif
     if (!strncmp(fname, temp, strlen(temp))) {
 	cp = strrchr(fname, '.');
 	if (strlen(cp) > (strlen(temp) - 4))
@@ -3330,6 +3379,19 @@ PUBLIC void change_sug_filename ARGS1(
 	}
 	*cp1 = '\0';
     }
+#ifdef _WINDOWS	/* 1998/05/05 (Tue) 10:08:05 */
+    if ((cp = strrchr(fname,'=')) != NULL && strlen(cp) > 1) {
+	cp1 = fname;
+	/*
+	 *  Go past the '='.
+	 */
+	cp++;
+	for (; *cp != '\0'; cp++, cp1++) {
+	    *cp1 = *cp;
+	}
+	*cp1 = '\0';
+    }
+#endif
 
     /*
      *	Trim off date-size suffix, if present.
@@ -3564,6 +3626,15 @@ PRIVATE int fmt_tempname ARGS3(
     if (suffix == 0)
 	suffix = "";
     counter++;
+#ifdef _WINDOWS	/* 1998/05/25 (Mon) 20:51:22 */
+    {
+	char *p = result;
+	while (*p++) {
+	    if (*p == '/')
+		*p = '\\';
+	}
+    }
+#endif
 #ifdef FNAMES_8_3
     /*
      * The 'lynx_temp_space' string ends with a '/' or '\\', so we only have to
@@ -3571,7 +3642,11 @@ PRIVATE int fmt_tempname ARGS3(
      * the suffix may contain more than a ".htm", e.g., "-txt.gz", so we trim
      * off from the filename portion to make room.
      */
+#ifdef _WINDOWS
+    sprintf(leaf, "%04x%04x", counter, (unsigned)GETPID());
+#else
     sprintf(leaf, "%u%u", counter, (unsigned)getpid());
+#endif
     if (strlen(leaf) > 8)
 	leaf[8] = 0;
     if (strlen(suffix) > 4 || *suffix != '.') {
@@ -3756,6 +3831,52 @@ PRIVATE BOOLEAN *restrict_flag[] = {
 #endif
        (BOOLEAN *) 0  };
 
+
+/*  This will make no difference between '-' and '_'. It does only in/equality
+    compare. It assumes that p2 can't contain dashes, but p1 can.
+    This function is also used (if macro OPTNAME_ALLOW_DASHES doesn't have
+    value of zero) for compare of commandline options -VH
+ */
+PUBLIC BOOL strn_dash_equ ARGS3(
+	CONST char*	,p1,
+	CONST char*	,p2,
+	int	,len)
+{
+    while (len--) {
+	if (!*p2)
+	    return 0;/* canonical name is shorter */
+	switch (*p1) {
+	    case 0:
+		return 0;
+	    case '-':
+	    case '_':
+		if (*p2!='_')
+		    return 0;
+		else
+		    break;
+	    default:
+		if (*p1!=*p2)
+		    return 0;
+	}
+	++p1; ++p2;
+    }
+    return 1;
+}
+
+/* Uncomment following lines to allow only exact string matching */
+/* #define RESTRICT_NM_ALLOW_DASHES 0 */
+
+#ifndef RESTRICT_NM_ALLOW_DASHES
+# define RESTRICT_NM_ALLOW_DASHES 1
+#endif
+
+#if RESTRICT_NM_ALLOW_DASHES
+#	define RESTRICT_NM_EQU(a,b,len) strn_dash_equ(a,b,len)
+#else
+#	define RESTRICT_NM_EQU(a,b,len) STRNEQ(a,b,len)
+#endif
+
+
 PUBLIC void parse_restrictions ARGS1(
 	CONST char *,	s)
 {
@@ -3772,13 +3893,13 @@ PUBLIC void parse_restrictions ARGS1(
 	  while (*p != ',' && *p != '\0')
 	      p++;
 
-	  if (STRNEQ(word, "all", p-word)) {
+	  if (RESTRICT_NM_EQU(word, "all", p-word)) {
 	      /* set all restrictions */
 	      for (i=N_SPECIAL_RESTRICT_OPTIONS; restrict_flag[i]; i++)
 		  *restrict_flag[i] = TRUE;
 	  }
 
-	  if (STRNEQ(word, "default", p-word)) {
+	  if (RESTRICT_NM_EQU(word, "default", p-word)) {
 	      /* set all restrictions */
 	      for (i=N_SPECIAL_RESTRICT_OPTIONS; restrict_flag[i]; i++)
 		  *restrict_flag[i] = TRUE;
@@ -3839,7 +3960,7 @@ PUBLIC void parse_restrictions ARGS1(
 	  }
 
 	  for (i=0; restrict_name[i]; i++) {
-	     if (STRNEQ(word, restrict_name[i], p-word)) {
+	     if (RESTRICT_NM_EQU(word, restrict_name[i], p-word)) {
 		 *restrict_flag[i] = TRUE;
 		 break;
 	     }
@@ -4232,7 +4353,26 @@ PUBLIC void LYConvertToURL ARGS2(
 have_VMS_URL:
 	CTRACE(tfp, "Trying: '%s'\n", *AllocatedString);
 #else /* not VMS: */
-#ifdef DOSPATH
+#if defined(DOSPATH)
+#ifdef _WINDOWS
+	if (*old_string == '.') {
+	    char fullpath[MAX_PATH + 1];
+	    char *filepart = NULL;
+	    DWORD chk;
+
+	    chk = GetFullPathNameA(old_string, MAX_PATH + 1,
+			fullpath, &filepart);
+	    if (chk != 0) {
+		StrAllocCopy(temp, HTDOS_wwwName(fullpath));
+		StrAllocCat(*AllocatedString, temp);
+		FREE(temp);
+		CTRACE(tfp, "Converted '%s' to '%s'\n",
+				old_string, *AllocatedString);
+	    } else {
+		StrAllocCat(*AllocatedString, old_string);
+	    }
+	}
+#else
 	if (strlen(old_string) == 1 && *old_string == '.') {
 	    /*
 	     *	They want .
@@ -4243,7 +4383,9 @@ have_VMS_URL:
 	    FREE(temp);
 	    CTRACE(tfp, "Converted '%s' to '%s'\n",
 			old_string, *AllocatedString);
-	} else
+	}
+#endif
+	else
 #endif /* DOSPATH */
 	if (*old_string == '~') {
 	    /*
@@ -4275,15 +4417,25 @@ have_VMS_URL:
 	     *	Concatenate and simplify, trimming any
 	     *	residual relative elements. - FM
 	     */
-#if defined (DOSPATH) || defined (__EMX__)
+#if defined (DOSPATH) || defined (__EMX__) || defined (WIN_EX)
 	    if (old_string[1] != ':' && old_string[1] != '|') {
+#ifdef DOSPATH
+		StrAllocCopy(temp, HTDOS_wwwName(curdir));
+#else
 		StrAllocCopy(temp, wwwName(curdir));
+#endif
 		LYAddHtmlSep(&temp);
 		LYstrncpy(curdir, temp, (sizeof(curdir) - 1));
 		StrAllocCat(temp, old_string);
 	    } else {
 		curdir[0] = '\0';
+		/* 1998/01/13 (Tue) 12:24:33 */
+		if (old_string[1] == '|')
+		    old_string[1] = ':';
 		StrAllocCopy(temp, old_string);
+
+		if (strlen(temp) == 2 && temp[1] == ':')
+		    StrAllocCat(temp, "/");
 	    }
 #else
 	    StrAllocCopy(temp, curdir);
@@ -4302,12 +4454,13 @@ have_VMS_URL:
 		/* especially when we really have file://localhost/   */
 		/* at the beginning.  To avoid any confusion we allow */
 		/* escaping the path if URL specials % or # present.  */
-		if (strchr(temp, '#') == NULL &&
-			   strchr(temp, '%') == NULL)
-		StrAllocCopy(cp, temp);
+		if (strchr(temp, '#') == NULL && strchr(temp, '%') == NULL)
+		    StrAllocCopy(cp, temp);
 		else
-#endif /* DOSPATH */
+		    cp = HTEscape(temp, URL_PATH);
+#else
 		cp = HTEscape(temp, URL_PATH);
+#endif /* DOSPATH */
 		StrAllocCat(*AllocatedString, cp);
 		FREE(cp);
 		CTRACE(tfp, "Converted '%s' to '%s'\n",
@@ -4324,6 +4477,9 @@ have_VMS_URL:
 		StrAllocCat(temp2, cp);		/* append to current dir  */
 		StrAllocCopy(cp2, temp2);	/* keep a copy in cp2	  */
 		LYTrimRelFromAbsPath(temp2);
+#ifdef WIN_EX	/* 1998/07/31 (Fri) 09:09:03 */
+		HTUnEscape(temp2);	/* for LFN */
+#endif
 
 		if (strcmp(temp2, temp) != 0 &&
 		    ((stat(temp2, &st) > -1) ||
@@ -4392,9 +4548,28 @@ have_VMS_URL:
 		 */
 		CTRACE(tfp, "Can't stat() or fopen() '%s'\n",
 			    temp2 ? temp2 : temp);
+#ifdef WIN_EX  /* 1998/01/13 (Tue) 09:07:37 */
+		{
+		    char *p, *q, buff[LY_MAXPATH + 128];
+
+		    p = (char *)Home_Dir();
+		    q = temp2 ? temp2 : temp;
+
+		    if (strlen(q) == 3 && isalpha(q[0]) && q[1] == ':') {
+			sprintf(buff,
+			    "'%s' not exist, Goto LynxHome '%s'.", q, p);
+			_statusline(buff);
+			sleep(AlertSecs);
+			FREE(temp);
+			StrAllocCat(*AllocatedString, p);
+			goto Retry;
+		    }
+		}
+#endif
 		if (LYExpandHostForURL((char **)&old_string,
 				       URLDomainPrefixes,
-				       URLDomainSuffixes)) {
+				       URLDomainSuffixes))
+		{
 		    if (!LYAddSchemeForURL((char **)&old_string, "http://")) {
 			StrAllocCopy(*AllocatedString, "http://");
 			StrAllocCat(*AllocatedString, old_string);
@@ -4405,6 +4580,9 @@ have_VMS_URL:
 		  /* RW 1998Mar16  Restore AllocatedString to 'old_string' */
 		    StrAllocCopy(*AllocatedString, old_string);
 		}
+#ifdef WIN_EX
+	Retry:
+#endif
 		CTRACE(tfp, "Trying: '%s'\n", *AllocatedString);
 	    }
 	    FREE(temp);
@@ -4484,6 +4662,38 @@ have_VMS_URL:
     CTRACE_SLEEP(AlertSecs);
 }
 
+#if defined(_WINDOWS) /* 1998/06/23 (Tue) 16:45:20 */
+
+PUBLIC int win32_check_interrupt()
+{
+    int c;
+
+    if (kbhit()) {
+	c = getch();
+	/** Keyboard 'Z' or 'z', or Control-G or Control-C **/
+	if (TOUPPER(c) == 'Z' || c == 7 || c == 3 || c == 0x1b) {
+	    return TRUE;
+	}
+    }
+    return FALSE;
+}
+
+void sleep(unsigned sec)
+{
+    int i, j, c;
+
+    for (j = 0; j < sec; j++) {
+	for (i = 0; i < 10; i++) {
+	    Sleep(100);
+	    if (kbhit()) {
+		c = getch();
+		return;
+	    }
+	}
+    }
+}
+#endif
+
 /*
  *  This function rewrites and reallocates a previously allocated
  *  string so that the first element is a confirmed Internet host,
@@ -4515,6 +4725,10 @@ PUBLIC BOOLEAN LYExpandHostForURL ARGS3(
     char *Fragment = NULL;
     BOOLEAN GotHost = FALSE;
     BOOLEAN Startup = (helpfilepath == NULL);
+#ifdef _WINDOWS
+    int hoststat;
+    struct hostent  *phost;	/* Pointer to host - See netdb.h */
+#endif
 
     /*
      *	If it's a NULL or zero-length string,
@@ -4596,7 +4810,8 @@ PUBLIC BOOLEAN LYExpandHostForURL ARGS3(
 	 *  Clear any residual interrupt. - FM
 	 */
 	if (LYCursesON && HTCheckForInterrupt()) {
-	    CTRACE(tfp, "LYExpandHostForURL: Ignoring interrupt because '%s' resolved.\n",
+	    CTRACE(tfp,
+	    "LYExpandHostForURL: Ignoring interrupt because '%s' resolved.\n",
 			host);
 	}
 
@@ -4608,15 +4823,18 @@ PUBLIC BOOLEAN LYExpandHostForURL ARGS3(
 	FREE(Str);
 	FREE(MsgStr);
 	return GotHost;
+    }
 #ifndef DJGPP
-    } else if (LYCursesON && (lynx_nsl_status == HT_INTERRUPTED)) {
+    else if (LYCursesON && (lynx_nsl_status == HT_INTERRUPTED))
 #else /* DJGPP */
-    } else if (LYCursesON && HTCheckForInterrupt()) {
+    else if (LYCursesON && HTCheckForInterrupt())
 #endif /* DJGPP */
+    {
 	/*
 	 *  Give the user chance to interrupt lookup cycles. - KW & FM
 	 */
-	CTRACE(tfp, "LYExpandHostForURL: Interrupted while '%s' failed to resolve.\n",
+	CTRACE(tfp,
+	"LYExpandHostForURL: Interrupted while '%s' failed to resolve.\n",
 		    host);
 
 	/*
@@ -4707,10 +4925,10 @@ PUBLIC BOOLEAN LYExpandHostForURL ARGS3(
 	    } else if (Startup && !dump_output_immediately) {
 		fprintf(stdout, "%s '%s'%s\n", WWW_FIND_MESSAGE, host, GUESSING_SEGMENT);
 	    }
-#ifndef DJGPP
-	    GotHost = (LYGetHostByName(host) != NULL);
-#else
+#ifdef DJGPP
 	    GotHost = (resolve(host) != 0);
+#else
+	    GotHost = (LYGetHostByName(host) != NULL);
 #endif /* DJGPP */
 	    if (HostColon != NULL) {
 		*HostColon = ':';
@@ -4719,13 +4937,14 @@ PUBLIC BOOLEAN LYExpandHostForURL ARGS3(
 		/*
 		 *  Give the user chance to interrupt lookup cycles. - KW
 		 */
-#ifndef DJGPP
-		if (LYCursesON && (lynx_nsl_status == HT_INTERRUPTED))
-#else /* DJGPP */
+#ifdef DJGPP
 		if (LYCursesON && HTCheckForInterrupt())
+#else /* !DJGPP */
+		if (LYCursesON && (lynx_nsl_status == HT_INTERRUPTED))
 #endif /* DJGPP */
 		{
-		    CTRACE(tfp, "LYExpandHostForURL: Interrupted while '%s' failed to resolve.\n",
+		    CTRACE(tfp,
+	"LYExpandHostForURL: Interrupted while '%s' failed to resolve.\n",
 				host);
 		    FREE(Str);
 		    FREE(MsgStr);
@@ -5220,6 +5439,12 @@ PUBLIC BOOLEAN LYPathOffHomeOK ARGS2(
 		return(FALSE);
 	    }
 	}
+#ifdef _WINDOWS		/* 1997/10/16 (Thu) 22:08:17 */
+	strcpy(buff, homedir);
+	p = buff;
+	while (*p++) if (*p == '\\') *p = '/';
+	homedir = buff;
+#endif
     }
 #endif /* VMS */
     if (*cp == '~') {
@@ -5705,7 +5930,7 @@ PUBLIC time_t LYmktime ARGS2(
     return(clock2);
 }
 
-#if ! HAVE_PUTENV
+#if !defined(HAVE_PUTENV) && !defined(_WINDOWS)
 /*
  *  No putenv on the next so we use this code instead!
  */
@@ -5802,7 +6027,7 @@ int remove ARGS1(char *, name)
 }
 #endif
 
-#ifdef UNIX
+#if defined(UNIX)
 /*
  * Verify if this is really a file, not accessed by a link, except for the
  * special case of its directory being pointed to by a link from a directory
@@ -5886,6 +6111,10 @@ PRIVATE FILE *OpenHiddenFile ARGS2(char *, name, char *, mode)
 	    fd = open(name, O_CREAT|O_EXCL|O_WRONLY, HIDE_CHMOD);
 	}
 	if (fd >= 0) {
+#ifdef O_BINARY	/* for __CYGWIN_ */
+	    if (mode[1] == 'b')
+		setmode(fd, O_BINARY);
+#endif
 	    fp = fdopen(fd, mode);
 	}
     }
@@ -5914,7 +6143,7 @@ PRIVATE FILE *OpenHiddenFile ARGS2(char *, name, char *, mode)
     }
     return fp;
 }
-#else
+#else	/* !UNIX */
 # ifndef VMS
 #  define OpenHiddenFile(name, mode) fopen(name, mode)
 # endif
@@ -6206,13 +6435,14 @@ PUBLIC FILE *LYOpenTempRewrite ARGS3(
 	 *  We truncate and then append, this avoids having a small
 	 *  window in which the file doesn't exist. - kw
 	 */
+#if HAVE_TRUNCATE
 	if (truncate(fname, 0) != 0) {
 	    CTRACE(tfp, "... truncate(%s,0) failed: %s\n",
 		   fname, LYStrerror(errno));
 	    return (LYOpenTemp(fname, suffix, mode));
-	} else {
-	    return (LYReopenTemp(fname));
 	}
+#endif
+	return (LYReopenTemp(fname));
     } else if (writable_exists) {
 	/*
 	 *  File exists, writable if we checked, but something is wrong
@@ -6662,7 +6892,7 @@ PUBLIC void LYTrimPathSep ARGS1(
 #endif
 
 /*
- * Add a trailing path-separator to avoid confusing other programs when we concatenate
+ * Add a trailing path-separator to avoid confusing other programs when we concateate
  * to it.  This only applies to local filesystems.
  */
 PUBLIC void LYAddPathSep ARGS1(
@@ -6767,6 +6997,31 @@ PUBLIC int LYCopyFile ARGS2(
 	char *,		src,
 	char *,		dst)
 {
+#ifdef SH_EX
+
+#define BUF_SIZE	1024
+
+    FILE *fin, *fout;
+    unsigned char buff[BUF_SIZE];
+    int len;
+
+    fin = fopen(src, "rb");
+    if (fin == NULL)
+	return EOF;
+
+    fout = fopen(dst, "wb");
+    if (fout == NULL)
+	return EOF;
+
+    while ((len = fread(buff, 1, BUF_SIZE, fin)) > 0) {
+	fwrite(buff, 1, len, fout);
+    }
+    fclose(fin);
+    fclose(fout);
+
+    return 0;
+
+#else
     int code;
     char *the_command = 0;
 
@@ -6781,8 +7036,8 @@ PUBLIC int LYCopyFile ARGS2(
     start_curses();
 
     FREE(the_command);
-
     return code;
+#endif
 }
 
 /*
@@ -6830,12 +7085,67 @@ PUBLIC int LYSystem ARGS1(
 	}
     }
 #  endif
+
+#if defined(__CYGWIN__) && defined(DOSPATH)	/* 1999/02/26 (Fri) */
+    {
+	char cmd[LY_MAXPATH];
+	char win32_name[LY_MAXPATH];
+	char new_cmd[LY_MAXPATH];
+	char new_command[LY_MAXPATH * 2 + 10];
+	char *p, *q;
+
+	p = command;
+	q = cmd;
+	while (*p) {
+	    if (*p == ' ')
+		break;
+	    else
+		*q = *p;
+	    p++;
+	    q++;
+	}
+	*q = '\0';
+
+	if (cmd[0] == '/')
+	    cygwin_conv_to_full_posix_path(cmd, new_cmd);
+	else
+	    strcpy(new_cmd, cmd);
+
+	while (*p == ' ')
+	    p++;
+
+	if (strchr(p, '\\') == NULL) {
+	    /* for Windows Application */
+	    cygwin_conv_to_full_win32_path(p, win32_name);
+	    sprintf(new_command, "%s \"%s\"", new_cmd, win32_name);
+	} else {
+	    /* for DOS like editor */
+	    q = win32_name;
+	    while (*p) {
+		if (*p == '\\') {
+		    if (*(p+1) == '\\')
+			p++;
+		}
+		*q = *p;
+		q++, p++;
+	    }
+	    *q = '\0';
+	    sprintf(new_command, "%s %s", new_cmd, win32_name);
+	}
+	command = new_command;
+    }
+#endif
+
+#if _WIN_CC
+    code = exec_command(command, TRUE);	/* Wait exec */
+#else
     if (restore_sigpipe_for_children)
 	signal(SIGPIPE, SIG_DFL); /* Some commands expect the default */
     code = system(command);
     if (restore_sigpipe_for_children)
 	signal(SIGPIPE, SIG_IGN); /* Ignore it again - kw */
 #endif
+#endif
 
 #ifdef __DJGPP__
     __djgpp_set_ctrl_c(1);
@@ -6853,15 +7163,73 @@ PUBLIC int LYSystem ARGS1(
 /*
  * Return a string which can be used in LYSystem() for spawning a subshell
  */
+#if defined(__CYGWIN__) && defined(DOSPATH)	/* 1999/02/26 (Fri) */
+PUBLIC int Cygwin_Shell NOARGS
+{
+    char *shell;
+    int code;
+    STARTUPINFO startUpInfo;
+    PROCESS_INFORMATION procInfo;
+    SECURITY_ATTRIBUTES sa;
+
+    /* Set up security attributes to allow inheritance of the file handle */
+
+    sa.nLength = sizeof(SECURITY_ATTRIBUTES);
+    sa.lpSecurityDescriptor = 0;
+    sa.bInheritHandle=TRUE;
+
+    /* Init a startup structure */
+    GetStartupInfo(&startUpInfo);
+
+    shell = getenv("COMSPEC");
+
+    /* Create the child process, specifying
+     inherited handles. Pass the value of the
+     handle as a command line parameter */
+    code = 0;
+    if (shell) {
+	code = CreateProcess(0, shell, 0, 0,
+			TRUE, 0,
+			0, 0, &startUpInfo, &procInfo);
+
+	if (!code) {
+	    printf("shell = [%s], code = %d\n", shell, GetLastError());
+	}
+
+	/* wait for the child to return (this is not a requirement
+	   since the child is its own independent process) */
+	WaitForSingleObject(procInfo.hProcess, INFINITE);
+    }
+
+    return code;
+}
+#endif
+
 PUBLIC char *LYSysShell NOARGS
 {
     char *shell = 0;
 #ifdef DOSPATH
-    if (getenv("SHELL") != NULL) {
-	shell = getenv("SHELL");
-    } else {
-	shell = (getenv("COMSPEC") == NULL) ? "command.com" : getenv("COMSPEC");
+#ifdef SH_EX
+    shell = getenv("SHELL");
+    if (shell) {
+	if (access(shell, 0) != 0)
+	    shell = getenv("COMSPEC");
+    }
+    if (shell == NULL) {
+	if (system_is_NT)
+	    shell = "cmd.exe";
+	else
+	    shell = "command.com";
+    }
+#else
+    shell = getenv("SHELL");
+    if (shell == NULL) {
+	shell = getenv("COMSPEC");
+    }
+    if (shell == NULL) {
+	shell = "command.com";
     }
+#endif	/* SH_EX */
 #else
 #ifdef __EMX__
     if (getenv("SHELL") != NULL) {
@@ -6922,3 +7290,195 @@ PUBLIC void LYsetXDisplay ARGS1(
 	}
     }
 }
+
+#if defined(WIN_EX)	/* 1997/10/16 (Thu) 20:13:28 */
+
+#define	MAX_DOS_PATH	128	/* exactly 80 */
+
+PUBLIC int put_clip(char *szBuffer)
+{
+    HANDLE hWnd;
+    HANDLE m_hLogData;
+    LPTSTR pLogData;
+    HANDLE hClip;
+    int len;
+
+    if (szBuffer == NULL)
+	return EOF;
+
+    len = strlen(szBuffer);
+    if (len == 0)
+	return EOF;
+    else
+	len ++;
+
+    m_hLogData = GlobalAlloc(GHND, len);
+    if (m_hLogData == NULL) {
+	return EOF;
+    }
+
+    hWnd = NULL;
+    if (!OpenClipboard(hWnd)) {
+	return EOF;
+    }
+    /* Remove the current Clipboard contents */
+    if (!EmptyClipboard()) {
+	GlobalFree(m_hLogData);
+	return EOF;
+    }
+
+    /* Lock the global memory while we write to it. */
+    pLogData = (LPTSTR) GlobalLock(m_hLogData);
+
+    lstrcpy((LPTSTR) pLogData, szBuffer);
+    GlobalUnlock(m_hLogData);
+
+    /* If there were any lines at all then copy them to clipboard. */
+    hClip = SetClipboardData(CF_TEXT, m_hLogData);
+    if (!hClip) {
+	/* If we couldn't clip the data then free the global handle. */
+	GlobalFree(m_hLogData);
+    }
+
+    CloseClipboard();
+    return 0;
+}
+
+PUBLIC int get_clip(char *szBuffer, int size)
+{
+    HANDLE hWnd;
+    HANDLE m_hLogData;
+    LPTSTR pLogData;
+    int val;
+
+    hWnd = NULL;
+    if (!OpenClipboard(hWnd)) {
+	return 0;
+    }
+
+    lstrcpy(szBuffer, "");
+    m_hLogData = GetClipboardData(CF_TEXT);
+
+    if (m_hLogData == NULL) {
+	val = 0;
+    } else {
+	pLogData = (LPTSTR) GlobalLock(m_hLogData);
+
+	val = strlen((LPTSTR) pLogData);
+	if (size > val)
+	    lstrcpy(szBuffer, (LPTSTR) pLogData);
+	else {
+	    val = size - 1;
+	    lstrcpyn(szBuffer, (LPTSTR) pLogData, val);
+	    szBuffer[val] = '\0';
+	}
+
+	GlobalUnlock(m_hLogData);
+    }
+    CloseClipboard();
+
+    return val;
+}
+
+
+PUBLIC char *HTDOS_short_name(char *path)
+{
+    static char sbuf[MAX_DOS_PATH];
+    char *ret;
+    DWORD r;
+
+    r = GetShortPathName(path, sbuf, sizeof sbuf);
+    if (r >= sizeof sbuf) {
+#if 0	/* DEBUG */
+	fprintf(stderr, "bug: recompile with MAX_DOS_PATH > %d\n", r);
+#endif
+	ret = path;
+    }
+    if (r == 0) {
+	ret = path;
+    } else {
+	ret = sbuf;
+    }
+    return ret;
+}
+#endif
+
+#if defined(WIN_EX)
+
+#ifndef WSABASEERR
+#define WSABASEERR 10000
+#endif
+
+/*
+ * Description: the windows32 version of perror()
+ *
+ * Returns:  a pointer to a static error
+ *
+ * Notes/Dependencies:  I got this from
+ *      comp.os.ms-windows.programmer.win32
+ */
+PUBLIC char * w32_strerror(DWORD ercode)
+{
+/*  __declspec(thread) necessary if you will use multiple threads */
+#ifdef __CYGWIN__
+    static char msg_buff[256];
+#else
+    __declspec(thread) static char msg_buff[256];
+#endif
+    HMODULE hModule;
+    int i, msg_type;
+    unsigned char *p, *q, tmp_buff[256];
+
+    hModule = NULL;
+    msg_type = FORMAT_MESSAGE_FROM_SYSTEM;
+    /* Fill message buffer with a default message in
+     * case FormatMessage fails
+     */
+    wsprintf(msg_buff, "Error %ld", ercode);
+
+    /*
+     *  Special code for winsock error handling.
+     */
+    if (ercode > WSABASEERR) {
+	hModule = GetModuleHandle("wsock32");
+#if 0
+	if (hModule == NULL) {
+	    hModule = LoadLibrary("wsock32");
+	}
+#endif
+	if (hModule == NULL)
+	    ercode = GetLastError();
+	else
+	    msg_type = FORMAT_MESSAGE_FROM_HMODULE;
+    }
+    /*
+     *  message handling
+     */
+    FormatMessage(msg_type,
+		  hModule,
+		  ercode,
+		  LANG_NEUTRAL,
+		  msg_buff,
+		  sizeof(msg_buff),
+		  NULL);
+
+#if 0
+    if (hModule) {
+	FreeLibrary(hModule);
+    }
+#endif
+
+    strcpy(tmp_buff, msg_buff);
+    p = q = tmp_buff;
+    i = 0;
+    while (*p) {
+	if (!(*p == '\n' || *p == '\r'))
+	    msg_buff[i++] = *p;
+	p++;
+    }
+    msg_buff[i] = '\0';
+
+    return msg_buff;
+}
+
+#endif
diff --git a/src/LYUtils.h b/src/LYUtils.h
index 10cf755b..9d962a7c 100644
--- a/src/LYUtils.h
+++ b/src/LYUtils.h
@@ -128,6 +128,15 @@ extern void remove_backslashes PARAMS((char *buf));
 extern void size_change PARAMS((int sig));
 extern void statusline PARAMS((CONST char *text));
 extern void toggle_novice_line NOPARAMS;
+extern BOOL strn_dash_equ PARAMS((CONST char* p1,CONST char* p2,int len));
+
+
+#if defined(WIN_EX)	/* 1997/10/16 (Thu) 20:13:28 */
+extern int put_clip(char *szBuffer);
+extern int get_clip(char *szBuffer, int size);
+extern char *HTDOS_short_name(char *path);
+extern char *w32_strerror(DWORD ercode);
+#endif
 
 #ifdef VMS
 extern void Define_VMSLogical PARAMS((char *LogicalName, char *LogicalValue));
@@ -220,4 +229,14 @@ extern HTList *sug_filenames;
 #define HIDE_CHMOD 0600
 #define HIDE_UMASK 0077
 
+#if defined(DOSPATH) || defined(WIN_EX) || defined(__CYGWIN__)
+#define TXT_R	"rt"
+#define TXT_W	"wt"
+#define TXT_A	"at+"
+#else
+#define TXT_R	"r"
+#define TXT_W	"w"
+#define TXT_A	"a+"
+#endif
+
 #endif /* LYUTILS_H */
diff --git a/src/LYexit.c b/src/LYexit.c
index 92cfe6b0..75046338 100644
--- a/src/LYexit.c
+++ b/src/LYexit.c
@@ -92,6 +92,12 @@ PUBLIC void LYexit ARGS1(
 {
 #ifndef VMS	/*  On VMS, the VMSexit() handler does these. - FM */
 #ifdef _WINDOWS
+    extern CRITICAL_SECTION critSec_DNS;	/* 1998/09/03 (Thu) 22:01:56 */
+    extern CRITICAL_SECTION critSec_READ;	/* 1998/09/03 (Thu) 22:01:56 */
+
+    DeleteCriticalSection(&critSec_DNS);
+    DeleteCriticalSection(&critSec_READ);
+
     WSACleanup();
 #endif
     if (LYOutOfMemory == TRUE) {
diff --git a/src/LYrcFile.c b/src/LYrcFile.c
index efe6b22e..cc9d6221 100644
--- a/src/LYrcFile.c
+++ b/src/LYrcFile.c
@@ -49,7 +49,7 @@ PUBLIC void read_rc NOPARAMS
     /*
      *  Open the RC file for reading.
      */
-    if ((fp = fopen(rcfile, "r")) == NULL) {
+    if ((fp = fopen(rcfile, TXT_R)) == NULL) {
 	return;
     }
 
@@ -333,7 +333,7 @@ PUBLIC void read_rc NOPARAMS
 	    if (LYstrstr(cp, "LINKS_ARE_NUMBERED"))
 		keypad_mode = LINKS_ARE_NUMBERED;
 	    else if (LYstrstr(cp, "LINKS_AND_FORM_FIELDS_ARE_NUMBERED"))
-		keypad_mode = LINKS_AND_FORM_FIELDS_ARE_NUMBERED;
+		keypad_mode = LINKS_AND_FIELDS_ARE_NUMBERED;
 	    else
 		keypad_mode = NUMBERS_AS_ARROWS;
 
diff --git a/src/UCdomap.c b/src/UCdomap.c
index 6ba65391..b77bacfd 100644
--- a/src/UCdomap.c
+++ b/src/UCdomap.c
@@ -763,7 +763,7 @@ PRIVATE void con_set_default_unimap NOARGS
     p = dfont_unitable;
     for (i = 0; i < 256; i++) {
 	for (j = dfont_unicount[i]; j; j--) {
-	    con_insert_unipair(*(p++), i, 1);
+	    con_insert_unipair(*(p++), (u16)i, 1);
 	}
     }
 
@@ -820,7 +820,7 @@ PRIVATE int UC_con_set_unimap ARGS2(
 
     for (i = 0; i < 256 && UCInfo[UC_charset_out_hndl].unicount != NULL; i++) {
 	for (j = UCInfo[UC_charset_out_hndl].unicount[i]; j; j--) {
-	    con_insert_unipair(*(p++), i, 0);
+	    con_insert_unipair(*(p++), (u16)i, 0);
 	}
     }
 
diff --git a/src/Xsystem.c b/src/Xsystem.c
new file mode 100644
index 00000000..e82cc5a4
--- /dev/null
+++ b/src/Xsystem.c
@@ -0,0 +1,598 @@
+/* $Id: Xsystem.c,v 1.1 1999/07/14 16:44:55 tom Exp $
+ *	like system("cmd") but return with exit code of "cmd"
+ *	for Turbo-C/MS-C/LSI-C
+ *  This code is in the public domain.
+ *
+ * $Log: Xsystem.c,v $
+ * Revision 1.1  1999/07/14 16:44:55  tom
+ * Initial revision
+ *
+ *
+ * Revision 1.14  1997/10/17 (Fri) 16:28:24  senshu
+ * *** for Win32 version ***
+ *
+ * Revision 1.13  1992/02/24  06:59:13  serow
+ * *** empty log message ***
+ *
+ * Revision 1.12  1991/04/09  08:48:20  serow
+ * ignore new line at command line tail
+ *
+ * Revision 1.11  1991/03/12  07:12:50  serow
+ * CMDLINE
+ *
+ * Revision 1.10  91/02/24  05:10:14  serow
+ * 2>&1
+ *
+ * Revision 1.9  91/02/22  07:01:17  serow
+ * NEAR for ms-c
+ *
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <io.h>
+#include <process.h>
+#ifndef __CYGWIN__
+#include <dos.h>
+#endif
+
+#ifndef USECMDLINE
+#define USECMDLINE	0
+#endif
+
+#ifndef TRUE
+#define TRUE	1
+#define FALSE	0
+#endif
+
+#define STR_MAX 512	/* MAX command line */
+
+extern char *mktemp(char *);
+
+#define UCH(c)   ((unsigned char)(c))
+#define isk1(c)  ((0x81<=UCH(c)&&UCH(c)<=0x9F)||(0xE0<=UCH(c)&&UCH(c)<=0xFC))
+#define isq(c)   ((c) == '"')
+#define isspc(c) ((c) == ' ' || (c) == '\t')
+#define issep(c) (isspc(c) || (c) == '"' || (c) == '\'' || (c) == '<' || (c) == '>' || (c) == 0)
+#define issep2(c) (issep(c) || (c) == '.' || (c) == '\\' || (c) == '/')
+#define isdeg(c) ('0' <= (c) && (c) <= '9')
+
+#if 0	/* MS-C */
+#define NEAR	_near
+#else
+#define NEAR
+#endif
+
+typedef struct _proc {
+    struct _proc *next;
+    char *line;
+    char *cmd;
+    char *arg;
+    char *inf;
+    int infmod;
+    char *outf;
+    int outfmod;
+    int ored[10];
+    int sred[10];
+} PRO;
+
+static PRO *p1 = 0;
+
+static char *NEAR
+xmalloc(size_t n)
+{
+    char *bp;
+
+    if ((bp = calloc(1, n)) == (char *) 0) {
+	write(2, "xsystem: Out of memory.!\n", 25);
+	exit(1);
+    }
+    return bp;
+}
+
+static char *NEAR
+xrealloc(void *p, size_t n)
+{
+    char *bp;
+
+    if ((bp = realloc(p, n)) == (char *) 0) {
+	write(2, "xsystem: Out of memory!.\n", 25);
+	exit(1);
+    }
+    return bp;
+}
+
+static int NEAR
+is_builtin_command(char *s)
+{
+    extern int system_is_NT;	/* 1997/11/05 (Wed) 22:10:35 */
+
+    static char *cmdtab[]=
+    {
+	"dir", "type", "rem", "ren", "rename", "erase", "del",
+	"copy", "pause", "date", "time", "ver", "vol", "label",
+	"cd", "chdir", "md", "mkdir", "rd", "rmdir", "break",
+	"verify", "set", "prompt", "path", "exit", "ctty", "echo",
+	"if", "for", "cls", "goto", "shift"
+	,"start"	/* start is NT only */
+    };
+    int i, l, lc, count;
+
+    l = strlen(s);
+    count = sizeof(cmdtab) / sizeof(cmdtab[0]);
+    if (!system_is_NT)
+	count--;
+    for (i = 0; i < count; i++) {
+	if (stricmp(s, cmdtab[i]) == 0)
+	    return 1;
+	lc = strlen(cmdtab[i]);
+	if (lc < l && strnicmp(s, cmdtab[i], lc) == 0 && issep2(s[lc]))
+	    return 1;
+    }
+    return 0;
+}
+
+static int NEAR
+getswchar(void)
+{
+#ifdef __WIN32__
+    return '/';
+#else
+    union REGS reg;
+
+    reg.x.ax = 0x3700;
+    intdos(&reg, &reg);
+    return reg.h.dl;
+#endif
+}
+
+static int NEAR
+csystem(PRO * p, int flag)
+{
+    char *cmp;
+    char SW[3];
+    int rc;
+
+    if ((cmp = getenv("COMSPEC")) == 0)
+	return -2;
+    SW[0] = getswchar();
+    SW[1] = 'c';
+    SW[2] = 0;
+    rc = spawnl(flag, cmp, cmp, SW, p->cmd, p->arg, (char *) 0);
+    return rc < 0 ? -2 : rc;
+}
+
+static PRO *NEAR
+pars1c(char *s)
+{
+    PRO *pp;
+    char *fnp;
+    int ms, mi;
+    int fs, fi, inpf;
+    int q;
+
+    pp = (PRO *) xmalloc(sizeof(PRO));
+    for (q = 0; q < sizeof(pp->ored) / sizeof(pp->ored[0]); q++)
+	pp->ored[q] = q;
+    while (isspc(*s))
+	s++;
+    pp->line = strdup(s);
+    pp->cmd = xmalloc(ms = 8);
+    mi = 0;
+    while (!issep(*s)) {
+	if (mi >= ms - 1)
+	    pp->cmd = xrealloc(pp->cmd, ms += 8);
+	pp->cmd[mi++] = *s++;
+    }
+    pp->cmd[mi] = 0;
+    q = 0;
+    pp->arg = xmalloc(ms = 32);
+    if (isspc(*s))
+	s++;
+    mi = 0;
+    while (*s) {
+	if (mi >= ms - 1) {
+	    pp->arg = xrealloc(pp->arg, ms += 32);
+	}
+	if (q == 0) {
+	    inpf = 0;
+	    if ((mi == 0 || isspc(s[-1])) &&
+		isdeg(s[0]) && s[1] == '>' &&
+		s[2] == '&' && isdeg(s[3])) {
+
+		pp->ored[s[0] & 15] = s[3] & 15;
+		s += 4;
+		continue;
+	    } else if (s[0] == '<') {
+		if (pp->inf == 0) {
+		    pp->infmod = O_RDONLY;
+		}
+		inpf = 1;
+	    } else if (s[0] == '>' && s[1] == '>') {
+		if (pp->outf == 0) {
+		    pp->outfmod = O_WRONLY | O_CREAT | O_APPEND;
+		}
+		s++;
+	    } else if (s[0] == '>') {
+		if (pp->outf == 0) {
+		    pp->outfmod = O_WRONLY | O_CREAT | O_TRUNC;
+		}
+	    } else {
+		if (*s == '"')
+		    q = !q;
+		pp->arg[mi++] = *s++;
+		continue;
+	    }
+	    fnp = xmalloc(fs = 16);
+	    fi = 0;
+	    s++;
+	    while (isspc(*s))
+		s++;
+	    while (!issep(*s)) {
+		if (fi >= fs - 1)
+		    fnp = xrealloc(fnp, fs += 16);
+		fnp[fi++] = *s++;
+	    }
+	    fnp[fi] = 0;
+	    if (inpf) {
+		if (pp->inf == 0)
+		    pp->inf = fnp;
+	    } else {
+		if (pp->outf == 0)
+		    pp->outf = fnp;
+	    }
+	} else if (s[0] == '"') {
+	    q = !q;
+	    pp->arg[mi++] = *s++;
+	} else {
+	    pp->arg[mi++] = *s++;
+	}
+    }
+    pp->arg[mi] = 0;
+    return pp;
+}
+
+static PRO *NEAR
+pars(char *s)
+{
+    char *lb;
+    int li, ls, q;
+    int c;
+    PRO *pp;
+
+    lb = xmalloc(ls = STR_MAX);	/* about */
+    li = q = 0;
+    p1 = 0;
+
+    for (;;) {
+	c = *s++;
+	if (li >= ls - 2)
+	    lb = xrealloc(lb, ls += STR_MAX);
+	if (isk1(c) && *s) {
+	    lb[li++] = c;
+	    lb[li++] = *s++;
+	} else if ((!q && c == '|') || c == 0 || (c == '\n' && *s == 0)) {
+	    lb[li++] = 0;
+	    if (p1 == 0) {
+		pp = p1 = pars1c(lb);
+	    } else {
+		pp->next = pars1c(lb);
+		pp = pp->next;
+	    }
+	    li = 0;
+	    if (c == 0 || (c == '\n' && *s == 0))
+		break;
+	} else if (c == '"') {
+	    q = !q;
+	    lb[li++] = c;
+	} else {
+	    lb[li++] = c;
+	}
+    }
+    free(lb);
+    return p1;
+}
+
+static int NEAR
+try3(char *cnm, PRO * p, int flag)
+{
+    char cmdb[STR_MAX];
+    int rc;
+
+    strcat(strcpy(cmdb, cnm), ".com");
+    if ((rc = open(cmdb, O_RDONLY)) >= 0) {
+	close(rc);
+	return spawnl(flag, cmdb, cmdb, p->arg, (char *) 0);
+    }
+    strcat(strcpy(cmdb, cnm), ".exe");
+    if ((rc = open(cmdb, O_RDONLY)) >= 0) {
+	close(rc);
+	return spawnl(flag, cmdb, cmdb, p->arg, (char *) 0);
+    }
+    strcat(strcpy(cmdb, cnm), ".bat");
+    if ((rc = open(cmdb, O_RDONLY)) >= 0) {
+	close(rc);
+	return csystem(p, flag);
+    }
+    return -1;
+}
+
+static int NEAR
+prog_go(PRO * p, int flag)
+{
+    char *s;
+    char *extp = 0;
+    char cmdb[STR_MAX];
+    char *ep;
+    int rc, lc, cmd_len;
+
+    cmd_len = strlen(p->cmd);
+
+    s = p->cmd + cmd_len - 1;
+    while (cmd_len && (*s != '\\') && (*s != '/') && (*s != ':')) {
+	if (*s == '.')
+	    extp = s;
+	cmd_len--;
+	s--;
+    }
+
+    if (is_builtin_command(p->cmd) || (extp && stricmp(extp, ".bat") == 0))
+	return csystem(p, flag);
+
+    if (s < p->cmd) {		/* cmd has no PATH nor Drive */
+	ep = getenv("PATH");
+	strcpy(cmdb, p->cmd);
+	for (;;) {
+	    if (extp) {		/* has extention */
+		if ((rc = open(cmdb, O_RDONLY)) >= 0) {
+		    close(rc);
+		    rc = spawnl(flag, cmdb, cmdb, p->arg, (char *) 0);
+		}
+	    } else {
+		rc = try3(cmdb, p, flag);
+	    }
+	    if (rc >= 0)
+		return rc;
+
+	    if (ep && *ep) {
+		int i;
+		for (i = 0; *ep != ';' && *ep != '\0'; ep++, i++)
+		    lc = cmdb[i] = *ep;
+		if (*ep == ';')
+		    ep++;
+		if (i > 0 && lc != ':' && lc != '\\' && lc != '/')
+		    cmdb[i++] = '\\';
+		cmdb[i] = 0;
+		strcat(cmdb, p->cmd);
+	    } else {
+		if (rc == -2)
+		    return rc;
+		return -1;
+	    }
+	}
+    } else {			/* has PATH or Drive */
+	if (extp) {		/* has extention */
+	    if ((rc = open(p->cmd, O_RDONLY)) >= 0) {
+		close(rc);
+		return spawnl(flag, p->cmd, p->cmd, p->arg, (char *) 0);
+	    }
+	    return -1;
+	} else {
+	    return try3(p->cmd, p, flag);
+	}
+    }
+}
+
+static char *NEAR
+tmpf(char *tp)
+{
+    char tplate[STR_MAX];
+    char *ev;
+    int i;
+
+    if ((ev = getenv("TMP")) != 0) {
+	strcpy(tplate, ev);
+	i = strlen(ev);
+	if (i && ev[i - 1] != '\\' && ev[i - 1] != '/')
+	    strcat(tplate, "\\");
+    } else {
+	tplate[0] = 0;
+    }
+    strcat(tplate, tp);
+    return strdup(mktemp(tplate));
+}
+
+static int NEAR
+redopen(char *fn, int md, int sfd)
+{
+    int rc;
+    int fd;
+
+    if ((fd = open(fn, md, 0666)) != -1) {
+	if (md & O_APPEND)
+	    lseek(fd, 0L, SEEK_END);
+	rc = dup(sfd);
+	if (fd != sfd) {
+	    dup2(fd, sfd);
+	    close(fd);
+	}
+	return rc;
+    }
+    return -1;
+}
+
+static int NEAR
+redclose(int fd, int sfd)
+{
+    if (fd != -1) {
+	dup2(fd, sfd);
+	close(fd);
+    }
+    return -1;
+}
+
+static void NEAR
+redswitch(PRO * p)
+{
+    int d;
+
+    for (d = 0; d < sizeof(p->ored) / sizeof(p->ored[0]); d++) {
+	if (d != p->ored[d]) {
+	    p->sred[d] = dup(d);
+	    dup2(p->ored[d], d);
+	}
+    }
+}
+
+static void NEAR
+redunswitch(PRO * p)
+{
+    int d;
+
+    for (d = 0; d < sizeof(p->ored) / sizeof(p->ored[0]); d++) {
+	if (d != p->ored[d]) {
+	    dup2(p->sred[d], d);
+	    close(p->sred[d]);
+	}
+    }
+}
+
+int
+xsystem(char *cmd)
+{
+    PRO *p, *pn;
+    char *pof, *pif, *pxf;
+    int psstdin, psstdout;
+    int rdstdin, rdstdout;
+    int rc = 0;
+    static char *cmdline = 0;
+#if USECMDLINE
+    char *oldcmdline;
+#endif
+
+#ifdef SH_EX	/* 1997/11/01 (Sat) 10:04:03 add by JH7AYN */
+    pif = cmd;
+    while (*pif++) {
+	if (*pif == '\r') {
+	    *pif = '\0';
+	    break;
+	} else if (*pif ==  '\n') {
+	    *pif = '\0';
+	    break;
+	}
+    }
+#endif
+
+    pof = pif = pxf = 0;
+    p = pars(cmd);
+    pof = tmpf("p1XXXXXX");
+    pif = tmpf("p2XXXXXX");
+    psstdin = psstdout = rdstdin = rdstdout = -1;
+    while (p) {
+#if USECMDLINE
+	if (!getenv("NOCMDLINE")) {
+	    oldcmdline = cmdline;
+	    cmdline = xmalloc(strlen(p->cmd) + strlen(p->arg) + 10);
+	    strcat(strcat(strcat(strcpy(cmdline, "CMDLINE="), p->cmd), " "), p->arg);
+	    putenv(cmdline);
+	    if (oldcmdline)
+		free(oldcmdline);
+	}
+#endif
+	if (p->next)
+	    psstdout = redopen(pof, O_WRONLY | O_CREAT | O_TRUNC, 1);
+	if (p->inf)
+	    rdstdin = redopen(p->inf, p->infmod, 0);
+	if (p->outf)
+	    rdstdout = redopen(p->outf, p->outfmod, 1);
+	redswitch(p);
+	rc = prog_go(p, P_WAIT);
+	redunswitch(p);
+	rdstdin = redclose(rdstdin, 0);
+	rdstdout = redclose(rdstdout, 1);
+	psstdout = redclose(psstdout, 1);
+	psstdin = redclose(psstdin, 0);
+	if ((p = p->next) != 0) {
+	    pxf = pif;
+	    pif = pof;
+	    pof = pxf;
+	    psstdin = redopen(pif, O_RDONLY, 0);
+	}
+    }
+    unlink(pif);
+    free(pif);
+    unlink(pof);
+    free(pof);
+    for (pn = p = p1; p; p = pn) {
+	pn = p->next;
+	if (p->line)
+	    free(p->line);
+	if (p->cmd)
+	    free(p->cmd);
+	if (p->arg)
+	    free(p->arg);
+	if (p->inf)
+	    free(p->inf);
+	if (p->outf)
+	    free(p->outf);
+	free(p);
+    }
+    if (rc == -2)
+	return 127;
+    return rc < 0 ? 0xFF00 : rc;
+}
+
+int exec_command(char * cmd, int wait_flag)
+{
+    PRO *p;
+    char *pif;
+    int rc = 0;
+    int cmd_str;
+
+    pif = cmd;
+    while(*pif == ' ')
+	pif++;
+
+    cmd = pif;
+    cmd_str = TRUE;
+
+    while (*pif++) {
+	if (*pif == '\r') {
+	    *pif = '\0';
+	    break;
+	} else if (*pif ==  '\n') {
+	    *pif = '\0';
+	    break;
+	} else if (cmd_str) {
+	    if (*pif ==  '/')
+		*pif = '\\';
+	} else if (cmd_str) {
+	    if (*pif ==  ' ')
+		cmd_str = FALSE;
+	}
+    }
+    p = pars(cmd);
+
+    if (wait_flag)
+	rc = prog_go(p, P_WAIT);
+    else
+	rc = prog_go(p, P_NOWAIT);
+
+    return rc;
+}
+
+
+#ifdef TEST
+#include <stdio.h>
+
+void
+main()
+{
+    char line_buff[STR_MAX];
+
+    while (gets(line_buff)) {
+	printf("\nreturn %04X\n", xsystem(line_buff));
+    }
+}
+#endif	/* TEST */
diff --git a/src/chrtrans/README.format b/src/chrtrans/README.format
index df7d335e..7437b503 100644
--- a/src/chrtrans/README.format
+++ b/src/chrtrans/README.format
@@ -82,7 +82,7 @@ c) character translation definitions:
  *	<range>		idem
  *	<range>		<unicode range>
  *
- * where <range> ::= <fontpos>-<fontpos>
+ * where <unicode range> ::= <unicode>-<unicode>
  * and <unicode> ::= U+<h><h><h><h>
  * and <h> ::= <hexadecimal digit>
  *
diff --git a/src/chrtrans/UCkd.h b/src/chrtrans/UCkd.h
index 104882d7..a6020696 100644
--- a/src/chrtrans/UCkd.h
+++ b/src/chrtrans/UCkd.h
@@ -1,8 +1,5 @@
 #ifndef _UC_KD_H
 #define _UC_KD_H
-#ifdef NOTDEFINED
-#include <sys/types.h>	/* Included via tcp.h. */
-#endif /* NOTDEFINED */
 
 /*
  *  NOTE: THE FOLLOWING #define MAY NEED ADJUSTMENT.
diff --git a/src/chrtrans/jcuken_kb.h b/src/chrtrans/jcuken_kb.h
index 8fbe458b..75c8da96 100644
--- a/src/chrtrans/jcuken_kb.h
+++ b/src/chrtrans/jcuken_kb.h
@@ -1,4 +1,4 @@
-static unsigned short kb_layout_jcuken[128] = { 
+static LYKeymap_t kb_layout_jcuken[128] = { 
 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, /* 00..07 */ 
 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F, /* 08..0F */ 
 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, /* 10..17 */ 
diff --git a/src/chrtrans/make-msc.bat b/src/chrtrans/make-msc.bat
new file mode 100644
index 00000000..7e69d642
--- /dev/null
+++ b/src/chrtrans/make-msc.bat
@@ -0,0 +1,49 @@
+@echo If .tbl files are added or removed you will need to hand edit

+@echo this batch file.

+@echo .

+@echo off

+REM make -f makefile.w32

+

+nmake -f makefile.msc

+

+makeuctb cp1250_uni.tbl > cp1250_uni.h

+makeuctb cp1251_uni.tbl > cp1251_uni.h

+makeuctb cp1252_uni.tbl > cp1252_uni.h

+makeuctb cp1253_uni.tbl > cp1253_uni.h

+makeuctb cp1255_uni.tbl > cp1255_uni.h

+makeuctb cp1256_uni.tbl > cp1256_uni.h

+makeuctb cp1257_uni.tbl > cp1257_uni.h

+makeuctb cp437_uni.tbl > cp437_uni.h

+makeuctb cp737_uni.tbl > cp737_uni.h

+makeuctb cp775_uni.tbl > cp775_uni.h

+makeuctb cp850_uni.tbl > cp850_uni.h

+makeuctb cp852_uni.tbl > cp852_uni.h

+makeuctb cp862_uni.tbl > cp862_uni.h

+makeuctb cp864_uni.tbl > cp864_uni.h

+makeuctb cp866_uni.tbl > cp866_uni.h

+makeuctb cp866u_uni.tbl > cp866u_uni.h

+makeuctb cp869_uni.tbl > cp869_uni.h

+makeuctb def7_uni.tbl  > def7_uni.h

+makeuctb dmcs_uni.tbl > dmcs_uni.h

+makeuctb hp_uni.tbl > hp_uni.h

+makeuctb iso01_uni.tbl > iso01_uni.h

+makeuctb iso02_uni.tbl > iso02_uni.h

+makeuctb iso03_uni.tbl > iso03_uni.h

+makeuctb iso04_uni.tbl > iso04_uni.h

+makeuctb iso05_uni.tbl > iso05_uni.h

+makeuctb iso06_uni.tbl > iso06_uni.h

+makeuctb iso07_uni.tbl > iso07_uni.h

+makeuctb iso08_uni.tbl > iso08_uni.h

+makeuctb iso09_uni.tbl > iso09_uni.h

+makeuctb iso10_uni.tbl > iso10_uni.h

+makeuctb iso15_uni.tbl > iso15_uni.h

+makeuctb koi8r_uni.tbl > koi8r_uni.h

+makeuctb koi8u_uni.tbl > koi8u_uni.h

+makeuctb mac_uni.tbl > mac_uni.h

+makeuctb mnem_suni.tbl > mnem_suni.h

+makeuctb mnem2_suni.tbl > mnem2_suni.h

+makeuctb mnem_suni.tbl > mnem_suni.h

+makeuctb next_uni.tbl > next_uni.h

+makeuctb rfc_suni.tbl > rfc_suni.h

+makeuctb utf8_uni.tbl > utf8_uni.h

+makeuctb viscii_uni.tbl > viscii_uni.h

diff --git a/src/chrtrans/makefile.dos b/src/chrtrans/makefile.dos
index 3a830a4f..cc9884cf 100644
--- a/src/chrtrans/makefile.dos
+++ b/src/chrtrans/makefile.dos
@@ -15,8 +15,8 @@ CC = gcc
 MCFLAGS = -O3 -DDOSPATH -DNO_TTYTYP \
 -I. \
 -I../../WWW/Library/Implementation \
--I../../djgpp/tcplib/include \
--I../../djgpp/tcplib/include/tcp \
+-I../../djgpp/watt32/inc \
+-I../../djgpp/watt32/inc/sys \
 -I../..
 
 .SUFFIXES: .tbl
diff --git a/src/chrtrans/makefile.in b/src/chrtrans/makefile.in
index 2e2f2681..87a39825 100644
--- a/src/chrtrans/makefile.in
+++ b/src/chrtrans/makefile.in
@@ -94,7 +94,7 @@ default: $(FONTMAP_INC)
 tables: $(TABLES)
 
 makeuctb$x: makeuctb.o
-	$(CC) $(CC_OPTS) -o $@ makeuctb.o $(INTLLIB) $(LIBS)
+	$(CC) $(CC_OPTS) $(LDFLAGS) -o $@ makeuctb.o $(INTLLIB) $(LIBS)
 
 makeuctb.o: $(srcdir)/UCkd.h $(srcdir)/makeuctb.c
 
diff --git a/src/chrtrans/makefile.msc b/src/chrtrans/makefile.msc
new file mode 100644
index 00000000..6885a616
--- /dev/null
+++ b/src/chrtrans/makefile.msc
@@ -0,0 +1,23 @@
+#
+# Makefile for Microsoft Visual C++ 4.2 or later
+#
+
+CC       = cl
+LD       = link
+
+INCLUDES = /I "." /I ".." /I "..\.." /I "..\..\WWW\Library\Implementation" /I "..\..\lib"
+DEFS = /D "NDEBUG" /D "__WIN32__" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_WIN32" /D "NO_FILEIO_H" /D "NO_UNISTD_H" /D "_WINDOWS" /D "DOSPATH"
+CFLAGS   = /nologo /MT /W3 /GX /O2 /c
+
+LDFLAGS  = /nologo /subsystem:console /incremental:no /machine:I386
+LIBS     = user32.lib wsock32.lib
+
+COMPILE = $(CC) $(CFLAGS) $(INCLUDES) $(DEFS)
+LINK    = $(LD) $(LDFLAGS) /out:$@
+
+makeuctb.exe : makeuctb.obj
+	$(LINK) makeuctb.obj $(LIBS)
+
+makeuctb.obj :  makeuctb.c
+	$(COMPILE) makeuctb.c
+
diff --git a/src/chrtrans/MAKEFILE.W32 b/src/chrtrans/makefile.w32
index 4968995f..4968995f 100644
--- a/src/chrtrans/MAKEFILE.W32
+++ b/src/chrtrans/makefile.w32
diff --git a/src/chrtrans/makeuctb.c b/src/chrtrans/makeuctb.c
index 1207d3d1..7e6b18da 100644
--- a/src/chrtrans/makeuctb.c
+++ b/src/chrtrans/makeuctb.c
@@ -18,7 +18,6 @@
 
 #define DONT_USE_SOCKS5
 #include <HTUtils.h>
-#include <tcp.h>
 /*
  *  Don't try to use LYexit().
  */
diff --git a/src/chrtrans/MAKEW32.BAT b/src/chrtrans/makew32.bat
index 3ad8c16f..47b8ae69 100644
--- a/src/chrtrans/MAKEW32.BAT
+++ b/src/chrtrans/makew32.bat
@@ -1,44 +1,44 @@
-@echo If .tbl files are added or removed you will need to hand edit
-@echo this batch file.
-@echo .
-make -f makefile.w32
-makeuctb cp1250_uni.tbl > cp1250_uni.h
-makeuctb cp1251_uni.tbl > cp1251_uni.h
-makeuctb cp1252_uni.tbl > cp1252_uni.h
-makeuctb cp1253_uni.tbl > cp1253_uni.h
-makeuctb cp1255_uni.tbl > cp1255_uni.h
-makeuctb cp1256_uni.tbl > cp1256_uni.h
-makeuctb cp1257_uni.tbl > cp1257_uni.h
-makeuctb cp437_uni.tbl > cp437_uni.h
-makeuctb cp737_uni.tbl > cp737_uni.h
-makeuctb cp775_uni.tbl > cp775_uni.h
-makeuctb cp850_uni.tbl > cp850_uni.h
-makeuctb cp852_uni.tbl > cp852_uni.h
-makeuctb cp862_uni.tbl > cp862_uni.h
-makeuctb cp864_uni.tbl > cp864_uni.h
-makeuctb cp866_uni.tbl > cp866_uni.h
-makeuctb cp866u_uni.tbl > cp866u_uni.h
-makeuctb cp869_uni.tbl > cp869_uni.h
-makeuctb def7_uni.tbl  > def7_uni.h
-makeuctb dmcs_uni.tbl > dmcs_uni.h
-makeuctb hp_uni.tbl > hp_uni.h 
-makeuctb iso01_uni.tbl > iso01_uni.h
-makeuctb iso02_uni.tbl > iso02_uni.h
-makeuctb iso03_uni.tbl > iso03_uni.h
-makeuctb iso04_uni.tbl > iso04_uni.h
-makeuctb iso05_uni.tbl > iso05_uni.h
-makeuctb iso06_uni.tbl > iso06_uni.h
-makeuctb iso07_uni.tbl > iso07_uni.h
-makeuctb iso08_uni.tbl > iso08_uni.h
-makeuctb iso09_uni.tbl > iso09_uni.h
-makeuctb iso10_uni.tbl > iso10_uni.h
-makeuctb iso15_uni.tbl > iso15_uni.h 
-makeuctb koi8r_uni.tbl > koi8r_uni.h
-makeuctb koi8u_uni.tbl > koi8u_uni.h
-makeuctb mac_uni.tbl > mac_uni.h
-makeuctb mnem2_suni.tbl > mnem2_suni.h
-makeuctb mnem_suni.tbl > mnem_suni.h
-makeuctb next_uni.tbl > next_uni.h
-makeuctb rfc_suni.tbl > rfc_suni.h
-makeuctb utf8_uni.tbl > utf8_uni.h
-makeuctb viscii_uni.tbl > viscii_uni.h
+@echo If .tbl files are added or removed you will need to hand edit

+@echo this batch file.

+@echo .

+make -f makefile.w32

+makeuctb cp1250_uni.tbl > cp1250_uni.h

+makeuctb cp1251_uni.tbl > cp1251_uni.h

+makeuctb cp1252_uni.tbl > cp1252_uni.h

+makeuctb cp1253_uni.tbl > cp1253_uni.h

+makeuctb cp1255_uni.tbl > cp1255_uni.h

+makeuctb cp1256_uni.tbl > cp1256_uni.h

+makeuctb cp1257_uni.tbl > cp1257_uni.h

+makeuctb cp437_uni.tbl > cp437_uni.h

+makeuctb cp737_uni.tbl > cp737_uni.h

+makeuctb cp775_uni.tbl > cp775_uni.h

+makeuctb cp850_uni.tbl > cp850_uni.h

+makeuctb cp852_uni.tbl > cp852_uni.h

+makeuctb cp862_uni.tbl > cp862_uni.h

+makeuctb cp864_uni.tbl > cp864_uni.h

+makeuctb cp866_uni.tbl > cp866_uni.h

+makeuctb cp866u_uni.tbl > cp866u_uni.h

+makeuctb cp869_uni.tbl > cp869_uni.h

+makeuctb def7_uni.tbl  > def7_uni.h

+makeuctb dmcs_uni.tbl > dmcs_uni.h

+makeuctb hp_uni.tbl > hp_uni.h 

+makeuctb iso01_uni.tbl > iso01_uni.h

+makeuctb iso02_uni.tbl > iso02_uni.h

+makeuctb iso03_uni.tbl > iso03_uni.h

+makeuctb iso04_uni.tbl > iso04_uni.h

+makeuctb iso05_uni.tbl > iso05_uni.h

+makeuctb iso06_uni.tbl > iso06_uni.h

+makeuctb iso07_uni.tbl > iso07_uni.h

+makeuctb iso08_uni.tbl > iso08_uni.h

+makeuctb iso09_uni.tbl > iso09_uni.h

+makeuctb iso10_uni.tbl > iso10_uni.h

+makeuctb iso15_uni.tbl > iso15_uni.h 

+makeuctb koi8r_uni.tbl > koi8r_uni.h

+makeuctb koi8u_uni.tbl > koi8u_uni.h

+makeuctb mac_uni.tbl > mac_uni.h

+makeuctb mnem2_suni.tbl > mnem2_suni.h

+makeuctb mnem_suni.tbl > mnem_suni.h

+makeuctb next_uni.tbl > next_uni.h

+makeuctb rfc_suni.tbl > rfc_suni.h

+makeuctb utf8_uni.tbl > utf8_uni.h

+makeuctb viscii_uni.tbl > viscii_uni.h

diff --git a/src/chrtrans/rot13_kb.h b/src/chrtrans/rot13_kb.h
index 8bc1a9dc..41a6a870 100644
--- a/src/chrtrans/rot13_kb.h
+++ b/src/chrtrans/rot13_kb.h
@@ -1,4 +1,4 @@
-static unsigned short kb_layout_rot13[128] = { 
+static LYKeymap_t kb_layout_rot13[128] = { 
 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, /* 00..07 */ 
 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F, /* 08..0F */ 
 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, /* 10..17 */ 
diff --git a/src/chrtrans/yawerty_kb.h b/src/chrtrans/yawerty_kb.h
index 2592b822..8698d965 100644
--- a/src/chrtrans/yawerty_kb.h
+++ b/src/chrtrans/yawerty_kb.h
@@ -1,4 +1,4 @@
-static unsigned short kb_layout_yawerty[128] = { 
+static LYKeymap_t kb_layout_yawerty[128] = { 
 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, /* 00..07 */ 
 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F, /* 08..0F */ 
 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, /* 10..17 */ 
diff --git a/src/makefile.dos b/src/makefile.dos
index 1a69fc84..a10c0b2d 100644
--- a/src/makefile.dos
+++ b/src/makefile.dos
@@ -1,62 +1,62 @@
-OBJS= UCdomap.o UCAux.o UCAuto.o \

-LYClean.o LYShowInfo.o LYEdit.o LYStrings.o \

-LYMail.o HTAlert.o GridText.o LYGetFile.o \

-LYMain.o LYMainLoop.o LYCurses.o LYBookmark.o LYUtils.o \

-LYOptions.o LYReadCFG.o LYSearch.o LYHistory.o \

-LYForms.o LYPrint.o LYrcFile.o LYDownload.o LYNews.o LYKeymap.o \

-HTML.o HTFWriter.o HTInit.o DefaultStyle.o LYLocal.o LYUpload.o \

-LYLeaks.o LYexit.o LYJump.o LYList.o LYCgi.o LYTraversal.o \

-LYEditmap.o LYCharSets.o LYCharUtils.o LYMap.o LYCookie.o LYExtern.o \

-LYStyle.o LYHash.o LYPrettySrc.o

-

-CFLAGS= $(MCFLAGS) -I. -I.. $(SLANGINC)

-

-CC = gcc

-MCFLAGS = -O2 -DHAVE_GETBKGD -DDISP_PARTIAL -DUSE_ZLIB \

- -DSOURCE_CACHE -DUSE_PSRC \

- -DUSE_EXTERNALS -DCOLOR_CURSES -DNCURSES -DFANCY_CURSES \

- -DACCESS_AUTH -DNO_CUSERID -DNOUSERS -DDOSPATH -DNO_TTYTYPE -DNO_UTMP \

- -Ichrtrans -I../WWW/library/implementation \

- -I../curses  -I../djgpp/tcplib/include -I../djgpp/tcplib/include/tcp

-WWWLIB = ../WWW/library/djgpp/libwww.a ../curses/pdcurses.a ../djgpp/tcplib/obj/libtcp.a

-LIBS=-lz

-

-all: lynx

-

-lynx:   message $(OBJS) $(WWWLIB)

-	@echo "Linking and creating Lynx executable"

-	$(CC) $(CFLAGS) -o lynx.exe  $(OBJS) $(WWWLIB) $(SLANGLIB) $(LIBS)

-	@echo "Welcome to Lynx!"

-

-message:

-	@echo "Compiling Lynx sources"

-

-dbg:	$(OBJS) $(WWWLIB)

-	@echo "Making Lynx code"

-	$(CC) -g $(OBJS) $(CFLAGS) $(WWWLIB) $(SLANGLIB) $(LIBS)

-

-lint:

-	lint *.c  > ../lint.out

-

-clean:

-	rm -f lynx.exe core *.[ob]

-

-DefaultStyle.o:	../userdefs.h

-HTFWriter.o:	../userdefs.h

-LYBookmark.o:	../userdefs.h

-LYCharSets.o:	../userdefs.h

-LYCharUtils.o:	../userdefs.h

-LYCookie.o:	../userdefs.h

-LYDownload.o:	../userdefs.h

-LYEditmap.o:	../userdefs.h

-LYExtern.o:	../userdefs.h

-LYGetFile.o:	../userdefs.h

-LYHistory.o:	../userdefs.h

-LYKeymap.o:	../userdefs.h

-LYMain.o:	../userdefs.h

-LYMainLoop.o:	../userdefs.h

-LYOptions.o:	../userdefs.h

-LYReadCFG.o:	../userdefs.h

-LYShowInfo.o:	../userdefs.h

-LYStrings.o:	../userdefs.h

-LYTraversal.o:	../userdefs.h

+OBJS= UCdomap.o UCAux.o UCAuto.o \
+LYClean.o LYShowInfo.o LYEdit.o LYStrings.o \
+LYMail.o HTAlert.o GridText.o LYGetFile.o \
+LYMain.o LYMainLoop.o LYCurses.o LYBookmark.o LYUtils.o \
+LYOptions.o LYReadCFG.o LYSearch.o LYHistory.o \
+LYForms.o LYPrint.o LYrcFile.o LYDownload.o LYNews.o LYKeymap.o \
+HTML.o HTFWriter.o HTInit.o DefaultStyle.o LYLocal.o LYUpload.o \
+LYLeaks.o LYexit.o LYJump.o LYList.o LYCgi.o LYTraversal.o \
+LYEditmap.o LYCharSets.o LYCharUtils.o LYMap.o LYCookie.o LYExtern.o \
+LYStyle.o LYHash.o LYPrettySrc.o
+
+CFLAGS= $(MCFLAGS) -I. -I.. $(SLANGINC)
+
+CC = gcc
+MCFLAGS = -O2 -DHAVE_GETBKGD -DDISP_PARTIAL -DUSE_ZLIB \
+ -DSOURCE_CACHE -DUSE_PSRC \
+ -DUSE_EXTERNALS -DCOLOR_CURSES -DNCURSES -DFANCY_CURSES \
+ -DACCESS_AUTH -DNO_CUSERID -DNOUSERS -DDOSPATH -DNO_TTYTYPE -DNO_UTMP \
+ -Ichrtrans -I../WWW/library/implementation \
+ -I../curses  -I../djgpp/tcplib/include -I../djgpp/tcplib/include/tcp
+WWWLIB = ../WWW/library/djgpp/libwww.a ../curses/pdcurses.a ../djgpp/tcplib/obj/libtcp.a
+LIBS=-lz
+
+all: lynx
+
+lynx:   message $(OBJS) $(WWWLIB)
+	@echo "Linking and creating Lynx executable"
+	$(CC) $(CFLAGS) -o lynx.exe  $(OBJS) $(WWWLIB) $(SLANGLIB) $(LIBS)
+	@echo "Welcome to Lynx!"
+
+message:
+	@echo "Compiling Lynx sources"
+
+dbg:	$(OBJS) $(WWWLIB)
+	@echo "Making Lynx code"
+	$(CC) -g $(OBJS) $(CFLAGS) $(WWWLIB) $(SLANGLIB) $(LIBS)
+
+lint:
+	lint *.c  > ../lint.out
+
+clean:
+	rm -f lynx.exe core *.[ob]
+
+DefaultStyle.o:	../userdefs.h
+HTFWriter.o:	../userdefs.h
+LYBookmark.o:	../userdefs.h
+LYCharSets.o:	../userdefs.h
+LYCharUtils.o:	../userdefs.h
+LYCookie.o:	../userdefs.h
+LYDownload.o:	../userdefs.h
+LYEditmap.o:	../userdefs.h
+LYExtern.o:	../userdefs.h
+LYGetFile.o:	../userdefs.h
+LYHistory.o:	../userdefs.h
+LYKeymap.o:	../userdefs.h
+LYMain.o:	../userdefs.h
+LYMainLoop.o:	../userdefs.h
+LYOptions.o:	../userdefs.h
+LYReadCFG.o:	../userdefs.h
+LYShowInfo.o:	../userdefs.h
+LYStrings.o:	../userdefs.h
+LYTraversal.o:	../userdefs.h
diff --git a/src/makefile.dsl b/src/makefile.dsl
index 326fa90c..9eb56338 100644
--- a/src/makefile.dsl
+++ b/src/makefile.dsl
@@ -1,69 +1,70 @@
-OBJS= UCdomap.o UCAux.o UCAuto.o \

-LYClean.o LYShowInfo.o LYEdit.o LYStrings.o \

-LYMail.o HTAlert.o GridText.o LYGetFile.o \

-LYMain.o LYMainLoop.o LYCurses.o LYBookmark.o LYUtils.o \

-LYOptions.o LYReadCFG.o LYSearch.o LYHistory.o \

-LYForms.o LYPrint.o LYrcFile.o LYDownload.o LYNews.o LYKeymap.o \

-HTML.o HTFWriter.o HTInit.o DefaultStyle.o LYLocal.o LYUpload.o \

-LYLeaks.o LYexit.o LYJump.o LYList.o LYCgi.o LYTraversal.o \

-LYEditmap.o LYCharSets.o LYCharUtils.o LYMap.o LYCookie.o LYExtern.o \

-LYStyle.o LYHash.o LYPrettySrc.o

-

-CFLAGS= $(MCFLAGS) $(INTLFLAGS) -I. -I.. $(SLANGINC)

-

-# comment this line to suppress DIRED support

-DIRED_DEFS = -DDIRED_SUPPORT -DOK_UUDECODE -DOK_TAR -DOK_GZIP -DOK_ZIP

-

-CC = gcc

-MCFLAGS = -O2 -DDISP_PARTIAL -DUSE_ZLIB -DUSE_EXTERNALS \

-$(DIRED_DEFS) \

--DSOURCE_CACHE -DUSE_PSRC \

--DUSE_SLANG -DDJGPP_KEYHANDLER -DACCESS_AUTH -DNO_CUSERID \

--DNOUSERS -DDOSPATH -DNO_TTYTYPE -DNO_UTMP -I../WWW/Library/Implementation \

--I../djgpp/tcplib/include -I./chrtrans -I../djgpp/tcplib/include/tcp

-WWWLIB = ../WWW/Library/djgpp/libwww.a ../djgpp/tcplib/obj/libtcp.a

-LIBS= -lslang -lz # -lintl

-CHRTR= ./chrtrans/

-#INTLFLAGS = -DHAVE_GETTEXT -DHAVE_LIBINTL_H

-

-all: lynx.exe

-

-lynx.exe:   message $(OBJS) $(WWWLIB)

-	@echo "Linking and creating Lynx executable"

-	$(CC) $(CFLAGS) -o lynx.exe  $(OBJS) $(WWWLIB) $(SLANGLIB) $(LIBS)

-	@echo "Welcome to Lynx!"

-

-message:

-	@echo "Compiling Lynx sources"

-

-dbg:    $(OBJS) $(WWWLIB)

-	@echo "Making Lynx code"

-	$(CC) $(OBJS) $(CFLAGS) $(WWWLIB) $(SLANGLIB) $(LIBS)

-

-lint:

-	lint *.c  > ../lint.out

-

-clean:

-	rm -f lynx.exe core *.[ob]

-

-DefaultStyle.o:	../userdefs.h

-HTFWriter.o:	../userdefs.h

-LYBookmark.o:	../userdefs.h

-LYCharSets.o:	../userdefs.h

-LYCharUtils.o:	../userdefs.h

-LYCookie.o:	../userdefs.h

-LYDownload.o:	../userdefs.h

-LYEditmap.o:	../userdefs.h

-LYExtern.o:	../userdefs.h

-LYGetFile.o:	../userdefs.h

-LYHistory.o:	../userdefs.h

-LYKeymap.o:	../userdefs.h

-LYMain.o:	../userdefs.h

-LYMainLoop.o:	../userdefs.h

-LYOptions.o:	../userdefs.h

-LYReadCFG.o:	../userdefs.h

-LYReadCFG.o:	../userdefs.h

-LYShowInfo.o:	../userdefs.h

-LYStrings.o:	../userdefs.h

-LYTraversal.o:	../userdefs.h

-LYUtils.o:	../userdefs.h

+OBJS= UCdomap.o UCAux.o UCAuto.o \
+LYClean.o LYShowInfo.o LYEdit.o LYStrings.o \
+LYMail.o HTAlert.o GridText.o LYGetFile.o \
+LYMain.o LYMainLoop.o LYCurses.o LYBookmark.o LYUtils.o \
+LYOptions.o LYReadCFG.o LYSearch.o LYHistory.o \
+LYForms.o LYPrint.o LYrcFile.o LYDownload.o LYNews.o LYKeymap.o \
+HTML.o HTFWriter.o HTInit.o DefaultStyle.o LYLocal.o LYUpload.o \
+LYLeaks.o LYexit.o LYJump.o LYList.o LYCgi.o LYTraversal.o \
+LYEditmap.o LYCharSets.o LYCharUtils.o LYMap.o LYCookie.o LYExtern.o \
+LYStyle.o LYHash.o LYPrettySrc.o
+
+CFLAGS= $(MCFLAGS) $(INTLFLAGS) -I. -I.. $(SLANGINC)
+
+# comment this line to suppress DIRED support
+DIRED_DEFS = -DDIRED_SUPPORT -DOK_UUDECODE -DOK_TAR -DOK_GZIP -DOK_ZIP
+
+CC = gcc
+MCFLAGS = -O2 -DDISP_PARTIAL -DUSE_ZLIB -DUSE_EXTERNALS \
+-DWATT32 \
+$(DIRED_DEFS) \
+-DSOURCE_CACHE -DUSE_PSRC \
+-DUSE_SLANG -DDJGPP_KEYHANDLER -DACCESS_AUTH -DNO_CUSERID \
+-DNOUSERS -DDOSPATH -DNO_TTYTYPE -DNO_UTMP -I../WWW/Library/Implementation \
+-I../djgpp/watt32/inc -I./chrtrans -I../djgpp/watt32/inc/sys
+WWWLIB = ../WWW/Library/djgpp/libwww.a ../djgpp/watt32/lib/libwatt.a
+LIBS= -lslang -lz # -lintl
+CHRTR= ./chrtrans/
+#INTLFLAGS = -DHAVE_GETTEXT -DHAVE_LIBINTL_H
+
+all: lynx.exe
+
+lynx.exe:   message $(OBJS) $(WWWLIB)
+	@echo "Linking and creating Lynx executable"
+	$(CC) $(CFLAGS) -o lynx.exe  $(OBJS) $(WWWLIB) $(SLANGLIB) $(LIBS)
+	@echo "Welcome to Lynx!"
+
+message:
+	@echo "Compiling Lynx sources"
+
+dbg:    $(OBJS) $(WWWLIB)
+	@echo "Making Lynx code"
+	$(CC) $(OBJS) $(CFLAGS) $(WWWLIB) $(SLANGLIB) $(LIBS)
+
+lint:
+	lint *.c  > ../lint.out
+
+clean:
+	rm -f lynx.exe core *.[ob]
+
+DefaultStyle.o:	../userdefs.h
+HTFWriter.o:	../userdefs.h
+LYBookmark.o:	../userdefs.h
+LYCharSets.o:	../userdefs.h
+LYCharUtils.o:	../userdefs.h
+LYCookie.o:	../userdefs.h
+LYDownload.o:	../userdefs.h
+LYEditmap.o:	../userdefs.h
+LYExtern.o:	../userdefs.h
+LYGetFile.o:	../userdefs.h
+LYHistory.o:	../userdefs.h
+LYKeymap.o:	../userdefs.h
+LYMain.o:	../userdefs.h
+LYMainLoop.o:	../userdefs.h
+LYOptions.o:	../userdefs.h
+LYReadCFG.o:	../userdefs.h
+LYReadCFG.o:	../userdefs.h
+LYShowInfo.o:	../userdefs.h
+LYStrings.o:	../userdefs.h
+LYTraversal.o:	../userdefs.h
+LYUtils.o:	../userdefs.h
diff --git a/src/makefile.wsl b/src/makefile.wsl
index a54731d2..a97b51bf 100644
--- a/src/makefile.wsl
+++ b/src/makefile.wsl
@@ -1,64 +1,64 @@
-OBJS= UCdomap.o UCAux.o UCAuto.o \

-LYClean.o LYShowInfo.o LYEdit.o LYStrings.o \

-LYMail.o HTAlert.o GridText.o LYGetFile.o \

-LYMain.o LYMainLoop.o LYCurses.o LYBookmark.o LYUtils.o \

-LYOptions.o LYReadCFG.o LYSearch.o LYHistory.o \

-LYForms.o LYPrint.o LYrcFile.o LYDownload.o LYNews.o LYKeymap.o \

-HTML.o HTFWriter.o HTInit.o DefaultStyle.o LYLocal.o LYUpload.o \

-LYLeaks.o LYexit.o LYJump.o LYList.o LYCgi.o LYTraversal.o \

-LYEditmap.o LYCharSets.o LYCharUtils.o LYMap.o LYCookie.o LYExtern.o \

-LYStyle.o LYHash.o LYPrettySrc.o

-

-CFLAGS= $(MCFLAGS) -I. -I.. $(SLANGINC)

-

-CC = gcc

-MCFLAGS = -O2 -DDISP_PARTIAL -DUSE_ZLIB -DUSE_EXTERNALS \

--DSOURCE_CACHE -DUSE_PSRC \

--DUSE_SLANG -DACCESS_AUTH -DNO_CUSERID \

--DNOUSERS -DDOSPATH -DNO_TTYTYPE -DNO_UTMP -I../WWW/library/implement -I../djgpp/tcplib/include \

--I./chrtrans -I../djgpp/tcplib/include/tcp

-WWWLIB = ../WWW/library/djgpp/libwww.a ../djgpp/tcplib/obj/libtcp.a

-LIBS= -lslang -lz

-CHRTR= ./chrtrans/

-

-all: lynx.exe

-

-lynx.exe:   message $(OBJS) $(WWWLIB)

-	@echo "Linking and creating Lynx executable"

-	$(CC) $(CFLAGS) -o lynx.exe  $(OBJS) $(WWWLIB) $(SLANGLIB) $(LIBS)

-	@echo "Welcome to Lynx!"

-

-message:

-	@echo "Compiling Lynx sources"

-

-dbg:    $(OBJS) $(WWWLIB)

-	@echo "Making Lynx code"

-	$(CC) $(OBJS) $(CFLAGS) $(WWWLIB) $(SLANGLIB) $(LIBS)

-

-lint:

-	lint *.c  > ../lint.out

-

-clean:

-	rm -f lynx.exe core *.[ob]

-

-DefaultStyle.o:	../userdefs.h

-HTFWriter.o:	../userdefs.h

-LYBookmark.o:	../userdefs.h

-LYCharSets.o:	../userdefs.h

-LYCharUtils.o:	../userdefs.h

-LYCookie.o:	../userdefs.h

-LYDownload.o:	../userdefs.h

-LYEditmap.o:	../userdefs.h

-LYExtern.o:	../userdefs.h

-LYGetFile.o:	../userdefs.h

-LYHistory.o:	../userdefs.h

-LYKeymap.o:	../userdefs.h

-LYMain.o:	../userdefs.h

-LYMainLoop.o:	../userdefs.h

-LYOptions.o:	../userdefs.h

-LYReadCFG.o:	../userdefs.h

-LYReadCFG.o:	../userdefs.h

-LYShowInfo.o:	../userdefs.h

-LYStrings.o:	../userdefs.h

-LYTraversal.o:	../userdefs.h

-LYUtils.o:	../userdefs.h

+OBJS= UCdomap.o UCAux.o UCAuto.o \
+LYClean.o LYShowInfo.o LYEdit.o LYStrings.o \
+LYMail.o HTAlert.o GridText.o LYGetFile.o \
+LYMain.o LYMainLoop.o LYCurses.o LYBookmark.o LYUtils.o \
+LYOptions.o LYReadCFG.o LYSearch.o LYHistory.o \
+LYForms.o LYPrint.o LYrcFile.o LYDownload.o LYNews.o LYKeymap.o \
+HTML.o HTFWriter.o HTInit.o DefaultStyle.o LYLocal.o LYUpload.o \
+LYLeaks.o LYexit.o LYJump.o LYList.o LYCgi.o LYTraversal.o \
+LYEditmap.o LYCharSets.o LYCharUtils.o LYMap.o LYCookie.o LYExtern.o \
+LYStyle.o LYHash.o LYPrettySrc.o
+
+CFLAGS= $(MCFLAGS) -I. -I.. $(SLANGINC)
+
+CC = gcc
+MCFLAGS = -O2 -DDISP_PARTIAL -DUSE_ZLIB -DUSE_EXTERNALS \
+-DSOURCE_CACHE -DUSE_PSRC \
+-DUSE_SLANG -DACCESS_AUTH -DNO_CUSERID \
+-DNOUSERS -DDOSPATH -DNO_TTYTYPE -DNO_UTMP -I../WWW/library/implement -I../djgpp/tcplib/include \
+-I./chrtrans -I../djgpp/tcplib/include/tcp
+WWWLIB = ../WWW/library/djgpp/libwww.a ../djgpp/tcplib/obj/libtcp.a
+LIBS= -lslang -lz
+CHRTR= ./chrtrans/
+
+all: lynx.exe
+
+lynx.exe:   message $(OBJS) $(WWWLIB)
+	@echo "Linking and creating Lynx executable"
+	$(CC) $(CFLAGS) -o lynx.exe  $(OBJS) $(WWWLIB) $(SLANGLIB) $(LIBS)
+	@echo "Welcome to Lynx!"
+
+message:
+	@echo "Compiling Lynx sources"
+
+dbg:    $(OBJS) $(WWWLIB)
+	@echo "Making Lynx code"
+	$(CC) $(OBJS) $(CFLAGS) $(WWWLIB) $(SLANGLIB) $(LIBS)
+
+lint:
+	lint *.c  > ../lint.out
+
+clean:
+	rm -f lynx.exe core *.[ob]
+
+DefaultStyle.o:	../userdefs.h
+HTFWriter.o:	../userdefs.h
+LYBookmark.o:	../userdefs.h
+LYCharSets.o:	../userdefs.h
+LYCharUtils.o:	../userdefs.h
+LYCookie.o:	../userdefs.h
+LYDownload.o:	../userdefs.h
+LYEditmap.o:	../userdefs.h
+LYExtern.o:	../userdefs.h
+LYGetFile.o:	../userdefs.h
+LYHistory.o:	../userdefs.h
+LYKeymap.o:	../userdefs.h
+LYMain.o:	../userdefs.h
+LYMainLoop.o:	../userdefs.h
+LYOptions.o:	../userdefs.h
+LYReadCFG.o:	../userdefs.h
+LYReadCFG.o:	../userdefs.h
+LYShowInfo.o:	../userdefs.h
+LYStrings.o:	../userdefs.h
+LYTraversal.o:	../userdefs.h
+LYUtils.o:	../userdefs.h
diff --git a/userdefs.h b/userdefs.h
index 276efd6a..2676cbe9 100644
--- a/userdefs.h
+++ b/userdefs.h
@@ -1255,12 +1255,12 @@
  * the version definition with the Project Version on checkout.  Just
  * ignore it. - kw */
 /* $Format: "#define LYNX_VERSION \"$ProjectVersion$\""$ */
-#define LYNX_VERSION "2.8.3dev.3"
+#define LYNX_VERSION "2.8.3dev.4"
 #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 "Tue, 29 Jun 1999 06:50:02 -0600"
+#define LYNX_DATE "Wed, 14 Jul 1999 10:25:26 -0600"
 #define LYNX_DATE_OFF 5		/* truncate the automatically-generated date */
 #define LYNX_DATE_LEN 11	/* truncate the automatically-generated date */
 #define LYNX_RELEASE_DATE "1999"