about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2010-11-01 22:19:09 -0400
committerThomas E. Dickey <dickey@invisible-island.net>2010-11-01 22:19:09 -0400
commit8729c355edc0e0a9763f7f9c091351a12a642f54 (patch)
treee1d2d942fdbb5367ac75f52e6cea68126befed09
parentf5cb2799ce40393d729dac32a29ab3eb86c71be9 (diff)
downloadlynx-snapshots-8729c355edc0e0a9763f7f9c091351a12a642f54.tar.gz
snapshot of project "lynx", label v2-8-8dev_6a
-rw-r--r--CHANGES9
-rw-r--r--PACKAGE/debian/changelog6
-rw-r--r--PACKAGE/lynx.spec4
-rw-r--r--WWW/Library/Implementation/HTAABrow.h43
-rw-r--r--WWW/Library/Implementation/HTAAUtil.h5
-rw-r--r--WWW/Library/Implementation/HTFTP.c4
-rw-r--r--WWW/Library/Implementation/HTFile.c5
-rw-r--r--WWW/Library/Implementation/HTFormat.h8
-rw-r--r--WWW/Library/Implementation/HTNews.c3
-rw-r--r--WWW/Library/Implementation/HTTCP.c5
-rw-r--r--WWW/Library/Implementation/HTUtils.h10
-rw-r--r--WWW/Library/Implementation/HTVMS_WaisUI.c6
-rw-r--r--WWW/Library/Implementation/LYexit.h22
-rw-r--r--WWW/Library/Implementation/tidy_tls.h5
-rw-r--r--WWW/Library/Implementation/www_tcp.h9
-rw-r--r--lib/dirent.c27
-rw-r--r--lib/dirent.h59
-rw-r--r--src/HTML.c6
-rw-r--r--src/LYCurses.c10
-rw-r--r--src/LYCurses.h4
-rw-r--r--src/LYForms.c4
-rw-r--r--src/LYLocal.c11
-rw-r--r--src/LYPrettySrc.c5
-rw-r--r--src/LYSession.c9
-rw-r--r--src/LYUtils.c10
-rw-r--r--src/TRSTable.c5
-rw-r--r--src/UCAuto.c4
-rw-r--r--src/UCdomap.c4
-rw-r--r--src/parsdate.h4
29 files changed, 164 insertions, 142 deletions
diff --git a/CHANGES b/CHANGES
index a7bc9a89..12613bcd 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,8 +1,15 @@
--- $LynxId: CHANGES,v 1.508 2010/10/04 08:19:06 tom Exp $
+-- $LynxId: CHANGES,v 1.511 2010/11/01 21:30:42 tom Exp $
 ===============================================================================
 Changes since Lynx 2.8 release
 ===============================================================================
 
+2010-11-01 (2.8.8dev.7)
+* restore \r to \n conversion in HTML_put_character(), broken in gcc warning
+  cleanup (report by FLWM) -TD
+* fix a double-free in make_argv() (report by FLWM) -TD
+* add a memset in RestoreSession(), fixes uninitialized memory reference for
+  the VLINK section -PBM
+
 2010-10-04 (2.8.8dev.6)
 * amend change for Debian #514897 to exclude XML documents (Debian #592883) -TD
 * use HTParsePort() in a few places, e.g., HTFinger.c, to allow for IPv6
diff --git a/PACKAGE/debian/changelog b/PACKAGE/debian/changelog
index 047e8ca3..bca8e272 100644
--- a/PACKAGE/debian/changelog
+++ b/PACKAGE/debian/changelog
@@ -1,3 +1,9 @@
+lynx-dev (2.8.8dev.7) unstable; urgency=low
+
+  * changes for dev.7
+
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Mon, 01 Nov 2010 17:32:06 -0400
+
 lynx-dev (2.8.8dev.6) unstable; urgency=low
 
   * add build-script for testing, adapted from Debian lynx-cur package.
diff --git a/PACKAGE/lynx.spec b/PACKAGE/lynx.spec
index 40e4ba85..b7c2d65d 100644
--- a/PACKAGE/lynx.spec
+++ b/PACKAGE/lynx.spec
@@ -1,8 +1,8 @@
-# $LynxId: lynx.spec,v 1.6 2010/09/21 23:18:23 tom Exp $
+# $LynxId: lynx.spec,v 1.7 2010/11/01 21:31:25 tom Exp $
 Summary: A text-based Web browser
 Name: lynx
 Version: 2.8.8
-Release: dev.6
+Release: dev.7
 License: GPLv2
 Group: Applications/Internet
 Source: lynx%{version}%{release}.tgz
diff --git a/WWW/Library/Implementation/HTAABrow.h b/WWW/Library/Implementation/HTAABrow.h
index 94034254..064f11e3 100644
--- a/WWW/Library/Implementation/HTAABrow.h
+++ b/WWW/Library/Implementation/HTAABrow.h
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTAABrow.h,v 1.15 2010/09/25 11:42:32 tom Exp $
+ * $LynxId: HTAABrow.h,v 1.16 2010/10/27 00:13:53 tom Exp $
  *
  *                          BROWSER SIDE ACCESS AUTHORIZATION MODULE
 
