about summary refs log tree commit diff stats
path: root/WWW
diff options
context:
space:
mode:
Diffstat (limited to 'WWW')
-rw-r--r--WWW/Library/Implementation/HTAABrow.c12
-rw-r--r--WWW/Library/Implementation/HTAccess.c6
-rw-r--r--WWW/Library/Implementation/HTAtom.c2
-rw-r--r--WWW/Library/Implementation/HTFTP.c10
-rw-r--r--WWW/Library/Implementation/HTFile.c10
-rw-r--r--WWW/Library/Implementation/HTFinger.c4
-rw-r--r--WWW/Library/Implementation/HTFormat.c4
-rw-r--r--WWW/Library/Implementation/HTGopher.c10
-rw-r--r--WWW/Library/Implementation/HTMIME.c4
-rw-r--r--WWW/Library/Implementation/HTMLGen.c10
-rw-r--r--WWW/Library/Implementation/HTNews.c6
-rw-r--r--WWW/Library/Implementation/HTParse.c4
-rw-r--r--WWW/Library/Implementation/HTTCP.c8
-rw-r--r--WWW/Library/Implementation/HTTP.c35
-rw-r--r--WWW/Library/Implementation/HTUU.c10
-rw-r--r--WWW/Library/Implementation/HTUU.h2
-rw-r--r--WWW/Library/Implementation/SGML.c6
-rw-r--r--WWW/Library/Implementation/www_tcp.h13
18 files changed, 92 insertions, 64 deletions
diff --git a/WWW/Library/Implementation/HTAABrow.c b/WWW/Library/Implementation/HTAABrow.c
index 6348da90..e67c58ab 100644
--- a/WWW/Library/Implementation/HTAABrow.c
+++ b/WWW/Library/Implementation/HTAABrow.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTAABrow.c,v 1.32 2010/06/17 00:37:22 tom Exp $
+ * $LynxId: HTAABrow.c,v 1.33 2010/09/22 00:54:01 tom Exp $
  *
  * MODULE							HTAABrow.c
  *		BROWSER SIDE ACCESS AUTHORIZATION MODULE
