about summary refs log tree commit diff stats
path: root/WWW
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>1997-09-19 01:14:00 -0400
committerThomas E. Dickey <dickey@invisible-island.net>1997-09-19 01:14:00 -0400
commit443226a5ffcf805f6ab3ccbcc2a6b4802793b07d (patch)
treeb6f0dca30c155e9ea2fa8ec78271fb44744b05ce /WWW
parentd2e46bbfcbedb43938b866f4ad9e8bf1d4084b7c (diff)
downloadlynx-snapshots-443226a5ffcf805f6ab3ccbcc2a6b4802793b07d.tar.gz
snapshot of project "lynx", label v2-7-1ac_0-69
Diffstat (limited to 'WWW')
-rw-r--r--WWW/Library/Implementation/BSDI_Makefile28
-rw-r--r--WWW/Library/Implementation/CommonMakefile5
-rw-r--r--WWW/Library/Implementation/HTAccess.c2
-rw-r--r--WWW/Library/Implementation/HTFTP.c11
-rw-r--r--WWW/Library/Implementation/HTFile.c26
-rw-r--r--WWW/Library/Implementation/HTFinger.c9
-rw-r--r--WWW/Library/Implementation/HTGopher.c11
-rw-r--r--WWW/Library/Implementation/HTMIME.c9
-rw-r--r--WWW/Library/Implementation/HTMLDTD.c16
-rw-r--r--WWW/Library/Implementation/HTMLDTD.h21
-rw-r--r--WWW/Library/Implementation/HTMLGen.c4
-rw-r--r--WWW/Library/Implementation/HTNews.c29
-rw-r--r--WWW/Library/Implementation/HTPlain.c14
-rw-r--r--WWW/Library/Implementation/HTTCP.c2
-rw-r--r--WWW/Library/Implementation/HTTP.c3
-rw-r--r--WWW/Library/Implementation/SGML.c92
-rw-r--r--WWW/Library/Implementation/SGML.h2
-rw-r--r--WWW/Library/Implementation/UCDefs.h2
18 files changed, 154 insertions, 132 deletions
diff --git a/WWW/Library/Implementation/BSDI_Makefile b/WWW/Library/Implementation/BSDI_Makefile
index 31f5dfef..21ff1c02 100644
--- a/WWW/Library/Implementation/BSDI_Makefile
+++ b/WWW/Library/Implementation/BSDI_Makefile
@@ -104,12 +104,12 @@ CERNLIBBIN = $(WWW)/bin
 COMMON = $(LOB)/HTParse.o $(LOB)/HTAccess.o $(LOB)/HTTP.o \
 	$(LOB)/HTFile.o	$(LOB)/HTBTree.o $(LOB)/HTFTP.o $(LOB)/HTTCP.o \
 	$(LOB)/SGML.o $(LOB)/HTMLDTD.o $(LOB)/HTChunk.o \
-	$(LOB)/HTPlain.o $(LOB)/HTWriter.o $(LOB)/HTFWriter.o \
+	$(LOB)/HTPlain.o $(LOB)/HTWriter.o \
 	$(LOB)/HTMLGen.o \
 	$(LOB)/HTAtom.o $(LOB)/HTAnchor.o $(LOB)/HTStyle.o \
-	$(LOB)/HTList.o $(LOB)/HTString.o $(LOB)/HTAlert.o \
-	$(LOB)/HTRules.o $(LOB)/HTFormat.o $(LOB)/HTInit.o $(LOB)/HTMIME.o \
-	$(LOB)/HTHistory.o $(LOB)/HTNews.o $(LOB)/HTGopher.o \
+	$(LOB)/HTList.o $(LOB)/HTString.o \
+	$(LOB)/HTRules.o $(LOB)/HTFormat.o  $(LOB)/HTMIME.o \
+	$(LOB)/HTHistory.o $(LOB)/HTNews.o  $(LOB)/HTGopher.o \
 	$(LOB)/HTTelnet.o $(LOB)/HTFinger.o $(LOB)/HTWSRC.o $(HTWAIS) \
 	$(LOB)/HTAAUtil.o $(LOB)/HTAAServ.o $(LOB)/HTAABrow.o \
 	$(LOB)/HTAAFile.o $(LOB)/HTPasswd.o $(LOB)/HTGroup.o  \
@@ -120,11 +120,11 @@ CFILES = $(CMN)HTParse.c $(CMN)HTAccess.c $(CMN)HTTP.c $(CMN)HTFile.c \
         $(CMN)HTBTree.c \
 	$(CMN)HTFTP.c   $(CMN)HTTCP.c     $(CMN)SGML.c 	\
 	$(CMN)HTMLDTD.c \
-	$(CMN)HTPlain.c	$(CMN)HTWriter.c  $(CMN)HTFWriter.c \
+	$(CMN)HTPlain.c	$(CMN)HTWriter.c  \
         $(CMN)HTMLGen.c	\
 	$(CMN)HTChunk.c $(CMN)HTAtom.c   $(CMN)HTAnchor.c $(CMN)HTStyle.c \
-	$(CMN)HTList.c  $(CMN)HTString.c $(CMN)HTAlert.c $(CMN)HTRules.c \
-	$(CMN)HTFormat.c $(CMN)HTInit.c $(CMN)HTMIME.c $(CMN)HTHistory.c \
+	$(CMN)HTList.c  $(CMN)HTString.c $(CMN)HTRules.c \
+	$(CMN)HTFormat.c $(CMN)HTMIME.c $(CMN)HTHistory.c \
 	$(CMN)HTNews.c  $(CMN)HTGopher.c $(CMN)HTTelnet.c \
 	$(CMN)HTFinger.c $(CMN)HTWAIS.c  $(CMN)HTWSRC.c \
 	$(CMN)HTAAUtil.c $(CMN)HTAAServ.c $(CMN)HTAABrow.c \