@@ -40,8 +40,7 @@
 extern "C" {
 #endif
 /*
-
-Routines for Browser Side Recording of AA Info
+   Routines for Browser Side Recording of AA Info
 
    Most of the browser-side AA is done by the following two functions (which are called
    from file HTTP.c so the browsers using libwww only need to be linked with the new
@@ -55,24 +54,26 @@ Routines for Browser Side Recording of AA Info
       HTAA_shouldRetryWithAuth() determines whether to retry the request with AA or with a
       new AA (in case username or password was misspelled).
 
- *//* PUBLIC                                               HTAA_composeAuth()
-   *
-   *      COMPOSE THE ENTIRE AUTHORIZATION HEADER LINE IF WE
-   *      ALREADY KNOW, THAT THE HOST MIGHT REQUIRE AUTHORIZATION
-   *
-   * ON ENTRY:
-   *      hostname        is the hostname of the server.
-   *      portnumber      is the portnumber in which the server runs.
-   *      docname         is the pathname of the document (as in URL)
-   *
-   * ON EXIT:
-   *      returns NULL, if no authorization seems to be needed, or
-   *              if it is the entire Authorization: line, e.g.
-   *
-   *                 "Authorization: basic username:password"
-   *
-   *              As usual, this string is automatically freed.
- */ extern char *HTAA_composeAuth(const char *hostname,
+ */
+/* PUBLIC                                               HTAA_composeAuth()
+ *
+ *      COMPOSE THE ENTIRE AUTHORIZATION HEADER LINE IF WE
+ *      ALREADY KNOW, THAT THE HOST MIGHT REQUIRE AUTHORIZATION
+ *
+ * ON ENTRY:
+ *      hostname        is the hostname of the server.
+ *      portnumber      is the portnumber in which the server runs.
+ *      docname         is the pathname of the document (as in URL)
+ *
+ * ON EXIT:
+ *      returns NULL, if no authorization seems to be needed, or
+ *              if it is the entire Authorization: line, e.g.
+ *
+ *                 "Authorization: basic username:password"
+ *
+ *              As usual, this string is automatically freed.
+ */
+    extern char *HTAA_composeAuth(const char *hostname,
 				  const int portnumber,
 				  const char *docname,
 				  int IsProxy);
diff --git a/WWW/Library/Implementation/HTAAUtil.h b/WWW/Library/Implementation/HTAAUtil.h
index 1fd9ee75..33a8ee30 100644
--- a/WWW/Library/Implementation/HTAAUtil.h
+++ b/WWW/Library/Implementation/HTAAUtil.h
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTAAUtil.h,v 1.12 2010/06/17 00:36:04 tom Exp $
+ * $LynxId: HTAAUtil.h,v 1.13 2010/10/27 00:09:52 tom Exp $
  *
  *                                            Utilities for the Authorization parts of libwww
  *           COMMON PARTS OF AUTHORIZATION MODULE TO BOTH SERVER AND BROWSER
@@ -48,7 +48,8 @@ extern "C" {
 #define MAX_FIELDNAME_LEN       16	/* @@ Longest field name in       */
     /* protection setup file          */
 #define MAX_PATHNAME_LEN        80	/* @@ Longest passwd/group file   */
-/* pathname to allow               *//*
+/* pathname to allow               */
+/*
 
    Datatype definitions
 
diff --git a/WWW/Library/Implementation/HTFTP.c b/WWW/Library/Implementation/HTFTP.c
index 0786d2f3..7ac5d208 100644
--- a/WWW/Library/Implementation/HTFTP.c
+++ b/WWW/Library/Implementation/HTFTP.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTFTP.c,v 1.98 2010/09/25 00:05:51 tom Exp $
+ * $LynxId: HTFTP.c,v 1.99 2010/10/31 17:56:13 tom Exp $
  *
  *			File Transfer Protocol (FTP) Client
  *			for a WorldWideWeb browser
@@ -133,7 +133,7 @@ typedef struct _connection {
 #elif defined(SYS_HPUX)
 #  if defined(_XOPEN_SOURCE_EXTENDED) && defined(SO_PROTOTYPE)
 #    define LY_SOCKLEN socklen_t
-#  else				/* HPUX 10.20, etc. */
+#  else	/* HPUX 10.20, etc. */
 #    define LY_SOCKLEN int
 #  endif
 #elif defined(SYS_TRU64)
diff --git a/WWW/Library/Implementation/HTFile.c b/WWW/Library/Implementation/HTFile.c
index f8ea537f..5d692616 100644
--- a/WWW/Library/Implementation/HTFile.c
+++ b/WWW/Library/Implementation/HTFile.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTFile.c,v 1.126 2010/09/24 08:52:55 tom Exp $
+ * $LynxId: HTFile.c,v 1.127 2010/10/27 00:10:02 tom Exp $
  *
  *			File Access				HTFile.c
  *			===========
@@ -31,7 +31,8 @@
 #define LONG_LIST		/* Define this for long style unix listings (ls -l),
 				   the actual style is configurable from lynx.cfg */
 #endif
-/* #define NO_PARENT_DIR_REFERENCE *//* Define this for no parent links */
+/* #define NO_PARENT_DIR_REFERENCE */
+/* Define this for no parent links */
 #endif /* !VMS */
 
 #if defined(DOSPATH)
diff --git a/WWW/Library/Implementation/HTFormat.h b/WWW/Library/Implementation/HTFormat.h
index a2c15902..1e82fd76 100644
--- a/WWW/Library/Implementation/HTFormat.h
+++ b/WWW/Library/Implementation/HTFormat.h
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTFormat.h,v 1.32 2010/09/25 11:42:03 tom Exp $
+ * $LynxId: HTFormat.h,v 1.33 2010/10/27 00:13:53 tom Exp $
  *
  *                                            HTFormat: The format manager in the WWW Library
  *                          MANAGE DIFFERENT DOCUMENT FORMATS
@@ -44,7 +44,11 @@ extern "C" {
    useful for diagnostics, and for users who want to see the original, whatever
    it is.
 
-																	 *//* Internal ones *//* #define WWW_SOURCE HTAtom_for("www/source") *//* Whatever it was originally */ extern HTAtom *WWW_SOURCE;
+																	 */
+/* Internal ones */
+/* #define WWW_SOURCE HTAtom_for("www/source") */
+/* Whatever it was originally */
+    extern HTAtom *WWW_SOURCE;
     /* calculated once, heavy used */
 
 /*
diff --git a/WWW/Library/Implementation/HTNews.c b/WWW/Library/Implementation/HTNews.c
index ab4a6cb5..eda9bf58 100644
--- a/WWW/Library/Implementation/HTNews.c
+++ b/WWW/Library/Implementation/HTNews.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTNews.c,v 1.66 2010/09/25 00:42:40 tom Exp $
+ * $LynxId: HTNews.c,v 1.67 2010/10/27 00:10:51 tom Exp $
  *
  *			NEWS ACCESS				HTNews.c
  *			===========
@@ -94,7 +94,6 @@ static int s;			/* Socket for NewsHost */
 static int HTCanPost = FALSE;	/* Current POST permission */
 static char response_text[LINE_LENGTH + 1];	/* Last response */
 
-/* static HText *	HT;	*//* the new hypertext */
 static HTStructured *target;	/* The output sink */
 static HTStructuredClass targetClass;	/* Copy of fn addresses */
 static HTStream *rawtarget = NULL;	/* The output sink for rawtext */
diff --git a/WWW/Library/Implementation/HTTCP.c b/WWW/Library/Implementation/HTTCP.c
index ec456175..d85f2d35 100644
--- a/WWW/Library/Implementation/HTTCP.c
+++ b/WWW/Library/Implementation/HTTCP.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTTCP.c,v 1.104 2010/09/25 11:32:53 tom Exp $
+ * $LynxId: HTTCP.c,v 1.105 2010/10/27 00:11:11 tom Exp $
  *
  *			Generic Communication Code		HTTCP.c
  *			==========================
@@ -77,9 +77,6 @@ static char *hostname = NULL;	/* The name of this host */
 unsigned long socks_bind_remoteAddr;	/* for long Rbind */
 #endif /* SOCKS */
 
-/* PUBLIC SockA HTHostAddress; *//* The internet address of the host */
-					/* Valid after call to HTHostName() */
-
 /*	Encode INET status (as in sys/errno.h)			  inet_status()
  *	------------------
  *
diff --git a/WWW/Library/Implementation/HTUtils.h b/WWW/Library/Implementation/HTUtils.h
index ba10b1b3..cdc0a09e 100644
--- a/WWW/Library/Implementation/HTUtils.h
+++ b/WWW/Library/Implementation/HTUtils.h
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTUtils.h,v 1.102 2010/09/25 15:32:56 tom Exp $
+ * $LynxId: HTUtils.h,v 1.103 2010/10/27 00:08:52 tom Exp $
  *
  * Utility macros for the W3 code library
  * MACROS FOR GENERAL USE
@@ -157,12 +157,12 @@ char *alloca();
 #define LY_MAXPATH 256
 #endif
 
-#ifndef	GCC_NORETURN
-#define	GCC_NORETURN		/* nothing */
+#ifndef GCC_NORETURN
+#define GCC_NORETURN		/* nothing */
 #endif
 
-#ifndef	GCC_UNUSED
-#define	GCC_UNUSED		/* nothing */
+#ifndef GCC_UNUSED
+#define GCC_UNUSED		/* nothing */
 #endif
 
 #if defined(__GNUC__) && defined(_FORTIFY_SOURCE)
diff --git a/WWW/Library/Implementation/HTVMS_WaisUI.c b/WWW/Library/Implementation/HTVMS_WaisUI.c
index 45a38a60..d8f73019 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.16 2010/09/25 00:32:18 tom Exp $
+ * $LynxId: HTVMS_WaisUI.c,v 1.17 2010/10/29 21:10:14 tom Exp $
  *								HTVMS_WAISUI.c
  *
  *	Adaptation for Lynx by F.Macrides (macrides@sci.wfeb.edu)
@@ -695,7 +695,7 @@ SearchAPDU *makeSearchAPDU(long small,
 		query->DatabaseNames = (char **) s_realloc((char *) query->DatabaseNames,
 							   (size_t) (sizeof(char
 									    *) *
-								       (i + 2)));
+								     (i + 2)));
 
 	    query->DatabaseNames[i] = s_strdup(ptr);
 	    query->DatabaseNames[i + 1] = NULL;
@@ -713,7 +713,7 @@ SearchAPDU *makeSearchAPDU(long small,
 		query->ElementSetNames = (char **) s_realloc((char *) query->ElementSetNames,
 							     (size_t) (sizeof(char
 									      *) *
-								         (i + 2)));
+								       (i + 2)));
 
 	    query->ElementSetNames[i] = s_strdup(ptr);
 	    query->ElementSetNames[i + 1] = NULL;
diff --git a/WWW/Library/Implementation/LYexit.h b/WWW/Library/Implementation/LYexit.h
index 09414880..d32e2079 100644
--- a/WWW/Library/Implementation/LYexit.h
+++ b/WWW/Library/Implementation/LYexit.h
@@ -39,15 +39,23 @@ extern "C" {
 #define exit(code) LYexit(code)
 #define atexit LYatexit
 #define ATEXITSIZE 50
+
 /*
  *	Data structures
- *//*
-   * Global variable declarations
- *//*
-   * Macros
- *//*
-   * Function declarations
- */ extern void outofmem(const char *fname, const char *func);
+ */
+
+/*
+ * Global variable declarations
+ */
+
+/*
+ * Macros
+ */
+
+/*
+ * Function declarations
+ */
+    extern void outofmem(const char *fname, const char *func);
     extern void reset_signals(void);
     extern void exit_immediately(int status) GCC_NORETURN;
     extern void LYexit(int status) GCC_NORETURN;
diff --git a/WWW/Library/Implementation/tidy_tls.h b/WWW/Library/Implementation/tidy_tls.h
index 04d3f681..771add4a 100644
--- a/WWW/Library/Implementation/tidy_tls.h
+++ b/WWW/Library/Implementation/tidy_tls.h
@@ -1,5 +1,5 @@
 /*
- * $LynxId: tidy_tls.h,v 1.1 2008/04/27 22:50:39 tom Exp $
+ * $LynxId: tidy_tls.h,v 1.2 2010/10/27 00:07:26 tom Exp $
  * Copyright 2008, Thomas E. Dickey
  */
 #ifndef TIDY_TLS_H
@@ -103,7 +103,7 @@ struct _SSL {
 /* use either SSL_VERIFY_NONE or SSL_VERIFY_PEER, the last 2 options
  * are 'ored' with SSL_VERIFY_PEER if they are desired */
 #define SSL_VERIFY_PEER			0x01
-
+/* *INDENT-OFF* */
 extern SSL *SSL_new(SSL_CTX * ctx);
 extern SSL_CIPHER *SSL_get_current_cipher(SSL * ssl);
 extern SSL_CTX *SSL_CTX_new(SSL_METHOD * method);
@@ -134,5 +134,6 @@ extern void SSL_CTX_free(SSL_CTX * ctx);
 extern void SSL_CTX_set_verify(SSL_CTX * ctx, int verify_mode, int (*verify_callback) (int, X509_STORE_CTX *));
 extern void SSL_free(SSL * ssl);
 extern void SSL_load_error_strings(void);
+/* *INDENT-ON* */
 
 #endif /* TIDY_TLS_H */
diff --git a/WWW/Library/Implementation/www_tcp.h b/WWW/Library/Implementation/www_tcp.h
index 4e47d788..d221f23d 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.45 2010/09/25 16:24:45 tom Exp $
+ * $LynxId: www_tcp.h,v 1.47 2010/10/31 17:56:16 tom Exp $
  *
                                    SYSTEM DEPENDENCIES
 
@@ -159,7 +159,8 @@ extern const unsigned char IBM1047[];
 /* For debugging
 #include <assert.h>
 #define   TOASCII(c) (assert((c)>=0 && (c)<256), un_IBM1047[c])
-*//* for production */
+*/
+/* for production */
 #define   TOASCII(c) (un_IBM1047[c])
 
 #define FROMASCII(c) (IBM1047[c])
@@ -746,10 +747,10 @@ typedef unsigned short mode_t;
 
 # ifdef HAVE_LIMITS_H
 #  include <limits.h>
-# endif				/* HAVE_LIMITS_H */
+# endif	/* HAVE_LIMITS_H */
 # if !defined(MAXINT) && defined(INT_MAX)
 #  define MAXINT INT_MAX
-# endif				/* !MAXINT && INT_MAX */
+# endif	/* !MAXINT && INT_MAX */
 
 #else
 
diff --git a/lib/dirent.c b/lib/dirent.c
index 3a19cfe5..8b8f08f4 100644
--- a/lib/dirent.c
+++ b/lib/dirent.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: dirent.c,v 1.3 2009/03/11 00:31:33 tom Exp $
+ * $LynxId: dirent.c,v 1.4 2010/10/31 17:56:17 tom Exp $
  *
  * dir.c for MS-DOS by Samuel Lam <skl@van-bc.UUCP>, June/87 
  */
@@ -20,7 +20,6 @@
  *    Changes made by Gordon Chaffee (chaffee@bugs-bunny.cs.berkeley.edu)
  */
 
-
 /*Includes: 
  *    crt 
  */
@@ -123,6 +122,7 @@ DIR *opendirx(char *name, char *pattern)
 	return NULL;
     }
     dirp = malloc(sizeof(DIR));
+
     if (dirp == NULL) {
 	return dirp;
     }
@@ -153,7 +153,7 @@ DIR *opendirx(char *name, char *pattern)
     }
     do {
 	if (((dp = malloc(sizeof(struct _dircontents))) == NULL) ||
-	     ((dp->_d_entry = malloc(strlen(s) + 1)) == NULL)) {
+	      ((dp->_d_entry = malloc(strlen(s) + 1)) == NULL)) {
 	    if (dp)
 		free(dp);
 	    free_dircontents(dirp->dd_contents);
@@ -180,13 +180,13 @@ DIR *opendir(char *name)
     return opendirx(name, "*");
 }
 
-void closedir(DIR * dirp)
+void closedir(DIR *dirp)
 {
     free_dircontents(dirp->dd_contents);
     free(dirp);
 }
 
-struct dirent *readdir(DIR * dirp)
+struct dirent *readdir(DIR *dirp)
 {
     /* static struct dirent dp; */
     if (dirp->dd_cp == NULL)
@@ -204,25 +204,23 @@ struct dirent *readdir(DIR * dirp)
     dirp->dd_cp = dirp->dd_cp->_d_next;
     dirp->dd_loc++;
 
-
     return &dp;
 }
 
-void seekdir(DIR * dirp, long off)
+void seekdir(DIR *dirp, long off)
 {
     long i = off;
     struct _dircontents *dp;
 
     if (off >= 0) {
-	for (dp = dirp->dd_contents; --i >= 0 && dp; dp = dp->_d_next);
+	for (dp = dirp->dd_contents; --i >= 0 && dp; dp = dp->_d_next) ;
 
 	dirp->dd_loc = off - (i + 1);
 	dirp->dd_cp = dp;
     }
 }
 
-
-long telldir(DIR * dirp)
+long telldir(DIR *dirp)
 {
     return dirp->dd_loc;
 }
@@ -263,14 +261,12 @@ static char *getdirent(char *dir)
 }
 /* end of getdirent() */
 
-struct passwd *_cdecl
- getpwnam(char *name)
+struct passwd *_cdecl getpwnam(char *name)
 {
     return NULL;
 }
 
-struct passwd *_cdecl
- getpwuid(int uid)
+struct passwd *_cdecl getpwuid(int uid)
 {
     return NULL;
 }
@@ -280,8 +276,7 @@ int getuid()
     return 0;
 }
 
-void _cdecl
- endpwent(void)
+void _cdecl endpwent(void)
 {
 }
 
diff --git a/lib/dirent.h b/lib/dirent.h
index c0852a17..db598492 100644
--- a/lib/dirent.h
+++ b/lib/dirent.h
@@ -14,43 +14,40 @@
  *  changed d_name to char * instead of array, removed non-std extensions 
  *  
  *  Cleanup, other hackery, Summer '92, Brian Moran , brianmo@microsoft.com 
- */ 
+ */
 
 #ifndef _DIRENT
 #define _DIRENT
 
 #include <direct.h>
 
-struct dirent 
-{ 
-    ino_t    d_ino;                   /* a bit of a farce */ 
-    short    d_reclen;                /* more farce */ 
-    short    d_namlen;                /* length of d_name */ 
-    char    *d_name;
-}; 
- 
-struct _dircontents 
-{ 
-    char *_d_entry; 
-    struct _dircontents *_d_next; 
-}; 
- 
-typedef struct _dirdesc 
-{ 
-    int  dd_id;			   /* uniquely identify each open directory*/ 
-    long dd_loc;			/* where we are in directory entry */ 
-    struct _dircontents *dd_contents;	/* pointer to contents of dir */ 
-    struct _dircontents *dd_cp;		/* pointer to current position */ 
-} 
-DIR; 
- 
-extern DIR *opendir(char *); 
-extern struct dirent *readdir(DIR *); 
-extern void seekdir(DIR *, long); 
-extern long telldir(DIR *); 
-extern void closedir(DIR *); 
-#define rewinddir(dirp) seekdir(dirp, 0L) 
+struct dirent {
+    ino_t d_ino;		/* a bit of a farce */
+    short d_reclen;		/* more farce */
+    short d_namlen;		/* length of d_name */
+    char *d_name;
+};
+
+struct _dircontents {
+    char *_d_entry;
+    struct _dircontents *_d_next;
+};
+
+typedef struct _dirdesc {
+    int dd_id;			/* uniquely identify each open directory */
+    long dd_loc;		/* where we are in directory entry */
+    struct _dircontents *dd_contents;	/* pointer to contents of dir */
+    struct _dircontents *dd_cp;	/* pointer to current position */
+} DIR;
+
+extern DIR *opendir(char *);
+extern struct dirent *readdir(DIR *);
+extern void seekdir(DIR *, long);
+extern long telldir(DIR *);
+extern void closedir(DIR *);
+
+#define rewinddir(dirp) seekdir(dirp, 0L)
 
 #endif /* _DIRENT */
 
-/* end of dirent.h */ 
+/* end of dirent.h */
diff --git a/src/HTML.c b/src/HTML.c
index e578c6b0..1d06f0c8 100644
--- a/src/HTML.c
+++ b/src/HTML.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTML.c,v 1.146 2010/09/25 17:00:36 tom Exp $
+ * $LynxId: HTML.c,v 1.148 2010/11/01 22:19:09 tom Exp $
  *
  *		Structured stream to Rich hypertext converter
  *		============================================
@@ -312,8 +312,10 @@ void HTML_put_character(HTStructured * me, int c)
 	return;
     }
     me->lastraw = c;
