about summary refs log tree commit diff stats
path: root/WWW/Library/Implementation
diff options
context:
space:
mode:
Diffstat (limited to 'WWW/Library/Implementation')
-rw-r--r--WWW/Library/Implementation/CommonMakefile3
-rw-r--r--WWW/Library/Implementation/HTAABrow.c14
-rw-r--r--WWW/Library/Implementation/HTAABrow.h6
-rw-r--r--WWW/Library/Implementation/HTAAFile.c16
-rw-r--r--WWW/Library/Implementation/HTAAFile.h32
-rw-r--r--WWW/Library/Implementation/HTAAProt.c2
-rw-r--r--WWW/Library/Implementation/HTAAProt.h2
-rw-r--r--WWW/Library/Implementation/HTAAServ.c8
-rw-r--r--WWW/Library/Implementation/HTAAServ.h34
-rw-r--r--WWW/Library/Implementation/HTAAUtil.c14
-rw-r--r--WWW/Library/Implementation/HTAAUtil.h24
-rw-r--r--WWW/Library/Implementation/HTACL.c6
-rw-r--r--WWW/Library/Implementation/HTACL.h10
-rw-r--r--WWW/Library/Implementation/HTAccess.c8
-rw-r--r--WWW/Library/Implementation/HTAccess.h96
-rw-r--r--WWW/Library/Implementation/HTAnchor.c10
-rw-r--r--WWW/Library/Implementation/HTAnchor.h10
-rw-r--r--WWW/Library/Implementation/HTAuth.c2
-rw-r--r--WWW/Library/Implementation/HTAuth.h8
-rw-r--r--WWW/Library/Implementation/HTFTP.c20
-rw-r--r--WWW/Library/Implementation/HTFTP.h16
-rw-r--r--WWW/Library/Implementation/HTFile.c2
-rw-r--r--WWW/Library/Implementation/HTFormat.c154
-rw-r--r--WWW/Library/Implementation/HTFormat.h128
-rw-r--r--WWW/Library/Implementation/HTGroup.c36
-rw-r--r--WWW/Library/Implementation/HTGroup.h66
-rw-r--r--WWW/Library/Implementation/HTHistory.c6
-rw-r--r--WWW/Library/Implementation/HTHistory.h2
-rw-r--r--WWW/Library/Implementation/HTLex.c2
-rw-r--r--WWW/Library/Implementation/HTMIME.h24
-rw-r--r--WWW/Library/Implementation/HTMLGen.c4
-rw-r--r--WWW/Library/Implementation/HTNews.c4
-rw-r--r--WWW/Library/Implementation/HTParse.c4
-rw-r--r--WWW/Library/Implementation/HTParse.h4
-rw-r--r--WWW/Library/Implementation/HTPasswd.c14
-rw-r--r--WWW/Library/Implementation/HTPasswd.h22
-rw-r--r--WWW/Library/Implementation/HTRules.h66
-rw-r--r--WWW/Library/Implementation/HTString.c154
-rw-r--r--WWW/Library/Implementation/HTString.h16
-rw-r--r--WWW/Library/Implementation/HTStyle.c6
-rw-r--r--WWW/Library/Implementation/HTStyle.h4
-rw-r--r--WWW/Library/Implementation/HTTCP.c30
-rw-r--r--WWW/Library/Implementation/HTTCP.h6
-rw-r--r--WWW/Library/Implementation/HTTP.c10
-rw-r--r--WWW/Library/Implementation/HTTelnet.c76
-rw-r--r--WWW/Library/Implementation/HTUU.c38
-rw-r--r--WWW/Library/Implementation/HTUU.h6
-rw-r--r--WWW/Library/Implementation/HTUtils.h54
-rw-r--r--WWW/Library/Implementation/HTVMSUtils.c96
-rw-r--r--WWW/Library/Implementation/HTVMS_WaisUI.c6
-rw-r--r--WWW/Library/Implementation/HTWAIS.c6
-rw-r--r--WWW/Library/Implementation/HTWAIS.h22
-rw-r--r--WWW/Library/Implementation/HTWSRC.h14
-rw-r--r--WWW/Library/Implementation/HText.h52
-rw-r--r--WWW/Library/Implementation/SGML.c6
-rw-r--r--WWW/Library/Implementation/SGML.h44
-rw-r--r--WWW/Library/Implementation/crypt_util.c164
-rw-r--r--WWW/Library/Implementation/entities.h4
-rw-r--r--WWW/Library/Implementation/tcp.h4
-rw-r--r--WWW/Library/Implementation/ufc-crypt.h14
60 files changed, 1021 insertions, 690 deletions
diff --git a/WWW/Library/Implementation/CommonMakefile b/WWW/Library/Implementation/CommonMakefile
index af0d200c..fda9f648 100644
--- a/WWW/Library/Implementation/CommonMakefile
+++ b/WWW/Library/Implementation/CommonMakefile
@@ -27,9 +27,6 @@
 # LIBDIR	Directory for installed library
 #______________________________________________________________________
 
-#  If this env var is set to something else Some makes will use that instead
-SHELL = /bin/sh
-
 RANLIB	= ranlib
 
 #	.h files are distributed but originally are made from the
diff --git a/WWW/Library/Implementation/HTAABrow.c b/WWW/Library/Implementation/HTAABrow.c
index 4208bfea..8ee0731b 100644
--- a/WWW/Library/Implementation/HTAABrow.c
+++ b/WWW/Library/Implementation/HTAABrow.c
@@ -15,7 +15,7 @@
 **
 **	Therefore also all the strings returned by this package
 **	are only valid until the next call to the same function
-**	is made. This approach is selected, because of the nature
+**	is made.  This approach is selected, because of the nature
 **	of access authorization: no string returned by the package
 **	needs to be valid longer than until the next call.
 **
