about summary refs log tree commit diff stats
path: root/WWW/Library
diff options
context:
space:
mode:
Diffstat (limited to 'WWW/Library')
-rw-r--r--WWW/Library/Implementation/HTFTP.c14
-rw-r--r--WWW/Library/Implementation/HTString.c8
-rw-r--r--WWW/Library/Implementation/HTString.h8
-rw-r--r--WWW/Library/Implementation/HTTCP.c8
-rw-r--r--WWW/Library/Implementation/HTVMS_WaisUI.c6
-rw-r--r--WWW/Library/Implementation/HTVMS_WaisUI.h4
-rw-r--r--WWW/Library/Implementation/LYLeaks.h4
-rw-r--r--WWW/Library/Implementation/dtd_util.c6
-rw-r--r--WWW/Library/Implementation/www_tcp.h17
9 files changed, 41 insertions, 34 deletions
diff --git a/WWW/Library/Implementation/HTFTP.c b/WWW/Library/Implementation/HTFTP.c
index dbe278f6..a993762a 100644
--- a/WWW/Library/Implementation/HTFTP.c
+++ b/WWW/Library/Implementation/HTFTP.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTFTP.c,v 1.137 2018/05/16 19:36:44 tom Exp $
+ * $LynxId: HTFTP.c,v 1.140 2018/12/27 10:24:31 tom Exp $
  *
  *			File Transfer Protocol (FTP) Client
  *			for a WorldWideWeb browser
@@ -233,11 +233,11 @@ static PortNumber port_number = FIRST_TCP_PORT;
 #endif /* POLL_PORTS */
 
 static BOOL have_socket = FALSE;	/* true if master_socket is valid */
-static unsigned master_socket;	/* Listening socket = invalid */
+static LYNX_FD master_socket;	/* Listening socket = invalid */
 
 static char port_command[255];	/* Command for setting the port */
 static fd_set open_sockets;	/* Mask of active channels */
-static unsigned num_sockets;	/* Number of sockets to scan */
+static LYNX_FD num_sockets;	/* Number of sockets to scan */
 static PortNumber passive_port;	/* Port server specified for data */
 
 #define NEXT_CHAR HTGetCharacter()	/* Use function in HTFormat.c */
@@ -1113,7 +1113,7 @@ static void set_master_socket(int value)
 {
     have_socket = (BOOLEAN) (value >= 0);
     if (have_socket)
-	master_socket = (unsigned) value;
+	master_socket = (LYNX_FD) value;
 }
 
 /*	Close Master (listening) socket
@@ -1129,7 +1129,7 @@ static int close_master_socket(void)
 	FD_CLR(master_socket, &open_sockets);
 
     status = NETCLOSE((int) master_socket);
-    CTRACE((tfp, "HTFTP: Closed master socket %u\n", master_socket));
+    CTRACE((tfp, "HTFTP: Closed master socket %u\n", (unsigned) master_socket));
 
     reset_master_socket();
 
@@ -1422,7 +1422,7 @@ static void set_years_and_date(void)
 	}
     }
     i++;
-    sprintf(date, "9999%02d%.2s", i, day);
+    sprintf(date, "9999%02d%.2s", i % 100, day);
     TheDate = atoi(date);
     LYStrNCpy(ThisYear, printable + 20, 4);
     sprintf(LastYear, "%d", (atoi(ThisYear) - 1) % 10000);
@@ -2586,7 +2586,7 @@ static void formatDate(char target[16], EntryInfo *entry)
 	}
     }
     i++;
-    sprintf(month, "%02d", i);
+    sprintf(month, "%02d", i % 100);
     strcat(target, month);
     StrNCat(target, &entry->date[4], 2);
     if (target[6] == ' ' || target[6] == HT_NON_BREAK_SPACE) {
diff --git a/WWW/Library/Implementation/HTString.c b/WWW/Library/Implementation/HTString.c
index 4a1ab43a..54d8207e 100644
--- a/WWW/Library/Implementation/HTString.c
+++ b/WWW/Library/Implementation/HTString.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTString.c,v 1.74 2018/02/15 01:54:27 tom Exp $
+ * $LynxId: HTString.c,v 1.75 2018/12/27 10:28:12 tom Exp $
  *
  *	Case-independent string comparison		HTString.c
  *
@@ -897,7 +897,7 @@ PUBLIC_IF_FIND_LEAKS char *StrAllocVsprintf(char **pstr,
 #ifdef HTSprintf		/* if hidden by LYLeaks stuff */
 #undef HTSprintf
 #endif