-    if (c == '\r')
+    if (c == '\r') {
 	c = '\n';
+	uc = UCH(c);
+    }
 
     /*
      * Handle SGML_LITTERAL tags that have HTChunk elements.  - FM
diff --git a/src/LYCurses.c b/src/LYCurses.c
index 24da4743..34906246 100644
--- a/src/LYCurses.c
+++ b/src/LYCurses.c
@@ -1,4 +1,4 @@
-/* $LynxId: LYCurses.c,v 1.156 2010/09/25 00:48:03 tom Exp $ */
+/* $LynxId: LYCurses.c,v 1.158 2010/10/31 17:56:18 tom Exp $ */
 #include <HTUtils.h>
 #include <HTAlert.h>
 
@@ -1138,7 +1138,7 @@ void start_curses(void)
 	   when the keypad is switched on, some keybindings may be overriden. */
 	keypad(LYwin, TRUE);
 	keypad_on = 1;
-#  endif			/* HAVE_KEYPAD */
+#  endif /* HAVE_KEYPAD */
 
 	if (-1 == lynx_initialize_keymaps()) {
 	    endwin();
@@ -1245,8 +1245,6 @@ void start_curses(void)
 #endif /* __DJGPP__ */
 #endif /* not VMS */
 
-/* nonl();   *//* seems to slow things down */
-
 #ifdef VMS
     crmode();
     raw();
@@ -1488,7 +1486,7 @@ void stop_curses(void)
 
 #ifdef __DJGPP__
     ScreenClear();
-#elif !defined(PDCURSES)	/* some flavor of win32?  */
+#elif !defined(PDCURSES) /* some flavor of win32?  */
     clrscr();
 #endif /* win32 */
 
@@ -1781,7 +1779,7 @@ void LYsubwindow(WINDOW * param)
 	    wbkgd(my_subwindow, (chtype) (b | ' '));
 	}
 	LynxWChangeStyle(my_subwindow, s_menu_bg, STACK_OFF);