@@ -259,9 +259,6 @@ $(LOB)/HTAnchor.o : $(OE) $(CMN)HTAnchor.c $(CMN)HTUtils.h $(CMN)HTList.h
 $(LOB)/HTFormat.o : $(OE) $(CMN)HTFormat.c $(CMN)HTUtils.h $(CMN)HTList.h
 	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTFormat.c
 
-$(LOB)/HTInit.o : $(OE) $(CMN)HTInit.c $(CMN)HTUtils.h $(CMN)HTList.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTInit.c
-
 $(LOB)/HTMIME.o : $(OE) $(CMN)HTMIME.c $(CMN)HTUtils.h $(CMN)HTList.h
 	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTMIME.c
 
@@ -295,14 +292,11 @@ $(LOB)/HTChunk.o : $(OE) $(CMN)HTChunk.c $(CMN)HTUtils.h
 $(LOB)/HTString.o : $(OE) $(CMN)HTString.c $(CMN)HTUtils.h $(CMN)Version.make
 	$(CC) -c -o $@ $(CFLAGS2) -DVC=\"$(VC)\" $(CMN)HTString.c
 
-$(LOB)/HTAlert.o : $(OE) $(CMN)HTAlert.c $(CMN)HTUtils.h $(CMN)Version.make
-	$(CC) -c -o $@ $(CFLAGS2) -DVC=\"$(VC)\" $(CMN)HTAlert.c
-
 $(LOB)/HTRules.o : $(OE) $(CMN)HTRules.c $(CMN)HTUtils.h $(CMN)Version.make \
 	 $(CMN)HTAAServ.h $(CMN)HTAAProt.h
 	$(CC) -c -o $@ $(CFLAGS2) -DVC=\"$(VC)\" $(CMN)HTRules.c
 
-$(LOB)/SGML.o : $(OE) $(CMN)SGML.c $(CMN)HTUtils.h
+$(LOB)/SGML.o : $(OE) $(CMN)SGML.c $(CMN)HTUtils.h $(CMN)UCAux.h
 	$(CC) -c -o $@ $(CFLAGS2) $(CMN)SGML.c
 
 $(LOB)/HTMLGen.o : $(OE) $(CMN)HTMLGen.c $(CMN)HTUtils.h $(CMN)HTMLDTD.h
@@ -311,7 +305,8 @@ $(LOB)/HTMLGen.o : $(OE) $(CMN)HTMLGen.c $(CMN)HTUtils.h $(CMN)HTMLDTD.h
 $(LOB)/HTMLDTD.o : $(OE) $(CMN)HTMLDTD.c $(CMN)SGML.h
 	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTMLDTD.c
 
-$(LOB)/HTPlain.o : $(OE) $(CMN)HTPlain.c $(CMN)HTPlain.h $(CMN)HTStream.h
+$(LOB)/HTPlain.o : $(OE) $(CMN)HTPlain.c $(CMN)HTPlain.h $(CMN)HTStream.h \
+	 $(CMN)UCAux.h
 	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTPlain.c
 
 $(LOB)/HTWAIS.o : $(OE) $(CMN)HTWAIS.c $(CMN)HTUtils.h $(CMN)HTList.h
@@ -323,9 +318,6 @@ $(LOB)/HTWSRC.o : $(OE) $(CMN)HTWSRC.c $(CMN)HTUtils.h $(CMN)HTList.h
 $(LOB)/HTWriter.o : $(OE) $(CMN)HTWriter.c $(CMN)HTWriter.h $(CMN)HTStream.h
 	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTWriter.c
 
-$(LOB)/HTFWriter.o : $(OE) $(CMN)HTFWriter.c $(CMN)HTFWriter.h $(CMN)HTStream.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTFWriter.c
-
 
 #	Access Authorization
 
diff --git a/WWW/Library/Implementation/CommonMakefile b/WWW/Library/Implementation/CommonMakefile
index 95a0c3a4..b7d32576 100644
--- a/WWW/Library/Implementation/CommonMakefile
+++ b/WWW/Library/Implementation/CommonMakefile
@@ -77,7 +77,7 @@ COMMON = $(LOB)/HTParse.o $(LOB)/HTAccess.o $(LOB)/HTTP.o \
 	$(LOB)/HTAtom.o $(LOB)/HTAnchor.o $(LOB)/HTStyle.o \
 	$(LOB)/HTList.o $(LOB)/HTString.o \
 	$(LOB)/HTRules.o $(LOB)/HTFormat.o  $(LOB)/HTMIME.o \
-	$(LOB)/HTHistory.o $(LOB)/HTNews.o $(LOB)/HTGopher.o \
+	$(LOB)/HTHistory.o $(LOB)/HTNews.o  $(LOB)/HTGopher.o \
 	$(LOB)/HTTelnet.o $(LOB)/HTFinger.o $(LOB)/HTWSRC.o $(HTWAIS) \
 	$(LOB)/HTAAUtil.o $(LOB)/HTAAServ.o $(LOB)/HTAABrow.o \
 	$(LOB)/HTAAFile.o $(LOB)/HTPasswd.o $(LOB)/HTGroup.o  \