@@ -142,9 +142,9 @@ static int proxy_portnumber = 80;
 void HTAAForwardAuth_set(const char *scheme_name,
 			 const char *scheme_specifics)
 {
-    unsigned len = (20
-		    + (scheme_name ? strlen(scheme_name) : 0)
-		    + (scheme_specifics ? strlen(scheme_specifics) : 0));
+    size_t len = (20
+		  + (scheme_name ? strlen(scheme_name) : 0)
+		  + (scheme_specifics ? strlen(scheme_specifics) : 0));
 
     FREE(HTAAForwardAuth);
     if ((HTAAForwardAuth = typecallocn(char, len)) == 0)
@@ -567,7 +567,7 @@ static char *compose_auth_string(HTAAScheme scheme, HTAASetup * setup, BOOL IsPr
 {
     char *cleartext = NULL;	/* Cleartext presentation */
     char *ciphertext = NULL;	/* Encrypted presentation */
-    unsigned len;
+    size_t len;
     char *msg = NULL;
     char *username = NULL;
     char *password = NULL;
@@ -821,7 +821,7 @@ char *HTAA_composeAuth(const char *hostname,
     char *auth_string;
     BOOL retry;
     HTAAScheme scheme;
-    unsigned len;
+    size_t len;
 
     /*
      * Setup atexit() freeing if not done already.  - FM
diff --git a/WWW/Library/Implementation/HTAccess.c b/WWW/Library/Implementation/HTAccess.c
index 7bb180f8..3cc6ff03 100644
--- a/WWW/Library/Implementation/HTAccess.c
+++ b/WWW/Library/Implementation/HTAccess.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTAccess.c,v 1.69 2010/04/29 09:30:51 tom Exp $
+ * $LynxId: HTAccess.c,v 1.70 2010/09/21 23:57:37 tom Exp $
  *
  *		Access Manager					HTAccess.c
  *		==============
@@ -342,9 +342,9 @@ BOOL override_proxy(const char *addr)
 
 	if (colon) {
 	    templ_port = atoi(colon + 1);
-	    t_len = colon - no_proxy;
+	    t_len = (int) (colon - no_proxy);
 	} else {
-	    t_len = end - no_proxy;
+	    t_len = (int) (end - no_proxy);
 	}
 
 	if ((!templ_port || templ_port == port) &&
diff --git a/WWW/Library/Implementation/HTAtom.c b/WWW/Library/Implementation/HTAtom.c
index 0d07308c..06775832 100644
--- a/WWW/Library/Implementation/HTAtom.c
+++ b/WWW/Library/Implementation/HTAtom.c
@@ -40,7 +40,7 @@ static void free_atoms(void);
 
 HTAtom *HTAtom_for(const char *string)
 {
-    int hash;
+    size_t hash;
     HTAtom *a;
 
     /* First time around, clear hash table
diff --git a/WWW/Library/Implementation/HTFTP.c b/WWW/Library/Implementation/HTFTP.c
index c8420ba0..dbbafcdc 100644
--- a/WWW/Library/Implementation/HTFTP.c
+++ b/WWW/Library/Implementation/HTFTP.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTFTP.c,v 1.94 2010/06/17 00:44:49 tom Exp $
+ * $LynxId: HTFTP.c,v 1.95 2010/09/22 00:53:07 tom Exp $
  *
  *			File Transfer Protocol (FTP) Client
  *			for a WorldWideWeb browser
@@ -466,7 +466,7 @@ static int write_cmd(const char *cmd)
 	    }
 	}
 #endif /* NOT_ASCII */
-	status = NETWRITE(control->socket, cmd, (unsigned) strlen(cmd));
+	status = (int) NETWRITE(control->socket, cmd, (unsigned) strlen(cmd));
 	if (status < 0) {
 	    CTRACE((tfp,
 		    "HTFTP: Error %d sending command: closing socket %d\n",
@@ -1850,7 +1850,9 @@ static void parse_vms_dir_entry(char *line,
 	LYLowerCase(entry_info->filename);
 	i = (int) strlen(entry_info->filename);
     } else {
-	i = ((strstr(entry_info->filename, "READ") - entry_info->filename) + 4);
+	i = (int) ((strstr(entry_info->filename, "READ")
+		    - entry_info->filename)
+		   + 4);
 	if (!strncmp(&entry_info->filename[i], "ME", 2)) {
 	    i += 2;
 	    while (entry_info->filename[i] && entry_info->filename[i] != '.') {
@@ -3106,7 +3108,7 @@ static int read_directory(HTParentAnchor *parent,
 		} else if (ic == EOF) {
 		    break;	/* End of file */
 		} else {
-		    HTChunkPutc(chunk, ic);
+		    HTChunkPutc(chunk, UCH(ic));
 		}
 	    }
 	    HTChunkTerminate(chunk);
diff --git a/WWW/Library/Implementation/HTFile.c b/WWW/Library/Implementation/HTFile.c
index e9e1543e..d1a006eb 100644
--- a/WWW/Library/Implementation/HTFile.c
+++ b/WWW/Library/Implementation/HTFile.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTFile.c,v 1.123 2010/06/17 00:27:47 tom Exp $
+ * $LynxId: HTFile.c,v 1.124 2010/09/22 00:12:36 tom Exp $
  *
  *			File Access				HTFile.c
  *			===========
@@ -307,7 +307,7 @@ static void LYListFmtParse(const char *fmtstr,
 	    *buf = '\0';
 #ifdef S_IFLNK
 	    if (c != 'A' && S_ISLNK(data->file_info.st_mode) &&
-		(len = readlink(file, tmp, sizeof(tmp) - 1)) >= 0) {
+		(len = (int) readlink(file, tmp, sizeof(tmp) - 1)) >= 0) {
 		PUTS(" -> ");
 		tmp[len] = '\0';
 		PUTS(tmp);
@@ -1248,7 +1248,7 @@ CompressFileType HTCompressFileType(const char *filename,
 	ftype -= 2;
     }
 
-    *rootlen = (ftype - filename);
+    *rootlen = (int) (ftype - filename);
 
     CTRACE((tfp, "HTCompressFileType(%s) returns %d:%s\n",
 	    filename, (int) result, filename + *rootlen));
@@ -1875,7 +1875,7 @@ static int print_local_dir(DIR *dp, char *localname,
     STRUCT_DIRENT *dirbuf;
     char *pathname = NULL;
     char *tail = NULL;
-    char *p;
+    const char *p;
     char *tmpfilename = NULL;
     BOOL need_parent_link = FALSE;
     BOOL preformatted = FALSE;
@@ -2802,7 +2802,7 @@ int HTLoadFile(const char *addr,
 	    char *best_name = NULL;	/* Best dir entry so far */
 
 	    char *base = strrchr(localname, '/');
-	    unsigned baselen = 0;
+	    size_t baselen = 0;
 
 	    if (!base || base == localname) {
 		forget_multi = YES;
diff --git a/WWW/Library/Implementation/HTFinger.c b/WWW/Library/Implementation/HTFinger.c
index 5567ed1d..ed5a6b20 100644
--- a/WWW/Library/Implementation/HTFinger.c
+++ b/WWW/Library/Implementation/HTFinger.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTFinger.c,v 1.25 2009/01/03 02:02:18 tom Exp $
+ * $LynxId: HTFinger.c,v 1.26 2010/09/22 00:46:26 tom Exp $
  *
  *			FINGER ACCESS				HTFinger.c
  *			=============
@@ -128,7 +128,7 @@ static int response(char *command,
     /* Send the command.
      */
     CTRACE((tfp, "HTFinger command to be sent: %s", command));
-    status = NETWRITE(finger_fd, (char *) command, (unsigned) length);
+    status = (int) NETWRITE(finger_fd, (char *) command, (unsigned) length);
     if (status < 0) {
 	CTRACE((tfp, "HTFinger: Unable to send command. Disconnecting.\n"));
 	NETCLOSE(finger_fd);
diff --git a/WWW/Library/Implementation/HTFormat.c b/WWW/Library/Implementation/HTFormat.c
index 10489450..367ddd4f 100644
--- a/WWW/Library/Implementation/HTFormat.c
+++ b/WWW/Library/Implementation/HTFormat.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTFormat.c,v 1.70 2010/06/17 00:25:03 tom Exp $
+ * $LynxId: HTFormat.c,v 1.71 2010/09/22 00:46:54 tom Exp $
  *
  *		Manage different file formats			HTFormat.c
  *		=============================
@@ -1176,7 +1176,7 @@ static int HTZzFileCopy(FILE *zzfp, HTStream *sink)
     for (;;) {
 	if (s.avail_in == 0) {
 	    s.next_in = (Bytef *) input_buffer;
-	    s.avail_in = fread(input_buffer, 1, INPUT_BUFFER_SIZE, zzfp);
+	    s.avail_in = (uInt) fread(input_buffer, 1, INPUT_BUFFER_SIZE, zzfp);
 	    len = (int) s.avail_in;
 	}
 	status = inflate(&s, flush);
diff --git a/WWW/Library/Implementation/HTGopher.c b/WWW/Library/Implementation/HTGopher.c
index e023a618..3851d471 100644
--- a/WWW/Library/Implementation/HTGopher.c
+++ b/WWW/Library/Implementation/HTGopher.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTGopher.c,v 1.46 2010/06/16 23:45:31 tom Exp $
+ * $LynxId: HTGopher.c,v 1.47 2010/09/22 00:50:23 tom Exp $
  *
  *			GOPHER ACCESS				HTGopher.c
  *			=============
@@ -263,7 +263,7 @@ static void parse_menu(const char *arg GCC_UNUSED,
 
 	} else {
 	    *p++ = '\0';	/* Terminate line */
-	    bytes += p - line;	/* add size */
+	    bytes += (int) (p - line);	/* add size */
 	    p = line;		/* Scan it to parse it */
 	    port = 0;		/* Flag "not parsed" */
 	    CTRACE((tfp, "HTGopher: Menu item: %s\n", line));
@@ -1490,7 +1490,7 @@ static int HTLoadCSO(const char *arg,
 	CTRACE((tfp, "' to socket %d\n", s));
     }
     _HTProgress(GOPHER_SENDING_CSO_REQUEST);
-    status = NETWRITE(s, BStrData(command), BStrLen(command));
+    status = (int) NETWRITE(s, BStrData(command), BStrLen(command));
     BStrFree(command);
     if (status < 0) {
 	CTRACE((tfp, "HTLoadCSO: Unable to send command.\n"));
@@ -1674,7 +1674,7 @@ static int HTLoadCSO(const char *arg,
 	trace_bstring(command);
 	CTRACE((tfp, "' to socket %d\n", s));
     }
-    status = NETWRITE(s, BStrData(command), BStrLen(command));
+    status = (int) NETWRITE(s, BStrData(command), BStrLen(command));
     BStrFree(command);
     if (status < 0) {
 	CTRACE((tfp, "HTLoadCSO: Unable to send command.\n"));
@@ -1885,7 +1885,7 @@ static int HTLoadGopher(const char *arg,
 
     _HTProgress(GOPHER_SENDING_REQUEST);
 
-    status = NETWRITE(s, command, (int) strlen(command));
+    status = (int) NETWRITE(s, command, (int) strlen(command));
     FREE(command);
     if (status < 0) {
 	CTRACE((tfp, "HTGopher: Unable to send command.\n"));
diff --git a/WWW/Library/Implementation/HTMIME.c b/WWW/Library/Implementation/HTMIME.c
index dc0b7bda..bbc7e2a6 100644
--- a/WWW/Library/Implementation/HTMIME.c
+++ b/WWW/Library/Implementation/HTMIME.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTMIME.c,v 1.73 2010/06/16 23:54:20 tom Exp $
+ * $LynxId: HTMIME.c,v 1.74 2010/09/22 00:42:30 tom Exp $
  *
  *			MIME Message Parse			HTMIME.c
  *			==================
@@ -2321,7 +2321,7 @@ static void HTmmdec_base64(char **t,
 	    if (!(p = strchr(HTmm64, s[j]))) {
 		return;
 	    }
-	    d = p - HTmm64;
+	    d = (int) (p - HTmm64);
 	    d <<= (3 - j) * 6;
 	    val += d;
 	}
diff --git a/WWW/Library/Implementation/HTMLGen.c b/WWW/Library/Implementation/HTMLGen.c
index 8beee26d..45f8eeef 100644
--- a/WWW/Library/Implementation/HTMLGen.c
+++ b/WWW/Library/Implementation/HTMLGen.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTMLGen.c,v 1.30 2010/05/02 22:26:02 tom Exp $
+ * $LynxId: HTMLGen.c,v 1.31 2010/09/22 00:43:23 tom Exp $
  *
  *		HTML Generator
  *		==============
@@ -98,7 +98,7 @@ static void HTMLGen_flush(HTStructured * me)
 {
     (*me->targetClass.put_block) (me->target,
 				  me->buffer,
-				  me->write_pointer - me->buffer);
+				  (int) (me->write_pointer - me->buffer));
     me->write_pointer = me->buffer;
     flush_breaks(me);
     me->cleanness = 0;
@@ -220,7 +220,7 @@ static void HTMLGen_put_character(HTStructured * me, char c)
 	    strcpy(delims, ",;:.");	/* @@ english bias */
 	    p = strchr(delims, me->write_pointer[-2]);
 	    if (p)
-		new_cleanness = p - delims + 6;
+		new_cleanness = (int) (p - delims + 6);
 	    if (!me->in_attrval)
 		new_cleanness += 10;
 	}
@@ -242,8 +242,8 @@ static void HTMLGen_put_character(HTStructured * me, char c)
 	    me->line_break[me->cleanness][0] = '\n';
 	    (*me->targetClass.put_block) (me->target,
 					  me->buffer,
-					  me->line_break[me->cleanness] -
-					  me->buffer + 1);
+					  (int) (me->line_break[me->cleanness] -
+						 me->buffer + 1));
 	    me->line_break[me->cleanness][0] = line_break_char;
 	    {			/* move next line in */
 		char *p = saved;
diff --git a/WWW/Library/Implementation/HTNews.c b/WWW/Library/Implementation/HTNews.c
index bc5825a4..c12196c0 100644
--- a/WWW/Library/Implementation/HTNews.c
+++ b/WWW/Library/Implementation/HTNews.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTNews.c,v 1.63 2010/06/17 00:10:46 tom Exp $
+ * $LynxId: HTNews.c,v 1.64 2010/09/22 00:51:25 tom Exp $
  *
  *			NEWS ACCESS				HTNews.c
  *			===========
@@ -312,7 +312,7 @@ static int response(char *command)
 	    status = NEWS_NETWRITE(s, ascii, length);
 	}
 #else
-	status = NEWS_NETWRITE(s, (char *) command, length);
+	status = (int) NEWS_NETWRITE(s, (char *) command, length);
 #endif /* NOT_ASCII */
 	if (status < 0) {
 	    CTRACE((tfp, "HTNews: Unable to send command. Disconnecting.\n"));
@@ -2697,7 +2697,7 @@ static int HTLoadNews(const char *arg,
 #endif /* USE_SSL */
 		HTInitInput(s);	/* set up buffering */
 		if (proxycmd[0]) {
-		    status = NEWS_NETWRITE(s, proxycmd, strlen(proxycmd));
+		    status = (int) NEWS_NETWRITE(s, proxycmd, (int) strlen(proxycmd));
 		    CTRACE((tfp,
 			    "HTNews: Proxy command returned status '%d'.\n",
 			    status));
diff --git a/WWW/Library/Implementation/HTParse.c b/WWW/Library/Implementation/HTParse.c
index 4f1f9378..60a9ec19 100644
--- a/WWW/Library/Implementation/HTParse.c
+++ b/WWW/Library/Implementation/HTParse.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTParse.c,v 1.62 2010/09/17 09:16:13 tom Exp $
+ * $LynxId: HTParse.c,v 1.63 2010/09/22 00:50:56 tom Exp $
  *
  *		Parse HyperText Document Address		HTParse.c
  *		================================
@@ -222,7 +222,7 @@ char *HTParsePort(char *host, int *portp)
 		if (brackets == 0 && isdigit(UCH(*host))) {
 		    char *next = NULL;
 
-		    *portp = strtol(host, &next, 10);
+		    *portp = (int) strtol(host, &next, 10);
 		    if (next != 0 && next != host && *next == '\0') {
 			result = (host - 1);
 			CTRACE((tfp, "HTParsePort %d\n", *portp));
diff --git a/WWW/Library/Implementation/HTTCP.c b/WWW/Library/Implementation/HTTCP.c
index 3be960dc..a8f5611d 100644
--- a/WWW/Library/Implementation/HTTCP.c
+++ b/WWW/Library/Implementation/HTTCP.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTTCP.c,v 1.101 2010/06/17 00:32:51 tom Exp $
+ * $LynxId: HTTCP.c,v 1.102 2010/09/22 00:40:25 tom Exp $
  *
  *			Generic Communication Code		HTTCP.c
  *			==========================
@@ -632,14 +632,14 @@ extern int h_errno;
  * struct via a pipe in one read -TD
  */
 #ifdef NSL_FORK
-static unsigned readit(int fd, char *buffer, unsigned length)
+static unsigned readit(int fd, char *buffer, size_t length)
 {
     unsigned result = 0;
 
     while (length != 0) {
 	unsigned got = (unsigned) read(fd, buffer, length);
 
-	if (got != 0) {
+	if ((int) got > 0) {
 	    result += got;
 	    buffer += got;
 	    length -= got;
@@ -2080,7 +2080,7 @@ int HTDoRead(int fildes,
 	}
 #else
 #ifdef UNIX
-	while ((result = SOCKET_READ(fildes, buf, nbyte)) == -1) {
+	while ((result = (int) SOCKET_READ(fildes, buf, nbyte)) == -1) {
 	    if (errno == EINTR)
 		continue;
 #ifdef ERESTARTSYS
diff --git a/WWW/Library/Implementation/HTTP.c b/WWW/Library/Implementation/HTTP.c
index 3d2fb2ff..35545fd6 100644
--- a/WWW/Library/Implementation/HTTP.c
+++ b/WWW/Library/Implementation/HTTP.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTTP.c,v 1.117 2010/06/20 22:11:16 tom Exp $
+ * $LynxId: HTTP.c,v 1.118 2010/09/22 00:35:50 tom Exp $
  *
  * HyperText Tranfer Protocol	- Client implementation		HTTP.c
  * ==========================
@@ -190,11 +190,21 @@ void HTSSLInitPRNG(void)
 }
 
 #define HTTP_NETREAD(sock, buff, size, handle) \
-	(handle ? SSL_read(handle, buff, size) : NETREAD(sock, buff, size))
+	(handle \
+	 ? SSL_read(handle, buff, size) \
+	 : NETREAD(sock, buff, size))
+
 #define HTTP_NETWRITE(sock, buff, size, handle) \
-	(handle ? SSL_write(handle, buff, size) : NETWRITE(sock, buff, size))
+	(handle \
+	 ? SSL_write(handle, buff, size) \
+	 : NETWRITE(sock, buff, size))
+
 #define HTTP_NETCLOSE(sock, handle)  \
-	{ (void)NETCLOSE(sock); if (handle) SSL_free(handle); SSL_handle = handle = NULL; }
+	{ (void)NETCLOSE(sock); \
+	  if (handle) \
+	      SSL_free(handle); \
+	  SSL_handle = handle = NULL; \
+	}
 
 #else
 #define HTTP_NETREAD(a, b, c, d)   NETREAD(a, b, c)
@@ -495,7 +505,7 @@ static int HTLoadHTTP(const char *arg,
 		      HTFormat format_out,
 		      HTStream *sink)
 {
-    static char *empty = "";
+    static char empty[1];
     int s;			/* Socket number for returned data */
     const char *url = arg;	/* The URL which get_physical() returned */
     bstring *command = NULL;	/* The whole command */
@@ -1433,7 +1443,10 @@ static int HTLoadHTTP(const char *arg,
 	    *p2 = TOASCII(*p2);
     }
 #endif /* NOT_ASCII */
-    status = HTTP_NETWRITE(s, BStrData(command), BStrLen(command), handle);
+    status = (int) HTTP_NETWRITE(s,
+				 BStrData(command),
+				 BStrLen(command),
+				 handle);
     BStrFree(command);
     FREE(linebuf);
     if (status <= 0) {
@@ -1721,8 +1734,14 @@ static int HTLoadHTTP(const char *arg,
 	     * anything else) when !eol.  Otherwise, set the value of length to
 	     * what we have beyond eol (i.e., beyond the status line).  - FM
 	     */
-	    start_of_data = eol ? eol + 1 : empty;
-	    length = eol ? length - (start_of_data - line_buffer) : 0;
+	    if (eol != 0) {
+		start_of_data = (eol + 1);
+	    } else {
+		start_of_data = empty;
+	    }
+	    length = (eol
+		      ? length - (int) (start_of_data - line_buffer)
+		      : 0);
 
 	    /*
 	     * Trim trailing spaces in line_buffer so that we can use it in
diff --git a/WWW/Library/Implementation/HTUU.c b/WWW/Library/Implementation/HTUU.c
index f23d85bd..4848cce5 100644
--- a/WWW/Library/Implementation/HTUU.c
+++ b/WWW/Library/Implementation/HTUU.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTUU.c,v 1.10 2010/04/29 23:57:11 tom Exp $
+ * $LynxId: HTUU.c,v 1.11 2010/09/21 23:55:12 tom Exp $
  *
  * MODULE							HTUU.c
  *			UUENCODE AND UUDECODE
@@ -69,14 +69,14 @@ static unsigned char pr2six[256];
  *             Returns the number of ASCII characters in "bufcoded".
  */
 int HTUU_encode(unsigned char *bufin,
-		unsigned int nbytes,
+		size_t nbytes,
 		char *bufcoded)
 {
 /* ENC is the basic 1 character encoding function to make a char printing */
 #define ENC(c) six2pr[c]
 
     register char *outptr = bufcoded;
-    unsigned int i;
+    size_t i;
 
     /* This doesn't seem to be needed (AL):   register unsigned char *inptr  = bufin; */
 
@@ -101,7 +101,7 @@ int HTUU_encode(unsigned char *bufin,
 	outptr[-2] = '=';
     }
     *outptr = '\0';
-    return (outptr - bufcoded);
+    return (int) (outptr - bufcoded);
 }
 
 /*--- function HTUU_decode ------------------------------------------------
@@ -182,7 +182,7 @@ int HTUU_decode(char *bufcoded,
      */
     bufin = bufcoded;
     while (pr2six[UCH(*(bufin++))] <= MAXVAL) ;
-    nprbytes = bufin - bufcoded - 1;
+    nprbytes = (int) (bufin - bufcoded - 1);
     nbytesdecoded = ((nprbytes + 3) / 4) * 3;
     if (nbytesdecoded > outbufsize) {
 	nprbytes = (outbufsize * 4) / 3;
diff --git a/WWW/Library/Implementation/HTUU.h b/WWW/Library/Implementation/HTUU.h
index 1bd5e6e6..925d1f74 100644
--- a/WWW/Library/Implementation/HTUU.h
+++ b/WWW/Library/Implementation/HTUU.h
@@ -20,7 +20,7 @@
 extern "C" {
 #endif
     extern int HTUU_encode(unsigned char *bufin,
-			   unsigned int nbytes,
+			   size_t nbytes,
 			   char *bufcoded);
 
     extern int HTUU_decode(char *bufcoded,
diff --git a/WWW/Library/Implementation/SGML.c b/WWW/Library/Implementation/SGML.c
index 0bd56de8..22132597 100644
--- a/WWW/Library/Implementation/SGML.c
+++ b/WWW/Library/Implementation/SGML.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: SGML.c,v 1.135 2010/06/18 09:59:35 tom Exp $
+ * $LynxId: SGML.c,v 1.136 2010/09/22 00:53:49 tom Exp $
  *
  *			General SGML Parser code		SGML.c
  *			========================
@@ -4281,7 +4281,9 @@ static void SGML_character(HTStream *context, char c_in)
 		    c = UCH((clong & 0xff));
 		}
 		saved_char_in = '\0';
-		context->include_index = puni - context->active_include + 1;
+		context->include_index = (int) (puni
+						- context->active_include
+						+ 1);
 		goto top1;
 	    } else {
 		/*
diff --git a/WWW/Library/Implementation/www_tcp.h b/WWW/Library/Implementation/www_tcp.h
index de91b9e0..705c41ba 100644
--- a/WWW/Library/Implementation/www_tcp.h
+++ b/WWW/Library/Implementation/www_tcp.h
@@ -1,5 +1,5 @@
 /*                System dependencies in the W3 library
- * $LynxId: www_tcp.h,v 1.42 2010/09/19 18:30:56 tom Exp $
+ * $LynxId: www_tcp.h,v 1.43 2010/09/22 00:35:17 tom Exp $
  *
                                    SYSTEM DEPENDENCIES
 
@@ -40,9 +40,14 @@ Default values
 
  */
 /* Default values of those: */
-#define NETCLOSE close		/* Routine to close a TCP-IP socket         */
-#define NETREAD  HTDoRead	/* Routine to read from a TCP-IP socket     */
-#define NETWRITE write		/* Routine to write to a TCP-IP socket      */
+	/* Routine to close a TCP-IP socket         */
+#define NETCLOSE close
+	/* Routine to read from a TCP-IP socket     */
+#define NETREAD(s,p,n) \
+	HTDoRead(s, p, (unsigned)(n))
+	/* Routine to write to a TCP-IP socket      */
+#define NETWRITE(s,p,n) \
+	write(s, p, (size_t)(n))
 #define SOCKET_READ read	/* normal socket read routine */
 #define IOCTL ioctl		/* normal ioctl routine for sockets */
 #define SOCKET_ERRNO errno	/* normal socket errno */