-char *HTSprintf(char **pstr, const char *fmt,...)
+char *HTSprintf(char **pstr, const char *fmt, ...)
 {
     char *result = 0;
     size_t inuse = 0;
@@ -924,7 +924,7 @@ char *HTSprintf(char **pstr, const char *fmt,...)
 #ifdef HTSprintf0		/* if hidden by LYLeaks stuff */
 #undef HTSprintf0
 #endif
-char *HTSprintf0(char **pstr, const char *fmt,...)
+char *HTSprintf0(char **pstr, const char *fmt, ...)
 {
     char *result = 0;
     va_list ap;
@@ -1330,7 +1330,7 @@ void HTSABFree(bstring **ptr)
  * Use this function to perform formatted sprintf's onto the end of a bstring.
  * The bstring may contain embedded nulls; the formatted portions must not.
  */
-bstring *HTBprintf(bstring **pstr, const char *fmt,...)
+bstring *HTBprintf(bstring **pstr, const char *fmt, ...)
 {
     bstring *result = 0;
     char *temp = 0;
diff --git a/WWW/Library/Implementation/HTString.h b/WWW/Library/Implementation/HTString.h
index a5ff20dc..e5ab99e8 100644
--- a/WWW/Library/Implementation/HTString.h
+++ b/WWW/Library/Implementation/HTString.h
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTString.h,v 1.39 2018/05/11 22:36:34 tom Exp $
+ * $LynxId: HTString.h,v 1.40 2018/12/27 10:27:01 tom Exp $
  *						String handling for libwww
  *                                         STRINGS
  *                                            
@@ -90,8 +90,8 @@ extern "C" {
     extern char *HTNextTok(char **pstr,
 			   const char *delims, const char *bracks, char *found);
 
-    extern char *HTSprintf(char **pstr, const char *fmt,...) GCC_PRINTFLIKE(2,3);
-    extern char *HTSprintf0(char **pstr, const char *fmt,...) GCC_PRINTFLIKE(2,3);
+    extern char *HTSprintf(char **pstr, const char *fmt, ...) GCC_PRINTFLIKE(2,3);
+    extern char *HTSprintf0(char **pstr, const char *fmt, ...) GCC_PRINTFLIKE(2,3);
 
 #if defined(LY_FIND_LEAKS)	/* private otherwise */
     extern char *StrAllocVsprintf(char **pstr,
@@ -156,7 +156,7 @@ extern "C" {
 #define BStrCat0(d,s)    HTSABCat0( &(d), s)
 #define BStrFree(d)      HTSABFree( &(d))
 
-    extern bstring *HTBprintf(bstring **pstr, const char *fmt,...) GCC_PRINTFLIKE(2,3);
+    extern bstring *HTBprintf(bstring **pstr, const char *fmt, ...) GCC_PRINTFLIKE(2,3);
 
     extern void trace_bstring(bstring *data);
     extern void trace_bstring2(const char *text, int size);
diff --git a/WWW/Library/Implementation/HTTCP.c b/WWW/Library/Implementation/HTTCP.c
index 4669efd4..de5b02c5 100644
--- a/WWW/Library/Implementation/HTTCP.c
+++ b/WWW/Library/Implementation/HTTCP.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTTCP.c,v 1.149 2018/05/16 19:48:49 tom Exp $
+ * $LynxId: HTTCP.c,v 1.151 2018/12/26 13:16:59 tom Exp $
  *
  *			Generic Communication Code		HTTCP.c
  *			==========================
@@ -1288,7 +1288,7 @@ BOOLEAN LYCheckHostByName(char *host)
  *		field is left unchanged in *soc_in.
  */
 #ifndef INET6
-static int HTParseInet(SockA * soc_in, const char *str)
+static int HTParseInet(SockA *soc_in, const char *str)
 {
     static const char *this_func = "HTParseInet";
 
@@ -2015,7 +2015,7 @@ int HTDoConnect(const char *url,
 		}
 		set_timeout(&select_timeout);
 		FD_ZERO(&writefds);
-		FD_SET((unsigned) *s, &writefds);
+		FD_SET((LYNX_FD) *s, &writefds);
 #ifdef SOCKS
 		if (socks_flag)
 		    ret = Rselect(*s + 1, NULL,
@@ -2292,7 +2292,7 @@ int HTDoRead(int fildes,
 	do {
 	    set_timeout(&select_timeout);
 	    FD_ZERO(&readfds);
-	    FD_SET((unsigned) fildes, &readfds);
+	    FD_SET((LYNX_FD) fildes, &readfds);
 #ifdef SOCKS
 	    if (socks_flag)
 		ret = Rselect(fildes + 1,
diff --git a/WWW/Library/Implementation/HTVMS_WaisUI.c b/WWW/Library/Implementation/HTVMS_WaisUI.c
index 6e127517..e74ab0ae 100644
--- a/WWW/Library/Implementation/HTVMS_WaisUI.c
+++ b/WWW/Library/Implementation/HTVMS_WaisUI.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTVMS_WaisUI.c,v 1.19 2013/05/03 20:51:49 tom Exp $
+ * $LynxId: HTVMS_WaisUI.c,v 1.20 2018/12/27 10:28:12 tom Exp $
  *								HTVMS_WAISUI.c
  *
  *	Adaptation for Lynx by F.Macrides (macrides@sci.wfeb.edu)
@@ -1484,7 +1484,7 @@ long anyToLong(any *a)
 
 #define bitsPerByte	8
 
-bit_map *makeBitMap(unsigned long numBits,...)
+bit_map *makeBitMap(unsigned long numBits, ...)
 /* construct and return a bitmap with numBits elements */
 {
     va_list ap;
@@ -2127,7 +2127,7 @@ static void exitAction(long error GCC_UNUSED)
 
 #define PANIC_HEADER "Fatal Error:  "
 
-void panic(char *format,...)
+void panic(char *format, ...)
 {
     va_list ap;			/* the variable arguments */
 
diff --git a/WWW/Library/Implementation/HTVMS_WaisUI.h b/WWW/Library/Implementation/HTVMS_WaisUI.h
index a2b2d07f..6ab702d6 100644
--- a/WWW/Library/Implementation/HTVMS_WaisUI.h
+++ b/WWW/Library/Implementation/HTVMS_WaisUI.h
@@ -22,7 +22,7 @@ extern "C" {
  *
  *----------------------------------------------------------------------*/
 
-    void panic(char *format,...);
+    void panic(char *format, ...);
 
 /*----------------------------------------------------------------------*/
 
@@ -310,7 +310,7 @@ extern "C" {
     char *writeString(char *s, data_tag tag, char *buffer, long *len);
     char *readString(char **s, char *buffer);
 
-    bit_map *makeBitMap(unsigned long numBits,...);
+    bit_map *makeBitMap(unsigned long numBits, ...);
 
     void freeBitMap(bit_map *bm);
     boolean bitAtPos(unsigned long pos, bit_map *bm);
diff --git a/WWW/Library/Implementation/LYLeaks.h b/WWW/Library/Implementation/LYLeaks.h
index e75fd6da..2139fa38 100644
--- a/WWW/Library/Implementation/LYLeaks.h
+++ b/WWW/Library/Implementation/LYLeaks.h
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYLeaks.h,v 1.17 2018/03/30 00:35:10 tom Exp $
+ * $LynxId: LYLeaks.h,v 1.18 2018/12/27 10:27:01 tom Exp $
  */
 #ifndef __LYLEAKS_H
 /*
@@ -296,7 +296,7 @@ extern "C" {
  * Trick to get tracking of var arg functions without relying on var arg
  * preprocessor macros:
  */
-    typedef char *HTSprintflike(char **, const char *,...);
+    typedef char *HTSprintflike(char **, const char *, ...);
     extern HTSprintflike *Get_htsprintf_fn(const char *cp_File,
 					   const short ssi_Line);
     extern HTSprintflike *Get_htsprintf0_fn(const char *cp_File,
diff --git a/WWW/Library/Implementation/dtd_util.c b/WWW/Library/Implementation/dtd_util.c
index 0badcbd5..3301d819 100644
--- a/WWW/Library/Implementation/dtd_util.c
+++ b/WWW/Library/Implementation/dtd_util.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: dtd_util.c,v 1.78 2015/12/13 23:22:17 tom Exp $
+ * $LynxId: dtd_util.c,v 1.79 2018/12/27 10:28:12 tom Exp $
  *
  * Given a SGML_dtd structure, write a corresponding flat file, or "C" source.
  * Given the flat-file, write the "C" source.
@@ -177,9 +177,9 @@ static SGMLContent s2SGMLContent(const char *value)
     return result;
 }
 
-static void PrintF(FILE *, int, const char *,...) GCC_PRINTFLIKE(3, 4);
+static void PrintF(FILE *, int, const char *, ...) GCC_PRINTFLIKE(3, 4);
 
-static void PrintF(FILE *output, int width, const char *fmt,...)
+static void PrintF(FILE *output, int width, const char *fmt, ...)
 {
     char buffer[BUFSIZ];
     va_list ap;
diff --git a/WWW/Library/Implementation/www_tcp.h b/WWW/Library/Implementation/www_tcp.h
index 8a081a5a..ef754c82 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.59 2018/05/16 20:31:43 tom Exp $
+ * $LynxId: www_tcp.h,v 1.61 2018/12/26 12:30:14 tom Exp $
  *
                                    SYSTEM DEPENDENCIES
 
@@ -313,7 +313,14 @@ extern int ws_netread(int fd, char *buf, int len);
 
 #define INCLUDES_DONE
 #define TCP_INCLUDES_DONE
-#endif /* WINDOWS */
+
+#define LYNX_FD	SOCKET		/* WINSOCK uses an unsigned value for FD_SET, etc */
+
+#else
+
+#define LYNX_FD	int		/* POSIX says FD_SET descriptor is int */
+
+#endif				/* WINDOWS */
 
 /*
 
@@ -343,7 +350,7 @@ VAX/VMS
 #ifdef UCX
 #undef IOCTL
 #define IOCTL(s,cmd,arg)	HTioctl(s,cmd,arg)
-#endif /* UCX */
+#endif				/* UCX */
 
 #ifdef WIN_TCP
 #undef SOCKET_READ
@@ -355,7 +362,7 @@ VAX/VMS
 #undef IOCTL
 #define IOCTL(a,b,c) -1		/* disables ioctl function            */
 #define NO_IOCTL		/* flag to check if ioctl is disabled */
-#endif /* WIN_TCP */
+#endif				/* WIN_TCP */
 
 #ifdef CMU_TCP
 #undef SOCKET_READ
@@ -366,7 +373,7 @@ VAX/VMS
 #define NETREAD(s,b,l)     (cmu_get_sdc((s)) != 0 ? HTDoRead((s),(b),(l)) : read((s),(b),(l)))
 #define NETWRITE(s,b,l)    (cmu_get_sdc((s)) != 0 ? cmu_write((s),(b),(l)) : write((s),(b),(l)))
 #define NETCLOSE(s)        (cmu_get_sdc((s)) != 0 ? cmu_close((s)) : close((s)))
-#endif /* CMU_TCP */
+#endif				/* CMU_TCP */
 
 #ifdef MULTINET
 #undef NETCLOSE