@@ -273,7 +273,8 @@ $(LOB)/HTMLGen.o : $(OE) $(CMN)HTMLGen.c $(CMN)HTUtils.h $(CMN)HTMLDTD.h
 $(LOB)/HTMLDTD.o : $(OE) $(CMN)HTMLDTD.c $(CMN)SGML.h
 	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTMLDTD.c
 
-$(LOB)/HTPlain.o : $(OE) $(CMN)HTPlain.c $(CMN)HTPlain.h $(CMN)HTStream.h $(CMN)UCAux.h
+$(LOB)/HTPlain.o : $(OE) $(CMN)HTPlain.c $(CMN)HTPlain.h $(CMN)HTStream.h \
+	 $(CMN)UCAux.h
 	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTPlain.c
 
 $(LOB)/HTWAIS.o : $(OE) $(CMN)HTWAIS.c $(CMN)HTUtils.h $(CMN)HTList.h
diff --git a/WWW/Library/Implementation/HTAccess.c b/WWW/Library/Implementation/HTAccess.c
index 0ebb2c17..816d64d2 100644
--- a/WWW/Library/Implementation/HTAccess.c
+++ b/WWW/Library/Implementation/HTAccess.c
@@ -600,7 +600,7 @@ PRIVATE BOOL HTLoadDocument ARGS4(
 {
     int	        status;
     HText *	text;
-    char * address_to_load =  (char *)full_address;
+    CONST char * address_to_load = full_address;
     extern char LYforce_no_cache;		       /* from   GridText.c */
     extern char LYoverride_no_cache;		       /* from LYMainLoop.c */
     extern char * HTLoadedDocumentURL NOPARAMS;		   /* in GridText.c */
diff --git a/WWW/Library/Implementation/HTFTP.c b/WWW/Library/Implementation/HTFTP.c
index f7a9a74f..3cf9dd3d 100644
--- a/WWW/Library/Implementation/HTFTP.c
+++ b/WWW/Library/Implementation/HTFTP.c
@@ -237,14 +237,15 @@ PUBLIC char * HTMake_VMS_name ARGS2(
     char *second;		/* 2nd slash */
     char *last;			/* last slash */
     
-    char * hostname = (char *)HTHostName();
+    CONST char * hostname = HTHostName();
 
     if (!filename || !nodename)
         outofmem(__FILE__, "HTVMSname");
     strcpy(filename, fn);
     strcpy(nodename, "");	/* On same node? Yes if node names match */
     if (strncmp(nn, "localhost", 9)) {
-        char *p, *q;
+        CONST char *p;
+	char *q;
         for (p = hostname, q = (char *)nn;
 	     *p && *p != '.' && *q && *q != '.'; p++, q++){
 	    if (TOUPPER(*p) != TOUPPER(*q)) {
@@ -757,7 +758,7 @@ PRIVATE int get_connection ARGS1(
 	     * Create and send a mail address as the password. - FM
 	     */
 	    char *user = NULL;
-	    char *host = NULL;
+	    CONST char *host = NULL;
 	    char * cp;
 
 	    if (personal_mail_address && *personal_mail_address) {
@@ -770,7 +771,7 @@ PRIVATE int get_connection ARGS1(
 		    *cp++ = '\0';
 		    host = cp;
 		} else {
-		    host = (char *)HTHostName();
+		    host = HTHostName();
 		}
 	    } else {
 	        /*
@@ -780,7 +781,7 @@ PRIVATE int get_connection ARGS1(
 		    StrAllocCopy(user, cp);
 		else
 		    StrAllocCopy(user, "WWWuser");
-		host = (char *)HTHostName();
+		host = HTHostName();
 	    }
 
 	    /*
diff --git a/WWW/Library/Implementation/HTFile.c b/WWW/Library/Implementation/HTFile.c
index c9fdfe9b..71ea8823 100644
--- a/WWW/Library/Implementation/HTFile.c
+++ b/WWW/Library/Implementation/HTFile.c
@@ -128,7 +128,7 @@ PUBLIC int HTDirReadme = HT_DIR_README_TOP;
 #endif /* DIRED_SUPPORT */
 
 extern int current_char_set;
-extern char *LYchar_set_names[];
+extern CONST char *LYchar_set_names[];
 extern BOOL HTPassEightBitRaw;
 extern HTCJKlang HTCJK;
 #ifndef EXP_CHARTRANS
@@ -865,7 +865,7 @@ PUBLIC HTFormat HTCharsetFormat ARGS3(
 					UCT_STAGE_HTEXT,
 					UCT_SETBY_DEFAULT);
 	    }
-	    if (p_in->enc != UCT_ENC_CJK &&
+	    if ((p_in->enc != UCT_ENC_CJK) &&
 		(p_in->codepoints & UCT_CP_SUBSETOF_LAT1)) {
 		HTCJK = NOCJK;
 	    } else if (chndl == current_char_set) {
@@ -1892,19 +1892,25 @@ PUBLIC int HTLoadFile ARGS4(
         	pathname = HTParse(logical, "", 
 					PARSE_PATH + PARSE_PUNCTUATION);
 
-    		if (!strcmp(pathname,"/"))  /* root path */
+    		if (!strcmp(pathname,"/")) {
+		    /*
+		    **  Root path.
+		    */
         	    StrAllocCopy (tail, "/foo/..");
-    	    	else {
-        	    char *p = strrchr(pathname, '/');  /* find lastslash */
+    	    	} else {
+		    char *p = strrchr(pathname, '/');  /* find lastslash */
+
 		    if (!p) {
 			/*
-			 *  This probably should not happen, but be
-			 *  prepared if it does... - kw
-			 */
+			**  This probably should not happen,
+			**  but be prepared if it does. - KW
+			*/
 			StrAllocCopy (tail, "/foo/..");
 		    } else {
-			/* take slash off the beginning */
-			StrAllocCopy(tail, p+1);
+			/*
+			**  Take slash off the beginning.
+			*/
+			StrAllocCopy(tail, (p + 1));
 		    }
     		}
     		FREE(pathname);
diff --git a/WWW/Library/Implementation/HTFinger.c b/WWW/Library/Implementation/HTFinger.c
index 4c3c4e94..d00b57cb 100644
--- a/WWW/Library/Implementation/HTFinger.c
+++ b/WWW/Library/Implementation/HTFinger.c
@@ -79,18 +79,19 @@ PRIVATE BOOL initialize NOARGS
 /*	Start anchor element
 **	--------------------
 */
-PRIVATE void start_anchor ARGS1(char *,  href)
+PRIVATE void start_anchor ARGS1(CONST char *,  href)
 {
     BOOL		present[HTML_A_ATTRIBUTES];
-    char*		value[HTML_A_ATTRIBUTES];
+    CONST char*		value[HTML_A_ATTRIBUTES];
     
     {
     	int i;
     	for(i=0; i<HTML_A_ATTRIBUTES; i++)
 	    present[i] = (i==HTML_A_HREF);
     }
-    value[HTML_A_HREF] = href;
-    (*targetClass.start_element)(target, HTML_A, present, value, 0);
+    ((CONST char **)value)[HTML_A_HREF] = href;
+    (*targetClass.start_element)(target, HTML_A, present,
+    				 (CONST char **)value, 0);
 
 }
 
diff --git a/WWW/Library/Implementation/HTGopher.c b/WWW/Library/Implementation/HTGopher.c
index dd1a4662..7af74580 100644
--- a/WWW/Library/Implementation/HTGopher.c
+++ b/WWW/Library/Implementation/HTGopher.c
@@ -185,22 +185,23 @@ PUBLIC BOOLEAN HT_Is_Gopher_URL=FALSE;
 PRIVATE void write_anchor ARGS2(CONST char *,text, CONST char *,addr)
 {
     BOOL present[HTML_A_ATTRIBUTES];
-    char * value[HTML_A_ATTRIBUTES];
+    CONST char * value[HTML_A_ATTRIBUTES];
     
     int i;
     
     for (i = 0; i < HTML_A_ATTRIBUTES; i++)
         present[i] = 0;
     present[HTML_A_HREF] = YES;
-    value[HTML_A_HREF] = addr;
+    ((CONST char **)value)[HTML_A_HREF] = addr;
     present[HTML_A_TITLE] = YES;
-    value[HTML_A_TITLE] = text;
+    ((CONST char **)value)[HTML_A_TITLE] = text;
 
     if(TRACE)
 	fprintf(stderr,"HTGopher: adding URL: %s\n",addr);
     
     HT_Is_Gopher_URL = TRUE;  /* tell HTML.c that this is a Gopher URL */
-    (*targetClass.start_element)(target, HTML_A, present, value, 0);
+    (*targetClass.start_element)(target, HTML_A, present,
+    				 (CONST char **)value, 0);
 	    
     PUTS(text);
     END(HTML_A);
@@ -1772,7 +1773,7 @@ PUBLIC int HTLoadGopher ARGS4(
         int len;
 
 	if ((len = strlen(arg)) > 5) {
-	    if (0 == strcmp((char *)&arg[len-6], ":105/2")) {
+	    if (0 == strcmp(&arg[len-6], ":105/2")) {
 	        /* Use CSO gateway. */
 		if (TRACE)
 		    fprintf(stderr, "HTGopher: Passing to CSO/PH gateway.\n");
diff --git a/WWW/Library/Implementation/HTMIME.c b/WWW/Library/Implementation/HTMIME.c
index 129cc846..db6d75b7 100644
--- a/WWW/Library/Implementation/HTMIME.c
+++ b/WWW/Library/Implementation/HTMIME.c
@@ -26,7 +26,7 @@
 #define FREE(x) if (x) {free(x); x = NULL;}
 
 extern int current_char_set;
-extern char *LYchar_set_names[];
+extern CONST char *LYchar_set_names[];
 extern BOOL HTPassEightBitRaw;
 extern HTCJKlang HTCJK;
 
@@ -442,8 +442,9 @@ PRIVATE void HTMIME_put_character ARGS2(
 							    UCT_STAGE_MIME),
 				       UCT_STAGE_HTEXT, UCT_SETBY_DEFAULT);
 				}
-				if (p_in->enc != UCT_ENC_CJK &&
-				    (p_in->codepoints & UCT_CP_SUBSETOF_LAT1)){
+				if ((p_in->enc != UCT_ENC_CJK) &&
+				    (p_in->codepoints &
+				     UCT_CP_SUBSETOF_LAT1)) {
 				    HTCJK = NOCJK;
 				} else if (chndl == current_char_set) {
 				HTPassEightBitRaw = TRUE;
@@ -2460,7 +2461,7 @@ PUBLIC int HTrjis ARGS2(
 */
 /*
  * RJIS ( Recover JIS code from broken file )
- * @Header: rjis.c,v 0.2 92/09/04 takahasi Exp @
+ * $Header: /usr/build/VCS/lynx/WWW/Library/Implementation/RCS/HTMIME.c,v 1.10 1997/09/19 01:14:00 klaus Exp $
  * Copyright (C) 1992 1994
  * Hironobu Takahashi (takahasi@tiny.or.jp)
  *
diff --git a/WWW/Library/Implementation/HTMLDTD.c b/WWW/Library/Implementation/HTMLDTD.c
index 3f6df848..7eb1d86b 100644
--- a/WWW/Library/Implementation/HTMLDTD.c
+++ b/WWW/Library/Implementation/HTMLDTD.c
@@ -1780,11 +1780,11 @@ struct _HTStructured {
 
 PUBLIC void HTStartAnchor ARGS3(
 	HTStructured *,		obj,
-	char *,			name,
-	char *,			href)
+	CONST char *,		name,
+	CONST char *,		href)
 {
     BOOL		present[HTML_A_ATTRIBUTES];
-    char * 		value[HTML_A_ATTRIBUTES];
+    CONST char * 	value[HTML_A_ATTRIBUTES];
     int i;
 
     for (i = 0; i < HTML_A_ATTRIBUTES; i++)
@@ -1792,11 +1792,11 @@ PUBLIC void HTStartAnchor ARGS3(
 
     if (name && *name) {
     	present[HTML_A_NAME] = YES;
-	value[HTML_A_NAME] = name;
+	value[HTML_A_NAME] = (CONST char *)name;
     }
     if (href) {
         present[HTML_A_HREF] = YES;
-        value[HTML_A_HREF] = href;
+        value[HTML_A_HREF] = (CONST char *)href;
     }
 
     (*obj->isa->start_element)(obj, HTML_A, present, value, 0);
@@ -1808,7 +1808,7 @@ PUBLIC void HTStartIsIndex ARGS3(
 	CONST char *,		href)
 {
     BOOL		present[HTML_ISINDEX_ATTRIBUTES];
-    char * 		value[HTML_ISINDEX_ATTRIBUTES];
+    CONST char * 	value[HTML_ISINDEX_ATTRIBUTES];
     int i;
 
     for (i = 0; i < HTML_ISINDEX_ATTRIBUTES; i++)
@@ -1816,11 +1816,11 @@ PUBLIC void HTStartIsIndex ARGS3(
 
     if (prompt && *prompt) {
     	present[HTML_ISINDEX_PROMPT] = YES;
-	value[HTML_ISINDEX_PROMPT] = prompt;
+	value[HTML_ISINDEX_PROMPT] = (CONST char *)prompt;
     }
     if (href) {
         present[HTML_ISINDEX_HREF] = YES;
-        value[HTML_ISINDEX_HREF] = href;
+        value[HTML_ISINDEX_HREF] = (CONST char *)href;
     }
 
     (*obj->isa->start_element)(obj, HTML_ISINDEX , present, value, 0);
diff --git a/WWW/Library/Implementation/HTMLDTD.h b/WWW/Library/Implementation/HTMLDTD.h
index 45ed9a36..98816060 100644
--- a/WWW/Library/Implementation/HTMLDTD.h
+++ b/WWW/Library/Implementation/HTMLDTD.h
@@ -10,10 +10,6 @@
    
  */
 
-#define HT_NON_BREAK_SPACE ((char)1)	/* For now */
-#define HT_EM_SPACE ((char)2)
-#define LY_SOFT_HYPHEN		'\007'
-
 #ifndef HTMLDTD_H
 #define HTMLDTD_H
 
@@ -23,6 +19,19 @@
 #include "SGML.h"
 
 /*
+**  Lynx internal character representations.
+*/
+#ifndef HT_NON_BREAK_SPACE
+#define HT_NON_BREAK_SPACE	((char)1)	/* For now */
+#endif /* !HT_NON_BREAK_SPACE */
+#ifndef HT_EM_SPACE
+#define HT_EM_SPACE		((char)2)	/* For now */
+#endif /* !HT_EM_SPACE */
+#ifndef LY_SOFT_HYPHEN
+#define LY_SOFT_HYPHEN		((char)7)
+#endif /* !LY_SOFT_HYPHEN */
+
+/*
 
 Element Numbers
 
@@ -962,8 +971,8 @@ Start anchor element
  */
 extern void HTStartAnchor PARAMS((
                 HTStructured * targetstream,
-                char *    	name,
-                char *    	href));
+                CONST char *    name,
+                CONST char *    href));
 
 /*
 
diff --git a/WWW/Library/Implementation/HTMLGen.c b/WWW/Library/Implementation/HTMLGen.c
index 3b593d06..e3ca3e9d 100644
--- a/WWW/Library/Implementation/HTMLGen.c
+++ b/WWW/Library/Implementation/HTMLGen.c
@@ -258,7 +258,7 @@ PRIVATE void HTMLGen_start_element ARGS5(
 	HTStructured *, 	me,
 	int,			element_number,
 	CONST BOOL*,	 	present,
-	char **,		value,
+	CONST char **,		value,
 	char **,		insert)
 {
     int i;
@@ -516,7 +516,7 @@ PUBLIC HTStream* HTPlainToHTML ARGS3(
     HTStructured* me = (HTStructured*)malloc(sizeof(*me));
     if (me == NULL)
         outofmem(__FILE__, "PlainToHTML");
-    me->isa = (HTStructuredClass*) &PlainToHTMLConversion;       
+    me->isa = (CONST HTStructuredClass*) &PlainToHTMLConversion;       
 
     /*
      *  Copy pointers to routines for speed.
diff --git a/WWW/Library/Implementation/HTNews.c b/WWW/Library/Implementation/HTNews.c
index 1fce965d..bcf2993e 100644
--- a/WWW/Library/Implementation/HTNews.c
+++ b/WWW/Library/Implementation/HTNews.c
@@ -627,36 +627,38 @@ PRIVATE char * author_address ARGS1(char *,email)
 /*	Start anchor element
 **	--------------------
 */
-PRIVATE void start_anchor ARGS1(char *,  href)
+PRIVATE void start_anchor ARGS1(CONST char *,  href)
 {
     BOOL		present[HTML_A_ATTRIBUTES];
-    char*		value[HTML_A_ATTRIBUTES];
+    CONST char*		value[HTML_A_ATTRIBUTES];
     
     {
     	int i;
     	for(i=0; i < HTML_A_ATTRIBUTES; i++)
 	    present[i] = (i == HTML_A_HREF);
     }
-    value[HTML_A_HREF] = href;
-    (*targetClass.start_element)(target, HTML_A, present, value, 0);
+    ((CONST char **)value)[HTML_A_HREF] = href;
+    (*targetClass.start_element)(target, HTML_A , present,
+    				 (CONST char **)value, 0);
 }
 
 /*      Start link element
 **      ------------------
 */
-PRIVATE void start_link ARGS2(char *,  href, char *, rev)
+PRIVATE void start_link ARGS2(CONST char *,  href, CONST char *, rev)
 {
     BOOL                present[HTML_LINK_ATTRIBUTES];
-    char*         	value[HTML_LINK_ATTRIBUTES];
+    CONST char*         value[HTML_LINK_ATTRIBUTES];
    
     {
         int i;
         for(i=0; i < HTML_LINK_ATTRIBUTES; i++)
             present[i] = (i == HTML_LINK_HREF || i == HTML_LINK_REV);
     }
-    value[HTML_LINK_HREF] = href;
-    value[HTML_LINK_REV]  = rev;
-    (*targetClass.start_element)(target, HTML_LINK, present, value, 0);
+    ((CONST char **)value)[HTML_LINK_HREF] = href;
+    ((CONST char **)value)[HTML_LINK_REV]  = rev;
+    (*targetClass.start_element)(target, HTML_LINK, present,
+				 (CONST char **)value, 0);
 }
 
 /*      Start list element
@@ -665,16 +667,17 @@ PRIVATE void start_link ARGS2(char *,  href, char *, rev)
 PRIVATE void start_list ARGS1(int, seqnum)
 {
     BOOL                present[HTML_OL_ATTRIBUTES];
-    char*         	value[HTML_OL_ATTRIBUTES];
+    CONST char*         value[HTML_OL_ATTRIBUTES];
     char SeqNum[20];
     int i;
    
     for (i = 0; i < HTML_OL_ATTRIBUTES; i++)
         present[i] = (i == HTML_OL_SEQNUM || i == HTML_OL_START);
     sprintf(SeqNum, "%d", seqnum);
-    value[HTML_OL_SEQNUM] = SeqNum;
-    value[HTML_OL_START]  = SeqNum;
-    (*targetClass.start_element)(target, HTML_OL, present, value, 0);
+    ((CONST char **)value)[HTML_OL_SEQNUM] = SeqNum;
+    ((CONST char **)value)[HTML_OL_START]  = SeqNum;
+    (*targetClass.start_element)(target, HTML_OL , present,
+				 (CONST char **)value, 0);
 }
 
 /*	Paste in an Anchor
diff --git a/WWW/Library/Implementation/HTPlain.c b/WWW/Library/Implementation/HTPlain.c
index 8c177625..a76616e5 100644
--- a/WWW/Library/Implementation/HTPlain.c
+++ b/WWW/Library/Implementation/HTPlain.c
@@ -30,7 +30,7 @@
 extern HTStyleSheet * styleSheet;
 
 extern int current_char_set;
-extern char * LYchar_set_names[];
+extern CONST char * LYchar_set_names[];
 extern CONST char **LYCharSets[];
 #ifdef EXP_CHARTRANS
 extern int LYlowest_eightbit[];
@@ -299,9 +299,9 @@ PRIVATE void HTPlain_write ARGS3(HTStream *, me, CONST char*, s, int, l)
 	    }
 	}
 	
-	if (me->T.trans_to_uni && (unsign_c >= 127 ||
-				   (unsign_c < 32 && unsign_c != 0 &&
-				    me->T.trans_C0_to_uni))) {
+	if (me->T.trans_to_uni &&
+	    (unsign_c >= 127 ||
+	     (unsign_c < 32 && unsign_c != 0 && me->T.trans_C0_to_uni))) {
 	    unsign_c = UCTransToUni(c_p, me->in_char_set);
 	    if (unsign_c > 0) {
 		if (unsign_c < 256) {
@@ -397,9 +397,9 @@ PRIVATE void HTPlain_write ARGS3(HTStream *, me, CONST char*, s, int, l)
 			uck, (char)uck);
 	    }
 	    HText_appendCharacter(me->text, (char)(uck & 0xff));
-	} else if (chk && (uck == -4 ||
-			    (me->T.repl_translated_C0 &&
-			     uck > 0 && uck <32)) &&
+	} else if (chk &&
+		   (uck == -4 ||
+		    (me->T.repl_translated_C0 && uck > 0 && uck < 32)) &&
 		   /*
 		   **  Not found; look for replacement string.
 		   */
diff --git a/WWW/Library/Implementation/HTTCP.c b/WWW/Library/Implementation/HTTCP.c
index 06c9ff03..572cd36b 100644
--- a/WWW/Library/Implementation/HTTCP.c
+++ b/WWW/Library/Implementation/HTTCP.c
@@ -264,7 +264,7 @@ PUBLIC unsigned int HTCardinal ARGS3(
 	char **,	pp,
 	unsigned int,	max_value)
 {
-    int n;
+    unsigned int n;
     if ((**pp<'0') || (**pp>'9')) {	    /* Null string is error */
 	*pstatus = -3;  /* No number where one expeceted */
 	return 0;
diff --git a/WWW/Library/Implementation/HTTP.c b/WWW/Library/Implementation/HTTP.c
index d5aef1e8..9c08a170 100644
--- a/WWW/Library/Implementation/HTTP.c
+++ b/WWW/Library/Implementation/HTTP.c
@@ -105,7 +105,7 @@ PUBLIC int HTLoadHTTP ARGS4 (
 	HTStream*,		sink)
 {
   int s;			/* Socket number for returned data */
-  char *url = (char *)arg;	/* The URL which get_physical() returned */
+  CONST char *url = arg;	/* The URL which get_physical() returned */
   char *command = NULL;		/* The whole command */
   char *eol;			/* End of line if found */
   char *start_of_data;		/* Start of body of reply */
@@ -1307,7 +1307,6 @@ Cookie2_continuation:
 	        if (TOUPPER(*cp) != 'L') {
 		    cp++;
 	        } else if (!strncasecomp(cp, "Location:", 9)) {
-		    char *value = NULL;
 	            char *cp1 = NULL, *cp2 = NULL;
 	            cp += 9;
 		    /*
diff --git a/WWW/Library/Implementation/SGML.c b/WWW/Library/Implementation/SGML.c
index 139be069..e1f56166 100644
--- a/WWW/Library/Implementation/SGML.c
+++ b/WWW/Library/Implementation/SGML.c
@@ -284,14 +284,14 @@ PRIVATE BOOL put_special_unicodes ARGS2(
 	long, code)
 {
     if (code == 160) {
-	PUTC(1);
+	PUTC(HT_NON_BREAK_SPACE);
     } else  if (code==173) {
-	PUTC(7);
+	PUTC(LY_SOFT_HYPHEN);
     } else if (code == 8194 || code == 8195 || code == 8201) {
 		        /*
 			**  ensp, emsp or thinsp.
 			*/
-	PUTC(2);
+	PUTC(HT_EM_SPACE);
     } else if (code == 8211 || code == 8212) {
 		        /*
 			**  ndash or mdash.
@@ -350,17 +350,17 @@ PRIVATE void handle_entity ARGS2(
     **  filters instead of using HTML_put_string(). - FM
     */
     if (!strcmp(s, "nbsp")) {
-        PUTC(1);
+        PUTC(HT_NON_BREAK_SPACE);
 	FoundEntity = TRUE;
 	return;
     }
     if (!strcmp(s, "ensp") || !strcmp(s, "emsp") || !strcmp(s, "thinsp")) {
-        PUTC(2);
+        PUTC(HT_EM_SPACE);
 	FoundEntity = TRUE;
 	return;
     }
     if (!strcmp(s, "shy")) {
-        PUTC(7);
+        PUTC(LY_SOFT_HYPHEN);
 	FoundEntity = TRUE;
 	return;
     }
@@ -810,7 +810,7 @@ PRIVATE void start_element ARGS1(
     	context->target,
 	new_tag - context->dtd->tags,
 	context->present,
-	context->value,  /* coerce type for think c */
+	(CONST char**) context->value,  /* coerce type for think c */
 	(char **)&context->include);
     if (new_tag->contents != SGML_EMPTY) {		/* i.e. tag not empty */
 	HTElement * N = (HTElement *)malloc(sizeof(HTElement));
@@ -977,7 +977,7 @@ PUBLIC void SGML_character ARGS2(
     HTChunk	*string = 	context->string;
     CONST char * EntityName;
     extern int current_char_set;
-    extern char *LYchar_set_names[];
+    extern CONST char *LYchar_set_names[];
     extern CONST char * HTMLGetEntityName PARAMS((int i));
 
 #ifdef EXP_CHARTRANS
@@ -1086,7 +1086,9 @@ PUBLIC void SGML_character ARGS2(
 	goto top1;
     } else if (unsign_c < 32 && unsign_c != 0 &&
 	       context->T.trans_C0_to_uni) {
-	/* This else if may be too ugly to keep... - kw */
+	/*
+	**  This else if may be too ugly to keep. - KW
+	*/
 	if (context->T.trans_from_uni &&
 	    (((clong = UCTransToUni(c, context->in_char_set)) >= 32) ||
 	     (context->T.transp &&
@@ -1123,7 +1125,7 @@ PUBLIC void SGML_character ARGS2(
 		StrAllocCat(context->recover, replace_buf + 1);
 	    }
 	    goto top0a;
-	} /* next line end of ugly stuff for C0 - kw */
+	} /*  Next line end of ugly stuff for C0. - KW */
     } else {
 	goto top0a;
     }
@@ -1233,14 +1235,14 @@ top1:
 	*/
 	} else if (unsign_c == 160 &&
 		   !(PASS8859SPECL || HTCJK != NOCJK)) {
-            PUTC(1);
+            PUTC(HT_NON_BREAK_SPACE);
 	/*
 	**  Convert 173 (shy) to Lynx special character if
 	**  neither HTPassHighCtrlRaw nor HTCJK is set. - FM
 	*/
 	} else if (unsign_c == 173 &&
 		   !(PASS8859SPECL || HTCJK != NOCJK)) {
-            PUTC(7);
+            PUTC(LY_SOFT_HYPHEN);
 
 #ifdef EXP_CHARTRANS
 	} else if (context->T.use_raw_char_in && saved_char_in) {
@@ -1266,13 +1268,13 @@ top1:
 	    PUTC(c);
 	} else if (chk && ((uck == -4 ||
 			    (context->T.repl_translated_C0 &&
-			     uck > 0 && uck <32))) &&
-		/*
-		**  Not found; look for replacement string.
-		*/
-		(uck = UCTransUniCharStr(replace_buf,60, clong,
-					 context->html_char_set, 0) >= 0 ) ) { 
-	      CONST char *p;
+			     uck > 0 && uck < 32))) &&
+		   /*
+		   **  Not found; look for replacement string. - KW
+		   */
+		   (uck = UCTransUniCharStr(replace_buf,60, clong,
+					    context->html_char_set,
+					    0) >= 0)) { 
 	    /*
 	    **  No further tests for valididy - assume that whoever
 	    **  defined replacement strings knew what she was doing.
@@ -1490,14 +1492,15 @@ top1:
 #ifdef EXP_CHARTRANS
 		if (value == 160 || value == 173) {
 		    /*
-		    **  We *always* should interpret this as Latin1 here!
+		    **  We *always* should interpret these as Latin1 here!
 		    **  Output the Lynx special character for nbsp and
 		    **  then recycle the terminator or break. - FM
 		    */
-		    if (value == 160)
-			PUTC(1);
-		    else	/* 173 */
-			PUTC(7);
+		    if (value == 160) {
+			PUTC(HT_NON_BREAK_SPACE);
+		    } else {
+			PUTC(LY_SOFT_HYPHEN);
+		    }
 		    string->size = 0;
 		    context->isHex = FALSE;
 		    context->state = S_text;
@@ -1510,21 +1513,26 @@ top1:
 		 */
 	      if ((uck = UCTransUniChar(value,current_char_set)) >= 32 &&
 		    uck < 256 &&
-		      (uck < 127 ||
-		        uck >= LYlowest_eightbit[context->html_char_set])
-		       ) {
-		  if (uck==160 && current_char_set==0) 
-		      PUTC(1); /* would only happen if some other unicode
-				  is mapped to Latin-1 160 */
-		  else if (uck==173 && current_char_set==0) 
-		      PUTC(7); /* would only happen if some other unicode
-				  is mapped to Latin-1 173 */
-		  else {
-		      PUTC(FROMASCII((char)uck));
-		  }
-	      } else if ((uck == -4 ||
+		    (uck < 127 ||
+		     uck >= LYlowest_eightbit[context->html_char_set])) {
+		    if (uck == 160 && current_char_set == 0) {
+			/*
+			**  Would only happen if some other unicode
+			**  is mapped to Latin-1 160.
+			*/
+			PUTC(HT_NON_BREAK_SPACE);
+		    } else if (uck == 173 && current_char_set == 0) {
+			/*
+			**  Would only happen if some other unicode
+			**  is mapped to Latin-1 173.
+			*/
+			PUTC(LY_SOFT_HYPHEN);
+		    } else {
+			PUTC(FROMASCII((char)uck));
+		    }
+		} else if ((uck == -4 ||
 			    (context->T.repl_translated_C0 &&
-			     uck > 0 && uck <32)) &&
+			     uck > 0 && uck < 32)) &&
 			   /*
 			   **  Not found; look for replacement string.
 			   */
@@ -1576,7 +1584,7 @@ top1:
 		        /*
 			**  ensp, emsp or thinsp. - FM
 			*/
-			PUTC(2);
+			PUTC(HT_EM_SPACE);
 		    } else if (value == 8211 || value == 8212) {
 		        /*
 			**  ndash or mdash. - FM
@@ -1606,12 +1614,12 @@ top1:
 		    /*
 		    **  Use Lynx special character for 160 (nbsp). - FM
 		    */
-		    PUTC(1);
+		    PUTC(HT_NON_BREAK_SPACE);
 		} else if (value == 173) {
 		    /*
 		    **  Use Lynx special character for 173 (shy) - FM
 		    */
-		    PUTC(7);
+		    PUTC(LY_SOFT_HYPHEN);
 		} else if (value < 161 || HTPassEightBitNum ||
 			   !strncmp(LYchar_set_names[current_char_set],
 			   	    "ISO Latin 1", 11)) {
@@ -1722,7 +1730,7 @@ top1:
 	    break;
         } else if (!string->size && (WHITE(c) || c == '=')) {/* <WHITE or <= */
 	    /*
-	    **  Recover the '<' and WHITE or '=' character. - FM, kw
+	    **  Recover the '<' and WHITE or '=' character. - FM & KW
 	    */
 	    context->state = S_text;
 	    PUTC('<');
diff --git a/WWW/Library/Implementation/SGML.h b/WWW/Library/Implementation/SGML.h
index 4a0fbd76..42524cbe 100644
--- a/WWW/Library/Implementation/SGML.h
+++ b/WWW/Library/Implementation/SGML.h
@@ -206,7 +206,7 @@ typedef struct _HTStructuredClass{
                 HTStructured*   me,
                 int             element_number,
                 CONST BOOL*     attribute_present,
-                char**    	attribute_value,
+                CONST char**    attribute_value,
 		char **		include));
                 
         void (*end_element) PARAMS((
diff --git a/WWW/Library/Implementation/UCDefs.h b/WWW/Library/Implementation/UCDefs.h
index 53d56439..bbfdc33a 100644
--- a/WWW/Library/Implementation/UCDefs.h
+++ b/WWW/Library/Implementation/UCDefs.h
@@ -5,7 +5,7 @@
 
 typedef struct _LYUCcharset {
     int UChndl;
-    char * MIMEname;
+    CONST char * MIMEname;
     int enc;
     int repertoire;
     int codepoints;