-#elif defined(HAVE_GETBKGD)	/* not defined in ncurses 1.8.7 */
+#elif defined(HAVE_GETBKGD) /* not defined in ncurses 1.8.7 */
 	wbkgd(my_subwindow, getbkgd(LYwin));
 #endif
 #endif
diff --git a/src/LYCurses.h b/src/LYCurses.h
index da3765fa..b0b3b9d0 100644
--- a/src/LYCurses.h
+++ b/src/LYCurses.h
@@ -1,4 +1,4 @@
-/* $LynxId: LYCurses.h,v 1.86 2010/10/04 08:56:09 tom Exp $ */
+/* $LynxId: LYCurses.h,v 1.87 2010/10/31 17:56:18 tom Exp $ */
 #ifndef LYCURSES_H
 #define LYCURSES_H
 
@@ -260,7 +260,7 @@ typedef char chtype;
 #  include <LYGCurses.h>
 #  else
 #   include <curses.h>		/* everything else */
-# endif				/* VMS && __GNUC__ */
+# endif	/* VMS && __GNUC__ */
 #endif /* HAVE_CONFIG_H */
 
 /*
diff --git a/src/LYForms.c b/src/LYForms.c
index 21bb6b9f..cedb89d1 100644
--- a/src/LYForms.c
+++ b/src/LYForms.c
@@ -1,4 +1,4 @@
-/* $LynxId: LYForms.c,v 1.86 2010/09/24 09:40:44 tom Exp $ */
+/* $LynxId: LYForms.c,v 1.87 2010/10/31 17:56:18 tom Exp $ */
 #include <HTUtils.h>
 #include <HTCJK.h>
 #include <HTTP.h>