@@ -75,7 +75,7 @@ typedef struct {
     int		portnumber;	/* Port number			*/
     BOOL	IsProxy;	/* Is it a proxy?		*/
     HTList *	setups;		/* List of protection setups	*/
-                                /* on this server; i.e. valid	*/
+                                /* on this server; i.e., valid	*/
                                 /* authentication schemes and	*/
                                 /* templates when to use them.	*/
                                 /* This is actually a list of	*/
@@ -609,7 +609,7 @@ PRIVATE char *compose_auth_string ARGS3(
 	}
 	/*
 	 *  The template should be either the '*' global
-	 *  for everthing on the server (always true for
+	 *  for everything on the server (always true for
 	 *  proxy authorization setups), or a path for
 	 *  the start of a protected limb, with no host
 	 *  field, but we'll check for a host anyway in
@@ -1029,7 +1029,7 @@ PUBLIC char *HTAA_composeAuth ARGS4(
 **		USERNAME AND/OR PASSWORD (IF MISSPELLED))
 ** ON ENTRY:
 **	start_of_headers is the first block already read from socket,
-**			but status line skipped; i.e. points to the
+**			but status line skipped; i.e., points to the
 **			start of the header section.
 **	length		is the remaining length of the first block.
 **	soc		is the socket to read the rest of server reply.
@@ -1180,7 +1180,7 @@ PUBLIC BOOL HTAA_shouldRetryWithAuth ARGS4(
 	    }
 	} else {
 	    /*
-	    **  proxy_setup == NULL, i.e. we have a
+	    **  proxy_setup == NULL, i.e., we have a
 	    **  first connection to a protected server or
 	    **  the server serves a wider set of documents
 	    **  than we expected so far.
@@ -1239,7 +1239,7 @@ PUBLIC BOOL HTAA_shouldRetryWithAuth ARGS4(
 	}
     } else {
         /*
-	**  current_setup == NULL, i.e. we have a
+	**  current_setup == NULL, i.e., we have a
 	**  first connection to a protected server or
 	**  the server serves a wider set of documents
 	**  than we expected so far.
@@ -1278,7 +1278,7 @@ PUBLIC void HTClearHTTPAuthInfo NOARGS
 {
     /*
     **  Need code to check cached documents against the
-    **  protention templates, and do something to ensure
+    **  protection templates, and do something to ensure
     **  that any protected documents no longer can be
     **  accessed without a new retrieval. - FM
     */
diff --git a/WWW/Library/Implementation/HTAABrow.h b/WWW/Library/Implementation/HTAABrow.h
index 49351cd2..5a195a91 100644
--- a/WWW/Library/Implementation/HTAABrow.h
+++ b/WWW/Library/Implementation/HTAABrow.h
@@ -12,7 +12,7 @@
    these functions.
    
    Therefore also all the strings returned by this package are only valid until the next
-   call to the same function is made. This approach is selected, because of the nature of
+   call to the same function is made.  This approach is selected, because of the nature of
    access authorization: no string returned by the package needs to be valid longer than
    until the next call.
    
@@ -89,7 +89,7 @@ extern char *HTAA_composeAuth PARAMS((
 **              USERNAME AND/OR PASSWORD (IF MISSPELLED))
 ** ON ENTRY:
 **      start_of_headers is the first block already read from socket,
-**                      but status line skipped; i.e. points to the
+**                      but status line skipped; i.e., points to the
 **                      start of the header section.
 **      length          is the remaining length of the first block.
 **      soc             is the socket to read the rest of server reply.
@@ -127,7 +127,7 @@ Enabling Gateway httpds to Forward Authorization
    These functions should only be called from daemon code, and HTAAForwardAuth_reset()
    must be called before the next request is handled to make sure that authorization
    string isn't cached in daemon so that other people can access private files using
-   somebody elses previous authorization information.
+   somebody else's previous authorization information.
    
  */
 
diff --git a/WWW/Library/Implementation/HTAAFile.c b/WWW/Library/Implementation/HTAAFile.c
index 82da7af9..101176cf 100644
--- a/WWW/Library/Implementation/HTAAFile.c
+++ b/WWW/Library/Implementation/HTAAFile.c
@@ -31,7 +31,7 @@
 **	fp	is the file from which records are read from.
 **
 ** ON EXIT:
-**	returns	nothing. File read pointer is located at the beginning
+**	returns	nothing.  File read pointer is located at the beginning
 **		of the next record. Handles continuation lines
 **		(lines ending in comma indicate a following
 **		continuation line).
@@ -60,19 +60,19 @@ PUBLIC void HTAAFile_nextRec ARGS1(FILE *, fp)
 /* PRIVATE							read_item()
 **		READ AN ITEM FROM A PASSWORD, GROUP
 **		OR ACCESS CONTROL LIST FILE
-**		i.e. either a field, or a list item.
+**		i.e., either a field, or a list item.
 ** ON ENTRY:
 **	fp		is the file to read the characters from
 **	contents	is the character array to put the characters
 **	reading_list	if TRUE, read a list item (ends either in
-**			acomma or acolon),
+**			a comma or a colon),
 **			if FALSE, read a field (ends in acolon).
 **	max_len		is the maximum number of characters that may
-**			be read (i.e. the size of dest minus one for
+**			be read (i.e., the size of dest minus one for
 **			terminating null).
 ** ON EXIT:
 **	returns		the terminating character
-**			(i.e. either separator or CR or LF or EOF).
+**			(i.e., either separator or CR or LF or EOF).
 **	contents	contains a null-terminated string representing
 **			the read field.
 ** NOTE 1:
@@ -132,17 +132,17 @@ PRIVATE int read_item ARGS4(FILE *,	fp,
 /* PUBLIC						HTAAFile_readField()
 **		READ A FIELD FROM A PASSWORD, GROUP
 **		OR ACCESS CONTROL LIST FILE
-**		i.e. an item terminated by colon,
+**		i.e., an item terminated by colon,
 **		end-of-line, or end-of-file. 
 ** ON ENTRY:
 **	fp		is the file to read the characters from
 **	contents	is the character array to put the characters
 **	max_len		is the maximum number of characters that may
-**			be read (i.e. the size of dest minus one for
+**			be read (i.e., the size of dest minus one for
 **			terminating null).
 ** ON EXIT:
 **	returns		the terminating character
-**			(i.e. either separator or CR or LF or EOF).
+**			(i.e., either separator or CR or LF or EOF).
 **	contents	contains a null-terminated string representing
 **			the read field.
 ** NOTE 1:
diff --git a/WWW/Library/Implementation/HTAAFile.h b/WWW/Library/Implementation/HTAAFile.h
index 8986b593..05082f42 100644
--- a/WWW/Library/Implementation/HTAAFile.h
+++ b/WWW/Library/Implementation/HTAAFile.h
@@ -1,14 +1,14 @@
 /*                       FILE ROUTINES FOR ACCESS AUTHORIZATION PACKAGE
-                                             
+
    This module implements the routines used for accessing (and parsing) the files used in
    the access authorization:
-   
+
       password file
-      
+
       group file
-      
+
       access control list (ACL) file
-      
+
  */
 
 
@@ -35,23 +35,23 @@
 Naming conventions
 
   Record                 is an entire line in file.
-                         
+
   Field                  is an entity separated by colons and/or by end-of-line.
-                         
+
   List                   is a field in which there are items separated by commas.
-                         
+
 Record-oriented Read Routines
 
    Password, group and ACL are internally read in by the following functions:
-   
+
   HTAAFile_nextRec()      skips to the beginning of the next record (must be called even
                          after the last field of a record is read to proceed to the next
                          record).
-                         
+
   HTAAFile_readField()    reads a field (separated by colons).
-                         
+
   HTAAFile_readList()     reads a field containing a comma-separated list of items.
-                         
+
  */
 
 /* PUBLIC                                               HTAAFile_nextRec()
@@ -60,7 +60,7 @@ Record-oriented Read Routines
 **      fp      is the file from which records are read from.
 **
 ** ON EXIT:
-**      returns nothing. File read pointer is located at the beginning
+**      returns nothing.  File read pointer is located at the beginning
 **              of the next record.
 **
 */
@@ -70,17 +70,17 @@ PUBLIC void HTAAFile_nextRec PARAMS((FILE * fp));
 /* PUBLIC                                               HTAAFile_readField()
 **              READ A FIELD FROM A PASSWORD, GROUP
 **              OR ACCESS CONTROL LIST FILE
-**              i.e. an item terminated by colon,
+**              i.e., an item terminated by colon,
 **              end-of-line, or end-of-file.
 ** ON ENTRY:
 **      fp              is the file to read the characters from
 **      contents        is the character array to put the characters
 **      max_len         is the maximum number of characters that may
-**                      be read (i.e. the size of dest minus one for
+**                      be read (i.e., the size of dest minus one for
 **                      terminating null).
 ** ON EXIT:
 **      returns         the terminating character
-**                      (i.e. either separator or CR or LF or EOF).
+**                      (i.e., either separator or CR or LF or EOF).
 **      contents        contains a null-terminated string representing
 **                      the read field.
 ** NOTE 1:
diff --git a/WWW/Library/Implementation/HTAAProt.c b/WWW/Library/Implementation/HTAAProt.c
index 9112b856..a7915121 100644
--- a/WWW/Library/Implementation/HTAAProt.c
+++ b/WWW/Library/Implementation/HTAAProt.c
@@ -534,7 +534,7 @@ PUBLIC HTAAProt *HTAA_getCurrentProtection NOARGS
 **	returns	a HTAAProt structure representing the
 **		default protection setup of the HTTranslate()'d
 **		file (if HTAA_getCurrentProtection() returned
-**		NULL, i.e. if there is no "protect" rule
+**		NULL, i.e., if there is no "protect" rule
 **		but ACL exists, and we need to know default
 **		protection settings).
 **		This must not be free()'d.
diff --git a/WWW/Library/Implementation/HTAAProt.h b/WWW/Library/Implementation/HTAAProt.h
index e423983b..f26ba7bc 100644
--- a/WWW/Library/Implementation/HTAAProt.h
+++ b/WWW/Library/Implementation/HTAAProt.h
@@ -154,7 +154,7 @@ extern HTAAProt *HTAA_getCurrentProtection NOPARAMS;
 **      returns a HTAAProt structure representing the
 **              default protection setup of the HTTranslate()'d
 **              file (if HTAA_getCurrentProtection() returned
-**              NULL, i.e. if there is no "protect" rule
+**              NULL, i.e., if there is no "protect" rule
 **              but ACL exists, and we need to know default
 **              protection settings).
 **              This must not be free()'d.
diff --git a/WWW/Library/Implementation/HTAAServ.c b/WWW/Library/Implementation/HTAAServ.c
index c081a3fa..c3aebd48 100644
--- a/WWW/Library/Implementation/HTAAServ.c
+++ b/WWW/Library/Implementation/HTAAServ.c
@@ -14,7 +14,7 @@
 **
 **	Therefore also all the strings returned by this package
 **	are only valid until the next call to the same function
-**	is made. This approach is selected, because of the nature
+**	is made.  This approach is selected, because of the nature
 **	of access authorization: no string returned by the package
 **	needs to be valid longer than until the next call.
 **
@@ -169,12 +169,12 @@ PRIVATE char *status_name ARGS1(HTAAFailReasonType, reason)
 }
 
 
-/* PRIVATE						check_uthorization()
+/* PRIVATE						check_authorization()
 **		CHECK IF USER IS AUTHORIZED TO ACCESS A FILE
 ** ON ENTRY:
 **	pathname	is the physical file pathname
 **			to access.
-**	method		method, e.g. METHOD_GET, METHOD_PUT, ...
+**	method		method, e.g., METHOD_GET, METHOD_PUT, ...
 **	scheme		authentication scheme.
 **	scheme_specifics authentication string (or other
 **			scheme specific parameters, like
@@ -369,7 +369,7 @@ PRIVATE HTAAFailReasonType check_authorization ARGS4(CONST char *,  pathname,
 **		CHECK IF USER IS AUTHORIZED TO ACCESS A FILE
 ** ON ENTRY:
 **	url		is the document to be accessed.
-**	method_name	name of the method, e.g. "GET"
+**	method_name	name of the method, e.g., "GET"
 **	scheme_name	authentication scheme name.
 **	scheme_specifics authentication string (or other
 **			scheme specific parameters, like
diff --git a/WWW/Library/Implementation/HTAAServ.h b/WWW/Library/Implementation/HTAAServ.h
index a2946ec4..c2612dfb 100644
--- a/WWW/Library/Implementation/HTAAServ.h
+++ b/WWW/Library/Implementation/HTAAServ.h
@@ -1,31 +1,31 @@
 /*                          SERVER SIDE ACCESS AUTHORIZATION MODULE
-                                             
-   This module is the server side interface to Access Authorization (AA) package. It
+
+   This module is the server side interface to Access Authorization (AA) package.  It
    contains code only for server.
-   
+
    Important to know about memory allocation:
-   
+
    Routines in this module use dynamic allocation, but free automatically all the memory
    reserved by them.
-   
+
    Therefore the caller never has to (and never should) free() any object returned by
    these functions.
-   
+
    Therefore also all the strings returned by this package are only valid until the next
-   call to the same function is made. This approach is selected, because of the nature of
+   call to the same function is made.  This approach is selected, because of the nature of
    access authorization: no string returned by the package needs to be valid longer than
    until the next call.
-   
+
    This also makes it easy to plug the AA package in: you don't have to ponder whether to
    free()something here or is it done somewhere else (because it is always done somewhere
    else).
-   
+
    The strings that the package needs to store are copied so the original strings given as
    parameters to AA functions may be freed or modified with no side effects.
-   
+
    Also note:The AA package does not free() anything else than what it has itself
    allocated.
-   
+
  */
 
 #ifndef HTAASERV_H
@@ -37,10 +37,10 @@
 
 
 #ifdef SHORT_NAMES
-#define HTAAstMs        HTAA_statusMessage
-#define HTAAchAu        HTAA_checkAuthorization
-#define HTAAcoAH        HTAA_composeAuthHeaders
-#define HTAAsLog        HTAA_startLogging
+#define HTAA_statusMessage	HTAAstMs
+#define HTAA_checkAuthorization	HTAAchAu
+#define HTAA_composeAuthHeaders	HTAAcoAH
+#define HTAA_startLogging	HTAAsLog
 #endif /*SHORT_NAMES*/
 
 extern time_t theTime;
@@ -50,14 +50,14 @@ extern time_t theTime;
 Check Access Authorization
 
    HTAA_checkAuthorization() is the main access authorization function.
-   
+
  */
 
 /* PUBLIC                                             HTAA_checkAuthorization()
 **              CHECK IF USER IS AUTHORIZED TO ACCESS A FILE
 ** ON ENTRY:
 **      url             is the document to be accessed.
-**      method_name     name of the method, e.g. "GET"
+**      method_name     name of the method, e.g., "GET"
 **      scheme_name     authentication scheme name.
 **      scheme_specifics authentication string (or other
 **                      scheme specific parameters, like
diff --git a/WWW/Library/Implementation/HTAAUtil.c b/WWW/Library/Implementation/HTAAUtil.c
index 05726a8e..f4407fc3 100644
--- a/WWW/Library/Implementation/HTAAUtil.c
+++ b/WWW/Library/Implementation/HTAAUtil.c
@@ -11,7 +11,7 @@
 **
 **	Therefore also all the strings returned by this package
 **	are only valid until the next call to the same function
-**	is made. This approach is selected, because of the nature
+**	is made.  This approach is selected, because of the nature
 **	of access authorization: no string returned by the package
 **	needs to be valid longer than until the next call.
 **
@@ -212,11 +212,11 @@ PUBLIC BOOL HTAAMethod_inList ARGS2(HTAAMethod, method,
 **
 ** ON ENTRY:
 **	template	is a template string to match the file name
-**			agaist, may contain a single wildcard
+**			against, may contain a single wildcard
 **			character * which matches zero or more
 **			arbitrary characters.
 **	filename	is the filename (or pathname) to be matched
-**			agaist the template.
+**			against the template.
 **
 ** ON EXIT:
 **	returns 	YES, if filename matches the template.
@@ -263,11 +263,11 @@ PUBLIC BOOL HTAA_templateMatch ARGS2(CONST char *, template,
 **
 ** ON ENTRY:
 **	template	is a template string to match the file name
-**			agaist, may contain a single wildcard
+**			against, may contain a single wildcard
 **			character * which matches zero or more
 **			arbitrary characters.
 **	filename	is the filename (or pathname) to be matched
-**			agaist the template.
+**			against the template.
 **
 ** ON EXIT:
 **	returns 	YES, if filename matches the template.
@@ -353,7 +353,7 @@ PUBLIC char *HTAA_makeProtectionTemplate ARGS1(CONST char *, docname)
 #define SKIPWS(s) while (*s==' ' || *s=='\t') s++;
 
 /*
-** Kill trailing whitespace starting from *(s-1) backwords
+** Kill trailing whitespace starting from *(s-1) backwards
 */
 #define KILLWS(s) {char *c=s-1; while (*c==' ' || *c=='\t') *(c--)='\0';}
 
@@ -455,7 +455,7 @@ PRIVATE char *end_pointer = buffer;
 PRIVATE int in_soc = -1;
 
 /* PUBLIC						HTAA_setupReader()
-**		SET UP HEADER LINE READER, i.e. give
+**		SET UP HEADER LINE READER, i.e., give
 **		the already-read-but-not-yet-processed
 **		buffer of text to be read before more
 **		is read from the socket.
diff --git a/WWW/Library/Implementation/HTAAUtil.h b/WWW/Library/Implementation/HTAAUtil.h
index 059d5b03..eab920e0 100644
--- a/WWW/Library/Implementation/HTAAUtil.h
+++ b/WWW/Library/Implementation/HTAAUtil.h
@@ -2,7 +2,7 @@
              COMMON PARTS OF AUTHORIZATION MODULE TO BOTH SERVER AND BROWSER
 
    This module is the interface to the common parts of Access Authorization (AA) package
-   for both server and browser. Important to know about memory allocation:
+   for both server and browser.  Important to know about memory allocation:
 
    Routines in this module use dynamic allocation, but free automatically all the memory
    reserved by them.
@@ -33,16 +33,16 @@
 #include <HTList.h>
 
 #ifdef SHORT_NAMES
-#define HTAASenu        HTAAScheme_enum
-#define HTAASnam        HTAAScheme_name
-#define HTAAMenu        HTAAMethod_enum
-#define HTAAMnam        HTAAMethod_name
-#define HTAAMinL        HTAAMethod_inList
-#define HTAAteMa        HTAA_templateMatch
-#define HTAAmaPT        HTAA_makeProtectionTemplate
-#define HTAApALi        HTAA_parseArgList
-#define HTAAsuRe        HTAA_setupReader
-#define HTAAgUfL        HTAA_getUnfoldedLine
+#define HTAAScheme_enum			HTAASenu
+#define HTAAScheme_name			HTAASnam
+#define HTAAMethod_enum			HTAAMenu
+#define HTAAMethod_name			HTAAMnam
+#define HTAAMethod_inList		HTAAMinL
+#define HTAA_templateMatch		HTAAteMa
+#define HTAA_makeProtectionTemplate	HTAAmaPT
+#define HTAA_parseArgList		HTAApALi
+#define HTAA_setupReader		HTAAsuRe
+#define HTAA_getUnfoldedLine		HTAAgUfL
 #endif /*SHORT_NAMES*/
 
 
@@ -299,7 +299,7 @@ Header Line Reader
  */
 
 /* PUBLIC                                               HTAA_setupReader()
-**              SET UP HEADER LINE READER, i.e. give
+**              SET UP HEADER LINE READER, i.e., give
 **              the already-read-but-not-yet-processed
 **              buffer of text to be read before more
 **              is read from the socket.
diff --git a/WWW/Library/Implementation/HTACL.c b/WWW/Library/Implementation/HTACL.c
index cca7753f..64c8a1af 100644
--- a/WWW/Library/Implementation/HTACL.c
+++ b/WWW/Library/Implementation/HTACL.c
@@ -36,7 +36,7 @@
 ** ON EXIT:
 **	returns the absolute pathname of ACL file
 **		(which is automatically freed next time
-**		this fuction is called).
+**		this function is called).
 */
 PRIVATE char *HTAA_getAclFilename ARGS1(CONST char *, pathname)
 {
@@ -113,7 +113,7 @@ PUBLIC void HTAA_closeAcl ARGS1(FILE *, acl_file)
 **	template : method, method, ... : group@addr, user, group, ...
 **
 **	The last item is in fact in exactly the same format as
-**	group definition in group file, i.e. everything that
+**	group definition in group file, i.e., everything that
 **	follows the 'groupname:' part,
 **	e.g.
 **		user, group, user@address, group@address,
@@ -137,7 +137,7 @@ PUBLIC void HTAA_closeAcl ARGS1(FILE *, acl_file)
 **
 ** NOTE:
 **	The returned group definition may well contain references
-**	to groups defined in group file. Therefore these references
+**	to groups defined in group file.  Therefore these references
 **	must be resolved according to that rule file by function
 **	HTAA_resolveGroupReferences() (group file is read in by
 **	HTAA_readGroupFile()) and after that access authorization
diff --git a/WWW/Library/Implementation/HTACL.h b/WWW/Library/Implementation/HTACL.h
index d1431b34..9aa0a68e 100644
--- a/WWW/Library/Implementation/HTACL.h
+++ b/WWW/Library/Implementation/HTACL.h
@@ -9,9 +9,9 @@
 #include <HTGroup.h>
 
 #ifdef SHORT_NAMES
-#define HTAAoACL	HTAA_openAcl
-#define HTAAcACL	HTAA_closeAcl
-#define HTAAgAEn	HTAA_getAclEntry
+#define HTAA_openAcl		HTAAoACL
+#define HTAA_closeAcl		HTAAcACL
+#define HTAA_getAclEntry	HTAAgAEn
 #endif /* SHORT_NAMES */
 
 /*
@@ -63,7 +63,7 @@ Getting ACL Entry
 **	template : method, method, ... : group@addr, user, group, ...
 **
 **	The last item is in fact in exactly the same format as
-**	group definition in group file, i.e. everything that
+**	group definition in group file, i.e., everything that
 **	follows the 'groupname:' part,
 **	e.g.
 **		user, group, user@address, group@address,
@@ -87,7 +87,7 @@ Getting ACL Entry
 **
 ** NOTE:
 **	The returned group definition may well contain references
-**	to groups defined in group file. Therefore these references
+**	to groups defined in group file.  Therefore these references
 **	must be resolved according to that rule file by function
 **	HTAA_resolveGroupReferences() (group file is read in by
 **	HTAA_readGroupFile()) and after that access authorization
diff --git a/WWW/Library/Implementation/HTAccess.c b/WWW/Library/Implementation/HTAccess.c
index 0bca6812..946a4a26 100644
--- a/WWW/Library/Implementation/HTAccess.c
+++ b/WWW/Library/Implementation/HTAccess.c
@@ -116,7 +116,7 @@ PUBLIC BOOL HTRegisterProtocol ARGS1(
 **	-----------------------------
 **
 **	Add to or subtract from this list if you add or remove protocol
-**	modules. This routine is called the first time the protocol list
+**	modules.  This routine is called the first time the protocol list
 **	is needed, unless any protocols are already registered, in which
 **	case it is not called.	Therefore the application can override
 **	this list.
@@ -774,7 +774,7 @@ PRIVATE BOOL HTLoadDocument ARGS4(
 	*    doesn't guarantee that the resource from which the MAP element
 	*    is taken will be read again (reloaded) when the list of links
 	*    for a client-side image map is regenerated, when in some cases
-	*    it should (e.g. user requested RELOAD, or HTTP response with
+	*    it should (e.g., user requested RELOAD, or HTTP response with
 	*    no-cache header and we are not overriding).
 	*
 	*    If DONT_TRACK_INTERNAL_LINKS is undefined, a target address that
@@ -965,7 +965,7 @@ PRIVATE BOOL HTLoadDocument ARGS4(
 	fprintf(stderr,
  gettext("**** HTAccess: socket or file number returned by obsolete load routine!\n"));
 	fprintf(stderr,
- gettext("**** HTAccess: Internal software error. Please mail lynx_dev@sig.net!\n"));
+ gettext("**** HTAccess: Internal software error.  Please mail lynx_dev@sig.net!\n"));
 	fprintf(stderr, gettext("**** HTAccess: Status returned was: %d\n"),status);
 	exit(-1);
     }
@@ -1317,7 +1317,7 @@ PUBLIC HTParentAnchor * HTHomeAnchor NOARGS
 		  "file:",
 		  PARSE_ACCESS|PARSE_HOST|PARSE_PATH|PARSE_PUNCTUATION);
     if (my_home_document) {
-	CTRACE(tfp, "HTAccess: Using custom home page %s i.e. address %s\n",
+	CTRACE(tfp, "HTAccess: Using custom home page %s i.e., address %s\n",
 		    my_home_document, ref);
 	FREE(my_home_document);
     }
diff --git a/WWW/Library/Implementation/HTAccess.h b/WWW/Library/Implementation/HTAccess.h
index 32d8e562..3dc91793 100644
--- a/WWW/Library/Implementation/HTAccess.h
+++ b/WWW/Library/Implementation/HTAccess.h
@@ -1,12 +1,12 @@
 /*                                                      HTAccess:  Access manager  for libwww
                                       ACCESS MANAGER
-                                             
+
    This module keeps a list of valid protocol (naming scheme) specifiers with associated
    access code.  It allows documents to be loaded given various combinations of
-   parameters. New access protocols may be registered at any time.
-   
+   parameters.  New access protocols may be registered at any time.
+
    Part of the libwww library .
-   
+
  */
 #ifndef HTACCESS_H
 #define HTACCESS_H
@@ -32,16 +32,14 @@ extern char * use_this_url_instead;
 **      In general, positive codes are OK and negative ones are bad.
 */
 
-#define HT_NO_DATA -9999        /* return code: OK but no data was loaded */
-                                /* Typically, other app started or forked */
 
 /*
 
 Default Addresses
 
-   These control the home page selection. To mess with these for normal browses is asking
+   These control the home page selection.  To mess with these for normal browses is asking
    for user confusion.
-   
+
  */
 #define LOGICAL_DEFAULT "WWW_HOME"  /* Defined to be the home page */
 
@@ -111,17 +109,17 @@ extern BOOL override_proxy PARAMS((
 Load a document from relative name
 
   ON ENTRY,
-  
+
   relative_name           The relative address of the file to be accessed.
-                         
+
   here                    The anchor of the object being searched
-                         
+
   ON EXIT,
-  
+
   returns    YES          Success in opening file
-                         
+
   NO                      Failure
-                         
+
  */
 extern  BOOL HTLoadRelative PARAMS((
                 CONST char *            relative_name,
@@ -133,25 +131,25 @@ extern  BOOL HTLoadRelative PARAMS((
 Load a document from absolute name
 
   ON ENTRY,
-  
+
   addr                    The absolute address of the document to be accessed.
-                         
+
   filter_it               if YES, treat document as HTML
-                         
+
  */
 
 /*
 
   ON EXIT,
-  
+
  */
 
 /*
 
   returns YES             Success in opening document
-                         
+
   NO                      Failure
-                         
+
  */
 extern BOOL HTLoadAbsolute PARAMS((CONST DocAddress * addr));
 
@@ -161,19 +159,19 @@ extern BOOL HTLoadAbsolute PARAMS((CONST DocAddress * addr));
 Load a document from absolute name to a stream
 
   ON ENTRY,
-  
+
   addr                    The absolute address of the document to be accessed.
-                         
+
   filter_it               if YES, treat document as HTML
-                         
+
   ON EXIT,
-  
+
   returns YES             Success in opening document
-                         
+
   NO                      Failure
-                         
+
    Note: This is equivalent to HTLoadDocument
-   
+
  */
 extern BOOL HTLoadToStream PARAMS((CONST char * addr, BOOL filter_it,
                                 HTStream * sink));
@@ -184,23 +182,23 @@ extern BOOL HTLoadToStream PARAMS((CONST char * addr, BOOL filter_it,
 Load if necessary, and select an anchor
 
   ON ENTRY,
-  
+
   destination                The child or parenet anchor to be loaded.
-                         
+
  */
 
 /*
 
   ON EXIT,
-  
+
  */
 
 /*
 
   returns YES             Success
-                         
+
   returns NO              Failure
-                         
+
  */
 
 
@@ -213,13 +211,13 @@ extern BOOL HTLoadAnchor PARAMS((HTAnchor * destination));
 Make a stream for Saving object back
 
   ON ENTRY,
-  
+
   anchor                  is valid anchor which has previously beeing loaded
-                         
+
   ON EXIT,
-  
+
   returns                 0 if error else a stream to save the object to.
-                         
+
  */
 
 
@@ -230,15 +228,15 @@ extern HTStream * HTSaveStream PARAMS((HTParentAnchor * anchor));
 
 Search
 
-   Performs a search on word given by the user. Adds the search words to the end of the
+   Performs a search on word given by the user.  Adds the search words to the end of the
    current address and attempts to open the new address.
-   
+
   ON ENTRY,
-  
+
   *keywords               space-separated keyword list or similar search list
-                         
+
   here                    The anchor of the object being searched
-                         
+
  */
 extern BOOL HTSearch PARAMS((CONST char * keywords, HTParentAnchor* here));
 
@@ -247,15 +245,15 @@ extern BOOL HTSearch PARAMS((CONST char * keywords, HTParentAnchor* here));
 
 Search Given Indexname
 
-   Performs a keyword search on word given by the user. Adds the keyword to  the end of
+   Performs a keyword search on word given by the user.  Adds the keyword to  the end of
    the current address and attempts to open the new address.
-   
+
   ON ENTRY,
-  
+
   *keywords               space-separated keyword list or similar search list
-                         
+
   *indexname              is name of object search is to be done on.
-                         
+
  */
 extern BOOL HTSearchAbsolute PARAMS((
         CONST char *    keywords,
@@ -270,13 +268,13 @@ Register an access method
 
 typedef struct _HTProtocol {
         char * name;
-        
+
         int (*load)PARAMS((
                 CONST char *    full_address,
                 HTParentAnchor * anchor,
                 HTFormat        format_out,
                 HTStream*       sink));
-                
+
         HTStream* (*saveStream)PARAMS((HTParentAnchor * anchor));
 
 } HTProtocol;
@@ -294,7 +292,7 @@ Generate the anchor for the home page
 
    As it involves file access, this should only be done once when the program first runs.
    This is a default algorithm -- browser don't HAVE to use this.
-   
+
  */
 extern HTParentAnchor * HTHomeAnchor NOPARAMS;
 
diff --git a/WWW/Library/Implementation/HTAnchor.c b/WWW/Library/Implementation/HTAnchor.c
index 3e0c4375..0c1eb7dd 100644
--- a/WWW/Library/Implementation/HTAnchor.c
+++ b/WWW/Library/Implementation/HTAnchor.c
@@ -13,7 +13,7 @@
 **	(c) Copyright CERN 1991 - See Copyright.html
 */
 
-#define HASH_SIZE 101		/* Arbitrary prime. Memory/speed tradeoff */
+#define HASH_SIZE 101		/* Arbitrary prime.  Memory/speed tradeoff */
 
 #include <HTUtils.h>
 #include <HTAnchor.h>
@@ -60,7 +60,7 @@ PRIVATE HTList **adult_table = 0;  /* Point to table of lists of all parents */
 /*				Creation Methods
 **				================
 **
-**	Do not use "new" by itself outside this module. In order to enforce
+**	Do not use "new" by itself outside this module.  In order to enforce
 **	consistency, we insist that you furnish more information about the
 **	anchor you are creating : use newWithParent or newWithAddress.
 */
@@ -160,7 +160,7 @@ PRIVATE BOOL HTIdentical ARGS2(
 **	---------------------------------
 **
 **	Me one is for a new anchor being edited into an existing
-**	document. The parent anchor must already exist.
+**	document.  The parent anchor must already exist.
 */
 PUBLIC HTChildAnchor * HTAnchor_findChild ARGS2(
 	HTParentAnchor *,	parent,
@@ -470,7 +470,7 @@ PRIVATE void deleteLinks ARGS1(
 	 *  Test here to avoid calling overhead.
 	 *  If the parent has no loaded document, then we should
 	 *  tell it to attempt to delete itself.
-	 *  Don't do this jass if the anchor passed in is the same
+	 *  Don't do this jazz if the anchor passed in is the same
 	 *  as the anchor to delete.
 	 *  Also, don't do this if the destination parent is our
 	 *  parent.
@@ -1203,7 +1203,7 @@ PUBLIC void HTAnchor_setPhysical ARGS2(
 **     text/plain
 **	from file:	HTFile.c ->  HTPlain.c		     ->  GridText.c
 **
-**  The lock/set_by is used to lock e.g. a charset set by an explicit
+**  The lock/set_by is used to lock e.g., a charset set by an explicit
 **  HTTP MIME header against overriding by a HTML META tag - the MIME
 **  header has higher priority.  Defaults (from -assume_.. options etc.)
 **  will not override charset explicitly given by server.
diff --git a/WWW/Library/Implementation/HTAnchor.h b/WWW/Library/Implementation/HTAnchor.h
index 2d9c43b9..ea28d5cd 100644
--- a/WWW/Library/Implementation/HTAnchor.h
+++ b/WWW/Library/Implementation/HTAnchor.h
@@ -12,7 +12,7 @@
 #define HTANCHOR_H
 
 /* Version 0 (TBL) written in Objective-C for the NeXT browser */
-/* Version 1 of 24-Oct-1991 (JFG), written in C, browser-independant */
+/* Version 1 of 24-Oct-1991 (JFG), written in C, browser-independent */
 
 #include <HTList.h>
 #include <HTAtom.h>
@@ -70,7 +70,7 @@ struct _HTAnchor {		/* Generic anchor : just links */
   HTLink	mainLink;	/* Main (or default) destination of this */
   HTList *	links;		/* List of extra links from this, if any */
   /* We separate the first link from the others to avoid too many small mallocs
-     involved by a list creation. Most anchors only point to one place. */
+     involved by a list creation.  Most anchors only point to one place. */
   HTParentAnchor * parent;	/* Parent of this anchor (self for adults) */
 };
 
@@ -87,7 +87,7 @@ struct _HTParentAnchor {
   char *	address;	/* Absolute address of this node */
   char *	post_data;	/* Posting data */
   char *	post_content_type;  /* Type of post data */
-  char *	bookmark;	/* Bookmark filname */
+  char *	bookmark;	/* Bookmark filename */
   HTFormat	format; 	/* Pointer to node format descriptor */
   char *	charset;	/* Pointer to character set (kludge, for now */
   BOOL		isIndex;	/* Acceptance of a keyword search */
@@ -115,7 +115,7 @@ struct _HTParentAnchor {
   char *	content_language;	/* Content-Language */
   char *	content_encoding;	/* Compression algorithm */
   char *	content_base;		/* Content-Base */
-  char *	content_disposition;	/* Content-Dispositon */
+  char *	content_disposition;	/* Content-Disposition */
   char *	content_location;	/* Content-Location */
   char *	content_md5;		/* Content-MD5 */
   int		content_length; 	/* Content-Length */
@@ -160,7 +160,7 @@ typedef struct _DocAddress {
 **	---------------------------------
 **
 **	This one is for a new anchor being edited into an existing
-**	document. The parent anchor must already exist.
+**	document.  The parent anchor must already exist.
 */
 extern HTChildAnchor * HTAnchor_findChild PARAMS((
 	HTParentAnchor *	parent,
diff --git a/WWW/Library/Implementation/HTAuth.c b/WWW/Library/Implementation/HTAuth.c
index f1e7efd5..05ff06c9 100644
--- a/WWW/Library/Implementation/HTAuth.c
+++ b/WWW/Library/Implementation/HTAuth.c
@@ -56,7 +56,7 @@ PRIVATE HTAAUser *decompose_auth_string ARGS2(char *,		authstring,
 				/*	      \/	      */
     FREE(cleartext);	/* From previous call.				*/
 			/* NOTE: parts of this memory are pointed to by */
-			/* pointers in HTAAUser structure. Therefore,	*/
+			/* pointers in HTAAUser structure.  Therefore,	*/
 			/* this also frees all the strings pointed to	*/
 			/* by the static 'user'.			*/
 
diff --git a/WWW/Library/Implementation/HTAuth.h b/WWW/Library/Implementation/HTAuth.h
index 0e88131c..a99081ce 100644
--- a/WWW/Library/Implementation/HTAuth.h
+++ b/WWW/Library/Implementation/HTAuth.h
@@ -1,8 +1,8 @@
 /*                                   AUTHENTICATION MODULE
-                                             
-   This is the authentication module. By modifying the function HTAA_authenticate() it can
+
+   This is the authentication module.  By modifying the function HTAA_authenticate() it can
    be made to support external authentication methods.
-   
+
  */
 
 #ifndef HTAUTH_H
@@ -13,7 +13,7 @@
 
 
 #ifdef SHORT_NAMES
-#define HTAAauth        HTAA_authenticate
+#define HTAA_authenticate	HTAAauth
 #endif /* SHORT_NAMES */
 
 
diff --git a/WWW/Library/Implementation/HTFTP.c b/WWW/Library/Implementation/HTFTP.c
index 179de6fd..8348b8f2 100644
--- a/WWW/Library/Implementation/HTFTP.c
+++ b/WWW/Library/Implementation/HTFTP.c
@@ -13,7 +13,7 @@
 **	It seems that an attempt by the server to connect to a port which has
 **	been used recently by a listen on the same socket, or by another
 **	socket this or another process causes a hangup of (almost exactly)
-**	one minute. Therefore, we have to use a rotating port number.
+**	one minute.  Therefore, we have to use a rotating port number.
 **	The problem remains that if the application is run twice in quick
 **	succession, it will hang for what remains of a minute.
 **
@@ -63,10 +63,10 @@
 /*
 BUGS:	@@@	Limit connection cache size!
 		Error reporting to user.
-		400 & 500 errors are acked by user with windows.
+		400 & 500 errors are ack'ed by user with windows.
 		Use configuration file for user names
 
-**		Note for portablility this version does not use select() and
+**		Note for portability this version does not use select() and
 **		so does not watch the control and data channels at the
 **		same time.
 */
@@ -239,9 +239,9 @@ PUBLIC char * HTMake_VMS_name ARGS2(
 	CONST char *,	fn)
 {
 
-/*	We try converting the filename into Files-11 syntax. That is, we assume
-**	first that the file is, like us, on a VMS node. We try remote
-**	(or local) DECnet access. Files-11, VMS, VAX and DECnet
+/*	We try converting the filename into Files-11 syntax.  That is, we assume
+**	first that the file is, like us, on a VMS node.  We try remote
+**	(or local) DECnet access.  Files-11, VMS, VAX and DECnet
 **	are trademarks of Digital Equipment Corporation.
 **	The node is assumed to be local if the hostname WITHOUT DOMAIN
 **	matches the local one. @@@
@@ -257,7 +257,7 @@ PUBLIC char * HTMake_VMS_name ARGS2(
     if (!filename || !nodename)
 	outofmem(__FILE__, "HTVMSname");
     strcpy(filename, fn);
-    strcpy(nodename, "");	/* On same node? Yes if node names match */
+    strcpy(nodename, "");	/* On same node?  Yes if node names match */
     if (strncmp(nn, "localhost", 9)) {
 	CONST char *p;
 	CONST char *q;
@@ -2092,7 +2092,7 @@ PRIVATE EntryInfo * parse_dir_entry ARGS2(
 	default:
 	    /*
 	    **	We can't tell if it is a directory since we only
-	    **	did an NLST :(	List bad file types anyways? NOT!
+	    **	did an NLST :(	List bad file types anyways?  NOT!
 	    */
 	    StrAllocCopy(entry_info->filename, entry);
 	    return(entry_info); /* mostly empty info */
@@ -2810,7 +2810,7 @@ PUBLIC int HTFTPLoad ARGS4(
 	}
 	if (binary != control->binary) {
 	    /*
-	    **	Act on our setting if not alread set. - FM
+	    **	Act on our setting if not already set. - FM
 	    */
 	    char * mode = binary ? "I" : "A";
 	    sprintf(command, "TYPE %s%c%c", mode, CR, LF);
@@ -3123,7 +3123,7 @@ PUBLIC int HTFTPLoad ARGS4(
 	    sprintf(command, "CWD %s%c%c", filename, CR, LF);
 	    status = response(command);
 
-	    if (status == 2) {	/* Successed : let's NAME LIST it */
+	    if (status == 2) {	/* Succeeded : let's NAME LIST it */
 		isDirectory = YES;
 	    if (use_list)
 		sprintf(command, "LIST%c%c", CR, LF);
diff --git a/WWW/Library/Implementation/HTFTP.h b/WWW/Library/Implementation/HTFTP.h
index 7b857076..4ef22f2d 100644
--- a/WWW/Library/Implementation/HTFTP.h
+++ b/WWW/Library/Implementation/HTFTP.h
@@ -1,11 +1,11 @@
 /*                                                               FTP access module for libwww
                                    FTP ACCESS FUNCTIONS
-                                             
+
    This isn't really  a valid protocol module -- it is lumped together with HTFile . That
    could be changed easily.
-   
-   Author: Tim Berners-Lee. Public Domain. Please mail changes to timbl@info.cern.ch
-   
+
+   Author: Tim Berners-Lee.  Public Domain.  Please mail changes to timbl@info.cern.ch
+
  */
 #ifndef HTFTP_H
 #define HTFTP_H
@@ -14,7 +14,7 @@
 #include <HTStream.h>
 #include <HTParse.h>
 
-#define FILE_BY_NAME 0 
+#define FILE_BY_NAME 0
 #define FILE_BY_TYPE 1
 #define FILE_BY_SIZE 2
 #define FILE_BY_DATE 3
@@ -33,7 +33,7 @@ extern int HTfileSortMethod;  /* specifies the method of sorting */
 ** Bug:	Returns pointer to static -- non-reentrant
 */
 PUBLIC char * HTMake_VMS_name PARAMS((
-	CONST char * nn, 
+	CONST char * nn,
 	CONST char * fn));
 
 
@@ -42,9 +42,9 @@ PUBLIC char * HTMake_VMS_name PARAMS((
 Retrieve File from Server
 
   ON EXIT,
-  
+
   returns                 Socket number for file if good.<0 if bad.
-                         
+
  */
 extern int HTFTPLoad PARAMS
 ((
diff --git a/WWW/Library/Implementation/HTFile.c b/WWW/Library/Implementation/HTFile.c
index 4dd8960a..a1dc1dfe 100644
--- a/WWW/Library/Implementation/HTFile.c
+++ b/WWW/Library/Implementation/HTFile.c
@@ -636,7 +636,7 @@ PUBLIC char * HTnameOfFile_WWW ARGS3(
 **
 **  Bugs:
 **	At present, only the names of two network root nodes are hand-coded
-**	in and valid for the NeXT only. This should be configurable in
+**	in and valid for the NeXT only.  This should be configurable in
 **	the general case.
 */
 PUBLIC char * WWW_nameOfFile ARGS1(
diff --git a/WWW/Library/Implementation/HTFormat.c b/WWW/Library/Implementation/HTFormat.c
index 46892a98..deb4e77a 100644
--- a/WWW/Library/Implementation/HTFormat.c
+++ b/WWW/Library/Implementation/HTFormat.c
@@ -11,7 +11,6 @@
 */
 
 #include <HTUtils.h>
-#include <HTAccess.h>
 
 /* Implements:
 */
@@ -503,13 +502,13 @@ PRIVATE void HTDisplayPartial NOARGS
 		/* new hypertext document available  */
 	&& ((Newline_partial + display_lines) > NumOfLines_partial)
 		/* current page not complete... */
-	&& (partial_threshold > 0 ? ((Newline_partial + partial_threshold)  < HText_getNumOfLines()) : 
-		 ((Newline_partial + display_lines) < HText_getNumOfLines()))) { 
-		/* 
-		 * Originally we rendered by increments of 2 lines, 
-		 * but that got annoying on slow network connections. 
-		 * Then we switched to full-pages.  Now it's configurable. 
-		 * If partial_threshold < 0, then it's a full page 
+	&& (partial_threshold > 0 ? ((Newline_partial + partial_threshold)  < HText_getNumOfLines()) :
+		 ((Newline_partial + display_lines) < HText_getNumOfLines()))) {
+		/*
+		 * Originally we rendered by increments of 2 lines,
+		 * but that got annoying on slow network connections.
+		 * Then we switched to full-pages.  Now it's configurable.
+		 * If partial_threshold < 0, then it's a full page
 		 */
 	    NumOfLines_partial = HText_getNumOfLines();
 	    HText_pageDisplay(Newline_partial, "");
@@ -530,6 +529,27 @@ PRIVATE void HTDisplayPartial NOARGS
 **   CRLF at the end of lines which need to be stripped to LF for unix
 **   when the format is textual.
 **
+**  State of socket and target stream on entry:
+**			socket (file_number) assumed open,
+**			target (sink) assumed valid.
+**
+**  Return values:
+**	HT_INTERRUPTED  Interruption or error after some data received.
+**	-2		Unexpected disconnect before any data received.
+**	-1		Interruption or error before any data received, or
+**			(UNIX) other read error before any data received, or
+**			download cancelled.
+**	HT_LOADED	Normal close of socket (end of file indication
+**			received), or
+**			unexpected disconnect after some data received, or
+**			other read error after some data received, or
+**			(not UNIX) other read error before any data received.
+**
+**  State of socket and target stream on return depends on return value:
+**	HT_INTERRUPTED	socket still open, target aborted.
+**	-2		socket still open, target stream still valid.
+**	-1		socket still open, target aborted.
+**	otherwise	socket closed,	target stream still valid.
 */
 PUBLIC int HTCopy ARGS4(
 	HTParentAnchor *,	anchor,
@@ -597,15 +617,51 @@ PUBLIC int HTCopy ARGS4(
 		    rv = -2;
 		    goto finished;
 		} else {
+#ifdef UNIX
+		   /*
+		    *  Treat what we've received already as the complete
+		    *  transmission, but not without giving the user
+		    *  an alert.  I don't know about all the different
+		    *  TCP stacks for VMS etc., so this is currently
+		    *  only for UNIX. - kw
+		    */
+		    HTInetStatus("NETREAD");
+		    HTAlert("Unexpected server disconnect.");
+		   CTRACE(tfp,
+	    "HTCopy: Unexpected server disconnect. Treating as completed.\n");
+		   status = 0;
+		   break;
+#else  /* !UNIX */
 		   /*
 		    *  Treat what we've gotten already
 		    *  as the complete transmission. - FM
 		    */
 		   CTRACE(tfp,
-	    "HTCopy: Unexpected server disconnect. Treating as completed.\n");
+	    "HTCopy: Unexpected server disconnect.  Treating as completed.\n");
 		   status = 0;
 		   break;
+#endif /* UNIX */
+		}
+#ifdef UNIX
+	    } else {		/* status < 0 and other errno */
+		/*
+		 *  Treat what we've received already as the complete
+		 *  transmission, but not without giving the user
+		 *  an alert.  I don't know about all the different
+		 *  TCP stacks for VMS etc., so this is currently
+		 *  only for UNIX. - kw
+		 */
+		HTInetStatus("NETREAD");
+		HTAlert("Unexpected read error.");
+		if (bytes) {
+		    (void)NETCLOSE(file_number);
+		    rv = HT_LOADED;
+		} else {
+		    (*targetClass._abort)(sink, NULL);
+		    rv = -1;
 		}
+		goto finished;
+#endif
 	    }
 	    break;
 	}
@@ -641,6 +697,18 @@ finished:
 **   graphic (or other) objects described by the file.
 **
 **
+**  State of file and target stream on entry:
+**			FILE* (fp) assumed open,
+**			target (sink) assumed valid.
+**
+**  Return values:
+**	HT_INTERRUPTED  Interruption after some data read.
+**	HT_PARTIAL_CONTENT	Error after some data read.
+**	-1		Error before any data read.
+**	HT_LOADED	Normal end of file indication on reading.
+**
+**  State of file and target stream on return:
+**	always		fp still open, target stream still valid.
 */
 PUBLIC int HTFileCopy ARGS2(
 	FILE *, 		fp,
@@ -701,6 +769,18 @@ PUBLIC int HTFileCopy ARGS2(
 **   graphic (or other) objects described by the file.
 **
 **
+**  State of file and target stream on entry:
+**		      gzFile (gzfp) assumed open (should have gzipped content),
+**		      target (sink) assumed valid.
+**
+**  Return values:
+**	HT_INTERRUPTED  Interruption after some data read.
+**	HT_PARTIAL_CONTENT	Error after some data read.
+**	-1		Error before any data read.
+**	HT_LOADED	Normal end of file indication on reading.
+**
+**  State of file and target stream on return:
+**	always		gzfp still open, target stream still valid.
 */
 PRIVATE int HTGzFileCopy ARGS2(
 	gzFile, 		gzfp,
@@ -807,6 +887,30 @@ PUBLIC void HTCopyNoCR ARGS3(
 **   CRLF at the end of lines which need to be stripped to LF for unix
 **   when the format is textual.
 **
+**  State of socket and target stream on entry:
+**			socket (file_number) assumed open,
+**			target (sink) usually NULL (will call stream stack).
+**
+**  Return values:
+**	HT_INTERRUPTED  Interruption or error after some data received.
+**	-501		Stream stack failed (cannot present or convert).
+**	-2		Unexpected disconnect before any data received.
+**	-1		Stream stack failed (cannot present or convert), or
+**			Interruption or error before any data received, or
+**			(UNIX) other read error before any data received, or
+**			download cancelled.
+**	HT_LOADED	Normal close of socket (end of file indication
+**			received), or
+**			unexpected disconnect after some data received, or
+**			other read error after some data received, or
+**			(not UNIX) other read error before any data received.
+**
+**  State of socket and target stream on return depends on return value:
+**	HT_INTERRUPTED	socket still open, target aborted.
+**	-501		socket still open, target stream NULL.
+**	-2		socket still open, target freed.
+**	-1		socket still open, target stream aborted or NULL.
+**	otherwise	socket closed,	target stream freed.
 */
 PUBLIC int HTParseSocket ARGS5(
 	HTFormat,		rep_in,
@@ -841,7 +945,8 @@ PUBLIC int HTParseSocket ARGS5(
     if (rv != -1 && rv != HT_INTERRUPTED)
 	(*targetClass._free)(stream);
 
-    return rv; /* full: HT_LOADED;  partial: HT_INTERRUPTED;  no bytes: -1 */
+    return rv;
+    /* Originally:  full: HT_LOADED;  partial: HT_INTERRUPTED;  no bytes: -1 */
 }
 
 /*	Parse a file given format and file pointer
@@ -853,6 +958,19 @@ PUBLIC int HTParseSocket ARGS5(
 **   CRLF at the end of lines which need to be stripped to \n for unix
 **   when the format is textual.
 **
+**  State of file and target stream on entry:
+**			FILE* (fp) assumed open,
+**			target (sink) usually NULL (will call stream stack).
+**
+**  Return values:
+**	-501		Stream stack failed (cannot present or convert).
+**	-1		Download cancelled.
+**	HT_NO_DATA	Error before any data read.
+**	HT_PARTIAL_CONTENT	Interruption or error after some data read.
+**	HT_LOADED	Normal end of file indication on reading.
+**
+**  State of file and target stream on return:
+**	always		fp still open; target freed, aborted, or NULL.
 */
 PUBLIC int HTParseFile ARGS5(
 	HTFormat,		rep_in,
@@ -921,6 +1039,22 @@ PRIVATE int HTCloseGzFile ARGS1(
     return(gzres);
 }
 
+/*	HTParseGzFile
+**
+**  State of file and target stream on entry:
+**			gzFile (gzfp) assumed open,
+**			target (sink) usually NULL (will call stream stack).
+**
+**  Return values:
+**	-501		Stream stack failed (cannot present or convert).
+**	-1		Download cancelled.
+**	HT_NO_DATA	Error before any data read.
+**	HT_PARTIAL_CONTENT	Interruption or error after some data read.
+**	HT_LOADED	Normal end of file indication on reading.
+**
+**  State of file and target stream on return:
+**	always		gzfp closed; target freed, aborted, or NULL.
+*/
 PUBLIC int HTParseGzFile ARGS5(
 	HTFormat,		rep_in,
 	HTFormat,		format_out,
diff --git a/WWW/Library/Implementation/HTFormat.h b/WWW/Library/Implementation/HTFormat.h
index 0e5c4634..c9b6392e 100644
--- a/WWW/Library/Implementation/HTFormat.h
+++ b/WWW/Library/Implementation/HTFormat.h
@@ -1,13 +1,13 @@
 /*                                            HTFormat: The format manager in the WWW Library
                             MANAGE DIFFERENT DOCUMENT FORMATS
-                                             
+
    Here we describe the functions of the HTFormat module which handles conversion between
    different data representations.  (In MIME parlance, a representation is known as a
-   content-type. In WWW  the term "format" is often used as it is shorter).
-   
-   This module is implemented by HTFormat.c . This hypertext document is used to generate
-   the HTFormat.h include file.  Part of the WWW library .
-   
+   content-type.  In WWW the term "format" is often used as it is shorter).
+
+   This module is implemented by HTFormat.c.  This hypertext document is used to generate
+   the HTFormat.h include file.  Part of the WWW library.
+
 Preamble
 
  */
@@ -27,20 +27,20 @@ Preamble
 
 The HTFormat type
 
-   We use the HTAtom object for holding representations. This allows faster manipulation
+   We use the HTAtom object for holding representations.  This allows faster manipulation
    (comparison and copying) that if we stayed with strings.
-   
+
  */
 typedef HTAtom * HTFormat;
-                        
+
 /*
 
    These macros (which used to be constants) define some basic internally referenced
    representations.  The www/xxx ones are of course not MIME standard.
-   
+
    www/source  is an output format which leaves the input untouched. It is useful for
    diagnostics, and for users who want to see the original, whatever it is.
-   
+
  */
                         /* Internal ones */
 #define WWW_SOURCE HTAtom_for("www/source")     /* Whatever it was originally*/
@@ -49,29 +49,29 @@ typedef HTAtom * HTFormat;
 
    www/present represents the user's perception of the document.  If you convert to
    www/present, you present the material to the user.
-   
+
  */
 #define WWW_PRESENT HTAtom_for("www/present")   /* The user's perception */
 
 /*
 
    The message/rfc822 format means a MIME message or a plain text message with no MIME
-   header. This is what is returned by an HTTP server.
-   
+   header.  This is what is returned by an HTTP server.
+
  */
 #define WWW_MIME HTAtom_for("www/mime")         /* A MIME message */
 
 /*
 
    www/print is like www/present except it represents a printed copy.
-   
+
  */
 #define WWW_PRINT HTAtom_for("www/print")       /* A printed copy */
 
 /*
 
-   www/unknown is a really unknown type. Some default action is appropriate.
-   
+   www/unknown is a really unknown type.  Some default action is appropriate.
+
  */
 #define WWW_UNKNOWN     HTAtom_for("www/unknown")
 
@@ -87,7 +87,7 @@ typedef HTAtom * HTFormat;
    These are regular MIME types.  HTML is assumed to be added by the W3 code.
    application/octet-stream was mistakenly application/binary in earlier libwww versions
    (pre 2.11).
-   
+
  */
 #define WWW_PLAINTEXT   HTAtom_for("text/plain")
 #define WWW_POSTSCRIPT  HTAtom_for("application/postscript")
@@ -100,7 +100,7 @@ typedef HTAtom * HTFormat;
 
    We must include the following file after defining HTFormat, to which it makes
    reference.
-   
+
 The HTEncoding type
 
  */
@@ -109,7 +109,7 @@ typedef HTAtom* HTEncoding;
 /*
 
    The following are values for the MIME types:
-   
+
  */
 #define WWW_ENC_7BIT            HTAtom_for("7bit")
 #define WWW_ENC_8BIT            HTAtom_for("8bit")
@@ -118,7 +118,7 @@ typedef HTAtom* HTEncoding;
 /*
 
    We also add
-   
+
  */
 #define WWW_ENC_COMPRESS        HTAtom_for("compress")
 
@@ -142,11 +142,11 @@ typedef HTAtom* HTEncoding;
 The HTPresentation and HTConverter types
 
    This HTPresentation structure represents a possible conversion algorithm from one
-   format to annother.  It includes a pointer to a conversion routine. The conversion
+   format to annother.  It includes a pointer to a conversion routine.  The conversion
    routine returns a stream to which data should be fed. See also HTStreamStack which
-   scans the list of registered converters and calls one. See the initialisation module
+   scans the list of registered converters and calls one.  See the initialisation module
    for a list of conversion routines.
-   
+
  */
 typedef struct _HTPresentation HTPresentation;
 
@@ -154,7 +154,7 @@ typedef HTStream * HTConverter PARAMS((
         HTPresentation *        pres,
         HTParentAnchor *        anchor,
         HTStream *              sink));
-        
+
 struct _HTPresentation {
         HTAtom	*	rep;            /* representation name atmoized */
         HTAtom	*	rep_out;        /* resulting representation */
@@ -170,14 +170,14 @@ struct _HTPresentation {
 
    The list of presentations is kept by this module.  It is also scanned by modules which
    want to know the set of formats supported. for example.
-   
+
  */
 extern HTList * HTPresentations;
 
 /*
 
    The default presentation is used when no other is appriporate
-   
+
  */
 extern  HTPresentation* default_presentation;
 
@@ -186,18 +186,18 @@ extern  HTPresentation* default_presentation;
 HTSetPresentation: Register a system command to present a format
 
   ON ENTRY,
-  
+
   rep                     is the MIME - style format name
-                         
+
   command                 is the MAILCAP - style command template
-                         
+
   quality                 A degradation faction 0..1.0
-                         
+
   secs                    A limit on the time user will wait (0.0 for infinity)
   secs_per_byte
-                         
+
   maxbytes                A limit on the length acceptable as input (0 infinite)
-                         
+
  */
 extern void HTSetPresentation PARAMS((
         CONST char *	representation,
@@ -214,13 +214,13 @@ extern void HTSetPresentation PARAMS((
 HTSetConversion:   Register a converstion routine
 
   ON ENTRY,
-  
+
   rep_in                  is the content-type input
-                         
+
   rep_out                 is the resulting content-type
-                         
+
   converter               is the routine to make the stream to do it
-                         
+
  */
 
 extern void HTSetConversion PARAMS((
@@ -238,13 +238,13 @@ extern void HTSetConversion PARAMS((
 
 HTStreamStack:   Create a stack of streams
 
-   This is the routine which actually sets up the conversion. It currently checks only for
-   direct conversions, but multi-stage conversions are forseen. It takes a stream into
+   This is the routine which actually sets up the conversion.  It currently checks only for
+   direct conversions, but multi-stage conversions are forseen.  It takes a stream into
    which the output should be sent in the final format, builds the conversion stack, and
    returns a stream into which the data in the input format should be fed.  The anchor is
    passed because hypertxet objects load information into the anchor object which
    represents them.
-   
+
  */
 extern HTStream * HTStreamStack PARAMS((
         HTFormat                format_in,
@@ -268,18 +268,18 @@ extern void HTReorderPresentation PARAMS((
 HTStackValue: Find the cost of a filter stack
 
    Must return the cost of the same stack which HTStreamStack would set up.
-   
+
   ON ENTRY,
-  
+
   format_in               The fomat of the data to be converted
-                         
+
   format_out              The format required
-                         
+
   initial_value           The intrinsic "value" of the data before conversion on a scale
                          from 0 to 1
-                         
+
   length                  The number of bytes expected in the input format
-                         
+
  */
 extern float HTStackValue PARAMS((
         HTFormat                format_in,
@@ -295,7 +295,7 @@ HTCopy:  Copy a socket to a stream
 
    This is used by the protocol engines to send data down a stream, typically one which
    has been generated by HTStreamStack.
-   
+
  */
 extern int HTCopy PARAMS((
 	HTParentAnchor *	anchor,
@@ -303,26 +303,26 @@ extern int HTCopy PARAMS((
 	void*			handle,
         HTStream*               sink));
 
-        
+
 /*
 
 HTFileCopy:  Copy a file to a stream
 
    This is used by the protocol engines to send data down a stream, typically one which
-   has been generated by HTStreamStack. It is currently called by HTParseFile
-   
+   has been generated by HTStreamStack.  It is currently called by HTParseFile
+
  */
 extern int HTFileCopy PARAMS((
         FILE*                   fp,
         HTStream*               sink));
 
-        
+
 /*
 
 HTCopyNoCR: Copy a socket to a stream, stripping CR characters.
 
    It is slower than HTCopy .
-   
+
  */
 
 extern void HTCopyNoCR PARAMS((
@@ -338,7 +338,7 @@ Clear input buffer and set file number
    This routine and the one below provide simple character input from sockets. (They are
    left over from the older architecure and may not be used very much.)  The existence of
    a common routine and buffer saves memory space in small implementations.
-   
+
  */
 extern void HTInitInput PARAMS((int file_number));
 
@@ -357,7 +357,7 @@ HTParseSocket: Parse a socket given its format
 
    This routine is called by protocol modules to load an object.  uses HTStreamStack and
    the copy routines above.  Returns HT_LOADED if succesful, <0 if not.
-   
+
  */
 extern int HTParseSocket PARAMS((
         HTFormat        format_in,
@@ -370,9 +370,10 @@ extern int HTParseSocket PARAMS((
 
 HTParseFile: Parse a File through a file pointer
 
-   This routine is called by protocols modules to load an object. uses HTStreamStack and
-   HTFileCopy .  Returns HT_LOADED if succesful, <0 if not.
-   
+   This routine is called by protocols modules to load an object.  uses
+   HTStreamStack and HTFileCopy.  Returns HT_LOADED if successful, can also
+   return HT_PARTIAL_CONTENT, HT_NO_DATA, or other <0 for failure.
+
  */
 extern int HTParseFile PARAMS((
         HTFormat        format_in,
@@ -389,8 +390,9 @@ extern int HTParseFile PARAMS((
 /*
 HTParseGzFile: Parse a gzipped File through a file pointer
 
-   This routine is called by protocols modules to load an object. uses HTStreamStack and
-   HTGzFileCopy .  Returns HT_LOADED if succesful, <0 if not.
+   This routine is called by protocols modules to load an object.  uses
+   HTStreamStack and HTGzFileCopy.  Returns HT_LOADED if successful, can also
+   return HT_PARTIAL_CONTENT, HT_NO_DATA, or other <0 for failure.
  */
 extern int HTParseGzFile PARAMS((
         HTFormat        format_in,
@@ -406,9 +408,9 @@ extern int HTParseGzFile PARAMS((
 HTNetToText: Convert Net ASCII to local representation
 
    This is a filter stream suitable for taking text from a socket and passing it into a
-   stream which expects text in the local C representation. It does ASCII and newline
-   conversion. As usual, pass its output stream to it when creating it.
-   
+   stream which expects text in the local C representation.  It does ASCII and newline
+   conversion.  As usual, pass its output stream to it when creating it.
+
  */
 extern HTStream *  HTNetToText PARAMS ((HTStream * sink));
 
@@ -421,7 +423,7 @@ HTFormatInit: Set up default presentations and conversions
    automatically be called the first time a conversion is needed. However, if you
    explicitly add some conversions (eg using HTLoadRules) then you may want also to
    explicitly call this to get the defaults as well.
-   
+
  */
 extern void HTFormatInit NOPARAMS;
 
diff --git a/WWW/Library/Implementation/HTGroup.c b/WWW/Library/Implementation/HTGroup.c
index a1b6fa4a..09340b30 100644
--- a/WWW/Library/Implementation/HTGroup.c
+++ b/WWW/Library/Implementation/HTGroup.c
@@ -67,7 +67,7 @@ typedef struct {
     GroupDef *	translation;
 } Ref;
 
-	
+
 
 PRIVATE void syntax_error ARGS3(FILE *,	 fp,
 				char *,	 msg,
@@ -111,7 +111,7 @@ PRIVATE AddressDefList *parse_address_part ARGS1(FILE *, fp)
 	ref->name = NULL;
 	ref->translation = NULL;
 	StrAllocCopy(ref->name, HTlex_buffer);
-	
+
 	HTList_addObject(address_def_list, (void*)ref);
 
 	if (only_one || (lex_item = lex(fp)) != LEX_ITEM_SEP)
@@ -167,7 +167,7 @@ PRIVATE UserDefList *parse_user_part ARGS1(FILE *, fp)
 	StrAllocCopy(ref->name, HTlex_buffer);
 
 	HTList_addObject(user_def_list, (void*)ref);
-	
+
 	if (only_one || (lex_item = lex(fp)) != LEX_ITEM_SEP)
 	    break;
 	/*
@@ -288,9 +288,9 @@ PUBLIC GroupDef *HTAA_parseGroupDef ARGS1(FILE *, fp)
     if ((lex_item = lex(fp)) != LEX_REC_SEP) {
 	syntax_error(fp, "Garbage after group definition", lex_item);
     }
-    
+
     return group_def;
-}    
+}
 
 
 PRIVATE GroupDef *parse_group_decl ARGS1(FILE *, fp)
@@ -324,7 +324,7 @@ PRIVATE GroupDef *parse_group_decl ARGS1(FILE *, fp)
 
     return group_def;
 }
-	
+
 
 
 /*
@@ -380,10 +380,10 @@ PRIVATE GroupDefList *parse_group_file ARGS1(FILE *, fp)
 {
     GroupDefList *group_def_list = HTList_new();
     GroupDef *group_def;
-    
+
     while (NULL != (group_def = parse_group_decl(fp)))
 	add_group_def(group_def_list, group_def);
-    
+
     return group_def_list;
 }
 
@@ -452,7 +452,7 @@ PRIVATE void print_group_def_list ARGS1(GroupDefList *, group_list)
 {
     GroupDefList *cur = group_list;
     GroupDef *group_def;
-    
+
     while (NULL != (group_def = (GroupDef*)HTList_nextObject(cur)))
 	HTAA_printGroupDef(group_def);
 }
@@ -509,8 +509,8 @@ PRIVATE BOOL part_match ARGS2(CONST char *, tcur,
 /* PRIVATE						ip_number_match()
 **		MATCH INET NUMBER AGAINST AN INET NUMBER MASK
 ** ON ENTRY:
-**	template	mask to match agaist, e.g. 128.141.*.*
-**	the_inet_addr	actual inet address, e.g. 128.141.201.74
+**	template	mask to match agaist, e.g., 128.141.*.*
+**	the_inet_addr	actual inet address, e.g., 128.141.201.74
 **
 ** ON EXIT:
 **	returns		YES, if match;  NO, if not.
@@ -521,7 +521,7 @@ PRIVATE BOOL ip_number_match ARGS2(CONST char *,	template,
     CONST char *tcur = template;
     CONST char *icur = the_inet_addr;
     int cnt;
-    
+
     for (cnt=0; cnt<4; cnt++) {
 	if (!tcur || !icur || !part_match(tcur, icur))
 	    return NO;
@@ -568,9 +568,9 @@ PRIVATE BOOL is_domain_mask ARGS1(CONST char *,	mask)
 /* PRIVATE							ip_mask_match()
 **		MATCH AN IP NUMBER MASK OR IP NAME MASK
 **		AGAINST ACTUAL IP NUMBER OR IP NAME
-**		
+**
 ** ON ENTRY:
-**	mask		mask. Mask may be either an inet number
+**	mask		mask.  Mask may be either an inet number
 **			mask or a domain name mask,
 **			e.g.
 **				128.141.*.*
@@ -614,7 +614,7 @@ PRIVATE BOOL ip_in_def_list ARGS3(AddressDefList *,	address_def_list,
 	Ref *ref;
 
 	while (NULL != (ref = (Ref*)HTList_nextObject(cur))) {
-	    /* Value of ref->translation is ignored, i.e. */
+	    /* Value of ref->translation is ignored, i.e., */
 	    /* no recursion for ip address tamplates.	  */
 	    if (ip_mask_match(ref->name, ip_number, ip_name))
 		return YES;
@@ -719,7 +719,7 @@ PUBLIC HTAAFailReasonType HTAA_userAndInetInGroup ARGS4(GroupDef *, group,
 	while (NULL != (item = (Item*)HTList_nextObject(cur1))) {
 	    if (!item->address_def_list ||	/* Any address allowed */
 		ip_in_def_list(item->address_def_list, ip_number, ip_name)) {
-		    
+
 		if (!item->user_def_list)	/* Any user allowed */
 		    return HTAA_OK;
 		else {
@@ -727,7 +727,7 @@ PUBLIC HTAAFailReasonType HTAA_userAndInetInGroup ARGS4(GroupDef *, group,
 		    Ref *ref;
 
 		    while (NULL != (ref = (Ref*)HTList_nextObject(cur2))) {
-			
+
 			if (ref->translation) {	/* Group, check recursively */
 			    reason = HTAA_userAndInetInGroup(ref->translation,
 							     username,
@@ -748,7 +748,7 @@ PUBLIC HTAAFailReasonType HTAA_userAndInetInGroup ARGS4(GroupDef *, group,
 	    }
 	} /* while items in group */
     } /* valid parameters */
-    
+
     return reason;		/* No match, or invalid parameters */
 }
 
diff --git a/WWW/Library/Implementation/HTGroup.h b/WWW/Library/Implementation/HTGroup.h
index c578d3c3..80f7dacf 100644
--- a/WWW/Library/Implementation/HTGroup.h
+++ b/WWW/Library/Implementation/HTGroup.h
@@ -1,5 +1,5 @@
 /*                                    GROUP FILE ROUTINES
-                                             
+
  */
 
 #ifndef HTGROUP_H
@@ -8,11 +8,11 @@
 #include <HTList.h>
 
 #ifdef SHORT_NAMES
-#define HTAApGrD        HTAA_parseGroupDef
-#define HTAArGrR        HTAA_resolveGroupReferences
-#define HTAApGrD        HTAA_printGroupDef
-#define HTAAGD_d        GroupDef_delete
-#define HTAAuIIG        HTAA_userAndInetInGroup
+#define HTAA_parseGroupDef		HTAApGrD
+#define HTAA_resolveGroupReferences	HTAArGrR
+#define HTAA_printGroupDef		HTAApGrD
+#define GroupDef_delete			HTAAGD_d
+#define HTAA_userAndInetInGroup		HTAAuIIG
 #endif /* SHORT_NAMES */
 
 typedef HTList GroupDefList;
@@ -48,63 +48,63 @@ Group definition grammar
 
   string
                          "sequence of alphanumeric characters"
-                         
+
   user_name
                          string
-                         
+
   group_name
                          string
-                         
+
   group_ref
                          group_name
-                         
+
   user_def
                          user_name | group_ref
-                         
+
   user_def_list
                            user_def { ',' user_def }
-                         
+
   user_part
                          user_def | '(' user_def_list ')'
-                         
+
   templ
-                         
+
                          "sequence of alphanumeric characters and '*'s"
-                         
+
   ip_number_mask
                          templ '.' templ '.' templ '.' templ
-                         
+
   domain_name_mask
                          templ { '.' templ }
-                         
+
   address
-                         
+
                          ip_number_mask | domain_name_mask
-                         
+
   address_def
-                         
+
                          address
-                         
+
   address_def_list
                          address_def { ',' address_def }
-                         
+
   address_part
                          address_def | '(' address_def_list ')'
-                         
+
   item
                          [user_part] ['@' address_part]
-                         
+
   item_list
                          item { ',' item }
-                         
+
   group_def
                          item_list
-                         
+
   group_decl
                          group_name ':' group_def
-                         
+
   PARSE GROUP DEFINITION
-  
+
  */
 
 PUBLIC GroupDef *HTAA_parseGroupDef PARAMS((FILE * fp));
@@ -114,7 +114,7 @@ Fill in Pointers to referenced Group Definitions in a Group Definition
 
    References to groups (by their name) are resolved from group_def_list and pointers to
    those structures are added to group_def.
-   
+
  */
 
 PUBLIC void HTAA_resolveGroupReferences PARAMS((GroupDef *     group_def,
@@ -125,7 +125,7 @@ Read Group File (and do caching)
 
    If group file is already in cache returns a pointer to previously read group definition
    list.
-   
+
  */
 
 PUBLIC GroupDefList *HTAA_readGroupFile PARAMS((CONST char * filename));
@@ -133,9 +133,9 @@ PUBLIC GroupDefList *HTAA_readGroupFile PARAMS((CONST char * filename));
 
 Delete Group Definition
 
-   Groups in cache should never be freed by this function. This should only be used to
+   Groups in cache should never be freed by this function.  This should only be used to
    free group definitions read by HTAA_parseGroupDef.
-   
+
  */
 
 PUBLIC void GroupDef_delete PARAMS((GroupDef * group_def));
@@ -151,7 +151,7 @@ PUBLIC void HTAA_printGroupDef PARAMS((GroupDef * group_def));
 Does a User Belong to a Given Set of Groups
 
    This function checks both the username and the internet address.
-   
+
  */
 
 /* PUBLIC                                       HTAA_userAndInetInGroup()
diff --git a/WWW/Library/Implementation/HTHistory.c b/WWW/Library/Implementation/HTHistory.c
index fab1edc5..d314c0f5 100644
--- a/WWW/Library/Implementation/HTHistory.c
+++ b/WWW/Library/Implementation/HTHistory.c
@@ -58,7 +58,7 @@ HTAnchor * HTHistory_moveBy
     return NULL;  /* No last visited node */
   if (last != (HTAnchor *) last->parent) {  /* Was a child */
     HTList * kids = last->parent->children;
-    int i = HTList_indexOf (kids, last); 
+    int i = HTList_indexOf (kids, last);
     HTAnchor * nextOne = (HTAnchor *)HTList_objectAt (kids, i - offset);
     if (nextOne) {
       HTAnchor * destination = HTAnchor_followMainLink (nextOne);
@@ -87,7 +87,7 @@ BOOL HTHistory_canMoveBy
     return NO;  /* No last visited node */
   if (last != (HTAnchor *) last->parent) {  /* Was a child */
     HTList * kids = last->parent->children;
-    int i = HTList_indexOf (kids, last); 
+    int i = HTList_indexOf (kids, last);
     return (HTList_objectAt (kids, i - offset) != NULL);
   } else {  /* Was a parent */
     return NO;  /* FIXME we could possibly follow the next link... */
@@ -130,7 +130,7 @@ HTAnchor * HTHistory_recall
 **
 **	This is needed in order to check the validity of certain commands
 **	for menus, etc.
-(not needed for now. Use canBacktrack, etc.)
+(not needed for now.  Use canBacktrack, etc.)
 int HTHistory_count
   NOARGS
 {
diff --git a/WWW/Library/Implementation/HTHistory.h b/WWW/Library/Implementation/HTHistory.h
index dc953d82..38d08e0e 100644
--- a/WWW/Library/Implementation/HTHistory.h
+++ b/WWW/Library/Implementation/HTHistory.h
@@ -91,7 +91,7 @@ extern HTAnchor * HTHistory_recall
 **
 **      This is needed in order to check the validity of certain commands
 **      for menus, etc.
-(not needed for now. Use canBacktrack, etc.)
+(not needed for now.  Use canBacktrack, etc.)
 extern int HTHistory_count NOPARAMS;
 */
 
diff --git a/WWW/Library/Implementation/HTLex.c b/WWW/Library/Implementation/HTLex.c
index 633286de..20a5d7ba 100644
--- a/WWW/Library/Implementation/HTLex.c
+++ b/WWW/Library/Implementation/HTLex.c
@@ -48,7 +48,7 @@ PUBLIC LexItem lex ARGS1(FILE *, fp)
 
     if (fp != cache) {	/* This cache doesn't work ok because the system  */
 	cache = fp;	/* often assign same FILE structure the next open */
-	HTlex_line = 1;	/* file. So, if there are syntax errors in setup  */
+	HTlex_line = 1;	/* file.  So, if there are syntax errors in setup */
     }			/* files it may confuse things later on.	  */
 
     if (lex_pushed_back != LEX_NONE) {
diff --git a/WWW/Library/Implementation/HTMIME.h b/WWW/Library/Implementation/HTMIME.h
index 88130d70..ac0a15c6 100644
--- a/WWW/Library/Implementation/HTMIME.h
+++ b/WWW/Library/Implementation/HTMIME.h
@@ -1,24 +1,24 @@
 /*                   /Net/dxcern/userd/timbl/hypertext/WWW/Library/Implementation/HTMIME.html
                                        MIME PARSER
-                                             
-   The MIME parser stream presents a MIME document. It recursively invokes the format
+
+   The MIME parser stream presents a MIME document.  It recursively invokes the format
    manager to handle embedded formats.
-   
+
    As well as stripping off and parsing the headers, the MIME parser has to parse any
    weirld MIME encodings it may meet within the body parts of messages, and must deal with
    multipart messages.
-   
+
    This module is implemented to the level necessary for operation with WWW, but is not
    currently complete for any arbitrary MIME message.
-   
+
    Check the source for latest additions to functionality.
-   
+
    The MIME parser is complicated by the fact that WWW allows real binary to be sent, not
-   ASCII encoded.  Therefore the netascii decoding is included in this module. One cannot
-   layer it by converting first from Net to local text, then decoding it. Of course, for
+   ASCII encoded.  Therefore the netascii decoding is included in this module.  One cannot
+   layer it by converting first from Net to local text, then decoding it.  Of course, for
    local files, the net ascii decoding is not needed.  There are therefore two creation
    routines.
-   
+
  */
 #ifndef HTMIME_H
 #define HTMIME_H
@@ -39,7 +39,7 @@ extern void HTMIME_TrimDoubleQuotes PARAMS((
 /*
 
   INPUT: LOCAL TEXT
-  
+
  */
 extern HTStream * HTMIMEConvert PARAMS((HTPresentation * pres,
                                         HTParentAnchor * anchor,
@@ -47,7 +47,7 @@ extern HTStream * HTMIMEConvert PARAMS((HTPresentation * pres,
 /*
 
   INPUT: NET ASCII
-  
+
  */
 extern HTStream * HTNetMIME PARAMS((HTPresentation * pres,
                                         HTParentAnchor * anchor,
@@ -57,7 +57,7 @@ extern HTStream * HTNetMIME PARAMS((HTPresentation * pres,
 /*
 
   For handling Japanese headers.
-  
+
 */
 extern void HTmmdec_base64 PARAMS((
 	char *	t,
diff --git a/WWW/Library/Implementation/HTMLGen.c b/WWW/Library/Implementation/HTMLGen.c
index 9581081f..9e5ac447 100644
--- a/WWW/Library/Implementation/HTMLGen.c
+++ b/WWW/Library/Implementation/HTMLGen.c
@@ -107,11 +107,11 @@ PRIVATE void allow_break ARGS3(
 **	------------------
 **
 **	The tricky bits are the line break handling.  This attempts
-**	to synchrononise line breaks on sentence or phrase ends. This
+**	to synchrononise line breaks on sentence or phrase ends.  This
 **	is important if one stores SGML files in a line-oriented code
 **	repository, so that if a small change is made, line ends don't
 **	shift in a ripple-through to apparently change a large part of the
-**	file. We give extra "cleanness" to spaces appearing directly
+**	file.  We give extra "cleanness" to spaces appearing directly
 **	after periods (full stops), [semi]colons and commas.
 **	   This should make the source files easier to read and modify
 **	by hand, too, though this is not a primary design consideration. TBL
diff --git a/WWW/Library/Implementation/HTNews.c b/WWW/Library/Implementation/HTNews.c
index ed14d41f..966dcdf6 100644
--- a/WWW/Library/Implementation/HTNews.c
+++ b/WWW/Library/Implementation/HTNews.c
@@ -2078,7 +2078,7 @@ PRIVATE int HTLoadNews ARGS4(
 	/* p1 = HTParse(arg, "", PARSE_PATH | PARSE_PUNCTUATION); */
 	/*
 	**  Don't use HTParse because news: access doesn't follow traditional
-	**  rules. For instance, if the article reference contains a '#',
+	**  rules.  For instance, if the article reference contains a '#',
 	**  the rest of it is lost -- JFG 10/7/92, from a bug report
 	*/
 	} else if (!strncasecomp (arg, "nntp:", 5)) {
@@ -2402,7 +2402,7 @@ PRIVATE int HTLoadNews ARGS4(
 			if (retries < 1)
 			    continue;
 			sprintf(message,
-				gettext("Can't read news info. News host %.20s responded: %.200s"),
+				gettext("Can't read news info.  News host %.20s responded: %.200s"),
 				NewsHost, response_text);
 			return HTLoadError(stream, 500, message);
 		}
diff --git a/WWW/Library/Implementation/HTParse.c b/WWW/Library/Implementation/HTParse.c
index 04a1d446..d3805794 100644
--- a/WWW/Library/Implementation/HTParse.c
+++ b/WWW/Library/Implementation/HTParse.c
@@ -577,7 +577,7 @@ PUBLIC void HTSimplify ARGS1(
 **	-------------------
 **
 ** This function creates and returns a string which gives an expression of
-** one address as related to another. Where there is no relation, an absolute
+** one address as related to another.  Where there is no relation, an absolute
 ** address is retured.
 **
 **  On entry,
@@ -774,7 +774,7 @@ PUBLIC char * HTUnEscape ARGS1(
 	        *q = from_hex(*p++) * 16;
 	    if (*p)
 		/*
-		** Careful! FROMASCII() may evaluate its arg more than once!
+		** Careful!  FROMASCII() may evaluate its arg more than once!
 		*/  /* S/390 -- gil -- 0221 */
 		*q =           *q + from_hex(*p++) ;
 		*q = FROMASCII(*q                 );
diff --git a/WWW/Library/Implementation/HTParse.h b/WWW/Library/Implementation/HTParse.h
index bea789d0..0307327d 100644
--- a/WWW/Library/Implementation/HTParse.h
+++ b/WWW/Library/Implementation/HTParse.h
@@ -22,7 +22,7 @@
 #define PARSE_ALL               31
 
 /*
-**  The following are valid mask values. The terms are the BNF names
+**  The following are valid mask values.  The terms are the BNF names
 **  in the URL document.
 */
 #define URL_XALPHAS     (unsigned char) 1
@@ -81,7 +81,7 @@ extern void HTSimplify PARAMS((
 **	-------------------
 **
 ** This function creates and returns a string which gives an expression of
-** one address as related to another. Where there is no relation, an absolute
+** one address as related to another.  Where there is no relation, an absolute
 ** address is retured.
 **
 **  On entry,
diff --git a/WWW/Library/Implementation/HTPasswd.c b/WWW/Library/Implementation/HTPasswd.c
index 764882d4..f5bc7be4 100644
--- a/WWW/Library/Implementation/HTPasswd.c
+++ b/WWW/Library/Implementation/HTPasswd.c
@@ -7,7 +7,7 @@
 **	MD	Mark Donszelmann    duns@vxdeop.cern.ch
 **
 ** HISTORY:
-**	 7 Nov 93 	MD 	free for crypt taken out (static data returned) 
+**	 7 Nov 93 	MD 	free for crypt taken out (static data returned)
 **
 **
 ** BUGS:
@@ -40,7 +40,7 @@ PRIVATE char salt_chars [65] =
 **	fp	is the password file from which records are read from.
 **
 ** ON EXIT:
-**	returns	nothing. File read pointer is located at the beginning
+**	returns	nothing.  File read pointer is located at the beginning
 **		of the next record.
 */
 PRIVATE void next_rec ARGS1(FILE *, fp)
@@ -71,7 +71,7 @@ PRIVATE void next_rec ARGS1(FILE *, fp)
 ** NOTE:
 **	Uses currently the C library function crypt(), which
 **	only accepts at most 8 characters long strings and produces
-**	always 13 characters long strings. This function is
+**	always 13 characters long strings.  This function is
 **	called repeatedly so that longer strings can be encrypted.
 **	This is of course not as safe as encrypting the entire
 **	string at once, but then again, we are not that paranoid
@@ -199,7 +199,7 @@ PUBLIC BOOL HTAA_passwdMatch ARGS2(CONST char *, password,
 ** ON EXIT:
 **	returns		EOF on end of file,
 **			otherwise the number of read fields
-**			(i.e. in a correct case returns 2).
+**			(i.e., in a correct case returns 2).
 **	out_username	contains the null-terminated read username.
 **	out_password	contains the null-terminated read password.
 **
@@ -215,7 +215,7 @@ PUBLIC int HTAAFile_readPasswdRec ARGS3(FILE *, fp,
 					char *, out_password)
 {
     int terminator;
-    
+
     terminator = HTAAFile_readField(fp, out_username, MAX_USERNAME_LEN);
 
     if (terminator == EOF) {				/* End of file */
@@ -257,7 +257,7 @@ PUBLIC BOOL HTAA_checkPassword ARGS3(CONST char *, username,
     char user[MAX_USERNAME_LEN+1];
     char pw[MAX_PASSWORD_LEN+1];
     int status;
-    
+
     if (filename && *filename)  fp = fopen(filename,"r");
     else			fp = fopen(PASSWD_FILE,"r");
 
@@ -285,7 +285,7 @@ PUBLIC BOOL HTAA_checkPassword ARGS3(CONST char *, username,
     } while (status != EOF);
 
     fclose(fp);
-    
+
     CTRACE(tfp, "HTAAFile_checkPassword: (%s,%s) %scorrect\n",
 		       username, password, ((status != EOF) ? "" : "in"));
 
diff --git a/WWW/Library/Implementation/HTPasswd.h b/WWW/Library/Implementation/HTPasswd.h
index 09007192..f02dbc9f 100644
--- a/WWW/Library/Implementation/HTPasswd.h
+++ b/WWW/Library/Implementation/HTPasswd.h
@@ -1,5 +1,5 @@
 /*                                   PASSWORD FILE ROUTINES
-                                             
+
  */
 
 #ifndef HTPASSWD_H
@@ -8,10 +8,10 @@
 #include <HTList.h>
 
 #ifdef SHORT_NAMES
-#define HTAAenPw        HTAA_encryptPasswd
-#define HTAApwMa        HTAA_passwdMatch
-#define HTAAFrPR        HTAAFile_readPasswdRec
-#define HTAAchPw        HTAA_checkPasswd
+#define HTAA_encryptPasswd	HTAAenPw
+#define HTAA_passwdMatch	HTAApwMa
+#define HTAAFile_readPasswdRec	HTAAFrPR
+#define HTAA_checkPasswd	HTAAchPw
 #endif /* SHORT_NAMES */
 
 /*
@@ -19,12 +19,12 @@
 User Authentication
 
    HTAA_checkPassword(username,password,passwdfile)opens the password file, and checks if
-   the username-password pair is correct. Return value is YES, if and only if they are
-   correct. Otherwise, and also if the open fails, returns NO.
-   
+   the username-password pair is correct.  Return value is YES, if and only if they are
+   correct.  Otherwise, and also if the open fails, returns NO.
+
    If the given password file name is NULL or an empty string, the default password file
    name is used (macro PASSWD_FILE).
-   
+
  */
 
 /* PUBLIC                                               HTAA_checkPassword()
@@ -63,7 +63,7 @@ Password File Maintenance Routines
 ** NOTE:
 **      Uses currently the C library function crypt(), which
 **      only accepts at most 8 characters long strings and produces
-**      always 13 characters long strings. This function is
+**      always 13 characters long strings.  This function is
 **      called repeatedly so that longer strings can be encrypted.
 **      This is of course not as safe as encrypting the entire
 **      string at once, but then again, we are not that paranoid
@@ -102,7 +102,7 @@ PUBLIC BOOL HTAA_passwdMatch PARAMS((CONST char * password,
 ** ON EXIT:
 **      returns         EOF on end of file,
 **                      otherwise the number of read fields
-**                      (i.e. in a correct case returns 2).
+**                      (i.e., in a correct case returns 2).
 **      out_username    contains the null-terminated read username.
 **      out_password    contains the null-terminated read password.
 **
diff --git a/WWW/Library/Implementation/HTRules.h b/WWW/Library/Implementation/HTRules.h
index 2bbe6def..d34c03ac 100644
--- a/WWW/Library/Implementation/HTRules.h
+++ b/WWW/Library/Implementation/HTRules.h
@@ -1,19 +1,19 @@
 /*                                             Configuration Manager for libwww
  *                            CONFIGURATION MANAGER
- *                                              
+ *
  * Author Tim Berners-Lee/CERN.  Public domain.  Please mail changes to
  * timbl@info.cern.ch.
- *    
+ *
  * The configuration information loaded includes tables (file suffixes,
  * presentation methods) in other modules.  The most likely routines needed by
  * developers will be:
- *    
+ *
  * HTSetConfiguration	to load configuration information.
- *                          
+ *
  * HTLoadRules		to load a whole file of configuration information
- *                          
+ *
  * HTTranslate		to translate a URL using the rule table.
- *                          
+ *
  */
 #ifndef HTRULE_H
 #define HTRULE_H
@@ -30,7 +30,7 @@ typedef enum _HTRuleOp {
 } HTRuleOp;
 
 #ifdef SHORT_NAMES
-#define HTSearSc HTSearchScript
+#define HTSearchScript	HTSearSc
 #endif /*SHORT_NAMES*/
 
 /*
@@ -38,11 +38,11 @@ typedef enum _HTRuleOp {
 Server Side Script Execution
 
    If a URL starts with /htbin/ it is understood to mean a script execution request on
-   server. This feature needs to be turned on by setting HTBinDir by the htbin rule.
+   server.  This feature needs to be turned on by setting HTBinDir by the htbin rule.
    Index searching is enabled by setting HTSearchScript into the name of script in BinDir
    doing the actual search by search rule (BinDir must also be set in this case, of
    course).
-   
+
  */
 
 extern char * HTBinDir;         /* Physical /htbin location */
@@ -53,20 +53,20 @@ extern char * HTSearchScript;   /* Search script name */
 HTAddRule:  Add rule to the list
 
   ON ENTRY,
-  
+
   pattern                points to 0-terminated string containing a single "*"
-                         
+
   equiv                  points to the equivalent string with * for the place where the
                          text matched by * goes.
-                         
+
   ON EXIT,
-  
+
   returns                0 if success, -1 if error.
-                         
+
    Note that if BYTE_ADDRESSING is set, the three blocks required are allocated and
-   deallocated as one. This will save time and storage, when malloc's allocation units are
+   deallocated as one.  This will save time and storage, when malloc's allocation units are
    large.
-   
+
  */
 extern int HTAddRule PARAMS((HTRuleOp op, CONST char * pattern, CONST char * equiv));
 
@@ -76,12 +76,12 @@ extern int HTAddRule PARAMS((HTRuleOp op, CONST char * pattern, CONST char * equ
 HTClearRules: Clear all rules
 
   ON EXIT,
-  
+
   Rule file               There are no rules
-                         
+
   returns
                           0 if success, -1 if error.
-                         
+
  */
 
 extern int HTClearRules PARAMS((void));
@@ -91,19 +91,19 @@ extern int HTClearRules PARAMS((void));
 HTTranslate: Translate by rules
 
  */
-        
+
 /*
 
   ON ENTRY,
-  
+
   required                points to a string whose equivalent value is neeed
-                         
+
   ON EXIT,
-  
+
   returns                 the address of the equivalent string allocated from the heap
                          which the CALLER MUST FREE. If no translation occured, then it is
                          a copy of the original.
-                         
+
  */
 extern char * HTTranslate PARAMS((CONST char * required));
 
@@ -112,12 +112,12 @@ extern char * HTTranslate PARAMS((CONST char * required));
 HTSetConfiguration:  Load one line of configuration information
 
   ON ENTRY,
-  
+
   config                  is a string in the syntax of a rule file line.
-                         
+
    This routine may be used for loading configuration information from sources other than
    the  rule file, for example INI files for X resources.
-   
+
  */
 extern int HTSetConfiguration PARAMS((CONST char * config));
 
@@ -127,16 +127,16 @@ extern int HTSetConfiguration PARAMS((CONST char * config));
 HtLoadRules:  Load the rules from a file
 
   ON ENTRY,
-  
+
   Rule table              Rules can be in any state
-                         
+
   ON EXIT,
-  
-  Rule table              Any existing rules will have been kept. Any new rules will have
+
+  Rule table              Any existing rules will have been kept.  Any new rules will have
                          been loaded on top, so as to be tried first.
-                         
+
   Returns                 0 if no error.
-                         
+
  */
 
 extern int HTLoadRules PARAMS((CONST char * filename));
diff --git a/WWW/Library/Implementation/HTString.c b/WWW/Library/Implementation/HTString.c
index b5ed973a..e2451c83 100644
--- a/WWW/Library/Implementation/HTString.c
+++ b/WWW/Library/Implementation/HTString.c
@@ -449,6 +449,7 @@ PRIVATE char * StrAllocVsprintf ARGS4(
 			done = FALSE;
 			type = *fmt;
 			break;
+		    case 'o': /* FALLTHRU */
 		    case 'i': /* FALLTHRU */
 		    case 'd': /* FALLTHRU */
 		    case 'u': /* FALLTHRU */
@@ -600,3 +601,156 @@ PUBLIC char * HTSprintf0 (va_alist)
 
     return (result);
 }
+
+/*
+ * Returns a quoted or escaped form of the given parameter, suitable for use in
+ * a command string.
+ */
+#if USE_QUOTED_PARAMETER
+#define S_QUOTE '\''
+#define D_QUOTE '"'
+PUBLIC char *HTQuoteParameter ARGS1(
+    CONST char *,	parameter)
+{
+    size_t i;
+    size_t last = strlen(parameter);
+    size_t n = 0;
+    size_t quoted = 0;
+    char * result;
+
+    for (i=0; i < last; ++i)
+	if (strchr("\\&#$^*?(){}<>\"';`|", parameter[i]) != 0
+	 || isspace(parameter[i]))
+	    ++quoted;
+
+    result = (char *)malloc(last + 5*quoted + 3);
+    if (result == NULL)
+	outofmem(__FILE__, "HTQuoteParameter");
+
+    n = 0;
+    if (quoted)
+	result[n++] = S_QUOTE;
+    for (i = 0; i < last; i++) {
+	if (parameter[i] == S_QUOTE) {
+	    result[n++] = S_QUOTE;
+	    result[n++] = D_QUOTE;
+	    result[n++] = parameter[i];
+	    result[n++] = D_QUOTE;
+	    result[n++] = S_QUOTE;
+	} else if (parameter[i] == '\\') {
+	    result[n++] = parameter[i];
+	    result[n++] = parameter[i];
+	} else {
+	    result[n++] = parameter[i];
+	}
+    }
+    if (quoted)
+	result[n++] = S_QUOTE;
+    result[n] = '\0';
+    return result;
+}
+#endif
+
+#define HTIsParam(string) ((string[0] == '%' && string[1] == 's'))
+
+/*
+ * Returns the number of "%s" tokens in a system command-template.
+ */
+PUBLIC int HTCountCommandArgs ARGS1(
+    CONST char *,	command)
+{
+    int number = 0;
+    while (command[0] != 0) {
+	if (HTIsParam(command))
+	    number++;
+	command++;
+    }
+    return number;
+}
+
+/*
+ * Returns a pointer into the given string after the given parameter number
+ */
+PRIVATE CONST char *HTAfterCommandArg ARGS2(
+    CONST char *,	command,
+    int,		number)
+{
+    while (number > 0) {
+	if (command[0] != 0) {
+	    if (HTIsParam(command)) {
+		number--;
+		command++;
+	    }
+	    command++;
+	} else {
+	    break;
+	}
+    }
+    return command;
+}
+
+/*
+ * Append string-parameter to a system command that we are constructing.  The
+ * string is a complete parameter (which is a necessary assumption so we can
+ * quote it properly).  We're given the index of the newest parameter we're
+ * processing.  Zero indicates none, so a value of '1' indicates that we copy
+ * from the beginning of the command string up to the first parameter,
+ * substitute the quoted parameter and return the resul.
+ *
+ * Parameters are substituted at "%s" tokens, like printf.  Other printf-style
+ * tokens are not substituted; they are passed through without change.
+ */
+PUBLIC void HTAddParam ARGS4(
+    char **,		result,
+    CONST char *,	command,
+    int,		number,
+    CONST char *,	parameter)
+{
+    CONST char *last = HTAfterCommandArg(command, number - 1);
+    CONST char *next = last;
+    char *quoted;
+
+    if (number > 0) {
+	if (number <= 1) {
+	    FREE(*result);
+	}
+	if (parameter == 0)
+	    parameter = "";
+	while (next[0] != 0) {
+	    if (HTIsParam(next)) {
+		if (next != last) {
+		    size_t len = (next - last)
+		    		+ ((*result != 0) ? strlen(*result) : 0);
+		    HTSACat(result, last);
+		    (*result)[len] = 0;
+		}
+#if USE_QUOTED_PARAMETER
+		quoted = HTQuoteParameter(parameter);
+		HTSACat(result, quoted);
+		FREE(quoted);
+#else
+		HTSACat(result, parameter);
+#endif
+		CTRACE(tfp, "PARAM-ADD:%s\n", *result);
+		return;
+	    }
+	    next++;
+	}
+    }
+}
+
+/*
+ * Append the remaining command-string to a system command (compare with
+ * HTAddParam).  Any remaining "%s" tokens are copied as-is.
+ */
+PUBLIC void HTEndParam ARGS3(
+    char **,		result,
+    CONST char *,	command,
+    int,		number)
+{
+    CONST char *last = HTAfterCommandArg(command, number);
+    if (last[0] != 0) {
+	HTSACat(result, last);
+    }
+    CTRACE(tfp, "PARAM-END:%s\n", *result);
+}
diff --git a/WWW/Library/Implementation/HTString.h b/WWW/Library/Implementation/HTString.h
index 6e4e5591..26c1fec2 100644
--- a/WWW/Library/Implementation/HTString.h
+++ b/WWW/Library/Implementation/HTString.h
@@ -63,4 +63,20 @@ extern char * HTSprintf () GCC_PRINTFLIKE(2,3);
 extern char * HTSprintf0 () GCC_PRINTFLIKE(2,3);
 #endif
 
+#if defined(VMS) || defined(DOSPATH) || defined(__EMX__)
+#define USE_QUOTED_PARAMETER 0
+#else
+#define USE_QUOTED_PARAMETER 1
+#endif
+
+#if USE_QUOTED_PARAMETER
+extern char *HTQuoteParameter PARAMS((CONST char *parameter));
+#else
+#define HTQuoteParameter(parameter) parameter	/* simplify ifdef'ing */
+#endif
+
+extern int HTCountCommandArgs PARAMS((CONST char * command));
+extern void HTAddParam PARAMS((char ** result, CONST char * command, int number, CONST char * parameter));
+extern void HTEndParam PARAMS((char ** result, CONST char * command, int number));
+
 #endif /* HTSTRING_H */
diff --git a/WWW/Library/Implementation/HTStyle.c b/WWW/Library/Implementation/HTStyle.c
index b1a834f9..77c63aa8 100644
--- a/WWW/Library/Implementation/HTStyle.c
+++ b/WWW/Library/Implementation/HTStyle.c
@@ -6,7 +6,7 @@
 **
 **	A StyleSheet is a collection of styles, defining the
 **	translation necessary to
-**	represent a document. It is a linked list of styles.
+**	represent a document.  It is a linked list of styles.
 */
 
 #include <HTUtils.h>
@@ -141,7 +141,7 @@ HTStyle * HTStyleDump (HTStyle * style)
 {
     int tab;
     NXTextStyle *p = style->paragraph;
-    printf(gettext("Style %d `%s' SGML:%s. Font %s %.1f point.\n"),
+    printf(gettext("Style %d `%s' SGML:%s.  Font %s %.1f point.\n"),
 	style,
 	style->name,
 	style->SGMLTag,
@@ -201,7 +201,7 @@ HTStyle * HTStyleMatching (HTStyleSheet * self, HTStyle *style)
 **	------------------------------------------
 **
 **	This heuristic is used for guessing the style for a run of
-**	text which has been pasted in. In order, we try:
+**	text which has been pasted in.  In order, we try:
 **
 **	A style whose paragraph structure is actually used by the run.
 **	A style matching in font
diff --git a/WWW/Library/Implementation/HTStyle.h b/WWW/Library/Implementation/HTStyle.h
index b4fcedaa..3075a2c1 100644
--- a/WWW/Library/Implementation/HTStyle.h
+++ b/WWW/Library/Implementation/HTStyle.h
@@ -5,7 +5,7 @@
    physical representation.
 
    A StyleSheet is a collection of styles, defining the translation necessary to represent
-   a document. It is a linked list of styles.
+   a document.  It is a linked list of styles.
 
 Overriding this module
 
@@ -21,7 +21,7 @@ Overriding this module
    be compiled with a knowledge of the
 
    It we take it out of the library, then of course HTStyle could be declared as an
-   undefined structure. The only references to it are in the structure-flattening code
+   undefined structure.  The only references to it are in the structure-flattening code
    HTML.c and HTPlain.c, which only use HTStypeNamed().
 
    You can in any case override this function in your own code, which will prevent the
diff --git a/WWW/Library/Implementation/HTTCP.c b/WWW/Library/Implementation/HTTCP.c
index 1f201aea..8ae0e0c3 100644
--- a/WWW/Library/Implementation/HTTCP.c
+++ b/WWW/Library/Implementation/HTTCP.c
@@ -17,7 +17,6 @@
 */
 
 #include <HTUtils.h>
-#include <HTAccess.h>
 #include <HTParse.h>
 #include <HTAlert.h>
 #include <HTTCP.h>
@@ -331,7 +330,7 @@ PRIVATE void quench ARGS1(
 **	soc_in	points to the binary internet or decnet address field.
 **
 **  On exit,
-**	*soc_in is filled in. If no port is specified in str, that
+**	*soc_in is filled in.  If no port is specified in str, that
 **		field is left unchanged in *soc_in.
 */
 PUBLIC int HTParseInet ARGS2(
@@ -538,7 +537,7 @@ PUBLIC int HTParseInet ARGS2(
 		**  selectable!  /dev/null isn't, on some systems, which
 		**  makes some useful Lynx invocations fail.  -BL
 		*/
-		if (isatty(fileno(stdin))) FD_SET(fileno(stdin), &readfds); 
+		if (isatty(fileno(stdin))) FD_SET(fileno(stdin), &readfds);
 #endif /* USE_SLANG */
 		timeout.tv_sec = 1;
 		timeout.tv_usec = 0;
@@ -693,8 +692,8 @@ PUBLIC int HTParseInet ARGS2(
 #if defined(VMS) && defined(CMU_TCP)
 	    /*
 	    **  In LIBCMU, phost->h_length contains not the length of one address
-	    **  (four bytes) but the number of bytes in *h_addr, i.e. some multiple
-	    **  of four. Thus we need to hard code the value here, and remember to
+	    **  (four bytes) but the number of bytes in *h_addr, i.e., some multiple
+	    **  of four.  Thus we need to hard code the value here, and remember to
 	    **  change it if/when IP addresses change in size. :-(	LIBCMU is no
 	    **  longer supported, and CMU users are encouraged to obtain and use
 	    **  SOCKETSHR/NETLIB instead. - S. Bjorndahl
@@ -1099,7 +1098,7 @@ PUBLIC int HTDoRead ARGS3(
     fd_set readfds;
     struct timeval timeout;
     int tries=0;
-#ifdef UCX
+#if defined(UNIX) || defined(UCX)
     int nb;
 #endif /* UCX, BSN */
 
@@ -1156,8 +1155,25 @@ PUBLIC int HTDoRead ARGS3(
     }
 
 #if !defined(UCX) || !defined(VAXC)
+#ifdef UNIX
+    while ((nb = SOCKET_READ (fildes, buf, nbyte)) == -1) {
+	int saved_errno = errno;
+	if (errno == EINTR)
+	    continue;
+#ifdef ERESTARTSYS
+	if (errno == ERESTARTSYS)
+	    continue;
+#endif /* ERESTARTSYS */
+	HTInetStatus("read");
+	errno = saved_errno;	/* our caller may check it */
+	break;
+    }
+    return nb;
+#else  /* UNIX */
     return SOCKET_READ (fildes, buf, nbyte);
-#else
+#endif /* !UNIX */
+
+#else  /* UCX && VAXC */
     /*
     **	VAXC and UCX problem only.
     */
diff --git a/WWW/Library/Implementation/HTTCP.h b/WWW/Library/Implementation/HTTCP.h
index a1a428c9..89837fe7 100644
--- a/WWW/Library/Implementation/HTTCP.h
+++ b/WWW/Library/Implementation/HTTCP.h
@@ -1,8 +1,8 @@
 /*                               /Net/dxcern/userd/timbl/hypertext/WWW/Library/src/HTTCP.html
                                GENERIC TCP/IP COMMUNICATION
-                                             
+
    This module has the common code for handling TCP/IP connections etc.
-   
+
  */
 #ifndef HTTCP_H
 #define HTTCP_H
@@ -79,7 +79,7 @@ extern unsigned int HTCardinal PARAMS((int *pstatus,
 **               sin points to the binary internet or decnet address field.
 **
 ** On exit:
-**               *sin is filled in. If no port is specified in str, that
+**               *sin is filled in.  If no port is specified in str, that
 **               field is left unchanged in *sin.
 */
 #ifdef __STDC__
diff --git a/WWW/Library/Implementation/HTTP.c b/WWW/Library/Implementation/HTTP.c
index 2f2e4c45..f6e87fb7 100644
--- a/WWW/Library/Implementation/HTTP.c
+++ b/WWW/Library/Implementation/HTTP.c
@@ -736,8 +736,8 @@ try_again:
   } /* Scope of loop variables */
 
 
-  /*	We now have a terminated unfolded line. Parse it.
-  **	-------------------------------------------------
+  /*	We now have a terminated unfolded line.  Parse it.
+  **	--------------------------------------------------
   */
   CTRACE(tfp, "HTTP: Rx: %s\n", line_buffer);
 
@@ -802,7 +802,7 @@ try_again:
 	server_version[3] != 'P' || server_version[4] != '/' ||
 	server_version[6] != '.') {
 	/*
-	 *  Ugh! An HTTP0 reply,
+	 *  Ugh!  An HTTP0 reply,
 	 */
 	HTAtom * encoding;
 
@@ -1105,9 +1105,9 @@ try_again:
 		       *  Don't make the redirection permanent
 		       *  if we have POST content. - FM
 		       */
-		      CTRACE(tfp, "HTTP: Have POST content. Treating 301 (Permanent) as Temporary.\n");
+		      CTRACE(tfp, "HTTP: Have POST content.  Treating 301 (Permanent) as Temporary.\n");
 		      HTAlert(
-	 gettext("Have POST content. Treating Permanent Redirection as Temporary.\n"));
+	 gettext("Have POST content.  Treating Permanent Redirection as Temporary.\n"));
 		  } else {
 		      permanent_redirection = TRUE;
 		  }
diff --git a/WWW/Library/Implementation/HTTelnet.c b/WWW/Library/Implementation/HTTelnet.c
index cc366cf7..dd8a7b35 100644
--- a/WWW/Library/Implementation/HTTelnet.c
+++ b/WWW/Library/Implementation/HTTelnet.c
@@ -10,7 +10,7 @@
 **	26 Jun 92 When over DECnet, suppressed FTP, Gopher and News. (JFG)
 **	 6 Oct 92 Moved HTClientHost and logfile into here. (TBL)
 **	17 Dec 92 Tn3270 added, bug fix. (DD)
-**	 2 Feb 93 Split from HTAccess.c. Registration.(TBL)
+**	 2 Feb 93 Split from HTAccess.c.  Registration.(TBL)
 */
 
 #include <HTUtils.h>
@@ -33,8 +33,6 @@
 #include <LYStrings.h>
 #include <LYLeaks.h>
 
-#define HT_NO_DATA -9999
-
 PRIVATE void do_system ARGS1(char *, command)
 {
     CTRACE(tfp, "HTTelnet: Command is: %s\n\n", command);
@@ -87,20 +85,20 @@ PRIVATE int remote_session ARGS2(char *, acc_method, char *, host)
 	if (port)
 	    *port++ = '\0';	/* Split */
 
-    if (!hostname || *hostname == '\0') {
-	CTRACE(tfp, "HTTelnet: No host specified!\n");
-	return HT_NO_DATA;
-    }
+	if (!hostname || *hostname == '\0') {
+	    CTRACE(tfp, "HTTelnet: No host specified!\n");
+	    return HT_NO_DATA;
+	}
 
-    if (user) {
-	password = strchr(user, ':');
-	if (password) {
-	    *password++ = '\0';
+	if (user) {
+	    password = strchr(user, ':');
+	    if (password) {
+		*password++ = '\0';
+	    }
 	}
-    }
 
-/* If the person is already telnetting etc, forbid hopping */
-/* This is a security precaution, for us and remote site */
+	/* If the person is already telnetting etc, forbid hopping */
+	/* This is a security precaution, for us and remote site */
 
 	if (HTSecure) {
 
@@ -126,9 +124,9 @@ PRIVATE int remote_session ARGS2(char *, acc_method, char *, host)
 	    return HT_NO_DATA;
 	}
 
-/* Not all telnet servers get it even if user name is specified
-** so we always tell the guy what to log in as
-*/
+	/* Not all telnet servers get it even if user name is specified
+	** so we always tell the guy what to log in as
+	*/
 	if (user && login_protocol != rlogin)
 	    printf("When you are connected, log in as:  %s\n", user);
 	if (password && login_protocol != rlogin)
@@ -139,11 +137,14 @@ PRIVATE int remote_session ARGS2(char *, acc_method, char *, host)
  *		You may need to define this yourself.
  */
 #if	defined(NeXT) && defined(NeXTSTEP) && NeXTSTEP<=20100
-	HTSprintf0(&command, "%s%s%s %s %s", TELNET_COMMAND,
-		user ? " -l " : "",
-		user ? user : "",
-		hostname,
-		port ? port : "");
+#define FMT_TELNET "%s%s%s %s %s"
+
+	HTAddParam(&command, FMT_TELNET, 1, TELNET_COMMAND);
+	HTAddParam(&command, FMT_TELNET, 2, user ? " -l " : "");
+	HTAddParam(&command, FMT_TELNET, 3, user);
+	HTAddParam(&command, FMT_TELNET, 4, hostname);
+	HTAddParam(&command, FMT_TELNET, 5, port);
+	HTEndParam(&command, FMT_TELNET, 5);
 
 	do_system(command);
 	return HT_NO_DATA;		/* Ok - it was done but no data */
@@ -153,21 +154,32 @@ PRIVATE int remote_session ARGS2(char *, acc_method, char *, host)
 /* Most unix machines suppport username only with rlogin */
 #if defined(unix) || defined(DOSPATH)
 #ifndef TELNET_DONE
+
+#define FMT_RLOGIN "%s %s%s%s"
+#define FMT_TN3270 "%s %s %s"
+#define FMT_TELNET "%s %s %s"
+
 	if (login_protocol == rlogin) {
-	    HTSprintf0(&command, "%s %s%s%s", RLOGIN_COMMAND,
-		hostname,
-		user ? " -l " : "",
-		user ? user : "");
+
+	    HTAddParam(&command, FMT_RLOGIN, 1, RLOGIN_COMMAND);
+	    HTAddParam(&command, FMT_RLOGIN, 2, hostname);
+	    HTAddParam(&command, FMT_RLOGIN, 3, user ? " -l " : "");
+	    HTAddParam(&command, FMT_RLOGIN, 4, user);
+	    HTEndParam(&command, FMT_RLOGIN, 4);
 
 	} else if (login_protocol == tn3270) {
-	    HTSprintf0(&command, "%s %s %s", TN3270_COMMAND,
-		hostname,
-		port ? port : "");
+
+	    HTAddParam(&command, FMT_TN3270, 1, TN3270_COMMAND);
+	    HTAddParam(&command, FMT_TN3270, 2, hostname);
+	    HTAddParam(&command, FMT_TN3270, 3, port);
+	    HTEndParam(&command, FMT_TN3270, 3);
 
 	} else {  /* TELNET */
-	    HTSprintf0(&command, "%s %s %s", TELNET_COMMAND,
-		hostname,
-		port ? port : "");
+
+	    HTAddParam(&command, FMT_TELNET, 1, TELNET_COMMAND);
+	    HTAddParam(&command, FMT_TELNET, 2, hostname);
+	    HTAddParam(&command, FMT_TELNET, 3, port);
+	    HTEndParam(&command, FMT_TELNET, 3);
 	}
 
 #ifdef __DJGPP__
diff --git a/WWW/Library/Implementation/HTUU.c b/WWW/Library/Implementation/HTUU.c
index c341c4b8..5465f89f 100644
--- a/WWW/Library/Implementation/HTUU.c
+++ b/WWW/Library/Implementation/HTUU.c
@@ -65,7 +65,7 @@ PRIVATE unsigned char pr2six[256];
  *
  *    Exit     bufcoded contains the coded line.  The first 4*nbytes/3 bytes
  *                      contain printing ASCII characters representing
- *                      those binary bytes. This may include one or
+ *                      those binary bytes.  This may include one or
  *                      two '=' characters used as padding at the end.
  *                      The last byte is a zero byte.
  *             Returns the number of ASCII characters in "bufcoded".
@@ -110,7 +110,7 @@ PUBLIC int HTUU_encode ARGS3(unsigned char *,	bufin,
  *
  *  Decode an ASCII-encoded buffer back to its original binary form.
  *
- *    Entry    bufcoded    points to a uuencoded string.  It is 
+ *    Entry    bufcoded    points to a uuencoded string.  It is
  *                         terminated by any character not in
  *                         the printable character table six2pr, but
  *                         leading whitespace is stripped.
@@ -149,21 +149,21 @@ PUBLIC int HTUU_decode ARGS3(char *,		bufcoded,
 
       for(j=0; j<64; j++) pr2six[(unsigned char)six2pr[j]] = (unsigned char)j;
 #if 0
-      pr2six['A']= 0; pr2six['B']= 1; pr2six['C']= 2; pr2six['D']= 3; 
-      pr2six['E']= 4; pr2six['F']= 5; pr2six['G']= 6; pr2six['H']= 7; 
-      pr2six['I']= 8; pr2six['J']= 9; pr2six['K']=10; pr2six['L']=11; 
-      pr2six['M']=12; pr2six['N']=13; pr2six['O']=14; pr2six['P']=15; 
-      pr2six['Q']=16; pr2six['R']=17; pr2six['S']=18; pr2six['T']=19; 
-      pr2six['U']=20; pr2six['V']=21; pr2six['W']=22; pr2six['X']=23; 
-      pr2six['Y']=24; pr2six['Z']=25; pr2six['a']=26; pr2six['b']=27; 
-      pr2six['c']=28; pr2six['d']=29; pr2six['e']=30; pr2six['f']=31; 
-      pr2six['g']=32; pr2six['h']=33; pr2six['i']=34; pr2six['j']=35; 
-      pr2six['k']=36; pr2six['l']=37; pr2six['m']=38; pr2six['n']=39; 
-      pr2six['o']=40; pr2six['p']=41; pr2six['q']=42; pr2six['r']=43; 
-      pr2six['s']=44; pr2six['t']=45; pr2six['u']=46; pr2six['v']=47; 
-      pr2six['w']=48; pr2six['x']=49; pr2six['y']=50; pr2six['z']=51; 
-      pr2six['0']=52; pr2six['1']=53; pr2six['2']=54; pr2six['3']=55; 
-      pr2six['4']=56; pr2six['5']=57; pr2six['6']=58; pr2six['7']=59; 
+      pr2six['A']= 0; pr2six['B']= 1; pr2six['C']= 2; pr2six['D']= 3;
+      pr2six['E']= 4; pr2six['F']= 5; pr2six['G']= 6; pr2six['H']= 7;
+      pr2six['I']= 8; pr2six['J']= 9; pr2six['K']=10; pr2six['L']=11;
+      pr2six['M']=12; pr2six['N']=13; pr2six['O']=14; pr2six['P']=15;
+      pr2six['Q']=16; pr2six['R']=17; pr2six['S']=18; pr2six['T']=19;
+      pr2six['U']=20; pr2six['V']=21; pr2six['W']=22; pr2six['X']=23;
+      pr2six['Y']=24; pr2six['Z']=25; pr2six['a']=26; pr2six['b']=27;
+      pr2six['c']=28; pr2six['d']=29; pr2six['e']=30; pr2six['f']=31;
+      pr2six['g']=32; pr2six['h']=33; pr2six['i']=34; pr2six['j']=35;
+      pr2six['k']=36; pr2six['l']=37; pr2six['m']=38; pr2six['n']=39;
+      pr2six['o']=40; pr2six['p']=41; pr2six['q']=42; pr2six['r']=43;
+      pr2six['s']=44; pr2six['t']=45; pr2six['u']=46; pr2six['v']=47;
+      pr2six['w']=48; pr2six['x']=49; pr2six['y']=50; pr2six['z']=51;
+      pr2six['0']=52; pr2six['1']=53; pr2six['2']=54; pr2six['3']=55;
+      pr2six['4']=56; pr2six['5']=57; pr2six['6']=58; pr2six['7']=59;
       pr2six['8']=60; pr2six['9']=61; pr2six['+']=62; pr2six['/']=63;
 #endif
    }
@@ -185,7 +185,7 @@ PUBLIC int HTUU_decode ARGS3(char *,		bufcoded,
    }
 
    bufin = bufcoded;
-   
+
    while (nprbytes > 0) {
       *(bufout++) = (unsigned char) (DEC(*bufin) << 2 | DEC(bufin[1]) >> 4);
       *(bufout++) = (unsigned char) (DEC(bufin[1]) << 4 | DEC(bufin[2]) >> 2);
@@ -193,7 +193,7 @@ PUBLIC int HTUU_decode ARGS3(char *,		bufcoded,
       bufin += 4;
       nprbytes -= 4;
    }
-   
+
    if(nprbytes & 03) {
       if(pr2six[(int)bufin[-2]] > MAXVAL) {
          nbytesdecoded -= 2;
diff --git a/WWW/Library/Implementation/HTUU.h b/WWW/Library/Implementation/HTUU.h
index 3594b276..8aa48fd6 100644
--- a/WWW/Library/Implementation/HTUU.h
+++ b/WWW/Library/Implementation/HTUU.h
@@ -1,11 +1,11 @@
 /*                              ENCODING TO PRINTABLE CHARACTERS
-                                             
+
    File module provides functions HTUU_encode() and HTUU_decode() which convert a buffer
-   of bytes to/from RFC 1113 printable encoding format. This technique is similar to the
+   of bytes to/from RFC 1113 printable encoding format.  This technique is similar to the
    familiar Unix uuencode format in that it maps 6 binary bits to one ASCII character (or
    more aptly, 3 binary bytes to 4 ASCII characters).  However, RFC 1113 does not use the
    same mapping to printable characters as uuencode.
-   
+
  */
 
 #ifndef HTUU_H
diff --git a/WWW/Library/Implementation/HTUtils.h b/WWW/Library/Implementation/HTUtils.h
index 7e90dc8e..2706b0e5 100644
--- a/WWW/Library/Implementation/HTUtils.h
+++ b/WWW/Library/Implementation/HTUtils.h
@@ -1,14 +1,14 @@
 /*                                       Utility macros for the W3 code library
                                   MACROS FOR GENERAL USE
-                                             
+
    See also: the system dependent file "tcp.h", which is included here.
-   
+
  */
 
 #ifndef DEBUG
 #define DEBUG   /* Noone ever turns this off as trace is too important */
 #endif          /* Keep option for really small memory applications tho */
-                
+
 #ifndef HTUTILS_H
 #define HTUTILS_H
 
@@ -82,7 +82,7 @@
 #define HAVE_UTMP 1
 #endif
 
-#endif /* HAVE_CONFIG_H */ 
+#endif /* HAVE_CONFIG_H */
 
 #ifndef LY_MAXPATH
 #define LY_MAXPATH 256
@@ -100,15 +100,15 @@
 #define popen _popen
 #define pclose _pclose
 #endif /* _WINDOWS */
- 
-#ifdef __EMX__ 
-#include <unistd.h> /* should be re-include protected under EMX */ 
-#include <stdlib.h> /* should be re-include protected under EMX */ 
-#define getcwd _getcwd2 
-#define chdir _chdir2 
- 
-#endif 
- 
+
+#ifdef __EMX__
+#include <unistd.h> /* should be re-include protected under EMX */
+#include <stdlib.h> /* should be re-include protected under EMX */
+#define getcwd _getcwd2
+#define chdir _chdir2
+
+#endif
+
 
 #ifdef SHORT_NAMES
 #define WWW_TraceFlag HTTrFlag
@@ -132,11 +132,11 @@ Debug message control.
 /*
 
   ERROR TYPE
-  
+
    This is passed back when streams are aborted. It might be nice to have some structure
-   of error messages, numbers, and recursive pointers to reasons. Curently this is a
+   of error messages, numbers, and recursive pointers to reasons.  Curently this is a
    placeholder for something more sophisticated.
-   
+
  */
 typedef void * HTError;                 /* Unused at present -- best definition? */
 
@@ -250,8 +250,8 @@ Macros for declarations
                 t a; u b; v c; w d; x e; y f; z g; s h; r i;
 #define ARGS10(t,a,u,b,v,c,w,d,x,e,y,f,z,g,s,h,r,i,q,j) (a,b,c,d,e,f,g,h,i,j) \
                 t a; u b; v c; w d; x e; y f; z g; s h; r i; q j;
-                
-        
+
+
 #endif /* __STDC__ (ANSI) */
 
 #ifndef NULL
@@ -276,9 +276,9 @@ Booleans
 #define FALSE   (BOOLEAN)0
 #endif
 #endif   /*  CURSES  */
-#endif   /* _WINDOWS */
+#endif	 /*  BOOLEAN_DEFINED */
 #define BOOLEAN_DEFINED
-#endif
+#endif   /* _WINDOWS */
 
 #ifndef BOOL
 #define BOOL BOOLEAN
@@ -319,7 +319,9 @@ Sucess (>=0) and failure (<0) codes
 #define HT_CANNOT_TRANSLATE -4
 #define HT_NO_ACCESS    -10             /* Access not available */
 #define HT_FORBIDDEN    -11             /* Access forbidden */
-#define HT_INTERNAL     -12             /* Weird -- should never happen. */
+#define HT_NO_DATA		-204	/* OK but no data was loaded - */
+					/* possibly other app started or forked */
+#define HT_INTERNAL             -900    /* Weird -- should never happen. */
 #define HT_BAD_EOF      -12             /* Premature EOF */
 
 #ifndef va_arg
@@ -370,8 +372,8 @@ Upper- and Lowercase macros
 
    The problem here is that toupper(x) is not defined officially unless isupper(x) is.
    These macros are CERTAINLY needed on #if defined(pyr) || define(mips) or BDSI
-   platforms. For safefy, we make them mandatory.
-   
+   platforms.  For safefy, we make them mandatory.
+
  */
 #include <ctype.h>
 #include <string.h>
@@ -389,9 +391,9 @@ Upper- and Lowercase macros
 The local equivalents of CR and LF
 
    We can check for these after net ascii text has been converted to the local
-   representation. Similarly, we include them in strings to be sent as net ascii after
+   representation.  Similarly, we include them in strings to be sent as net ascii after
    translation.
-   
+
  */
 #define LF   FROMASCII('\012')  /* ASCII line feed LOCAL EQUIVALENT */
 #define CR   FROMASCII('\015')  /* Will be converted to ^M for transmission */
@@ -416,7 +418,7 @@ extern FILE *TraceFP NOPARAMS;
 #include <socks.h>
 
 /*
- * The AIX- and SOCKS4-specific definitions in socks.h are inconsistent. 
+ * The AIX- and SOCKS4-specific definitions in socks.h are inconsistent.
  * Repair them so they're consistent (and usable).
  */
 #if defined(_AIX) && !defined(USE_SOCKS4_PREFIX)
diff --git a/WWW/Library/Implementation/HTVMSUtils.c b/WWW/Library/Implementation/HTVMSUtils.c
index 20033864..9275176f 100644
--- a/WWW/Library/Implementation/HTVMSUtils.c
+++ b/WWW/Library/Implementation/HTVMSUtils.c
@@ -77,12 +77,12 @@ unsigned long Buffer[2];
   Result = sys$getjpiw(0, 0, 0, ItemList, 0, 0, 0);
 
   if (Result != SS$_NORMAL)
-     return(NO);  
+     return(NO);
 
   if (Buffer[0] & PRV$M_SYSPRV)
      return(YES);
 
-  return(NO);  
+  return(NO);
 }
 
 
@@ -93,7 +93,7 @@ unsigned long Buffer[2];
 **	No arguments.
 **
 ** ON EXIT:
-**	
+**
 */
 PUBLIC void HTVMS_enableSysPrv NOARGS
 {
@@ -119,7 +119,7 @@ unsigned long Prv[2], PreviousPrv[2];
 **	No arguments.
 **
 ** ON EXIT:
-**	
+**
 */
 PUBLIC void HTVMS_disableSysPrv NOARGS
 {
@@ -149,7 +149,7 @@ unsigned long Prv[2], PreviousPrv[2];
 **
 ** ON EXIT:
 **	returns YES if access is allowed
-**	
+**
 */
 PUBLIC BOOL HTVMS_checkAccess ARGS3(
 	CONST char *, FileName,
@@ -220,7 +220,7 @@ char *colon;
 
 
 /* PUBLIC							HTVMS_wwwName()
-**		CONVERTS VMS Name into WWW Name 
+**		CONVERTS VMS Name into WWW Name
 ** ON ENTRY:
 **	vmsname		VMS file specification (NO NODE)
 **
@@ -239,10 +239,10 @@ char *colon;
 **	[DUNS.ECHO.--.TRANS] 		duns/echo/../../trans
 **	[.DUNS] 			duns
 **	[.DUNS.ECHO] 			duns/echo
-**	[.DUNS.ECHO]TEST.COM 		duns/echo/test.com 
+**	[.DUNS.ECHO]TEST.COM 		duns/echo/test.com
 **	TEST.COM 			test.com
 **
-**	
+**
 */
 PUBLIC char * HTVMS_wwwName ARGS1(
 	char *, vmsname)
@@ -261,11 +261,11 @@ int dir;
          case ':':  *(dst++) = '/'; break;
          case '-': if (dir)
 	 	   {
-	 	      if ((*(src-1)=='[' || *(src-1)=='.' || *(src-1)=='-') && 
+	 	      if ((*(src-1)=='[' || *(src-1)=='.' || *(src-1)=='-') &&
 		          (*(src+1)=='.' || *(src+1)=='-'))
 		      {
 		          *(dst++) = '/';
-                          *(dst++) = '.'; 
+                          *(dst++) = '.';
                           *(dst++) = '.';
 		      }
 		      else
@@ -290,7 +290,7 @@ int dir;
          case '[': dir = 1; break;
          case ']': dir = 0; break;
          default:  if (*(src-1) == ']') *(dst++) = '/';
-                   *(dst++) = *src; 
+                   *(dst++) = *src;
                    break;
       }
    }
@@ -311,14 +311,14 @@ int dir;
 ** Bug:	Returns pointer to static -- non-reentrant
 */
 PUBLIC char * HTVMS_name ARGS2(
-	CONST char *, nn, 
+	CONST char *, nn,
 	CONST char *, fn)
 {
 
-/*	We try converting the filename into Files-11 syntax. That is, we assume
-**	first that the file is, like us, on a VMS node. We try remote
-**	(or local) DECnet access. Files-11, VMS, VAX and DECnet
-**	are trademarks of Digital Equipment Corporation. 
+/*	We try converting the filename into Files-11 syntax.  That is, we assume
+**	first that the file is, like us, on a VMS node.  We try remote
+**	(or local) DECnet access.  Files-11, VMS, VAX and DECnet
+**	are trademarks of Digital Equipment Corporation.
 **	The node is assumed to be local if the hostname WITHOUT DOMAIN
 **	matches the local one. @@@
 */
@@ -327,12 +327,12 @@ PUBLIC char * HTVMS_name ARGS2(
     char * nodename = (char*)malloc(strlen(nn)+2+1);	/* Copies to hack */
     char *second;		/* 2nd slash */
     char *last;			/* last slash */
-    
+
     char * hostname = (char *)HTHostName();
 
     if (!filename || !nodename) outofmem(__FILE__, "HTVMSname");
     strcpy(filename, fn);
-    strcpy(nodename, "");	/* On same node? Yes if node names match */
+    strcpy(nodename, "");	/* On same node?  Yes if node names match */
     if (strncmp(nn,"localhost",9)) {
         char *p, *q;
         for (p=hostname, q=(char *)nn;
@@ -349,7 +349,7 @@ PUBLIC char * HTVMS_name ARGS2(
 
     second = strchr(filename+1, '/');		/* 2nd slash */
     last = strrchr(filename, '/');	/* last slash */
-        
+
     if (!second) {				/* Only one slash */
 	sprintf(vmsname, "%s%s", nodename, filename + 1);
     } else if(second==last) {		/* Exactly two slashes */
@@ -376,19 +376,19 @@ PUBLIC char * HTVMS_name ARGS2(
 **	It is based on the newer WWWLib's HTDirBrw.c. - Foteos Macrides
 */
 PUBLIC int HTStat ARGS2(
-	CONST char *, filename, 
+	CONST char *, filename,
 	struct stat *, info)
 {
-   /* 
+   /*
       the following stuff does not work in VMS with a normal stat...
       -->   /disk$user/duns/www if www is a directory
-		is statted like: 	/disk$user/duns/www.dir 
+		is statted like: 	/disk$user/duns/www.dir
 		after a normal stat has failed
       -->   /disk$user/duns	if duns is a toplevel directory
 		is statted like:	/disk$user/000000/duns.dir
       -->   /disk$user since disk$user is a device
 		is statted like:	/disk$user/000000/000000.dir
-      -->   /			
+      -->   /
 		searches all devices, no solution yet...
       -->   /vxcern!/disk$cr/wwwteam/login.com
 		is not statted but granted with fake information...
@@ -408,7 +408,7 @@ char Name[256];
 
 #ifdef NOT_USED
    /* if filename contains a node specification (! or ::), we will try to access
-      the file via DECNET, but we do not stat it..., just return success 
+      the file via DECNET, but we do not stat it..., just return success
       with some fake information... */
    if (HTVMS_checkDecnet(Name))
    {
@@ -436,19 +436,19 @@ char Name[256];
    {  /* root requested */
       return(-1);
    }
-   
+
    /* failed so this might be a directory, add '.dir' */
    Len = strlen(Name);
    if (Name[Len-1] == '/')
       Name[Len-1] = '\0';
-   
+
    /* fail in case of device */
    Ptr = strchr(Name+1,'/');
    if ((Ptr == NULL) && (Name[0] == '/'))
    {  /* device only... */
       strcat(Name,"/000000/000000");
    }
-   
+
    if (Ptr != NULL)
    {  /* correct filename in case of toplevel dir */
       Ptr2 = strchr(Ptr+1,'/');
@@ -592,7 +592,7 @@ char *dot;
    }
    else
    {
-      *dot = ']';   
+      *dot = ']';
       strcat(DirEntry,".dir");
    }
 
@@ -608,8 +608,8 @@ char *dot;
    entryname_desc.dsc$b_class = DSC$K_CLASS_S;
    entryname_desc.dsc$a_pointer = VMSentry;
 
-   status = lib$find_file(&(dirname_desc), 
-                          &entryname_desc, 
+   status = lib$find_file(&(dirname_desc),
+                          &entryname_desc,
                           &(dir.context),
                           0,0,0,0);
    if (!(status & 0x01))
@@ -653,8 +653,8 @@ char *UnixEntry;
    entryname_desc.dsc$b_class = DSC$K_CLASS_S;
    entryname_desc.dsc$a_pointer = VMSentry;
 
-   status = lib$find_file(&(dirp->dirname_desc), 
-                          &entryname_desc, 
+   status = lib$find_file(&(dirp->dirname_desc),
+                          &entryname_desc,
                           &(dirp->context),
                           0,0,0,0);
    if (status == RMS$_NMF)
@@ -735,13 +735,13 @@ PRIVATE void free_VMSEntryInfo_contents ARGS1(VMSEntryInfo *,entry_info)
    /* dont free the struct */
 }
 
-#define FILE_BY_NAME 0 
+#define FILE_BY_NAME 0
 #define FILE_BY_TYPE 1
 #define FILE_BY_SIZE 2
 #define FILE_BY_DATE 3
 extern BOOLEAN HTfileSortMethod;  /* specifies the method of sorting */
 
-PUBLIC int compare_VMSEntryInfo_structs ARGS2(VMSEntryInfo *,entry1, 
+PUBLIC int compare_VMSEntryInfo_structs ARGS2(VMSEntryInfo *,entry1,
 					      VMSEntryInfo *,entry2)
 {
     int i, status;
@@ -752,7 +752,7 @@ PUBLIC int compare_VMSEntryInfo_structs ARGS2(VMSEntryInfo *,entry1,
         case FILE_BY_SIZE:
 			/* both equal or both 0 */
                         if(entry1->size == entry2->size)
-			    return(strcasecomp(entry1->filename, 
+			    return(strcasecomp(entry1->filename,
 					       entry2->filename));
 			else
 			    if(entry1->size > entry2->size)
@@ -767,7 +767,7 @@ PUBLIC int compare_VMSEntryInfo_structs ARGS2(VMSEntryInfo *,entry1,
 				return(status);
 			    /* else fall to filename comparison */
 			}
-                        return (strcasecomp(entry1->filename, 
+                        return (strcasecomp(entry1->filename,
 					    entry2->filename));
                         break;
         case FILE_BY_DATE:
@@ -777,7 +777,7 @@ PUBLIC int compare_VMSEntryInfo_structs ARGS2(VMSEntryInfo *,entry1,
 			    */
 			    if (strlen(entry1->date) != 12 ||
 			        strlen(entry2->date) != 12) {
-				return (strcasecomp(entry1->filename, 
+				return (strcasecomp(entry1->filename,
 						    entry2->filename));
 			    }
 			    /*
@@ -843,7 +843,7 @@ PUBLIC int compare_VMSEntryInfo_structs ARGS2(VMSEntryInfo *,entry1,
                         break;
         case FILE_BY_NAME:
         default:
-                        return (strcmp(entry1->filename, 
+                        return (strcmp(entry1->filename,
 					    entry2->filename));
       }
 }
@@ -951,7 +951,7 @@ PUBLIC int HTVMSBrowseDir ARGS4(
 	StrAllocCat(pathname, "/");
 	pathend++;
     }
-    
+
     /*
      *  Output the title and header.
      */
@@ -1006,7 +1006,7 @@ PUBLIC int HTVMSBrowseDir ARGS4(
 	    }
 	    END(HTML_PRE);
 	    fclose(fp);
-        } 
+        }
     }
     FREE(header);
     if (parent) {
@@ -1052,7 +1052,7 @@ PUBLIC int HTVMSBrowseDir ARGS4(
 	    if (!dirbuf->d_ino)	{
 		continue;
 	    }
-	    
+
 	    /* Current and parent directories are never shown in list */
 	    if (dottest && (!strcmp(dirbuf->d_name, ".") ||
 			    !strcmp(dirbuf->d_name, ".."))) {
@@ -1079,7 +1079,7 @@ PUBLIC int HTVMSBrowseDir ARGS4(
 		   we however continue to browse through the directory... */
                 continue;
 	    }
-            entry_info = (VMSEntryInfo *)malloc(sizeof(VMSEntryInfo));    
+            entry_info = (VMSEntryInfo *)malloc(sizeof(VMSEntryInfo));
 	    if (entry_info == NULL)
 		outofmem(__FILE__, "HTVMSBrowseDir");
 	    entry_info->type = 0;
@@ -1092,7 +1092,7 @@ PUBLIC int HTVMSBrowseDir ARGS4(
 	    format = HTFileFormat(dirbuf->d_name, &encoding,
 				  (CONST char **)&cp);
 	    if (!cp) {
-		if(!strncmp(HTAtom_name(format), "application",11)) 
+		if(!strncmp(HTAtom_name(format), "application",11))
 		{
 		    cp = HTAtom_name(format) + 12;
 		    if(!strncmp(cp,"x-", 2))
@@ -1164,7 +1164,7 @@ PUBLIC int HTVMSBrowseDir ARGS4(
 	      {
 		 CTRACE(tfp,"Adding file to BTree: %s\n",
 						      entry_info->filename);
-	         HTBTree_add(bt, (VMSEntryInfo *)entry_info); 
+	         HTBTree_add(bt, (VMSEntryInfo *)entry_info);
 	      }
 
 	} /* End while HTVMSreaddir() */
@@ -1186,7 +1186,7 @@ PUBLIC int HTVMSBrowseDir ARGS4(
 		entry_info = (VMSEntryInfo *)HTBTree_object(ele);
 
 		/* Output the date */
-		if(entry_info->date) 
+		if(entry_info->date)
 		       {
 		             PUTS(entry_info->date);
 		             PUTS("  ");
@@ -1195,7 +1195,7 @@ PUBLIC int HTVMSBrowseDir ARGS4(
 			PUTS("     * ");
 
 		/* Output the type */
-		if(entry_info->type) 
+		if(entry_info->type)
 		  {
 		    for(i = 0; entry_info->type[i] != '\0' && i < 15; i++)
 		        PUTC(entry_info->type[i]);
@@ -1205,12 +1205,12 @@ PUBLIC int HTVMSBrowseDir ARGS4(
 		  }
 
 		/* Output the link for the name */
-		HTDirEntry(target, tail, entry_info->filename);  
+		HTDirEntry(target, tail, entry_info->filename);
 		PUTS(entry_info->filename);
 		END(HTML_A);
 
                 /* Output the size */
-		if(entry_info->size) 
+		if(entry_info->size)
 		  {
 		          if(entry_info->size < 1024)
 			      sprintf(string_buffer,"  %d bytes",
diff --git a/WWW/Library/Implementation/HTVMS_WaisUI.c b/WWW/Library/Implementation/HTVMS_WaisUI.c
index 2301cbd6..1f9ffccc 100644
--- a/WWW/Library/Implementation/HTVMS_WaisUI.c
+++ b/WWW/Library/Implementation/HTVMS_WaisUI.c
@@ -216,7 +216,7 @@ transport_message(
   int rv;
 
 
-  /* Write out message. Read back header. Figure out response length. */
+  /* Write out message.  Read back header.  Figure out response length. */
 
   if( request_length + HEADER_LENGTH !=
       NETWRITE(connection,request_message,
@@ -1206,7 +1206,7 @@ makeAny(unsigned long size, char* data)
 
 void
 freeAny(any* a)
-/* destroy an any and its associated data. Assumes a->bytes was
+/* destroy an any and its associated data.  Assumes a->bytes was
    allocated using the s_malloc family of libraries
  */
 {
@@ -1988,7 +1988,7 @@ getQueryTermSize(query_term* qt)
 
 /*----------------------------------------------------------------------*/
 
-/* A query is simply a null terminated list of query terms. For
+/* A query is simply a null terminated list of query terms.  For
    transmission, a query is written into an any which is sent as
    the user information field. */
 
diff --git a/WWW/Library/Implementation/HTWAIS.c b/WWW/Library/Implementation/HTWAIS.c
index b21aafd7..b1b42ff2 100644
--- a/WWW/Library/Implementation/HTWAIS.c
+++ b/WWW/Library/Implementation/HTWAIS.c
@@ -280,7 +280,7 @@ PRIVATE char * WWW_from_WAIS ARGS1(
 	 (p < docid->bytes+docid->size) && (q < &buf[BIG]);) {
 	CTRACE(tfp, "    Record type %d, length %d\n", p[0], p[1]);
 	if (*p > 10) {
-	    CTRACE(tfp, "Eh? DOCID record type of %d!\n", *p);
+	    CTRACE(tfp, "Eh?  DOCID record type of %d!\n", *p);
 	    return 0;
 	}
 	{	/* Bug fix -- allow any byte value 15 Apr 93 */
@@ -433,7 +433,7 @@ PRIVATE void output_text_record ARGS4(
 
   for (count = 0; count < record->DocumentText->size; count++){
     long ch = (unsigned char)record->DocumentText->bytes[count];
-    if (ch == 27) {	/* What is this in for? Tim */
+    if (ch == 27) {	/* What is this in for?  Tim */
 	    /* then we have an escape code */
 	    /* if the next letter is '(' or ')', then ignore two letters */
 	    if ('(' == record->DocumentText->bytes[count + 1] ||
@@ -747,7 +747,7 @@ PUBLIC int HTLoadWAIS ARGS4(
 
     /*
     **	If keyword search is performed but there are no keywords,
-    **	the user has followed a link to the index itself. It would be
+    **	the user has followed a link to the index itself.  It would be
     **	appropriate at this point to send him the .SRC file - how?
     */
     if (key && !*key) { 			/* I N D E X */
diff --git a/WWW/Library/Implementation/HTWAIS.h b/WWW/Library/Implementation/HTWAIS.h
index e8a6b7f2..613acedf 100644
--- a/WWW/Library/Implementation/HTWAIS.h
+++ b/WWW/Library/Implementation/HTWAIS.h
@@ -1,26 +1,26 @@
 /*                                                    WAIS protocol module for the W3 library
                                  WAIS PROTOCOL INTERFACE
-                                             
+
    This module does not actually perform the WAIS protocol directly, but it does using one
-   or more libraries of the freeWAIS distribution. The ui.a library came with the old free
+   or more libraries of the freeWAIS distribution.  The ui.a library came with the old free
    WAIS from TMC,  the client.a and wais.a libraries are needed from the freeWAIS from
    CNIDR.
-   
+
    If you include this module in the library, you must also
-   
-      Register the HTWAIS protocol at initialisation (e.g. HTInit or HTSInit) by compiling
+
+      Register the HTWAIS protocol at initialisation (e.g., HTInit or HTSInit) by compiling
       it with -DDIRECT_WAIS
-      
+
       Link with the WAIS libraries
-      
+
    The wais source files are parsed by a separate and independent module, HTWSRC .   You
    can include HTWSRC without including direct wais using this module, and your WWW code
    will be able to read source files, and access WAIS indexes through a gateway.
-   
+
    A WAIS-WWW gateway is just a normal W3 server with a libwww compiled with this module.
-   
+
    Anyways, this interface won't change much:
-   
+
  */
 #ifndef HTWAIS_H
 #define HTWAIS_H
@@ -37,5 +37,5 @@ GLOBALREF HTProtocol HTWAIS;
 
 /*
                                                                   Tim BL
-                                                                            
+
 */
diff --git a/WWW/Library/Implementation/HTWSRC.h b/WWW/Library/Implementation/HTWSRC.h
index 62617022..821cf2ff 100644
--- a/WWW/Library/Implementation/HTWSRC.h
+++ b/WWW/Library/Implementation/HTWSRC.h
@@ -1,12 +1,12 @@
 /*                                                             A parser for WAIS source files
                                  WAIS SOURCE FILE PARSER
-                                             
+
    This converter returns a stream object into which a WAIS source file can be written.
    The result is put via a structured stream into whatever format was required for the
    output stream.
-   
+
    See also: HTWAIS protocol interface module
-   
+
  */
 #ifndef HTWSRC_H
 #define HTWSRC_H
@@ -25,11 +25,11 @@ extern  HTStream* HTWSRCConvert PARAMS((
 Escaping Strings
 
    HTDeSlash takes out the invlaid characters in a URL path ELEMENT by converting them
-   into hex-escaped characters. HTEnSlash does the reverse.
-   
+   into hex-escaped characters.  HTEnSlash does the reverse.
+
    Each returns a pointer to a newly allocated string which must eventually be freed by
    the caller.
-   
+
  */
 extern char * HTDeSlash PARAMS((CONST char * str));
 
@@ -40,5 +40,5 @@ extern char * HTEnSlash PARAMS((CONST char * str));
 /*
 
                                                                                     Tim BL
-                                                                                          
+
     */
diff --git a/WWW/Library/Implementation/HText.h b/WWW/Library/Implementation/HText.h
index 9a028d87..2d1f1ed3 100644
--- a/WWW/Library/Implementation/HText.h
+++ b/WWW/Library/Implementation/HText.h
@@ -1,14 +1,14 @@
 /*                                                           Rich Hypertext object for libWWW
                                   RICH HYPERTEXT OBJECT
-                                             
+
  */
 
 /*
 
    This is the C interface to the Objective-C (or whatever) Style-oriented HyperText
-   class. It is used when a style-oriented text object is available or craeted in order to
+   class.  It is used when a style-oriented text object is available or craeted in order to
    display hypertext.
-   
+
  */
 #ifndef HTEXT_H
 #define HTEXT_H
@@ -64,11 +64,11 @@ extern HTParentAnchor * HTMainAnchor;   /* Pointer to current text's anchor */
 Creation and deletion
 
   HTEXT_NEW: CREATE HYPERTEXT OBJECT
-  
-   There are several methods depending on how much you want to specify. The output stream
+
+   There are several methods depending on how much you want to specify.  The output stream
    is used with objects which need to output the hypertext to a stream.  The structure is
    for objects which need to refer to the structure which is kep by the creating stream.
-   
+
  */
  extern HText * HText_new PARAMS((HTParentAnchor * anchor));
 
@@ -82,7 +82,7 @@ Creation and deletion
 /*
 
   FREE HYPERTEXT OBJECT
-  
+
  */
 extern void     HText_free PARAMS((HText * me));
 
@@ -94,7 +94,7 @@ Object Building methods
    These are used by a parser to build the text in an object HText_beginAppend must be
    called, then any combination of other append calls, then HText_endAppend. This allows
    optimised handling using buffers and caches which are flushed at the end.
-   
+
  */
 extern void HText_beginAppend PARAMS((HText * text));
 
@@ -103,7 +103,7 @@ extern void HText_endAppend PARAMS((HText * text));
 /*
 
   SET THE STYLE FOR FUTURE TEXT
-  
+
  */
 
 extern void HText_setStyle PARAMS((HText * text, HTStyle * style));
@@ -111,14 +111,14 @@ extern void HText_setStyle PARAMS((HText * text, HTStyle * style));
 /*
 
   ADD ONE CHARACTER
-  
+
  */
 extern void HText_appendCharacter PARAMS((HText * text, char ch));
 
 /*
 
   ADD A ZERO-TERMINATED STRING
-  
+
  */
 
 extern void HText_appendText PARAMS((HText * text, CONST char * str));
@@ -126,9 +126,9 @@ extern void HText_appendText PARAMS((HText * text, CONST char * str));
 /*
 
   NEW PARAGRAPH
-  
+
    and similar things
-   
+
  */
 extern void HText_appendParagraph PARAMS((HText * text));
 
@@ -141,15 +141,15 @@ extern void HText_appendHorizontalRule PARAMS((HText * text));
 /*
 
   START/END SENSITIVE TEXT
-  
+
  */
 
 /*
 
-   The anchor object is created and passed to HText_beginAnchor. The senstive text is
+   The anchor object is created and passed to HText_beginAnchor.  The senstive text is
    added to the text object, and then HText_endAnchor is called. Anchors may not be
    nested.
-   
+
  */
 extern int HText_beginAnchor PARAMS((
 	HText *		text,
@@ -161,14 +161,14 @@ extern void HText_endAnchor PARAMS((HText * text, int number));
 /*
 
   APPEND AN INLINE IMAGE
-  
+
    The image is handled by the creation of an anchor whose destination is the image
    document to be included. The semantics is the intended inline display of the image.
-   
+
    An alternative implementation could be, for example, to begin an anchor, append the
-   alternative text or "IMAGE", then end the anchor. This would simply generate some text
+   alternative text or "IMAGE", then end the anchor.  This would simply generate some text
    linked to the image itself as a separate document.
-   
+
  */
 extern void HText_appendImage PARAMS((
         HText *         text,
@@ -180,7 +180,7 @@ extern void HText_appendImage PARAMS((
 /*
 
   DUMP DIAGNOSTICS TO STDERR
-  
+
  */
 
 extern void HText_dump PARAMS((HText * me));
@@ -188,7 +188,7 @@ extern void HText_dump PARAMS((HText * me));
 /*
 
   RETURN THE ANCHOR ASSOCIATED WITH THIS NODE
-  
+
  */
 extern HTParentAnchor * HText_nodeAnchor PARAMS((HText * me));
 
@@ -203,7 +203,7 @@ Browsing functions
 /*
 
   BRING TO FRONT AND HIGHLIGHT IT
-  
+
  */
 
 
@@ -214,10 +214,10 @@ extern BOOL HText_selectAnchor PARAMS((HText * text, HTChildAnchor* anchor));
 
 Editing functions
 
-   These are called from the application. There are many more functions not included here
-   from the orginal text object. These functions NEED NOT BE IMPLEMENTED in a browser
+   These are called from the application.  There are many more functions not included here
+   from the orginal text object.  These functions NEED NOT BE IMPLEMENTED in a browser
    which cannot edit.
-   
+
  */
 /*      Style handling:
 */
diff --git a/WWW/Library/Implementation/SGML.c b/WWW/Library/Implementation/SGML.c
index d55c74fb..fd15d5bf 100644
--- a/WWW/Library/Implementation/SGML.c
+++ b/WWW/Library/Implementation/SGML.c
@@ -1,8 +1,8 @@
 /*			General SGML Parser code		SGML.c
 **			========================
 **
-**	This module implements an HTStream object. To parse an
-**	SGML file, create this object which is a parser. The object
+**	This module implements an HTStream object.  To parse an
+**	SGML file, create this object which is a parser.  The object
 **	is (currently) created by being passed a DTD structure,
 **	and a target HTStructured object at which to throw the parsed stuff.
 **
@@ -928,7 +928,7 @@ PRIVATE void start_element ARGS1(
 	(CONST char**) context->value,	/* coerce type for think c */
 	context->current_tag_charset,
 	(char **)&context->include);
-    if (new_tag->contents != SGML_EMPTY) {		/* i.e. tag not empty */
+    if (new_tag->contents != SGML_EMPTY) {		/* i.e., tag not empty */
 	HTElement * N = (HTElement *)malloc(sizeof(HTElement));
 	if (N == NULL)
 	    outofmem(__FILE__, "start_element");
diff --git a/WWW/Library/Implementation/SGML.h b/WWW/Library/Implementation/SGML.h
index 22f4bded..f4643ad2 100644
--- a/WWW/Library/Implementation/SGML.h
+++ b/WWW/Library/Implementation/SGML.h
@@ -1,21 +1,21 @@
 /*                                                SGML parse and stream definition for libwww
                                SGML AND STRUCTURED STREAMS
-                                             
-   The SGML parser is a state machine. It is called for every character
-   
-   of the input stream. The DTD data structure contains pointers
-   
+
+   The SGML parser is a state machine.  It is called for every character
+
+   of the input stream.  The DTD data structure contains pointers
+
    to functions which are called to implement the actual effect of the
-   
+
    text read. When these functions are called, the attribute structures pointed to by the
    DTD are valid, and the function is passed a pointer to the current tag structure, and an
    "element stack" which represents the state of nesting within SGML elements.
-   
+
    The following aspects are from Dan Connolly's suggestions:  Binary search, Structured
    object scheme basically, SGML content enum type.
-   
+
    (c) Copyright CERN 1991 - See Copyright.html
-   
+
  */
 #ifndef SGML_H
 #define SGML_H
@@ -101,7 +101,7 @@ typedef int TagFlags;
 **                      of attribute names.
 **
 **      litteral        determines how the SGML engine parses the characters
-**                      within the element. If set, tag openers are ignored
+**                      within the element.  If set, tag openers are ignored
 **                      except for that which opens a matching closing tag.
 **
 */
@@ -164,16 +164,16 @@ Structured Object definition
    in SGML.  I'll rephrase that.  A structured object is an ordered
    tree-structured arrangement of data which is representable as text.
    The SGML parser outputs to a Structured object.  A Structured object
-   can output its contents to another Structured Object. It's a kind of
-   typed stream. The architecture is largely Dan Conolly's. Elements and
+   can output its contents to another Structured Object.  It's a kind of
+   typed stream.  The architecture is largely Dan Conolly's.  Elements and
    entities are passed to the sob by number, implying a knowledge of the
    DTD.  Knowledge of the SGML syntax is not here, though.
-   
+
    Superclass: HTStream
-   
+
    The creation methods will vary on the type of Structured Object.
    Maybe the callerData is enough info to pass along.
-   
+
  */
 typedef struct _HTStructured HTStructured;
 
@@ -187,20 +187,20 @@ typedef struct _HTStructuredClass{
         void (*_abort) PARAMS((
                 HTStructured*   me,
                 HTError         e));
-                
+
         void (*put_character) PARAMS((
                 HTStructured*   me,
                 char            ch));
-                                
+
         void (*put_string) PARAMS((
                 HTStructured*   me,
                 CONST char *    str));
-                
+
         void (*_write) PARAMS((
                 HTStructured*   me,
                 CONST char *    str,
                 int             len));
-                
+
         void (*start_element) PARAMS((
                 HTStructured*   me,
                 int             element_number,
@@ -208,7 +208,7 @@ typedef struct _HTStructuredClass{
                 CONST char**    attribute_value,
 		int		charset,
 		char **		include));
-                
+
         void (*end_element) PARAMS((
                 HTStructured*   me,
                 int             element_number,
@@ -217,7 +217,7 @@ typedef struct _HTStructuredClass{
         int (*put_entity) PARAMS((
                 HTStructured*   me,
                 int             entity_number));
-                
+
 }HTStructuredClass;
 
 /*
@@ -233,7 +233,7 @@ extern void LYDoCSI PARAMS((char *url, CONST char *comment, char **csi));
 Find a Tag by Name
 
    Returns a pointer to the tag within the DTD.
-   
+
  */
 extern HTTag * SGMLFindTag PARAMS((
 	CONST SGML_dtd *	dtd,
diff --git a/WWW/Library/Implementation/crypt_util.c b/WWW/Library/Implementation/crypt_util.c
index 91868b75..b81264c3 100644
--- a/WWW/Library/Implementation/crypt_util.c
+++ b/WWW/Library/Implementation/crypt_util.c
@@ -45,11 +45,11 @@
 
 static char patchlevel_str[] = PATCHLEVEL;
 
-/* 
- * Permutation done once on the 56 bit 
+/*
+ * Permutation done once on the 56 bit
  *  key derived from the original 8 byte ASCII key.
  */
-static int pc1[56] = { 
+static int pc1[56] = {
   57, 49, 41, 33, 25, 17,  9,  1, 58, 50, 42, 34, 26, 18,
   10,  2, 59, 51, 43, 35, 27, 19, 11,  3, 60, 52, 44, 36,
   63, 55, 47, 39, 31, 23, 15,  7, 62, 54, 46, 38, 30, 22,
@@ -60,15 +60,15 @@ static int pc1[56] = {
  * How much to rotate each 28 bit half of the pc1 permutated
  *  56 bit key before using pc2 to give the i' key
  */
-static int rots[16] = { 
-  1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1 
+static int rots[16] = {
+  1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1
 };
 
-/* 
- * Permutation giving the key 
- * of the i' DES round 
+/*
+ * Permutation giving the key
+ * of the i' DES round
  */
-static int pc2[48] = { 
+static int pc2[48] = {
   14, 17, 11, 24,  1,  5,  3, 28, 15,  6, 21, 10,
   23, 19, 12,  4, 26,  8, 16,  7, 27, 20, 13,  2,
   41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48,
@@ -79,7 +79,7 @@ static int pc2[48] = {
  * The E expansion table which selects
  * bits from the 32 bit intermediate result.
  */
-static int esel[48] = { 
+static int esel[48] = {
   32,  1,  2,  3,  4,  5,  4,  5,  6,  7,  8,  9,
    8,  9, 10, 11, 12, 13, 12, 13, 14, 15, 16, 17,
   16, 17, 18, 19, 20, 21, 20, 21, 22, 23, 24, 25,
@@ -87,16 +87,16 @@ static int esel[48] = {
 };
 static int e_inverse[64];
 
-/* 
- * Permutation done on the 
- * result of sbox lookups 
+/*
+ * Permutation done on the
+ * result of sbox lookups
  */
 static int perm32[32] = {
   16,  7, 20, 21, 29, 12, 28, 17,  1, 15, 23, 26,  5, 18, 31, 10,
   2,   8, 24, 14, 32, 27,  3,  9, 19, 13, 30,  6, 22, 11,  4, 25
 };
 
-/* 
+/*
  * The sboxes
  */
 static int sbox[8][4][16]= {
@@ -149,19 +149,19 @@ static int sbox[8][4][16]= {
         }
 };
 
-/* 
- * This is the initial 
+/*
+ * This is the initial
  * permutation matrix
  */
-static int initial_perm[64] = { 
+static int initial_perm[64] = {
   58, 50, 42, 34, 26, 18, 10,  2, 60, 52, 44, 36, 28, 20, 12, 4,
   62, 54, 46, 38, 30, 22, 14,  6, 64, 56, 48, 40, 32, 24, 16, 8,
   57, 49, 41, 33, 25, 17,  9,  1, 59, 51, 43, 35, 27, 19, 11, 3,
   61, 53, 45, 37, 29, 21, 13,  5, 63, 55, 47, 39, 31, 23, 15, 7
 };
 
-/* 
- * This is the final 
+/*
+ * This is the final
  * permutation matrix
  */
 static int final_perm[64] = {
@@ -171,8 +171,8 @@ static int final_perm[64] = {
   34,  2, 42, 10, 50, 18, 58, 26, 33,  1, 41,  9, 49, 17, 57, 25
 };
 
-/* 
- * The 16 DES keys in BITMASK format 
+/*
+ * The 16 DES keys in BITMASK format
  */
 #ifdef _UFC_32_
 long32 _ufc_keytab[16][2];
@@ -199,15 +199,15 @@ long64 _ufc_keytab[16];
 
 #ifdef _UFC_32_
 long32 _ufc_sb0[8192], _ufc_sb1[8192], _ufc_sb2[8192], _ufc_sb3[8192];
-static long32 *sb[4] = {_ufc_sb0, _ufc_sb1, _ufc_sb2, _ufc_sb3}; 
+static long32 *sb[4] = {_ufc_sb0, _ufc_sb1, _ufc_sb2, _ufc_sb3};
 #endif
 
 #ifdef _UFC_64_
 long64 _ufc_sb0[4096], _ufc_sb1[4096], _ufc_sb2[4096], _ufc_sb3[4096];
-static long64 *sb[4] = {_ufc_sb0, _ufc_sb1, _ufc_sb2, _ufc_sb3}; 
+static long64 *sb[4] = {_ufc_sb0, _ufc_sb1, _ufc_sb2, _ufc_sb3};
 #endif
 
-/* 
+/*
  * eperm32tab: do 32 bit permutation and E selection
  *
  * The first index is the byte number in the 32 bit value to be permuted
@@ -218,7 +218,7 @@ static long64 *sb[4] = {_ufc_sb0, _ufc_sb1, _ufc_sb2, _ufc_sb3};
  */
 static ufc_long eperm32tab[4][256][2];
 
-/* 
+/*
  * do_pc1: permform pc1 permutation in the key schedule generation.
  *
  * The first   index is the byte number in the 8 byte ASCII key
@@ -246,7 +246,7 @@ static ufc_long do_pc2[8][128];
 /*
  * efp: undo an extra e selection and do final
  *      permutation giving the DES result.
- * 
+ *
  *      Invoked 6 bit a time on two 48 bit values
  *      giving two 32 bit longs.
  */
@@ -347,7 +347,7 @@ void init_des()
       mask1 = bytemask[comes_from_bit % 8 + 1];
       mask2 = longmask[bit % 28 + 4];
       for(j = 0; j < 128; j++) {
-	if(j & mask1) 
+	if(j & mask1)
 	  do_pc1[comes_from_bit / 8][bit / 28][j] |= mask2;
       }
     }
@@ -367,14 +367,14 @@ void init_des()
       }
     }
 
-    /* 
+    /*
      * Now generate the table used to do combined
      * 32 bit permutation and e expansion
      *
      * We use it because we have to permute 16384 32 bit
      * longs into 48 bit in order to initialize sb.
      *
-     * Looping 48 rounds per permutation becomes 
+     * Looping 48 rounds per permutation becomes
      * just too slow...
      *
      */
@@ -383,17 +383,17 @@ void init_des()
 
     for(bit = 0; bit < 48; bit++) {
       ufc_long mask1,comes_from;
-	
+
       comes_from = perm32[esel[bit]-1]-1;
       mask1      = bytemask[comes_from % 8];
-	
+
       for(j = 256; j--;) {
 	if(j & mask1)
 	  eperm32tab[comes_from / 8][j][bit / 24] |= BITMASK(bit % 24);
       }
     }
-    
-    /* 
+
+    /*
      * Create the sb tables:
      *
      * For each 12 bit segment of an 48 bit intermediate
@@ -408,14 +408,14 @@ void init_des()
     for(sg = 0; sg < 4; sg++) {
       int j1, j2;
       int s1, s2;
-    
+
       for(j1 = 0; j1 < 64; j1++) {
 	s1 = s_lookup(2 * sg, j1);
 	for(j2 = 0; j2 < 64; j2++) {
 	  ufc_long to_permute, inx;
-    
+
 	  s2         = s_lookup(2 * sg + 1, j2);
-	  to_permute = (((ufc_long)s1 << 4)  | 
+	  to_permute = (((ufc_long)s1 << 4)  |
 	               (ufc_long)s2) << (24 - 8 * (ufc_long)sg);
 
 #ifdef _UFC_32_
@@ -431,13 +431,13 @@ void init_des()
 #endif
 #ifdef _UFC_64_
 	  inx = ((j1 << 6)  | j2);
-	  sb[sg][inx]  = 
+	  sb[sg][inx]  =
 	    ((long64)eperm32tab[0][(to_permute >> 24) & 0xff][0] << 32) |
 	     (long64)eperm32tab[0][(to_permute >> 24) & 0xff][1];
 	  sb[sg][inx] |=
 	    ((long64)eperm32tab[1][(to_permute >> 16) & 0xff][0] << 32) |
 	     (long64)eperm32tab[1][(to_permute >> 16) & 0xff][1];
-  	  sb[sg][inx] |= 
+  	  sb[sg][inx] |=
 	    ((long64)eperm32tab[2][(to_permute >>  8) & 0xff][0] << 32) |
 	     (long64)eperm32tab[2][(to_permute >>  8) & 0xff][1];
 	  sb[sg][inx] |=
@@ -446,9 +446,9 @@ void init_des()
 #endif
 	}
       }
-    }  
+    }
 
-    /* 
+    /*
      * Create an inverse matrix for esel telling
      * where to plug out bits if undoing it
      */
@@ -457,7 +457,7 @@ void init_des()
       e_inverse[esel[bit] - 1 + 32] = bit + 48;
     }
 
-    /* 
+    /*
      * create efp: the matrix used to
      * undo the E expansion and effect final permutation
      */
@@ -472,11 +472,11 @@ void init_des()
       o_long = bit / 32; /* 0..1  */
       o_bit  = bit % 32; /* 0..31 */
 
-      /* 
+      /*
        * And find a bit in the e permutated value setting this bit.
        *
        * Note: the e selection may have selected the same bit several
-       * times. By the initialization of e_inverse, we only look
+       * times.  By the initialization of e_inverse, we only look
        * for one specific instance.
        */
       comes_from_f_bit = final_perm[bit] - 1;         /* 0..63 */
@@ -493,7 +493,7 @@ void init_des()
       }
     }
 
-    
+
     /*
      * Create revfinal: an array to undo final
      * the effects of efp
@@ -513,7 +513,7 @@ void init_des()
     initialized++;
   }
 
-/* 
+/*
  * Process the elements of the sb table permuting the
  * bits swapped in the expansion by the current salt.
  */
@@ -545,7 +545,7 @@ STATIC void shuffle_sb(k, saltbits)
   }
 #endif
 
-/* 
+/*
  * Setup the unit for a new salt
  * Hopefully we'll not see a new salt in each crypt call.
  */
@@ -564,8 +564,8 @@ STATIC void setup_salt(s)
     if(s[0] == current_salt[0] && s[1] == current_salt[1])
       return;
     current_salt[0] = s[0]; current_salt[1] = s[1];
-    
-    /* 
+
+    /*
      * This is the only crypt change to DES:
      * entries are swapped in the expansion table
      * according to the bits set in the salt.
@@ -574,10 +574,10 @@ STATIC void setup_salt(s)
     for(i = 0; i < 2; i++) {
       long c=ascii_to_bin(s[i]);
 #ifdef notdef
-      /* 
+      /*
        * Some applications do rely on illegal
-       * salts. It seems that UFC-crypt behaves
-       * identically to standard crypt 
+       * salts.  It seems that UFC-crypt behaves
+       * identically to standard crypt
        * implementations on illegal salts -- glad
        */
       if(c < 0 || c > 63)
@@ -594,7 +594,7 @@ STATIC void setup_salt(s)
      * to reflect the changed e
      * selection table
      */
-    shuffle_sb(_ufc_sb0, current_saltbits ^ saltbits); 
+    shuffle_sb(_ufc_sb0, current_saltbits ^ saltbits);
     shuffle_sb(_ufc_sb1, current_saltbits ^ saltbits);
     shuffle_sb(_ufc_sb2, current_saltbits ^ saltbits);
     shuffle_sb(_ufc_sb3, current_saltbits ^ saltbits);
@@ -648,7 +648,7 @@ STATIC void ufc_mk_keytab(key)
     direction = 0;
   }
 
-/* 
+/*
  * Undo an extra E selection and do final permutations
  */
 
@@ -686,8 +686,8 @@ ufc_long *_ufc_dofinalperm(l1, l2, r1, r2)
     return ary;
   }
 
-/* 
- * crypt only: convert from 64 bit to 11 bit ASCII 
+/*
+ * crypt only: convert from 64 bit to 11 bit ASCII
  * prefixing with the salt
  */
 
@@ -721,10 +721,10 @@ STATIC char *output_conversion(v1, v2, salt)
 
 ufc_long *_ufc_doit();
 
-/* 
+/*
  * UNIX crypt function
  */
-   
+
 char *crypt(key, salt)
   char *key, *salt;
   { ufc_long *s;
@@ -745,7 +745,7 @@ char *crypt(key, salt)
     /*
      * Go for the 25 DES encryptions
      */
-    s = _ufc_doit((ufc_long)0, (ufc_long)0, 
+    s = _ufc_doit((ufc_long)0, (ufc_long)0,
 		  (ufc_long)0, (ufc_long)0, (ufc_long)25);
     /*
      * Do final permutations
@@ -758,7 +758,7 @@ char *crypt(key, salt)
     return output_conversion(s[0], s[1], salt);
   }
 
-/* 
+/*
  * To make fcrypt users happy.
  * They don't need to call init_des.
  */
@@ -769,8 +769,8 @@ char *fcrypt(key, salt)
   { return crypt(key, salt);
   }
 
-/* 
- * UNIX encrypt function. Takes a bitvector
+/*
+ * UNIX encrypt function.  Takes a bitvector
  * represented by one byte per bit and
  * encrypt/decrypt according to edflag
  */
@@ -794,12 +794,12 @@ void encrypt(block, edflag)
       for(i = 0; i < 8; i++) {
 #ifdef _UFC_32_
 	long32 x;
-	x = _ufc_keytab[15-i][0]; 
-        _ufc_keytab[15-i][0] = _ufc_keytab[i][0]; 
+	x = _ufc_keytab[15-i][0];
+        _ufc_keytab[15-i][0] = _ufc_keytab[i][0];
         _ufc_keytab[i][0] = x;
 
-	x = _ufc_keytab[15-i][1]; 
-        _ufc_keytab[15-i][1] = _ufc_keytab[i][1]; 
+	x = _ufc_keytab[15-i][1];
+        _ufc_keytab[15-i][1] = _ufc_keytab[i][1];
         _ufc_keytab[i][1] = x;
 #endif
 #ifdef _UFC_64_
@@ -854,11 +854,11 @@ void encrypt(block, edflag)
     for(i = 0; i < 32; i++) {
       *block++ = (r1 & longmask[i]) != 0;
     }
-    
+
   }
 
-/* 
- * UNIX setkey function. Take a 64 bit DES
+/*
+ * UNIX setkey function.  Take a 64 bit DES
  * key and setup the machinery.
  */
 
@@ -875,14 +875,14 @@ void setkey(key)
 	c = c << 1 | *key++;
       ktab[i] = c >> 1;
     }
-    
+
     ufc_mk_keytab(ktab);
   }
 
-/* 
+/*
  * Ultrix crypt16 function, thanks to pcl@convex.oxford.ac.uk (Paul Leyland)
  */
-   
+
 char *crypt16(key, salt)
   char *key, *salt;
   { ufc_long *s, *t;
@@ -892,44 +892,44 @@ char *crypt16(key, salt)
      * Hack DES tables according to salt
      */
     setup_salt(salt);
-    
+
     /*
      * Setup key schedule
      */
     clearmem(ktab, sizeof ktab);
     (void)strncpy(ktab, key, 8);
     ufc_mk_keytab(ktab);
-    
+
     /*
      * Go for first 20 DES encryptions
      */
-    s = _ufc_doit((ufc_long)0, (ufc_long)0, 
+    s = _ufc_doit((ufc_long)0, (ufc_long)0,
 		  (ufc_long)0, (ufc_long)0, (ufc_long)20);
-    
+
     /*
      * And convert back to 6 bit ASCII
      */
     strcpy (res, output_conversion(s[0], s[1], salt));
-    
+
     clearmem(ttab, sizeof ttab);
     if (strlen (key) > 8) (void)strncpy(ttab, key+8, 8);
     ufc_mk_keytab(ttab);
-    
+
     /*
      * Go for second 5 DES encryptions
      */
-    t = _ufc_doit((ufc_long)0, (ufc_long)0, 
+    t = _ufc_doit((ufc_long)0, (ufc_long)0,
 		  (ufc_long)0, (ufc_long)0, (ufc_long)5);
     /*
      * And convert back to 6 bit ASCII
      */
     strcpy (q, output_conversion(t[0], t[1], salt));
     strcpy (res+13, q+2);
-    
+
     clearmem(ktab, sizeof ktab);
     (void)strncpy(ktab, key, 8);
     ufc_mk_keytab(ktab);
-    
+
     return res;
   }
 
@@ -961,14 +961,14 @@ void ufc_setup_password(cookie, s)
   }
 
 void ufc_do_pw(cookie, guess)
-  long *cookie;  
+  long *cookie;
   char *guess;
   { char ktab[9];
     ufc_long *s;
     clearmem(ktab, sizeof ktab);
     (void)strncpy(ktab, guess, 8);
     ufc_mk_keytab(ktab);
-    s = _ufc_doit((ufc_long)0, (ufc_long)0, 
+    s = _ufc_doit((ufc_long)0, (ufc_long)0,
 		  (ufc_long)0, (ufc_long)0, (ufc_long)25);
     cookie[0] = s[0];    cookie[1] = s[1];
     cookie[2] = s[2];    cookie[3] = s[3];
diff --git a/WWW/Library/Implementation/entities.h b/WWW/Library/Implementation/entities.h
index a6ca7c1d..a43aed6e 100644
--- a/WWW/Library/Implementation/entities.h
+++ b/WWW/Library/Implementation/entities.h
@@ -3,11 +3,11 @@
 **
 *
 *	Whole entities[] thing (and much more) now present
-*	in this kind of structure. The structured streams to which
+*	in this kind of structure.  The structured streams to which
 *	the SGML modules sends its output could then easily have access
 *	to both entity names and unicode values for each (special)
 *	character.  Probably the whole translation to display characters
-*	should be done at that later stage (e.g. in HTML.c).
+*	should be done at that later stage (e.g., in HTML.c).
 *	What's missing is a way for the later stage to return info
 *	to SGML whether the entity could be displayed or not.
 *	(like between SGML_character() and handle_entity() via FoundEntity.)
diff --git a/WWW/Library/Implementation/tcp.h b/WWW/Library/Implementation/tcp.h
index 79c42c73..54cb8b89 100644
--- a/WWW/Library/Implementation/tcp.h
+++ b/WWW/Library/Implementation/tcp.h
@@ -1,7 +1,7 @@
 /*                System dependencies in the W3 library
                                    SYSTEM DEPENDENCIES
 
-   System-system differences for TCP include files and macros. This
+   System-system differences for TCP include files and macros.  This
    file includes for each system the files necessary for network and
    file I/O.  It should be used in conjunction with HTUtils.h to help
    ensure portability across as many platforms and flavors of platforms
@@ -201,7 +201,7 @@ VAX/VMS
 
    The last three do not interfere with the
    unix i/o library, and so they need special calls to read, write and
-   close sockets. In these cases the socket number is a VMS channel
+   close sockets.  In these cases the socket number is a VMS channel
    number, so we make the @@@ HORRIBLE @@@ assumption that a channel
    number will be greater than 10 but a unix file descriptor less than
    10.  It works.
diff --git a/WWW/Library/Implementation/ufc-crypt.h b/WWW/Library/Implementation/ufc-crypt.h
index 13da8b47..a7cf7d4f 100644
--- a/WWW/Library/Implementation/ufc-crypt.h
+++ b/WWW/Library/Implementation/ufc-crypt.h
@@ -12,20 +12,20 @@
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Library General Public License for more details.
- 
+
  * You should have received a copy of the GNU Library General Public
  * License along with this library; if not, write to the Free
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
  * @(#)ufc-crypt.h	1.16 09/21/92
  *
- * Definitions of datatypes 
- * 
+ * Definitions of datatypes
+ *
  */
 
-/* 
+/*
  * Requirements for datatypes:
- * 
+ *
  * A datatype 'ufc_long' of at least 32 bit
  * *and*
  *   A type 'long32' of exactly 32 bits (_UFC_32_)
@@ -54,9 +54,9 @@ typedef long long     long64;
 #endif
 
 #ifdef ksr
-/* 
+/*
  * Note - the KSR machine does not define a unique symbol
- * which we can check. So you MUST add '-Dksr' to your Makefile.
+ * which we can check.  So you MUST add '-Dksr' to your Makefile.
  * Thanks to lijewski@theory.tc.cornell.edu (Mike Lijewski) for
  * the patch.
  */