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/HTAABrow.c8
-rw-r--r--WWW/Library/Implementation/HTAAProt.c16
-rw-r--r--WWW/Library/Implementation/HTAAProt.h12
-rw-r--r--WWW/Library/Implementation/HTAAUtil.c4
-rw-r--r--WWW/Library/Implementation/HTAAUtil.h4
-rw-r--r--WWW/Library/Implementation/HTAccess.c2
-rw-r--r--WWW/Library/Implementation/HTAccess.h2
-rw-r--r--WWW/Library/Implementation/HTFTP.c34
-rw-r--r--WWW/Library/Implementation/HTFile.c54
-rw-r--r--WWW/Library/Implementation/HTFile.h6
-rw-r--r--WWW/Library/Implementation/HTGopher.c11
-rw-r--r--WWW/Library/Implementation/HTGroup.c2
-rw-r--r--WWW/Library/Implementation/HTLex.c2
-rw-r--r--WWW/Library/Implementation/HTLex.h2
-rw-r--r--WWW/Library/Implementation/HTMIME.c2
-rw-r--r--WWW/Library/Implementation/HTParse.c2
-rw-r--r--WWW/Library/Implementation/HTRules.c13
-rw-r--r--WWW/Library/Implementation/HTStream.h2
-rw-r--r--WWW/Library/Implementation/HTString.c2
-rw-r--r--WWW/Library/Implementation/HTTCP.c4
-rw-r--r--WWW/Library/Implementation/HTTCP.h4
-rw-r--r--WWW/Library/Implementation/HTTP.c14
-rw-r--r--WWW/Library/Implementation/HText.h4
-rw-r--r--WWW/Library/Implementation/SGML.c14
-rw-r--r--WWW/Library/Implementation/SGML.h6
25 files changed, 118 insertions, 108 deletions
diff --git a/WWW/Library/Implementation/HTAABrow.c b/WWW/Library/Implementation/HTAABrow.c
index 38c90a29..1f39a2ac 100644
--- a/WWW/Library/Implementation/HTAABrow.c
+++ b/WWW/Library/Implementation/HTAABrow.c
@@ -565,8 +565,8 @@ static char *compose_auth_string(HTAAScheme scheme, HTAASetup * setup, BOOL IsPr
     char *proxiedHost = NULL;
     char *thePort = NULL;
     HTAARealm *realm;
-    char *i_net_addr = "0.0.0.0";	/* Change... @@@@ */
-    char *timestamp = "42";	/* ... these @@@@ */
+    const char *i_net_addr = "0.0.0.0";		/* Change... @@@@ */
+    const char *timestamp = "42";	/* ... these @@@@ */
 
     FREE(compose_auth_stringResult);	/* From previous call */
 
@@ -910,7 +910,7 @@ char *HTAA_composeAuth(const char *hostname,
 	    StrAllocCopy(HTAA_composeAuthResult, "");
 	    return (HTAA_composeAuthResult);
 	}
-	len = strlen(auth_string) + strlen((char *) HTAAScheme_name(scheme)) + 26;
+	len = strlen(auth_string) + strlen(HTAAScheme_name(scheme)) + 26;
 	if ((HTAA_composeAuthResult = typecallocn(char, len)) == 0)
 	      outofmem(__FILE__, "HTAA_composeAuth");
 
@@ -988,7 +988,7 @@ char *HTAA_composeAuth(const char *hostname,
 	    return (HTAA_composeAuthResult);
 	}
 
-	len = strlen(auth_string) + strlen((char *) HTAAScheme_name(scheme)) + 20;
+	len = strlen(auth_string) + strlen(HTAAScheme_name(scheme)) + 20;
 	if ((HTAA_composeAuthResult = typecallocn(char, len)) == 0)
 	      outofmem(__FILE__, "HTAA_composeAuth");
 
diff --git a/WWW/Library/Implementation/HTAAProt.c b/WWW/Library/Implementation/HTAAProt.c
index 192b974c..f4bc2e87 100644
--- a/WWW/Library/Implementation/HTAAProt.c
+++ b/WWW/Library/Implementation/HTAAProt.c
@@ -85,7 +85,7 @@ static BOOL isNumber(const char *s)
  *	returns	the user name
  *		Default is "" (nobody).
  */
-char *HTAA_getUidName(void)
+const char *HTAA_getUidName(void)
 {
     if (current_prot && current_prot->uid_name
 	&& (0 != strcmp(current_prot->uid_name, "nobody")))
@@ -102,7 +102,7 @@ char *HTAA_getUidName(void)
  * ON EXIT:
  *	returns	the filename
  */
-char *HTAA_getFileName(void)
+const char *HTAA_getFileName(void)
 {
     if (current_prot && current_prot->filename)
 	return (current_prot->filename);
@@ -595,7 +595,7 @@ static void clear_uidgid_cache(void)
 #endif /* LY_FIND_LEAKS */
 
 #ifndef NOUSERS
-static void save_gid_info(char *name, int user)
+static void save_gid_info(const char *name, int user)
 {
     USER_DATA *data = typecalloc(USER_DATA);
 
@@ -617,7 +617,7 @@ static void save_gid_info(char *name, int user)
 #endif /* NOUSERS */
 
 #ifndef NOUSERS
-static void save_uid_info(char *name, int user)
+static void save_uid_info(const char *name, int user)
 {
     USER_DATA *data = typecalloc(USER_DATA);
 
@@ -646,7 +646,7 @@ static void save_uid_info(char *name, int user)
  * ON EXIT:
  *      returns the user name, or an empty string if not found.
  */
-char *HTAA_UidToName(int uid)
+const char *HTAA_UidToName(int uid)
 {
 #ifndef NOUSERS
     struct passwd *pw;
@@ -680,7 +680,7 @@ char *HTAA_UidToName(int uid)
  * ON EXIT:
  *      returns the user id, or NONESUCH if not found.
  */
-int HTAA_NameToUid(char *name)
+int HTAA_NameToUid(const char *name)
 {
 #ifndef NOUSERS
     struct passwd *pw;
@@ -713,7 +713,7 @@ int HTAA_NameToUid(char *name)
  * ON EXIT:
  *      returns the group name, or an empty string if not found.
  */
-char *HTAA_GidToName(int gid)
+const char *HTAA_GidToName(int gid)
 {
 #ifndef NOUSERS
     struct group *gr;
@@ -747,7 +747,7 @@ char *HTAA_GidToName(int gid)
  * ON EXIT:
  *      returns the group id, or NONESUCH if not found.
  */
-int HTAA_NameToGid(char *name)
+int HTAA_NameToGid(const char *name)
 {
 #ifndef NOUSERS
     struct group *gr;
diff --git a/WWW/Library/Implementation/HTAAProt.h b/WWW/Library/Implementation/HTAAProt.h
index d083aca1..4bdd1964 100644
--- a/WWW/Library/Implementation/HTAAProt.h
+++ b/WWW/Library/Implementation/HTAAProt.h
@@ -194,7 +194,7 @@ extern int HTAA_getGid(void);
  *      returns the user name
  *              Default is "" (nobody).
  */
-extern char *HTAA_getUidName(void);
+extern const char *HTAA_getUidName(void);
 
 /* PUBLIC                                                       HTAA_getFileName
  *              GET THE FILENAME (VMS ONLY)
@@ -204,7 +204,7 @@ extern char *HTAA_getUidName(void);
  * ON EXIT:
  *      returns the filename
  */
-extern char *HTAA_getFileName(void);
+extern const char *HTAA_getFileName(void);
 #endif /* VMS */
 
 /* PUBLIC                                                       HTAA_UidToName
@@ -215,7 +215,7 @@ extern char *HTAA_getFileName(void);
  * ON EXIT:
  *      returns the user name
  */
-extern char *HTAA_UidToName(int uid);
+extern const char *HTAA_UidToName(int uid);
 
 /* PUBLIC                                                       HTAA_NameToUid
  *              GET THE USER ID
@@ -225,7 +225,7 @@ extern char *HTAA_UidToName(int uid);
  * ON EXIT:
  *      returns the user id
  */
-extern int HTAA_NameToUid(char *name);
+extern int HTAA_NameToUid(const char *name);
 
 /* PUBLIC                                                       HTAA_GidToName
  *              GET THE GROUP NAME
@@ -235,7 +235,7 @@ extern int HTAA_NameToUid(char *name);
  * ON EXIT:
  *      returns the group name
  */
-extern char *HTAA_GidToName(int gid);
+extern const char *HTAA_GidToName(int gid);
 
 /* PUBLIC                                                       HTAA_NameToGid
  *              GET THE GROUP ID
@@ -245,6 +245,6 @@ extern char *HTAA_GidToName(int gid);
  * ON EXIT:
  *      returns the group id
  */
-extern int HTAA_NameToGid(char *name);
+extern int HTAA_NameToGid(const char *name);
 
 #endif /* not HTAAPROT_H */
diff --git a/WWW/Library/Implementation/HTAAUtil.c b/WWW/Library/Implementation/HTAAUtil.c
index 98da373a..a5651d16 100644
--- a/WWW/Library/Implementation/HTAAUtil.c
+++ b/WWW/Library/Implementation/HTAAUtil.c
@@ -104,7 +104,7 @@ HTAAScheme HTAAScheme_enum(const char *name)
  *	returns		the name of the scheme, i.e.
  *			"None", "Basic", "Pubkey", ...
  */
-char *HTAAScheme_name(HTAAScheme scheme)
+const char *HTAAScheme_name(HTAAScheme scheme)
 {
     switch (scheme) {
     case HTAA_NONE:
@@ -156,7 +156,7 @@ HTAAMethod HTAAMethod_enum(const char *name)
  *	returns		the name of the scheme, i.e.
  *			"GET", "PUT", ...
  */
-char *HTAAMethod_name(HTAAMethod method)
+const char *HTAAMethod_name(HTAAMethod method)
 {
     switch (method) {
     case METHOD_GET:
diff --git a/WWW/Library/Implementation/HTAAUtil.h b/WWW/Library/Implementation/HTAAUtil.h
index 058d940c..488b9859 100644
--- a/WWW/Library/Implementation/HTAAUtil.h
+++ b/WWW/Library/Implementation/HTAAUtil.h
@@ -103,7 +103,7 @@ extern HTAAScheme HTAAScheme_enum(const char *name);
  *      returns         the name of the scheme, i.e.
  *                      "none", "basic", "pubkey", ...
  */
-extern char *HTAAScheme_name(HTAAScheme scheme);
+extern const char *HTAAScheme_name(HTAAScheme scheme);
 
 /*
 
@@ -132,7 +132,7 @@ extern HTAAMethod HTAAMethod_enum(const char *name);
  *      returns         the name of the scheme, i.e.
  *                      "GET", "PUT", ...
  */
-extern char *HTAAMethod_name(HTAAMethod method);
+extern const char *HTAAMethod_name(HTAAMethod method);
 
 /* PUBLIC                                               HTAAMethod_inList()
  *              IS A METHOD IN A LIST OF METHOD NAMES
diff --git a/WWW/Library/Implementation/HTAccess.c b/WWW/Library/Implementation/HTAccess.c
index f2618ef2..443891c8 100644
--- a/WWW/Library/Implementation/HTAccess.c
+++ b/WWW/Library/Implementation/HTAccess.c
@@ -1242,7 +1242,7 @@ BOOL HTLoadAnchor(HTAnchor * destination)
  */
 static char hex(int i)
 {
-    char *hexchars = "0123456789ABCDEF";
+    const char *hexchars = "0123456789ABCDEF";
 
     return hexchars[i];
 }
diff --git a/WWW/Library/Implementation/HTAccess.h b/WWW/Library/Implementation/HTAccess.h
index 0f565dec..b3cff533 100644
--- a/WWW/Library/Implementation/HTAccess.h
+++ b/WWW/Library/Implementation/HTAccess.h
@@ -209,7 +209,7 @@ Register an access method
  */
 
 typedef struct _HTProtocol {
-    char *name;
+    const char *name;
 
     int (*load) (const char *full_address,
 		 HTParentAnchor *anchor,
diff --git a/WWW/Library/Implementation/HTFTP.c b/WWW/Library/Implementation/HTFTP.c
index 7c41ab10..49e2279b 100644
--- a/WWW/Library/Implementation/HTFTP.c
+++ b/WWW/Library/Implementation/HTFTP.c
@@ -389,7 +389,7 @@ static char *help_message_cache_contents(void)
  *		  or negative for communication failure (in which case
  *		  the control connection will be closed).
  */
-static int write_cmd(char *cmd)
+static int write_cmd(const char *cmd)
 {
     int status;
 
@@ -442,7 +442,7 @@ static int write_cmd(char *cmd)
  *	returns:  The first digit of the reply type,
  *		  or negative for communication failure.
  */
-static int response(char *cmd)
+static int response(const char *cmd)
 {
     int result;			/* Three-digit decimal code */
     int continuation_response = -1;
@@ -533,7 +533,7 @@ static int response(char *cmd)
     return result / 100;
 }
 
-static int send_cmd_1(char *verb)
+static int send_cmd_1(const char *verb)
 {
     char command[80];
 
@@ -541,7 +541,7 @@ static int send_cmd_1(char *verb)
     return response(command);
 }
 
-static int send_cmd_2(char *verb, char *param)
+static int send_cmd_2(const char *verb, const char *param)
 {
     char *command = 0;
     int status;
@@ -1340,7 +1340,7 @@ static int get_listen_socket(void)
 
 }				/* get_listen_socket */
 
-static char *months[12] =
+static const char *months[12] =
 {
     "Jan", "Feb", "Mar", "Apr", "May", "Jun",
     "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
@@ -1686,7 +1686,8 @@ static void parse_vms_dir_entry(char *line,
 {
     int i, j;
     unsigned int ialloc;
-    char *cp, *cpd, *cps, date[16], *sp = " ";
+    char *cp, *cpd, *cps, date[16];
+    const char *sp = " ";
 
     /* Get rid of blank lines, and information lines.  Valid lines have the ';'
      * version number token.
@@ -2976,7 +2977,7 @@ static int setup_connection(const char *name,
 #endif /* REPEAT_PORT */
 	} else {		/* Tell the server to be passive */
 	    char *command = NULL;
-	    char *p;
+	    const char *p;
 	    int h0, h1, h2, h3, p0, p1;		/* Parts of reply */
 
 #ifdef INET6
@@ -3132,7 +3133,8 @@ int HTFTPLoad(const char *name,
 	char *fname = filename;	/* Save for subsequent free() */
 	char *vmsname = NULL;
 	BOOL binary;
-	char *type = NULL;
+	const char *type = NULL;
+	char *types = NULL;
 	char *cp;
 
 	if (server_type == CMS_SERVER) {
@@ -3152,22 +3154,22 @@ int HTFTPLoad(const char *name,
 	if (!*filename) {
 	    StrAllocCopy(filename, "/");
 	    type = "D";
-	} else if ((type = strrchr(filename, ';')) != NULL) {
+	} else if ((type = types = strrchr(filename, ';')) != NULL) {
 	    /*
 	     * Check and trim the type= parameter.  - FM
 	     */
 	    if (!strncasecomp((type + 1), "type=", 5)) {
 		switch (TOUPPER(*(type + 6))) {
 		case 'D':
-		    *type = '\0';
+		    *types = '\0';
 		    type = "D";
 		    break;
 		case 'A':
-		    *type = '\0';
+		    *types = '\0';
 		    type = "A";
 		    break;
 		case 'I':
-		    *type = '\0';
+		    *types = '\0';
 		    type = "I";
 		    break;
 		default:
@@ -3274,7 +3276,7 @@ int HTFTPLoad(const char *name,
 	    /*
 	     * Act on our setting if not already set.  - FM
 	     */
-	    char *mode = binary ? "I" : "A";
+	    const char *mode = binary ? "I" : "A";
 
 	    status = send_cmd_2("TYPE", mode);
 	    if (status != 2) {
@@ -3708,11 +3710,11 @@ int HTFTPLoad(const char *name,
 	    format = HTAtom_for("www/compressed");
 
 	} else {
-	    char *dot;
-	    CompressFileType cft = HTCompressFileType(FileName, "._-", &dot);
+	    int rootlen;
+	    CompressFileType cft = HTCompressFileType(FileName, "._-", &rootlen);
 
 	    if (cft != cftNone) {
-		*dot = '\0';
+		FileName[rootlen] = '\0';
 		format = HTFileFormat(FileName, &encoding, NULL);
 		format = HTCharsetFormat(format, anchor, -1);
 		StrAllocCopy(anchor->content_type, format->name);
diff --git a/WWW/Library/Implementation/HTFile.c b/WWW/Library/Implementation/HTFile.c
index de4c9b6d..0dba3fd1 100644
--- a/WWW/Library/Implementation/HTFile.c
+++ b/WWW/Library/Implementation/HTFile.c
@@ -130,13 +130,13 @@ int HTDirReadme = HT_DIR_README_NONE;
 int HTDirReadme = HT_DIR_README_TOP;
 #endif /* DIRED_SUPPORT */
 
-static char *HTMountRoot = "/Net/";	/* Where to find mounts */
+static const char *HTMountRoot = "/Net/";	/* Where to find mounts */
 
 #ifdef VMS
-static char *HTCacheRoot = "/WWW$SCRATCH";	/* Where to cache things */
+static const char *HTCacheRoot = "/WWW$SCRATCH";	/* Where to cache things */
 
 #else
-static char *HTCacheRoot = "/tmp/W3_Cache_";	/* Where to cache things */
+static const char *HTCacheRoot = "/tmp/W3_Cache_";	/* Where to cache things */
 #endif /* VMS */
 
 /*
@@ -189,7 +189,7 @@ static char *FormatNum(char **bufp,
     return *bufp;
 }
 
-static void LYListFmtParse(char *fmtstr,
+static void LYListFmtParse(const char *fmtstr,
 			   DIRED * data,
 			   char *file,
 			   HTStructured * target,
@@ -205,7 +205,7 @@ static void LYListFmtParse(char *fmtstr,
     char type;
 
 #ifndef NOUSERS
-    char *name;
+    const char *name;
 #endif
     time_t now;
     char *datestr;
@@ -216,7 +216,7 @@ static void LYListFmtParse(char *fmtstr,
 #define SEC_PER_YEAR	(60 * 60 * 24 * 365)
 
 #ifdef _WINDOWS			/* 1998/01/06 (Tue) 21:20:53 */
-    static char *pbits[] =
+    static const char *pbits[] =
     {
 	"---", "--x", "-w-", "-wx",
 	"r--", "r-x", "rw-", "rwx",
@@ -225,10 +225,10 @@ static void LYListFmtParse(char *fmtstr,
 #define PBIT(a, n, s)  pbits[((a) >> (n)) & 0x7]
 
 #else
-    static char *pbits[] =
+    static const char *pbits[] =
     {"---", "--x", "-w-", "-wx",
      "r--", "r-x", "rw-", "rwx", 0};
-    static char *psbits[] =
+    static const char *psbits[] =
     {"--S", "--s", "-wS", "-ws",
      "r-S", "r-s", "rwS", "rws", 0};
 
@@ -236,7 +236,7 @@ static void LYListFmtParse(char *fmtstr,
 	pbits[((a) >> (n)) & 0x7]
 #endif
 #ifdef S_ISVTX
-    static char *ptbits[] =
+    static const char *ptbits[] =
     {"--T", "--t", "-wT", "-wt",
      "r-T", "r-t", "rwT", "rwt", 0};
 
@@ -819,13 +819,13 @@ const char *HTFileSuffix(HTAtom *rep,
 static const char *VMS_trim_version(const char *filename)
 {
     const char *result = filename;
-    char *version = strchr(filename, ';');
+    const char *version = strchr(filename, ';');
 
     if (version != 0) {
 	static char *stripped;
 
 	StrAllocCopy(stripped, filename);
-	stripped[(const char *) version - filename] = '\0';
+	stripped[version - filename] = '\0';
 	result = (const char *) stripped;
     }
     return result;
@@ -1201,13 +1201,13 @@ float HTFileValue(const char *filename)
  *  Determine compression type from file name, by looking at its suffix.
  *  Sets as side-effect a pointer to the "dot" that begins the suffix.
  */
-CompressFileType HTCompressFileType(char *filename,
-				    char *dots,
-				    char **suffix)
+CompressFileType HTCompressFileType(const char *filename,
+				    const char *dots,
+				    int *rootlen)
 {
     CompressFileType result = cftNone;
     size_t len = strlen(filename);
-    char *ftype = filename + len;
+    const char *ftype = filename + len;
 
     VMS_DEL_VERSION(filename);
 
@@ -1233,10 +1233,10 @@ CompressFileType HTCompressFileType(char *filename,
 	ftype -= 2;
     }
 
-    *suffix = ftype;
+    *rootlen = (ftype - filename);
 
     CTRACE((tfp, "HTCompressFileType(%s) returns %d:%s\n",
-	    filename, result, *suffix));
+	    filename, result, filename + *rootlen));
     return result;
 }
 
@@ -1663,9 +1663,9 @@ static void do_readme(HTStructured * target, const char *localname)
 #define NM_cmp(a,b) ((a) < (b) ? -1 : ((a) > (b) ? 1 : 0))
 
 #if defined(LONG_LIST) && defined(DIRED_SUPPORT)
-static char *file_type(char *path)
+static const char *file_type(const char *path)
 {
-    char *type;
+    const char *type;
 
     while (*path == '.')
 	++path;
@@ -2149,7 +2149,7 @@ static int decompressAndParse(HTParentAnchor *anchor,
     CompressFileType internal_decompress = cftNone;
     BOOL failed_decompress = NO;
 #endif
-    char *dot = 0;
+    int rootlen = 0;
     char *localname = filename;
     int bin;
     FILE *fp;
@@ -2164,7 +2164,7 @@ static int decompressAndParse(HTParentAnchor *anchor,
 		 : localname + 1);
 #endif /* VMS */
 
-    bin = HTCompressFileType(filename, ".", &dot) != cftNone;
+    bin = HTCompressFileType(filename, ".", &rootlen) != cftNone;
     fp = fopen(localname, FOPEN_MODE(bin));
 
 #ifdef VMS
@@ -2238,13 +2238,13 @@ static int decompressAndParse(HTParentAnchor *anchor,
 		format = HTAtom_for("www/compressed");
 	    }
 	} else {
-	    CompressFileType cft = HTCompressFileType(localname, DOT_STRING, &dot);
+	    CompressFileType cft = HTCompressFileType(localname, DOT_STRING, &rootlen);
 
 	    if (cft != cftNone) {
 		char *cp = NULL;
 
 		StrAllocCopy(cp, localname);
-		cp[dot - localname] = '\0';
+		cp[rootlen] = '\0';
 		format = HTFileFormat(cp, &encoding, NULL);
 		FREE(cp);
 		format = HTCharsetFormat(format, anchor,
@@ -2407,7 +2407,6 @@ int HTLoadFile(const char *addr,
     char *newname = NULL;	/* Simplified name of file */
     HTAtom *myEncoding = NULL;	/* enc of this file, may be gzip etc. */
     int status = -1;
-    char *dot;
 
 #ifdef VMS
     struct stat stat_info;
@@ -2609,15 +2608,16 @@ int HTLoadFile(const char *addr,
 					       0L /* @@@@@@ */ );
 
 		    if (value <= 0.0) {
-			char *atomname = NULL;
+			int rootlen = 0;
+			const char *atomname = NULL;
 			CompressFileType cft =
-			HTCompressFileType(dirbuf->d_name, ".", &dot);
+			HTCompressFileType(dirbuf->d_name, ".", &rootlen);
 			char *cp = NULL;
 
 			enc = NULL;
 			if (cft != cftNone) {
 			    StrAllocCopy(cp, dirbuf->d_name);
-			    cp[dot - dirbuf->d_name] = '\0';
+			    cp[rootlen] = '\0';
 			    format = HTFileFormat(cp, NULL, NULL);
 			    FREE(cp);
 			    value = HTStackValue(format, format_out,
diff --git a/WWW/Library/Implementation/HTFile.h b/WWW/Library/Implementation/HTFile.h
index 0c69bb42..c9aacc2d 100644
--- a/WWW/Library/Implementation/HTFile.h
+++ b/WWW/Library/Implementation/HTFile.h
@@ -205,9 +205,9 @@ typedef enum {
 /*
  *  Determine compression type from file name, by looking at its suffix.
  */
-extern CompressFileType HTCompressFileType(char *filename,
-					   char *dots,
-					   char **suffix);
+extern CompressFileType HTCompressFileType(const char *filename,
+					   const char *dots,
+					   int *rootlen);
 
 /*
  *  Determine compression type from the content-type.
diff --git a/WWW/Library/Implementation/HTGopher.c b/WWW/Library/Implementation/HTGopher.c
index b98025b2..d45c8bcf 100644
--- a/WWW/Library/Implementation/HTGopher.c
+++ b/WWW/Library/Implementation/HTGopher.c
@@ -139,7 +139,7 @@ static BOOL acceptable_inited = NO;
 static void init_acceptable(void)
 {
     unsigned int i;
-    char *good =
+    const char *good =
     "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./-_$";
 
     for (i = 0; i < 256; i++)
@@ -328,7 +328,7 @@ static void parse_menu(const char *arg GCC_UNUSED,
 
 	    } else if (port) {	/* Other types need port */
 		char *address = 0;
-		char *format = *selector ? "%s//%s@%s/" : "%s//%s/";
+		const char *format = *selector ? "%s//%s@%s/" : "%s//%s/";
 
 		if (gtype == GOPHER_TELNET) {
 		    PUTS(" (TEL) ");
@@ -725,7 +725,7 @@ static void free_CSOfields(void)
 /*	Interpret CSO/PH form template keys. - FM
  *	=========================================
  */
-static void interpret_cso_key(char *key,
+static void interpret_cso_key(const char *key,
 			      char *buf,
 			      int *length,
 			      CSOformgen_context * ctx,
@@ -1074,9 +1074,10 @@ static int generate_cso_form(char *host,
     int i, j, length;
     size_t out;
     int full_flag = 1;
-    char *key, *line;
+    const char *key;
+    const char *line;
     CSOformgen_context ctx;
-    static char *template[] =
+    static const char *template[] =
     {
 	"<HTML>\n<HEAD>\n<TITLE>CSO/PH Query Form for $(HOST)</TITLE>\n</HEAD>\n<BODY>",
 	"<H2><I>CSO/PH Query Form</I> for <EM>$(HOST)</EM></H2>",
diff --git a/WWW/Library/Implementation/HTGroup.c b/WWW/Library/Implementation/HTGroup.c
index eed577f3..c56127bb 100644
--- a/WWW/Library/Implementation/HTGroup.c
+++ b/WWW/Library/Implementation/HTGroup.c
@@ -66,7 +66,7 @@ typedef struct {
     GroupDef *translation;
 } Ref;
 
-static void syntax_error(FILE *fp, char *msg,
+static void syntax_error(FILE *fp, const char *msg,
 			 LexItem lex_item)
 {
     char buffer[41];
diff --git a/WWW/Library/Implementation/HTLex.c b/WWW/Library/Implementation/HTLex.c
index fea6aae8..6a7025a7 100644
--- a/WWW/Library/Implementation/HTLex.c
+++ b/WWW/Library/Implementation/HTLex.c
@@ -105,7 +105,7 @@ LexItem lex(FILE *fp)
     }				/* forever */
 }
 
-char *lex_verbose(LexItem lex_item)
+const char *lex_verbose(LexItem lex_item)
 {
     static char msg[100];	/* @@@@@@@@ */
 
diff --git a/WWW/Library/Implementation/HTLex.h b/WWW/Library/Implementation/HTLex.h
index 5914eba4..c647b61f 100644
--- a/WWW/Library/Implementation/HTLex.h
+++ b/WWW/Library/Implementation/HTLex.h
@@ -49,7 +49,7 @@ Get the Name for Lexical Item
 
  */
 
-extern char *lex_verbose(LexItem lex_item);
+extern const char *lex_verbose(LexItem lex_item);
 
 /*
 
diff --git a/WWW/Library/Implementation/HTMIME.c b/WWW/Library/Implementation/HTMIME.c
index 49791955..314d7b1a 100644
--- a/WWW/Library/Implementation/HTMIME.c
+++ b/WWW/Library/Implementation/HTMIME.c
@@ -479,7 +479,7 @@ static int pumpData(HTStream *me)
 	char *url = NULL;
 	char *num = NULL;
 	char *txt = NULL;
-	char *base = "";	/* FIXME: refresh_url may be relative to doc */
+	const char *base = "";	/* FIXME: refresh_url may be relative to doc */
 
 	LYParseRefreshURL(me->refresh_url, &num, &url);
 	if (url != NULL && me->format == WWW_HTML) {
diff --git a/WWW/Library/Implementation/HTParse.c b/WWW/Library/Implementation/HTParse.c
index 70a21573..b291264b 100644
--- a/WWW/Library/Implementation/HTParse.c
+++ b/WWW/Library/Implementation/HTParse.c
@@ -886,7 +886,7 @@ static const unsigned char isAcceptable[96] =
 	 7,7,7,7,7,7,7,7,7,7,7,0,0,0,0,0 };	/* 7X  pqrstuvwxyz{|}~	DEL */
 /* *INDENT-ON* */
 
-static char *hex = "0123456789ABCDEF";
+static const char *hex = "0123456789ABCDEF";
 
 #define ACCEPTABLE(a)	( a>=32 && a<128 && ((isAcceptable[a-32]) & mask))
 
diff --git a/WWW/Library/Implementation/HTRules.c b/WWW/Library/Implementation/HTRules.c
index c291bf4b..7e621b3f 100644
--- a/WWW/Library/Implementation/HTRules.c
+++ b/WWW/Library/Implementation/HTRules.c
@@ -209,7 +209,8 @@ char *HTTranslate(const char *required)
 {
     rule *r;
     char *current = NULL;
-    char *msgtmp = NULL, *pMsg;
+    char *msgtmp = NULL;
+    const char *pMsg;
     int proxy_none_flag = 0;
     int permitredir_flag = 0;
 
@@ -446,8 +447,11 @@ int HTSetConfiguration(char *config)
     HTRuleOp op;
     char *line = NULL;
     char *pointer = line;
-    char *word1, *word2, *word3;
-    char *cond_op = NULL, *cond = NULL;
+    char *word1;
+    const char *word2;
+    const char *word3;
+    const char *cond_op = NULL;
+    const char *cond = NULL;
     float quality, secs, secs_per_byte;
     int maxbytes;
     int status;
@@ -586,7 +590,8 @@ int HTSetConfiguration(char *config)
 		if (cond_op && *cond_op)
 		    cond = HTNextField(&pointer);
 		if (word3) {	/* Fix string with too may %s - kw */
-		    char *cp = word3, *cp1, *cp2;
+		    const char *cp = word3;
+		    char *cp1, *cp2;
 
 		    while ((cp1 = strchr(cp, '%'))) {
 			if (cp1[1] == '\0') {
diff --git a/WWW/Library/Implementation/HTStream.h b/WWW/Library/Implementation/HTStream.h
index b2941c94..c5f6a67a 100644
--- a/WWW/Library/Implementation/HTStream.h
+++ b/WWW/Library/Implementation/HTStream.h
@@ -31,7 +31,7 @@ typedef struct _HTStream HTStream;
  */
 typedef struct _HTStreamClass {
 
-    char *name;			/* Just for diagnostics */
+    const char *name;		/* Just for diagnostics */
 
     void (*_free) (HTStream *me);
 
diff --git a/WWW/Library/Implementation/HTString.c b/WWW/Library/Implementation/HTString.c
index 2c6cee4f..bc4abf68 100644
--- a/WWW/Library/Implementation/HTString.c
+++ b/WWW/Library/Implementation/HTString.c
@@ -19,7 +19,7 @@ int WWW_TraceMask = 0;		/* Global trace flag for ALL W3 code */
 #endif
 
 #ifndef VC
-#define VC "unknown"
+#define VC "2.14"
 #endif /* !VC */
 
 #ifdef _WINDOWS
diff --git a/WWW/Library/Implementation/HTTCP.c b/WWW/Library/Implementation/HTTCP.c
index 84aeb412..fc479848 100644
--- a/WWW/Library/Implementation/HTTCP.c
+++ b/WWW/Library/Implementation/HTTCP.c
@@ -189,7 +189,7 @@ int HTioctl(int d,
 /*	Report Internet Error
  *	---------------------
  */
-int HTInetStatus(char *where)
+int HTInetStatus(const char *where)
 {
     int status;
     int saved_errno = errno;
@@ -1504,7 +1504,7 @@ const char *HTHostName(void)
  *  modified over the years by numerous Lynx lovers. - FM
  */
 int HTDoConnect(const char *url,
-		char *protocol,
+		const char *protocol,
 		int default_port,
 		int *s)
 {
diff --git a/WWW/Library/Implementation/HTTCP.h b/WWW/Library/Implementation/HTTCP.h
index a86a8931..eae20aa5 100644
--- a/WWW/Library/Implementation/HTTCP.h
+++ b/WWW/Library/Implementation/HTTCP.h
@@ -35,7 +35,7 @@ extern const char *HTInetString(struct sockaddr_in *mysin);
  * On return:
  *      returns a negative status in the unix way.
  */
-extern int HTInetStatus(char *where);
+extern int HTInetStatus(const char *where);
 
 /*      Publicly accessible variables
 */
@@ -93,7 +93,7 @@ extern struct hostent *LYGetHostByName(char *str);
 extern const char *HTHostName(void);
 
 extern int HTDoConnect(const char *url,
-		       char *protocol,
+		       const char *protocol,
 		       int default_port,
 		       int *s);
 
diff --git a/WWW/Library/Implementation/HTTP.c b/WWW/Library/Implementation/HTTP.c
index 7307ebb1..187f4023 100644
--- a/WWW/Library/Implementation/HTTP.c
+++ b/WWW/Library/Implementation/HTTP.c
@@ -357,11 +357,13 @@ static void strip_userid(char *host)
  * Check if the user's options specified to use the given encoding.  Normally
  * all encodings with compiled-in support are specified (encodingALL).
  */
-static BOOL acceptEncoding (int code)
+static BOOL acceptEncoding(int code)
 {
     BOOL result = FALSE;
+
     if ((code & LYAcceptEncoding) != 0) {
 	const char *program = 0;
+
 	switch (code) {
 	case encodingGZIP:
 	    program = HTGetProgramPath(ppGZIP);
@@ -421,7 +423,7 @@ static int HTLoadHTTP(const char *arg,
     HTFormat format_in;		/* Format arriving in the message */
     BOOL do_head = FALSE;	/* Whether or not we should do a head */
     BOOL do_post = FALSE;	/* ARE WE posting ? */
-    char *METHOD;
+    const char *METHOD;
 
     BOOL had_header;		/* Have we had at least one header? */
     char *line_buffer;
@@ -874,16 +876,16 @@ static int HTLoadHTTP(const char *arg,
 	if (!(LYUserSpecifiedURL ||
 	      LYNoRefererHeader || LYNoRefererForThis) &&
 	    strcmp(HTLoadedDocumentURL(), "")) {
-	    char *cp = LYRequestReferer;
+	    const char *cp = LYRequestReferer;
 
 	    if (!cp)
 		cp = HTLoadedDocumentURL();	/* @@@ Try both? - kw */
 	    BStrCat0(command, "Referer: ");
 	    if (isLYNXIMGMAP(cp)) {
-		char *cp1 = trimPoundSelector(cp);
+		char *pound = findPoundSelector(cp);
+		int nn = (pound ? (int) (pound - cp) : (int) strlen(cp));
 
-		BStrCat0(command, cp + LEN_LYNXIMGMAP);
-		restorePoundSelector(cp1);
+		HTSABCat(&command, cp + LEN_LYNXIMGMAP, nn);
 	    } else {
 		BStrCat0(command, cp);
 	    }
diff --git a/WWW/Library/Implementation/HText.h b/WWW/Library/Implementation/HText.h
index 08e91a10..4c7b1dce 100644
--- a/WWW/Library/Implementation/HText.h
+++ b/WWW/Library/Implementation/HText.h
@@ -29,8 +29,8 @@ typedef CHyperText HText;
 extern HText *HTMainText;	/* Pointer to current main text */
 extern HTParentAnchor *HTMainAnchor;	/* Pointer to current text's anchor */
 
-extern char *HTAppName;		/* Application name */
-extern char *HTAppVersion;	/* Application version */
+extern const char *HTAppName;	/* Application name */
+extern const char *HTAppVersion;	/* Application version */
 
 /*
 
diff --git a/WWW/Library/Implementation/SGML.c b/WWW/Library/Implementation/SGML.c
index 54910903..684efd50 100644
--- a/WWW/Library/Implementation/SGML.c
+++ b/WWW/Library/Implementation/SGML.c
@@ -224,9 +224,9 @@ struct _HTStream {
 };
 
 #ifndef NO_LYNX_TRACE
-static char *state_name(sgml_state n)
+static const char *state_name(sgml_state n)
 {
-    char *result = "?";
+    const char *result = "?";
     /* *INDENT-OFF* */
     switch (n) {
     case S_attr:                result = "S_attr";              break;
@@ -4506,12 +4506,12 @@ History:
 
 int TREAT_SJIS = 1;
 
-void JISx0201TO0208_EUC(register unsigned char IHI,
-			register unsigned char ILO,
-			register unsigned char *OHI,
-			register unsigned char *OLO)
+void JISx0201TO0208_EUC(unsigned char IHI,
+			unsigned char ILO,
+			unsigned char *OHI,
+			unsigned char *OLO)
 {
-    static char *table[] =
+    static const char *table[] =
     {
 	"\241\243",		/* A1,A3 */
 	"\241\326",		/* A1,D6 */
diff --git a/WWW/Library/Implementation/SGML.h b/WWW/Library/Implementation/SGML.h
index 7d22883f..2c75b088 100644
--- a/WWW/Library/Implementation/SGML.h
+++ b/WWW/Library/Implementation/SGML.h
@@ -46,7 +46,7 @@ typedef enum {
 } SGMLContent;
 
 typedef struct {
-    char *name;			/* The (constant) name of the attribute */
+    const char *name;		/* The name of the attribute */
 #ifdef USE_PRETTYSRC
     char type;			/* code of the type of the attribute. Code
 				   values are in HTMLDTD.h */
@@ -126,7 +126,7 @@ typedef int TagFlags;
  */
 typedef struct _tag HTTag;
 struct _tag {
-    char *name;			/* The name of the tag */
+    const char *name;		/* The name of the tag */
 #ifdef USE_COLOR_STYLE
     int name_len;		/* The length of the name */
 #endif
@@ -191,7 +191,7 @@ typedef struct _HTStructured HTStructured;
 
 typedef struct _HTStructuredClass {
 
-    char *name;			/* Just for diagnostics */
+    const char *name;		/* Just for diagnostics */
 
     void (*_free) (HTStructured * me);