@@ -528,7 +528,7 @@ static int form_getstr(int cur,
 		MyEdit.dirty = TRUE;
 	    }
 	} else
-#  endif			/* NCURSES || PDCURSES */
+#  endif /* NCURSES || PDCURSES */
 #endif /* USE_MOUSE */
 
 	{
diff --git a/src/LYLocal.c b/src/LYLocal.c
index caead794..430410da 100644
--- a/src/LYLocal.c
+++ b/src/LYLocal.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYLocal.c,v 1.112 2010/09/25 16:26:16 tom Exp $
+ * $LynxId: LYLocal.c,v 1.114 2010/11/01 08:46:02 tom Exp $
  *
  *  Routines to manipulate the local filesystem.
  *  Written by: Rick Mallett, Carleton University
@@ -386,6 +386,7 @@ static char **make_argv(const char *command,...)
     va_list ap;
 
     va_start(ap, command);
+    result[0] = 0;
     StrAllocCopy(result[argc++], command);
     do {
 	result[argc] = 0;
@@ -1756,7 +1757,7 @@ static char *build_command(char *line,
 	    }
 	    return buffer;
 	}
-#  endif			/* OK_GZIP */
+#  endif /* OK_GZIP */
 	if ((arg = match_op("UNTAR_Z", line)) != 0) {
 #define FMT_UNTAR_Z "cd %s; %s %s |  %s %s %s"
 	    if ((program = HTGetProgramPath(ppZCAT)) != NULL) {
@@ -1781,7 +1782,7 @@ static char *build_command(char *line,
 	    HTEndParam(&buffer, FMT_UNTAR, 4);
 	    return buffer;
 	}
-# endif				/* !ARCHIVE_ONLY */
+# endif	/* !ARCHIVE_ONLY */
 
 # ifdef OK_GZIP
 	if ((arg = match_op("TAR_GZ", line)) != 0) {
@@ -1800,7 +1801,7 @@ static char *build_command(char *line,
 	    }
 	    return buffer;
 	}
-# endif				/* OK_GZIP */
+# endif	/* OK_GZIP */
 
 	if ((arg = match_op("TAR_Z", line)) != 0) {
 #define FMT_TAR_Z "cd %s; %s %s %s %s | %s >%s%s"
@@ -1882,7 +1883,7 @@ static char *build_command(char *line,
 	}
 	return buffer;
     }
-# endif				/* !ARCHIVE_ONLY */
+# endif	/* !ARCHIVE_ONLY */
 #endif /* OK_ZIP */
 
     if ((arg = match_op("COMPRESS", line)) != 0) {
diff --git a/src/LYPrettySrc.c b/src/LYPrettySrc.c
index 97681147..d85a93f0 100644
--- a/src/LYPrettySrc.c
+++ b/src/LYPrettySrc.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYPrettySrc.c,v 1.24 2010/09/24 22:06:29 tom Exp $
+ * $LynxId: LYPrettySrc.c,v 1.25 2010/10/27 00:15:12 tom Exp $
  *
  * HTML source syntax highlighting
  * by Vlad Harchev <hvv@hippo.ru>
@@ -159,7 +159,8 @@ static void append_open_tag(char *tagname,
 	int n = tag->number_of_attributes;
 	attr *attrs = tag->attributes;
 
-/*.... *//* this is not implemented though it's easy */
+/*.... */
+/* this is not implemented though it's easy */
 #  endif
 
 	hcode = hash_code_aggregate_char('.', hcode);
diff --git a/src/LYSession.c b/src/LYSession.c
index 3578c194..8c5c690d 100644
--- a/src/LYSession.c
+++ b/src/LYSession.c
@@ -1,4 +1,4 @@
-/* $LynxId: LYSession.c,v 1.6 2008/07/02 21:24:27 Paul.B.Mahol Exp $ */
+/* $LynxId: LYSession.c,v 1.7 2010/10/31 18:15:33 Paul.B.Mahol Exp $ */
 
 #include <LYSession.h>
 
@@ -63,11 +63,12 @@ void RestoreSession(void)
     DocInfo doc;
     VisitedLink *vl;
     int i = 0;
-    short errors = 10;		/* how many syntax errors are allowed in */
-
-    /* session file before aborting. */
+    short errors = 10;		/* how many syntax errors are allowed in
+				 * session file before aborting. */
     char *value1, *value2, *rsline, *linktext, *rslevel;
 
+    memset(&doc, 0, sizeof(doc));
+
     /*
      * This should be done only once, here:  iff USE_SESSIONS is defined or: 
      * in mainloop(), otherwise history entries are lost
diff --git a/src/LYUtils.c b/src/LYUtils.c
index c26abbfc..b82286f4 100644
--- a/src/LYUtils.c
+++ b/src/LYUtils.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYUtils.c,v 1.204 2010/10/04 09:00:23 tom Exp $
+ * $LynxId: LYUtils.c,v 1.205 2010/10/31 17:56:21 tom Exp $
  */
 #include <HTUtils.h>
 #include <HTTCP.h>
@@ -2978,9 +2978,9 @@ static BOOLEAN LYToggleSigDfl(int sig,
 #  else
 #   ifdef HAVE_TERMIO_H
 #    include <termio.h>
-#   endif			/* HAVE_TERMIO_H */
-#  endif			/* HAVE_TERMIOS_H */
-# endif				/* TERMIO_AND_TERMIOS */
+#   endif /* HAVE_TERMIO_H */
+#  endif /* HAVE_TERMIOS_H */
+# endif	/* TERMIO_AND_TERMIOS */
 #endif /* TERMIO_AND_CURSES */
 
 void size_change(int sig GCC_UNUSED)
@@ -7574,7 +7574,7 @@ int put_clip(const char *s)
     return 0;
 }
 
-#  endif			/* !defined(WIN_EX) && defined(HAVE_POPEN) */
+#  endif /* !defined(WIN_EX) && defined(HAVE_POPEN) */
 
 #endif /* __EMX__ */
 
diff --git a/src/TRSTable.c b/src/TRSTable.c
index a86e284a..ea07bc90 100644
--- a/src/TRSTable.c
+++ b/src/TRSTable.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: TRSTable.c,v 1.28 2010/09/25 12:47:08 tom Exp $
+ * $LynxId: TRSTable.c,v 1.29 2010/10/27 00:15:10 tom Exp $
  *		Simple table object
  *		===================
  * Authors
@@ -1322,7 +1322,8 @@ static int Stbl_fakeFinishCellInTable(STable_info *me,
 	}
 
 	/* Fake </TR> at BOL */
-/* Stbl_finishCellInTable(lineno, 0, 0); *//* Needed? */
+	/* Stbl_finishCellInTable(lineno, 0, 0); */
+	/* Needed? */
 
 	/* Fake <TR> at BOL */
 	if (Stbl_addRowToTable(me, al, lineno) < 0) {
diff --git a/src/UCAuto.c b/src/UCAuto.c
index a7547674..99a709a0 100644
--- a/src/UCAuto.c
+++ b/src/UCAuto.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: UCAuto.c,v 1.45 2010/09/25 00:51:53 tom Exp $
+ * $LynxId: UCAuto.c,v 1.46 2010/10/31 17:56:21 tom Exp $
  *
  *  This file contains code for changing the Linux console mode.
  *  Currently some names for font files are hardwired in here.
@@ -788,7 +788,7 @@ static int _Switch_Display_Charset(int ord, enum switch_display_charset_t really
     CTRACE((tfp, "Display font set to '%s'.\n", name));
     return ord;
 }
-#  endif			/* __EMX__ */
+#  endif /* __EMX__ */
 
 int Switch_Display_Charset(const int ord, const enum switch_display_charset_t really)
 {
diff --git a/src/UCdomap.c b/src/UCdomap.c
index f610666d..89a4cb2f 100644
--- a/src/UCdomap.c
+++ b/src/UCdomap.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: UCdomap.c,v 1.86 2010/09/25 15:31:34 tom Exp $
+ * $LynxId: UCdomap.c,v 1.87 2010/10/31 17:56:22 tom Exp $
  *
  *  UCdomap.c
  *  =========
@@ -2171,7 +2171,7 @@ static int CpOrdinal(const unsigned UCode_t cp, const int other)
     CTRACE((tfp, "Found %i.\n", ret));
     return ret;
 }
-#  endif			/* __EMX__ */
+#  endif /* __EMX__ */
 #endif /* CAN_AUTODETECT_DISPLAY_CHARSET */
 #endif /* EXP_CHARTRANS_AUTOSWITCH */
 
diff --git a/src/parsdate.h b/src/parsdate.h
index ab24d318..9853f501 100644
--- a/src/parsdate.h
+++ b/src/parsdate.h
@@ -1,4 +1,4 @@
-/* $LynxId: parsdate.h,v 1.1 2008/06/29 23:23:45 tom Exp $ */
+/* $LynxId: parsdate.h,v 1.2 2010/10/31 17:56:22 tom Exp $ */
 #ifndef PARSDATE_H
 #define PARSDATE_H
 
@@ -7,7 +7,7 @@ extern "C" {
 #endif
 #include <LYUtils.h>
 #define ARRAY_SIZE(array)       ((int) (sizeof(array) / sizeof(array[0])))
-     typedef struct _TIMEINFO {
+    typedef struct _TIMEINFO {
 	time_t time;
 	long usec;
 	long tzone;