about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2016-11-24 20:42:26 -0500
committerThomas E. Dickey <dickey@invisible-island.net>2016-11-24 20:42:26 -0500
commit8e90b748a51b502a3b0430d58cfbc7954d4a801d (patch)
treeb21a6586b444c3604344c862c204083f7fb266af
parentda3e74522784403f7b98fb00637209557a87c0f3 (diff)
downloadlynx-snapshots-8e90b748a51b502a3b0430d58cfbc7954d4a801d.tar.gz
snapshot of project "lynx", label v2-8-9dev_11c
-rw-r--r--CHANGES6
-rw-r--r--WWW/Library/Implementation/HTAABrow.c18
-rw-r--r--WWW/Library/Implementation/HTAAProt.c6
-rw-r--r--WWW/Library/Implementation/HTAAUtil.c4
-rw-r--r--WWW/Library/Implementation/HTAccess.c4
-rw-r--r--WWW/Library/Implementation/HTAnchor.c12
-rw-r--r--WWW/Library/Implementation/HTAssoc.c4
-rw-r--r--WWW/Library/Implementation/HTAtom.c6
-rw-r--r--WWW/Library/Implementation/HTBTree.c7
-rw-r--r--WWW/Library/Implementation/HTChunk.c6
-rw-r--r--WWW/Library/Implementation/HTFTP.c9
-rw-r--r--WWW/Library/Implementation/HTFile.c4
-rw-r--r--WWW/Library/Implementation/HTFormat.c7
-rw-r--r--WWW/Library/Implementation/HTGopher.c14
-rw-r--r--WWW/Library/Implementation/HTGroup.c8
-rw-r--r--WWW/Library/Implementation/HTList.c8
-rw-r--r--WWW/Library/Implementation/HTMIME.c19
-rw-r--r--WWW/Library/Implementation/HTMLGen.c6
-rw-r--r--WWW/Library/Implementation/HTParse.c16
-rw-r--r--WWW/Library/Implementation/HTPlain.c4
-rw-r--r--WWW/Library/Implementation/HTRules.c4
-rw-r--r--WWW/Library/Implementation/HTString.c19
-rw-r--r--WWW/Library/Implementation/HTTCP.c3
-rw-r--r--WWW/Library/Implementation/HTTP.c6
-rw-r--r--WWW/Library/Implementation/HTWSRC.c4
-rw-r--r--WWW/Library/Implementation/SGML.c26
-rw-r--r--src/GridText.c46
-rw-r--r--src/HTFWriter.c12
-rw-r--r--src/HTInit.c10
-rw-r--r--src/HTML.c7
-rw-r--r--src/LYCgi.c6
-rw-r--r--src/LYCharUtils.c4
-rw-r--r--src/LYCookie.c12
-rw-r--r--src/LYGetFile.c4
-rw-r--r--src/LYHistory.c8
-rw-r--r--src/LYJump.c6
-rw-r--r--src/LYKeymap.c4
-rw-r--r--src/LYLeaks.c10
-rw-r--r--src/LYLocal.c6
-rw-r--r--src/LYMainLoop.c4
-rw-r--r--src/LYMap.c4
-rw-r--r--src/LYOptions.c8
-rw-r--r--src/LYReadCFG.c14
-rw-r--r--src/LYStrings.c7
-rw-r--r--src/LYUtils.c4
-rw-r--r--src/LYrcFile.c3
-rw-r--r--src/TRSTable.c68
-rw-r--r--src/UCAuto.c4
-rw-r--r--src/tidy_tls.c8
49 files changed, 96 insertions, 393 deletions
diff --git a/CHANGES b/CHANGES
index f1792c8c..dd6fba2c 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,9 +1,13 @@
--- $LynxId: CHANGES,v 1.865 2016/11/24 14:30:28 tom Exp $
+-- $LynxId: CHANGES,v 1.868 2016/11/24 20:42:26 tom Exp $
 ===============================================================================
 Changes since Lynx 2.8 release
 ===============================================================================
 
 2016-11-24 (2.8.9dev.12)
+* fix several minor warnings reported by Coverity -TD
+* remove redundant asserts which follow a check that leads to outofmem(),
+  added in 2.8.8dev.4 to appease clang 2.6, since clang 3.x understands
+  no-return function declarations -TD
 * when converting host+params to idna, temporarily separate the params to
   avoid a warning from idna_to_ascii_8z() -TD
 * improve warning messages from 2.8.9dev.11 fixes when stripping user/password,
diff --git a/WWW/Library/Implementation/HTAABrow.c b/WWW/Library/Implementation/HTAABrow.c
index f1d3c313..31a0a469 100644
--- a/WWW/Library/Implementation/HTAABrow.c
+++ b/WWW/Library/Implementation/HTAABrow.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTAABrow.c,v 1.40 2013/11/28 11:11:05 tom Exp $
+ * $LynxId: HTAABrow.c,v 1.41 2016/11/24 15:14:00 tom Exp $
  *
  * MODULE							HTAABrow.c
  *		BROWSER SIDE ACCESS AUTHORIZATION MODULE
@@ -150,8 +150,6 @@ void HTAAForwardAuth_set(const char *scheme_name,
     if ((HTAAForwardAuth = typecallocn(char, len)) == 0)
 	  outofmem(__FILE__, "HTAAForwardAuth_set");
 
-    assert(HTAAForwardAuth != 0);
-
     strcpy(HTAAForwardAuth, "Authorization: ");
     if (scheme_name) {
 	strcat(HTAAForwardAuth, scheme_name);
@@ -196,8 +194,6 @@ static HTAAServer *HTAAServer_new(const char *hostname,
     if ((server = typecalloc(HTAAServer)) == 0)
 	  outofmem(__FILE__, "HTAAServer_new");
 
-    assert(server != NULL);
-
     server->hostname = NULL;
     server->portnumber = (portnumber > 0 ? portnumber : 80);
     server->IsProxy = (BOOLEAN) IsProxy;
@@ -399,8 +395,6 @@ static HTAASetup *HTAASetup_new(HTAAServer *server, char *ctemplate,
     if ((setup = typecalloc(HTAASetup)) == 0)
 	outofmem(__FILE__, "HTAASetup_new");
 
-    assert(setup != NULL);
-
     setup->retry = NO;
     setup->server = server;
     setup->ctemplate = NULL;
@@ -523,8 +517,6 @@ static HTAARealm *HTAARealm_new(HTList *realm_table,
 	if ((realm = typecalloc(HTAARealm)) == 0)
 	      outofmem(__FILE__, "HTAARealm_new");
 
-	assert(realm != NULL);
-
 	realm->realmname = NULL;
 	realm->username = NULL;
 	realm->password = NULL;
@@ -679,8 +671,6 @@ static char *compose_auth_string(HTAAScheme scheme, HTAASetup * setup, int IsPro
     if ((cleartext = typecallocn(char, len)) == 0)
 	  outofmem(__FILE__, "compose_auth_string");
 
-    assert(cleartext != NULL);
-
     if (realm->username)
 	strcpy(cleartext, realm->username);
     else
@@ -927,8 +917,6 @@ char *HTAA_composeAuth(const char *hostname,
 	if ((HTAA_composeAuthResult = typecallocn(char, len)) == 0)
 	      outofmem(__FILE__, "HTAA_composeAuth");
 
-	assert(HTAA_composeAuthResult != NULL);
-
 	strcpy(HTAA_composeAuthResult, "Proxy-Authorization: ");
 
     } else {
@@ -1007,8 +995,6 @@ char *HTAA_composeAuth(const char *hostname,
 	if ((HTAA_composeAuthResult = typecallocn(char, len)) == 0)
 	      outofmem(__FILE__, "HTAA_composeAuth");
 
-	assert(HTAA_composeAuthResult != NULL);
-
 	strcpy(HTAA_composeAuthResult, "Authorization: ");
     }
 
@@ -1109,8 +1095,6 @@ BOOL HTAA_shouldRetryWithAuth(char *start_of_headers,
 			if (!scheme_specifics)
 			    outofmem(__FILE__, "HTAA_shouldRetryWithAuth");
 
-			assert(scheme_specifics != NULL);
-
 			for (i = 0; i < HTAA_MAX_SCHEMES; i++)
 			    scheme_specifics[i] = NULL;
 		    }
diff --git a/WWW/Library/Implementation/HTAAProt.c b/WWW/Library/Implementation/HTAAProt.c
index 03243815..d5117f1c 100644
--- a/WWW/Library/Implementation/HTAAProt.c
+++ b/WWW/Library/Implementation/HTAAProt.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTAAProt.c,v 1.33 2013/11/28 11:11:05 tom Exp $
+ * $LynxId: HTAAProt.c,v 1.34 2016/11/24 15:29:50 tom Exp $
  *
  * MODULE							HTAAProt.c
  *		PROTECTION FILE PARSING MODULE
@@ -346,8 +346,6 @@ static HTAAProt *HTAAProt_new(const char *cur_docname,
 	if ((prot = typecalloc(HTAAProt)) == 0)
 	      outofmem(__FILE__, "HTAAProt_new");
 
-	assert(prot != NULL);
-
 	prot->ctemplate = NULL;
 	prot->filename = NULL;
 	prot->uid_name = NULL;
@@ -362,8 +360,6 @@ static HTAAProt *HTAAProt_new(const char *cur_docname,
 	    if ((cache_item = typecalloc(HTAAProtCache)) == 0)
 		outofmem(__FILE__, "HTAAProt_new");
 
-	    assert(cache_item != NULL);
-
 	    cache_item->prot = prot;
 	    cache_item->prot_filename = NULL;
 	    StrAllocCopy(cache_item->prot_filename, prot_filename);
diff --git a/WWW/Library/Implementation/HTAAUtil.c b/WWW/Library/Implementation/HTAAUtil.c
index f7ed67c1..1be26f90 100644
--- a/WWW/Library/Implementation/HTAAUtil.c
+++ b/WWW/Library/Implementation/HTAAUtil.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTAAUtil.c,v 1.35 2013/05/03 20:32:37 tom Exp $
+ * $LynxId: HTAAUtil.c,v 1.36 2016/11/24 15:29:50 tom Exp $
  *
  * MODULE							HTAAUtil.c
  *		COMMON PARTS OF ACCESS AUTHORIZATION MODULE
@@ -488,8 +488,6 @@ void HTAA_setupReader(char *start_of_headers,
     if (buffer == NULL)
 	outofmem(__FILE__, "HTAA_setupReader");
 
-    assert(buffer != NULL);
-
 #ifdef LY_FIND_LEAKS
     atexit(FreeHTAAUtil);
 #endif
diff --git a/WWW/Library/Implementation/HTAccess.c b/WWW/Library/Implementation/HTAccess.c
index be142e83..4c2c1be5 100644
--- a/WWW/Library/Implementation/HTAccess.c
+++ b/WWW/Library/Implementation/HTAccess.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTAccess.c,v 1.79 2013/11/28 11:11:05 tom Exp $
+ * $LynxId: HTAccess.c,v 1.80 2016/11/24 15:29:50 tom Exp $
  *
  *		Access Manager					HTAccess.c
  *		==============
@@ -1283,8 +1283,6 @@ BOOL HTSearch(const char *keywords,
     if (escaped == NULL)
 	outofmem(__FILE__, "HTSearch");
 
-    assert(escaped != NULL);
-
     StrAllocCopy(address, here->isIndexAction);
 
     /*
diff --git a/WWW/Library/Implementation/HTAnchor.c b/WWW/Library/Implementation/HTAnchor.c
index 616b69c4..ee0a0084 100644
--- a/WWW/Library/Implementation/HTAnchor.c
+++ b/WWW/Library/Implementation/HTAnchor.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTAnchor.c,v 1.76 2013/11/28 11:34:24 tom Exp $
+ * $LynxId: HTAnchor.c,v 1.77 2016/11/24 15:29:50 tom Exp $
  *
  *	Hypertext "Anchor" Object				HTAnchor.c
  *	==========================
@@ -86,8 +86,6 @@ static HTParentAnchor0 *HTParentAnchor0_new(const char *address,
     if (newAnchor == NULL)
 	outofmem(__FILE__, "HTParentAnchor0_new");
 
-    assert(newAnchor != NULL);
-
     newAnchor->parent = newAnchor;	/* self */
     StrAllocCopy(newAnchor->address, address);
     newAnchor->adult_hash = (HASH_TYPE) hash;
@@ -102,8 +100,6 @@ static HTParentAnchor *HTParentAnchor_new(HTParentAnchor0 *parent)
     if (newAnchor == NULL)
 	outofmem(__FILE__, "HTParentAnchor_new");
 
-    assert(newAnchor != NULL);
-
     newAnchor->parent = parent;	/* cross reference */
     parent->info = newAnchor;	/* cross reference */
     newAnchor->address = parent->address;	/* copy pointer */
@@ -124,8 +120,6 @@ static HTChildAnchor *HTChildAnchor_new(HTParentAnchor0 *parent)
     if (p == NULL)
 	outofmem(__FILE__, "HTChildAnchor_new");
 
-    assert(p != NULL);
-
     p->parent = parent;		/* parent reference */
     return p;
 }
@@ -138,8 +132,6 @@ static HTChildAnchor *HText_pool_ChildAnchor_new(HTParentAnchor *parent)
     if (p == NULL)
 	outofmem(__FILE__, "HText_pool_ChildAnchor_new");
 
-    assert(p != NULL);
-
     p->parent = parent->parent;	/* parent reference */
     return p;
 }
@@ -1315,8 +1307,6 @@ LYUCcharset *HTAnchor_getUCInfoStage(HTParentAnchor *me,
 	    if (stages == NULL)
 		outofmem(__FILE__, "HTAnchor_getUCInfoStage");
 
-	    assert(stages != NULL);
-
 	    for (i = 0; i < UCT_STAGEMAX; i++) {
 		stages->s[i].C.MIMEname = "";
 		stages->s[i].LYhndl = -1;
diff --git a/WWW/Library/Implementation/HTAssoc.c b/WWW/Library/Implementation/HTAssoc.c
index 22c1126c..831b1967 100644
--- a/WWW/Library/Implementation/HTAssoc.c
+++ b/WWW/Library/Implementation/HTAssoc.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTAssoc.c,v 1.10 2010/04/29 09:34:03 tom Exp $
+ * $LynxId: HTAssoc.c,v 1.11 2016/11/24 15:29:50 tom Exp $
  *
  * MODULE							HTAssoc.c
  *	    ASSOCIATION LIST FOR STORING NAME-VALUE PAIRS.
@@ -55,8 +55,6 @@ void HTAssocList_add(HTAssocList *alist,
 	if (!(assoc = (HTAssoc *) malloc(sizeof(HTAssoc))))
 	      outofmem(__FILE__, "HTAssoc_add");
 
-	assert(assoc != NULL);
-
 	assoc->name = NULL;
 	assoc->value = NULL;
 
diff --git a/WWW/Library/Implementation/HTAtom.c b/WWW/Library/Implementation/HTAtom.c
index 3a96ba4e..914a7f37 100644
--- a/WWW/Library/Implementation/HTAtom.c
+++ b/WWW/Library/Implementation/HTAtom.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTAtom.c,v 1.19 2013/11/28 11:11:05 tom Exp $
+ * $LynxId: HTAtom.c,v 1.20 2016/11/24 15:29:50 tom Exp $
  *
  *			Atoms: Names to numbers			HTAtom.c
  *			=======================
@@ -82,14 +82,10 @@ HTAtom *HTAtom_for(const char *string)
     if (a == NULL)
 	outofmem(__FILE__, "HTAtom_for");
 
-    assert(a != NULL);
-
     a->name = (char *) malloc(strlen(string) + 1);
     if (a->name == NULL)
 	outofmem(__FILE__, "HTAtom_for");
 
-    assert(a->name != NULL);
-
     strcpy(a->name, string);
     a->next = hash_table[hash];	/* Put onto the head of list */
     hash_table[hash] = a;
diff --git a/WWW/Library/Implementation/HTBTree.c b/WWW/Library/Implementation/HTBTree.c
index 3a76550e..f595bae0 100644
--- a/WWW/Library/Implementation/HTBTree.c
+++ b/WWW/Library/Implementation/HTBTree.c
@@ -24,8 +24,6 @@ HTBTree *HTBTree_new(HTComparer comp)
     if (tree == NULL)
 	outofmem(__FILE__, "HTBTree_new");
 
-    assert(tree != NULL);
-
     tree->compare = comp;
     tree->top = NULL;
 
@@ -146,8 +144,6 @@ void HTBTree_add(HTBTree *tree,
 	if (tree->top == NULL)
 	    outofmem(__FILE__, "HTBTree_add");
 
-	assert(tree->top != NULL);
-
 	tree->top->up = NULL;
 	tree->top->object = object;
 	tree->top->left = NULL;
@@ -173,8 +169,6 @@ void HTBTree_add(HTBTree *tree,
 		    if (father_of_element->left == NULL)
 			outofmem(__FILE__, "HTBTree_add");
 
-		    assert(father_of_element->left != NULL);
-
 		    added_element = father_of_element->left;
 		    added_element->up = father_of_element;
 		    added_element->object = object;
@@ -192,7 +186,6 @@ void HTBTree_add(HTBTree *tree,
 
 		    if (father_of_element->right == NULL)
 			outofmem(__FILE__, "HTBTree_add");
-		    assert(father_of_element->right != NULL);
 
 		    added_element = father_of_element->right;
 		    added_element->up = father_of_element;
diff --git a/WWW/Library/Implementation/HTChunk.c b/WWW/Library/Implementation/HTChunk.c
index 2ea36c85..6b670116 100644
--- a/WWW/Library/Implementation/HTChunk.c
+++ b/WWW/Library/Implementation/HTChunk.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTChunk.c,v 1.27 2012/02/07 11:28:44 tom Exp $
+ * $LynxId: HTChunk.c,v 1.28 2016/11/24 15:29:50 tom Exp $
  *
  *		Chunk handling:	Flexible arrays
  *		===============================
@@ -48,8 +48,6 @@ HTChunk *HTChunkCreateMayFail(int grow, int failok)
 	}
     }
 
-    assert(ch != NULL);
-
     HTChunkInit(ch, grow);
     ch->failok = failok;
     return ch;
@@ -65,8 +63,6 @@ HTChunk *HTChunkCreate2(int grow, size_t needed)
     if (ch == NULL)
 	outofmem(__FILE__, "HTChunkCreate2");
 
-    assert(ch != NULL);
-
     HTChunkInit(ch, grow);
     if (needed-- > 0) {
 	/* Round up */
diff --git a/WWW/Library/Implementation/HTFTP.c b/WWW/Library/Implementation/HTFTP.c
index 49af1828..d2c8bdf2 100644
--- a/WWW/Library/Implementation/HTFTP.c
+++ b/WWW/Library/Implementation/HTFTP.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTFTP.c,v 1.126 2014/07/24 22:08:24 tom Exp $
+ * $LynxId: HTFTP.c,v 1.127 2016/11/24 16:22:50 tom Exp $
  *
  *			File Transfer Protocol (FTP) Client
  *			for a WorldWideWeb browser
@@ -309,9 +309,6 @@ char *HTVMS_name(const char *nn,
     if (!filename || !nodename)
 	outofmem(__FILE__, "HTVMSname");
 
-    assert(filename != NULL);
-    assert(nodename != NULL);
-
     strcpy(filename, fn);
     strcpy(nodename, "");	/* On same node?  Yes if node names match */
     if (StrNCmp(nn, "localhost", 9)) {
@@ -823,8 +820,6 @@ static int get_connection(const char *arg,
 	con = typecalloc(connection);
 	if (con == NULL)
 	    outofmem(__FILE__, "get_connection");
-
-	assert(con != NULL);
     }
     con->socket = -1;
 
@@ -2283,8 +2278,6 @@ static EntryInfo *parse_dir_entry(char *entry,
     if (entry_info == NULL)
 	outofmem(__FILE__, "parse_dir_entry");
 
-    assert(entry_info != NULL);
-
     entry_info->display = TRUE;
 
     switch (server_type) {
diff --git a/WWW/Library/Implementation/HTFile.c b/WWW/Library/Implementation/HTFile.c
index 1da1d19c..74ab62c1 100644
--- a/WWW/Library/Implementation/HTFile.c
+++ b/WWW/Library/Implementation/HTFile.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTFile.c,v 1.144 2014/12/08 01:38:05 tom Exp $
+ * $LynxId: HTFile.c,v 1.145 2016/11/24 15:29:50 tom Exp $
  *
  *			File Access				HTFile.c
  *			===========
@@ -556,8 +556,6 @@ void HTSetSuffix5(const char *suffix,
 	    if (suff == NULL)
 		outofmem(__FILE__, "HTSetSuffix");
 
-	    assert(suff != NULL);
-
 	    if (!HTSuffixes) {
 		HTSuffixes = HTList_new();
 #ifdef LY_FIND_LEAKS
diff --git a/WWW/Library/Implementation/HTFormat.c b/WWW/Library/Implementation/HTFormat.c
index 54850418..1ba5f199 100644
--- a/WWW/Library/Implementation/HTFormat.c
+++ b/WWW/Library/Implementation/HTFormat.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTFormat.c,v 1.84 2016/04/26 09:11:03 tom Exp $
+ * $LynxId: HTFormat.c,v 1.85 2016/11/24 15:29:50 tom Exp $
  *
  *		Manage different file formats			HTFormat.c
  *		=============================
@@ -96,7 +96,6 @@ void HTSetPresentation(const char *representation,
     if (pres == NULL)
 	outofmem(__FILE__, "HTSetPresentation");
 
-    assert(pres != NULL);
     assert(representation != NULL);
 
     CTRACE2(TRACE_CFG,
@@ -159,8 +158,6 @@ void HTSetConversion(const char *representation_in,
     if (pres == NULL)
 	outofmem(__FILE__, "HTSetConversion");
 
-    assert(pres != NULL);
-
     CTRACE2(TRACE_CFG,
 	    (tfp,
 	     "HTSetConversion rep_in=%s, rep_out=%s, qual=%f\n",
@@ -1874,8 +1871,6 @@ HTStream *HTNetToText(HTStream *sink)
     if (me == NULL)
 	outofmem(__FILE__, "NetToText");
 
-    assert(me != NULL);
-
     me->isa = &NetToTextClass;
 
     me->had_cr = NO;
diff --git a/WWW/Library/Implementation/HTGopher.c b/WWW/Library/Implementation/HTGopher.c
index a8c8c434..4828a785 100644
--- a/WWW/Library/Implementation/HTGopher.c
+++ b/WWW/Library/Implementation/HTGopher.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTGopher.c,v 1.63 2016/10/15 01:11:44 tom Exp $
+ * $LynxId: HTGopher.c,v 1.65 2016/11/24 16:38:54 tom Exp $
  *
  *			GOPHER ACCESS				HTGopher.c
  *			=============
@@ -692,8 +692,6 @@ static void de_escape(char *command, const char *selector)
     if (command == NULL)
 	outofmem(__FILE__, "HTLoadGopher");
 
-    assert(command != NULL);
-
     q = command;
     while (*p) {		/* Decode hex */
 	if (*p == HEX_ESCAPE) {
@@ -1030,8 +1028,6 @@ static int parse_cso_fields(char *buf,
 			    outofmem(__FILE__, "HTLoadCSO");
 			}
 
-			assert(newf != NULL);
-
 			if (last)
 			    last->next = newf;
 			else
@@ -1517,7 +1513,7 @@ static int HTLoadCSO(const char *arg,
     Target = HTStreamStack(format_in,
 			   format_out,
 			   sink, anAnchor);
-    if (!Target || Target == NULL) {
+    if (Target == NULL) {
 	char *temp = 0;
 
 	HTSprintf0(&temp, CANNOT_CONVERT_I_TO_O,
@@ -1803,8 +1799,6 @@ static int HTLoadGopher(const char *arg,
 	    if (command == NULL)
 		outofmem(__FILE__, "HTLoadGopher");
 
-	    assert(command != NULL);
-
 	    de_escape(command, selector);	/* Bug fix TBL 921208 */
 
 	    strcat(command, "\t");
@@ -1839,8 +1833,6 @@ static int HTLoadGopher(const char *arg,
 	    if (command == NULL)
 		outofmem(__FILE__, "HTLoadGopher");
 
-	    assert(command != NULL);
-
 	    de_escape(command, selector);	/* Bug fix TBL 921208 */
 
 	    strcpy(command, "query ");
@@ -1860,8 +1852,6 @@ static int HTLoadGopher(const char *arg,
 	    if (command == NULL)
 		outofmem(__FILE__, "HTLoadGopher");
 
-	    assert(command != NULL);
-
 	    de_escape(command, selector);
 	}
 	FREE(p1);
diff --git a/WWW/Library/Implementation/HTGroup.c b/WWW/Library/Implementation/HTGroup.c
index e2e39791..c1172f00 100644
--- a/WWW/Library/Implementation/HTGroup.c
+++ b/WWW/Library/Implementation/HTGroup.c
@@ -108,8 +108,6 @@ static AddressDefList *parse_address_part(FILE *fp)
 	if (ref == NULL)
 	    outofmem(__FILE__, "parse_address_part");
 
-	assert(ref != NULL);
-
 	ref->name = NULL;
 	ref->translation = NULL;
 	StrAllocCopy(ref->name, HTlex_buffer);
@@ -167,8 +165,6 @@ static UserDefList *parse_user_part(FILE *fp)
 	if (ref == NULL)
 	    outofmem(__FILE__, "parse_user_part");
 
-	assert(ref != NULL);
-
 	ref->name = NULL;
 	ref->translation = NULL;
 	StrAllocCopy(ref->name, HTlex_buffer);
@@ -243,8 +239,6 @@ static Item *parse_item(FILE *fp)
     if (item == NULL)
 	outofmem(__FILE__, "parse_item");
 
-    assert(item != NULL);
-
     item->user_def_list = user_def_list;
     item->address_def_list = address_def_list;
     return item;
@@ -293,8 +287,6 @@ GroupDef *HTAA_parseGroupDef(FILE *fp)
     if (group_def == NULL)
 	outofmem(__FILE__, "HTAA_parseGroupDef");
 
-    assert(group_def != NULL);
-
     group_def->group_name = NULL;
     group_def->item_list = item_list;
 
diff --git a/WWW/Library/Implementation/HTList.c b/WWW/Library/Implementation/HTList.c
index 996bea3d..d12cd38c 100644
--- a/WWW/Library/Implementation/HTList.c
+++ b/WWW/Library/Implementation/HTList.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTList.c,v 1.19 2013/01/04 00:31:27 tom Exp $
+ * $LynxId: HTList.c,v 1.20 2016/11/24 15:29:50 tom Exp $
  *
  *	A small List class					      HTList.c
  *	==================
@@ -23,8 +23,6 @@ HTList *HTList_new(void)
     if ((newList = typeMalloc(HTList)) == NULL)
 	  outofmem(__FILE__, "HTList_new");
 
-    assert(newList != NULL);
-
     newList->object = NULL;
     newList->next = NULL;
 
@@ -134,8 +132,6 @@ void HTList_addObject(HTList *me, void *newObject)
 	if ((newNode = typeMalloc(HTList)) == NULL)
 	      outofmem(__FILE__, "HTList_addObject");
 
-	assert(newNode != NULL);
-
 	newNode->object = newObject;
 	newNode->next = me->next;
 	me->next = newNode;
@@ -192,8 +188,6 @@ void HTList_insertObjectAt(HTList *me, void *newObject,
 	    if ((newNode = typeMalloc(HTList)) == NULL)
 		  outofmem(__FILE__, "HTList_addObjectAt");
 
-	    assert(newNode != NULL);
-
 	    newNode->object = newObject;
 	    newNode->next = temp;
 	    if (prevNode)
diff --git a/WWW/Library/Implementation/HTMIME.c b/WWW/Library/Implementation/HTMIME.c
index 6f6391c8..77775660 100644
--- a/WWW/Library/Implementation/HTMIME.c
+++ b/WWW/Library/Implementation/HTMIME.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTMIME.c,v 1.90 2015/12/16 01:13:50 tom Exp $
+ * $LynxId: HTMIME.c,v 1.92 2016/11/24 18:16:23 tom Exp $
  *
  *			MIME Message Parse			HTMIME.c
  *			==================
@@ -1081,12 +1081,7 @@ static void HTMIME_put_character(HTStream *me, int c)
       begin_transparent:
     case MIME_TRANSPARENT:
 	me->anchor->actual_length += 1;
-	if (me->anchor->content_length == 0 ||
-	    (me->anchor->content_length >= me->anchor->actual_length)) {
-	    (me->targetClass.put_character) (me->target, c);
-	} else {
-	    (me->targetClass.put_character) (me->target, c);
-	}
+	(me->targetClass.put_character) (me->target, c);
 	return;
 
 	/* RFC-2616 describes chunked transfer coding */
@@ -2170,8 +2165,6 @@ HTStream *HTMIMEConvert(HTPresentation *pres,
     if (me == NULL)
 	outofmem(__FILE__, "HTMIMEConvert");
 
-    assert(me != NULL);
-
     me->isa = &HTMIME;
     me->sink = sink;
     me->anchor = anchor;
@@ -2319,8 +2312,6 @@ static void HTmmdec_base64(char **t,
     if ((buf = typeMallocn(char, strlen(s) * 3 + 1)) == 0)
 	  outofmem(__FILE__, "HTmmdec_base64");
 
-    assert(buf != NULL);
-
     for (bp = buf; *s; s += 4) {
 	val = 0;
 	if (s[2] == '=')
@@ -2363,8 +2354,6 @@ static void HTmmdec_quote(char **t,
     if ((buf = typeMallocn(char, strlen(s) + 1)) == 0)
 	  outofmem(__FILE__, "HTmmdec_quote");
 
-    assert(buf != NULL);
-
     for (bp = buf; *s;) {
 	if (*s == '=') {
 	    cval = 0;
@@ -2409,8 +2398,6 @@ void HTmmdecode(char **target,
     if ((buf = typeMallocn(char, strlen(source) + 1)) == 0)
 	  outofmem(__FILE__, "HTmmdecode");
 
-    assert(buf != NULL);
-
     for (s = source, u = buf; *s;) {
 	if (!strncasecomp(s, "=?ISO-2022-JP?B?", 16)) {
 	    base64 = 1;
@@ -2486,8 +2473,6 @@ int HTrjis(char **t,
     if ((buf = typeMallocn(char, strlen(s) * 2 + 1)) == 0)
 	  outofmem(__FILE__, "HTrjis");
 
-    assert(buf != NULL);
-
     for (p = buf; *s;) {
 	if (!kanji && s[0] == '$' && (s[1] == '@' || s[1] == 'B')) {
 	    if (HTmaybekanji((int) s[2], (int) s[3])) {
diff --git a/WWW/Library/Implementation/HTMLGen.c b/WWW/Library/Implementation/HTMLGen.c
index 60d77469..361ad69d 100644
--- a/WWW/Library/Implementation/HTMLGen.c
+++ b/WWW/Library/Implementation/HTMLGen.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTMLGen.c,v 1.40 2013/11/28 11:13:46 tom Exp $
+ * $LynxId: HTMLGen.c,v 1.41 2016/11/24 15:29:50 tom Exp $
  *
  *		HTML Generator
  *		==============
@@ -630,8 +630,6 @@ HTStructured *HTMLGenerator(HTStream *output)
     if (me == NULL)
 	outofmem(__FILE__, "HTMLGenerator");
 
-    assert(me != NULL);
-
     me->isa = &HTMLGeneration;
 
     me->target = output;
@@ -715,8 +713,6 @@ HTStream *HTPlainToHTML(HTPresentation *pres GCC_UNUSED,
     if (me == NULL)
 	outofmem(__FILE__, "PlainToHTML");
 
-    assert(me != NULL);
-
     me->isa = (const HTStructuredClass *) &PlainToHTMLConversion;
 
     /*
diff --git a/WWW/Library/Implementation/HTParse.c b/WWW/Library/Implementation/HTParse.c
index 3c1ec7b4..c5d947f8 100644
--- a/WWW/Library/Implementation/HTParse.c
+++ b/WWW/Library/Implementation/HTParse.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTParse.c,v 1.77 2016/11/24 14:32:41 tom Exp $
+ * $LynxId: HTParse.c,v 1.78 2016/11/24 15:29:50 tom Exp $
  *
  *		Parse HyperText Document Address		HTParse.c
  *		================================
@@ -386,8 +386,6 @@ char *HTParse(const char *aName,
     result = tail = (char *) LYalloca(need);
     if (result == NULL) {
 	outofmem(__FILE__, "HTParse");
-
-	assert(result != NULL);
     }
     *result = '\0';
     name = result + len;
@@ -785,8 +783,6 @@ const char *HTParseAnchor(const char *aName)
 
 	    if (name == NULL) {
 		outofmem(__FILE__, "HTParseAnchor");
-
-		assert(name != NULL);
 	    }
 	    strcpy(name, aName);
 	    scan(name, &given);
@@ -1008,8 +1004,6 @@ char *HTRelative(const char *aName,
 	if (result == NULL)
 	    outofmem(__FILE__, "HTRelative");
 
-	assert(result != NULL);
-
 	result[0] = '\0';
 	for (; levels; levels--)
 	    strcat(result, "../");
@@ -1070,8 +1064,6 @@ char *HTEscape(const char *str,
     if (result == NULL)
 	outofmem(__FILE__, "HTEscape");
 
-    assert(result != NULL);
-
     for (q = result, p = str; *p; p++) {
 	unsigned char a = UCH(TOASCII(*p));
 
@@ -1113,8 +1105,6 @@ char *HTEscapeUnsafe(const char *str)
     if (result == NULL)
 	outofmem(__FILE__, "HTEscapeUnsafe");
 
-    assert(result != NULL);
-
     for (q = result, p = str; *p; p++) {
 	unsigned char a = UCH(TOASCII(*p));
 
@@ -1156,8 +1146,6 @@ char *HTEscapeSP(const char *str,
     if (result == NULL)
 	outofmem(__FILE__, "HTEscape");
 
-    assert(result != NULL);
-
     for (q = result, p = str; *p; p++) {
 	unsigned char a = UCH(TOASCII(*p));
 
@@ -1326,8 +1314,6 @@ void HTMake822Word(char **str,
     if (result == NULL)
 	outofmem(__FILE__, "HTMake822Word");
 
-    assert(result != NULL);
-
     q = result;
     if (quoted)
 	*q++ = '"';
diff --git a/WWW/Library/Implementation/HTPlain.c b/WWW/Library/Implementation/HTPlain.c
index 57ca2370..1dc63b48 100644
--- a/WWW/Library/Implementation/HTPlain.c
+++ b/WWW/Library/Implementation/HTPlain.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTPlain.c,v 1.59 2014/12/08 01:11:15 tom Exp $
+ * $LynxId: HTPlain.c,v 1.60 2016/11/24 15:29:50 tom Exp $
  *
  *		Plain text object		HTWrite.c
  *		=================
@@ -577,8 +577,6 @@ HTStream *HTPlainPresent(HTPresentation *pres GCC_UNUSED, HTParentAnchor *anchor
     if (me == NULL)
 	outofmem(__FILE__, "HTPlain_new");
 
-    assert(me != NULL);
-
     me->isa = &HTPlain;
 
     HTPlain_lastraw = -1;
diff --git a/WWW/Library/Implementation/HTRules.c b/WWW/Library/Implementation/HTRules.c
index a9b6e9db..b1e263bb 100644
--- a/WWW/Library/Implementation/HTRules.c
+++ b/WWW/Library/Implementation/HTRules.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTRules.c,v 1.45 2013/11/28 11:14:29 tom Exp $
+ * $LynxId: HTRules.c,v 1.46 2016/11/24 15:29:50 tom Exp $
  *
  *	Configuration manager for Hypertext Daemon		HTRules.c
  *	==========================================
@@ -91,8 +91,6 @@ int HTAddRule(HTRuleOp op, const char *pattern,
     if (temp == NULL)
 	outofmem(__FILE__, "HTAddRule");
 
-    assert(temp != NULL);
-
     if (equiv) {		/* Two operands */
 	char *pEquiv = NULL;
 
diff --git a/WWW/Library/Implementation/HTString.c b/WWW/Library/Implementation/HTString.c
index 3eb94a11..187f1b1b 100644
--- a/WWW/Library/Implementation/HTString.c
+++ b/WWW/Library/Implementation/HTString.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTString.c,v 1.72 2013/11/28 11:14:49 tom Exp $
+ * $LynxId: HTString.c,v 1.73 2016/11/24 15:29:50 tom Exp $
  *
  *	Case-independent string comparison		HTString.c
  *
@@ -306,7 +306,6 @@ char *HTSACopy(char **dest,
 	    *dest = (char *) malloc(size);
 	    if (*dest == NULL)
 		outofmem(__FILE__, "HTSACopy");
-	    assert(*dest != NULL);
 	    MemCpy(*dest, src, size);
 	}
     } else {
@@ -327,13 +326,11 @@ char *HTSACat(char **dest,
 	    *dest = (char *) realloc(*dest, length + strlen(src) + 1);
 	    if (*dest == NULL)
 		outofmem(__FILE__, "HTSACat");
-	    assert(*dest != NULL);
 	    strcpy(*dest + length, src);
 	} else {
 	    *dest = (char *) malloc(strlen(src) + 1);
 	    if (*dest == NULL)
 		outofmem(__FILE__, "HTSACat");
-	    assert(*dest != NULL);
 	    strcpy(*dest, src);
 	}
     }
@@ -367,7 +364,6 @@ char *HTSACopy_extra(char **dest,
 	    *dest = (char *) malloc(size + EXTRA_SIZE);
 	    if (*dest == NULL)
 		outofmem(__FILE__, "HTSACopy_extra");
-	    assert(*dest != NULL);
 	    *(EXTRA_TYPE *) (void *) (*dest) = size;
 	    *dest += EXTRA_SIZE;
 	}
@@ -587,7 +583,6 @@ static char *HTAlloc(char *ptr, size_t length)
 	ptr = (char *) malloc(length);
     if (ptr == 0)
 	outofmem(__FILE__, "HTAlloc");
-    assert(ptr != NULL);
     return ptr;
 }
 
@@ -699,8 +694,6 @@ PUBLIC_IF_FIND_LEAKS char *StrAllocVsprintf(char **pstr,
     if ((fmt_ptr = malloc(need * NUM_WIDTH)) == 0
 	|| (tmp_ptr = malloc(tmp_len)) == 0) {
 	outofmem(__FILE__, "StrAllocVsprintf");
-	assert(fmt_ptr != NULL);
-	assert(tmp_ptr != NULL);
     }
 #endif /* SAVE_TIME_NOT_SPACE */
 
@@ -973,8 +966,6 @@ char *HTQuoteParameter(const char *parameter)
     if (result == NULL)
 	outofmem(__FILE__, "HTQuoteParameter");
 
-    assert(result != NULL);
-
     n = 0;
 #if (USE_QUOTED_PARAMETER == 1)
     /*
@@ -1232,13 +1223,9 @@ void HTSABCopy(bstring **dest, const char *src,
 	if ((t = (bstring *) malloc(sizeof(bstring))) == NULL)
 	      outofmem(__FILE__, "HTSABCopy");
 
-	assert(t != NULL);
-
 	if ((t->str = typeMallocn(char, need)) == NULL)
 	      outofmem(__FILE__, "HTSABCopy");
 
-	assert(t->str != NULL);
-
 	MemCpy(t->str, src, len);
 	t->len = len;
 	t->str[t->len] = '\0';
@@ -1286,15 +1273,11 @@ void HTSABCat(bstring **dest, const char *src,
 	    if ((t = typecalloc(bstring)) == NULL)
 		  outofmem(__FILE__, "HTSACat");
 
-	    assert(t != NULL);
-
 	    t->str = typeMallocn(char, need);
 	}
 	if (t->str == NULL)
 	    outofmem(__FILE__, "HTSACat");
 
-	assert(t->str != NULL);
-
 	MemCpy(t->str + t->len, src, len);
 	t->len += len;
 	t->str[t->len] = '\0';
diff --git a/WWW/Library/Implementation/HTTCP.c b/WWW/Library/Implementation/HTTCP.c
index 54491956..c5ceb041 100644
--- a/WWW/Library/Implementation/HTTCP.c
+++ b/WWW/Library/Implementation/HTTCP.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTTCP.c,v 1.135 2016/11/15 09:31:58 tom Exp $
+ * $LynxId: HTTCP.c,v 1.136 2016/11/24 18:06:26 tom Exp $
  *
  *			Generic Communication Code		HTTCP.c
  *			==========================
@@ -1593,6 +1593,7 @@ static void really_getaddrinfo(const char *host,
 	    statuses->h_length = (int) (((LYNX_ADDRINFO *) (*result))->ai_addrlen);
 	}
     }
+    free(res);
 }
 #endif /* NSL_FORK */
 
diff --git a/WWW/Library/Implementation/HTTP.c b/WWW/Library/Implementation/HTTP.c
index 9a5bc2b8..2db68e25 100644
--- a/WWW/Library/Implementation/HTTP.c
+++ b/WWW/Library/Implementation/HTTP.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTTP.c,v 1.161 2016/11/24 12:20:07 tom Exp $
+ * $LynxId: HTTP.c,v 1.162 2016/11/24 18:25:32 tom Exp $
  *
  * HyperText Tranfer Protocol	- Client implementation		HTTP.c
  * ==========================
@@ -538,9 +538,7 @@ char *HTSkipToAt(char *host, int *gen_delims)
 
     *gen_delims = 0;
     while ((ch = UCH(*s)) != '\0') {
-	if (ch == '\0') {
-	    break;
-	} else if (ch == ':') {
+	if (ch == ':') {
 	    if (pass++)
 		break;
 	} else if (ch == '@') {
diff --git a/WWW/Library/Implementation/HTWSRC.c b/WWW/Library/Implementation/HTWSRC.c
index 1136da0f..fe42a65b 100644
--- a/WWW/Library/Implementation/HTWSRC.c
+++ b/WWW/Library/Implementation/HTWSRC.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTWSRC.c,v 1.29 2013/05/01 22:32:59 tom Exp $
+ * $LynxId: HTWSRC.c,v 1.30 2016/11/24 15:29:50 tom Exp $
  *
  *			Parse WAIS Source file			HTWSRC.c
  *			======================
@@ -470,8 +470,6 @@ HTStream *HTWSRCConvert(HTPresentation *pres, HTParentAnchor *anchor,
     if (!me)
 	outofmem(__FILE__, "HTWSRCConvert");
 
-    assert(me != NULL);
-
     me->isa = &WSRCParserClass;
     me->target = HTML_new(anchor, pres->rep_out, sink);
 
diff --git a/WWW/Library/Implementation/SGML.c b/WWW/Library/Implementation/SGML.c
index 962d794c..47dbc306 100644
--- a/WWW/Library/Implementation/SGML.c
+++ b/WWW/Library/Implementation/SGML.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: SGML.c,v 1.155 2014/12/10 09:48:35 tom Exp $
+ * $LynxId: SGML.c,v 1.159 2016/11/24 20:08:10 tom Exp $
  *
  *			General SGML Parser code		SGML.c
  *			========================
@@ -19,9 +19,6 @@
 #include <SGML.h>
 #include <HTMLDTD.h>
 #include <HTAccess.h>
-#include <HTCJK.h>		/* FIXME: this doesn't belong in SGML.c */
-#include <UCMap.h>
-#include <UCDefs.h>
 #include <UCAux.h>
 
 #include <HTChunk.h>
@@ -1365,8 +1362,6 @@ static void start_element(HTStream *me)
 	if (N == NULL)
 	    outofmem(__FILE__, "start_element");
 
-	assert(N != NULL);
-
 	N->next = me->element_stack;
 	N->tag = new_tag;
 	me->element_stack = N;
@@ -3214,8 +3209,8 @@ static void SGML_character(HTStream *me, int c_in)
 		HTPassEightBitRaw &&
 		saved_char_in >=
 		LYlowest_eightbit[me->outUCLYhndl]) {
-		HTChunkPutUtf8Char(string,
-				   (UCode_t) (0xf000 | saved_char_in));
+		orig_HTChunkPutUtf8Char(string,
+					(UCode_t) (0xf000 | saved_char_in));
 	    } else {
 		HTChunkPutUtf8Char(string, clong);
 	    }
@@ -3624,8 +3619,8 @@ static void SGML_character(HTStream *me, int c_in)
 		HTPassEightBitRaw &&
 		saved_char_in >=
 		LYlowest_eightbit[me->outUCLYhndl]) {
-		HTChunkPutUtf8Char(string,
-				   (UCode_t) (0xf000 | saved_char_in));
+		orig_HTChunkPutUtf8Char(string,
+					(UCode_t) (0xf000 | saved_char_in));
 	    } else {
 		HTChunkPutUtf8Char(string, clong);
 	    }
@@ -3664,8 +3659,8 @@ static void SGML_character(HTStream *me, int c_in)
 		HTPassEightBitRaw &&
 		saved_char_in >=
 		LYlowest_eightbit[me->outUCLYhndl]) {
-		HTChunkPutUtf8Char(string,
-				   (UCode_t) (0xf000 | saved_char_in));
+		orig_HTChunkPutUtf8Char(string,
+					(UCode_t) (0xf000 | saved_char_in));
 	    } else {
 		HTChunkPutUtf8Char(string, clong);
 	    }
@@ -3708,8 +3703,8 @@ static void SGML_character(HTStream *me, int c_in)
 		HTPassEightBitRaw &&
 		saved_char_in >=
 		LYlowest_eightbit[me->outUCLYhndl]) {
-		HTChunkPutUtf8Char(string,
-				   (UCode_t) (0xf000 | saved_char_in));
+		orig_HTChunkPutUtf8Char(string,
+					(UCode_t) (0xf000 | saved_char_in));
 	    } else {
 		HTChunkPutUtf8Char(string, clong);
 	    }
@@ -4320,8 +4315,6 @@ HTStream *SGML_new(const SGML_dtd * dtd,
     if (!me)
 	outofmem(__FILE__, "SGML_begin");
 
-    assert(me != NULL);
-
     me->isa = &SGMLParser;
     me->string = HTChunkCreate(128);	/* Grow by this much */
     me->dtd = dtd;
@@ -4872,7 +4865,6 @@ void TO_JIS(const unsigned char *arg,
 	outofmem(__FILE__, "TO_JIS");
 #endif
     TO_EUC(arg, euc);
-    is_EUC_JP(euc);
     EUC_TO_JIS(euc, jis, TO_KANJI, TO_ASCII);
 
     free(euc);
diff --git a/src/GridText.c b/src/GridText.c
index 810a38d2..a2f5479a 100644
--- a/src/GridText.c
+++ b/src/GridText.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: GridText.c,v 1.287 2015/12/16 01:20:01 tom Exp $
+ * $LynxId: GridText.c,v 1.290 2016/11/24 18:10:02 tom Exp $
  *
  *		Character grid hypertext object
  *		===============================
@@ -1000,13 +1000,7 @@ HText *HText_new(HTParentAnchor *anchor)
      * the previous object may become invalid.  - kw
      */
     if (HTMainText) {
-	if (HText_hasUTF8OutputSet(HTMainText) &&
-	    HTLoadedDocumentEightbit() &&
-	    IS_UTF8_TTY) {
-	    self->had_utf8 = HTMainText->has_utf8;
-	} else {
-	    self->had_utf8 = HTMainText->has_utf8;
-	}
+	self->had_utf8 = HTMainText->has_utf8;
 	HTMainText->has_utf8 = NO;
     }
 
@@ -3136,8 +3130,6 @@ static void split_line(HText *text, unsigned split)
 	if (!temp)
 	    outofmem(__FILE__, "split_line_2");
 
-	assert(temp != NULL);
-
 	memcpy(temp, previous, LINE_SIZE(previous->size));
 #if defined(USE_COLOR_STYLE)
 	POOLallocstyles(temp->styles, previous->numstyles);
@@ -5164,8 +5156,6 @@ int HText_beginAnchor(HText *text, int underline,
     if (a == NULL)
 	outofmem(__FILE__, "HText_beginAnchor");
 
-    assert(a != NULL);
-
     a->inUnderline = (BOOLEAN) underline;
 
     a->sgml_offset = SGML_offset();
@@ -7997,7 +7987,6 @@ static AnchorIndex **allocAnchorIndex(unsigned *size)
 		    if (p == NULL)
 			outofmem(__FILE__, "allocAnchorIndex");
 
-		    assert(p != NULL);
 		    p->type = input->type;
 		    p->size = input->size;
 		    p->offset = anchor->line_pos;
@@ -9322,7 +9311,6 @@ void HText_setTabID(HText *text, const char *name)
 	StrAllocCopy(Tab->name, name);
     }
 
-    assert(Tab != NULL);
     Tab->column = HText_getCurrentColumn(text);
     return;
 }
@@ -9537,8 +9525,6 @@ void HText_beginForm(char *action,
     if (newform == NULL)
 	outofmem(__FILE__, "HText_beginForm");
 
-    assert(newform != NULL);
-
     PerFormInfo_free(HTCurrentForm);	/* shouldn't happen here - kw */
     HTCurrentForm = newform;
 
@@ -9862,7 +9848,6 @@ char *HText_setLastOptionValue(HText *text, char *value,
 		outofmem(__FILE__, "HText_setLastOptionValue");
 	}
 
-	assert(new_ptr != NULL);
 	new_ptr->name = NULL;
 	new_ptr->cp_submit_value = NULL;
 	new_ptr->next = NULL;
@@ -10033,9 +10018,6 @@ int HText_beginInput(HText *text,
     if (a == NULL || f == NULL)
 	outofmem(__FILE__, "HText_beginInput");
 
-    assert(a != NULL);
-    assert(f != NULL);
-
     a->sgml_offset = SGML_offset();
     a->inUnderline = (BOOLEAN) underline;
     a->line_num = text->Lines;
@@ -10714,9 +10696,6 @@ static void UpdateBoundary(char **Boundary,
     char *text = BStrData(data);
     char *want = *Boundary;
 
-    assert(want != NULL);
-    assert(text != NULL);
-
     for (j = 0; (long) j <= (long) (last - have); ++j) {
 	if (want[0] == text[j]
 	    && !memcmp(want, text + j, have)) {
@@ -10766,7 +10745,6 @@ static char *convert_to_base64(const char *src,
     if ((dest = (char *) malloc(rlen + 1)) == NULL) {
 	outofmem(__FILE__, "convert_to_base64");
     }
-    assert(dest != NULL);
     r = dest;
 
     /* encode */
@@ -11135,7 +11113,6 @@ int HText_SubmitForm(FormInfo * submit_item, DocInfo *doc,
 	my_data = typecallocn(PostData, (size_t) anchor_limit);
 	if (my_data == 0)
 	    outofmem(__FILE__, "HText_SubmitForm");
-	assert(my_data != NULL);
     }
 
     if (target_csname == NULL) {
@@ -12626,14 +12603,12 @@ static int increment_tagged_htline(HTLine *ht, TextAnchor *a, int *lx_val,
 	allocHTLine(temp, strlen(buf));
 	if (!temp)
 	    outofmem(__FILE__, "increment_tagged_htline");
-	assert(temp != NULL);
 
 	memcpy(temp, ht, LINE_SIZE(0));
 #if defined(USE_COLOR_STYLE)
 	POOLallocstyles(temp->styles, ht->numstyles);
 	if (!temp->styles)
 	    outofmem(__FILE__, "increment_tagged_htline");
-	assert(temp->styles != NULL);
 	memcpy(temp->styles, ht->styles, sizeof(HTStyleChange) * ht->numstyles);
 #endif
 	ht = temp;
@@ -12695,10 +12670,6 @@ static void insert_new_textarea_anchor(TextAnchor **curr_anchor, HTLine **exit_h
     if (a == NULL || l == NULL || f == NULL)
 	outofmem(__FILE__, "insert_new_textarea_anchor");
 
-    assert(a != NULL);
-    assert(f != NULL);
-    assert(l != NULL);
-
     /*  Init all the fields in the new TextAnchor.                 */
     /*  [anything "special" needed based on ->show_anchor value ?] */
     a->next = anchor->next;
@@ -12963,8 +12934,6 @@ static char *readEditedFile(char *ed_temp)
 
 	if (!ebuf)
 	    outofmem(__FILE__, "HText_EditTextArea");
-
-	assert(ebuf != NULL);
     } else {
 	ebuf = typecallocn(char, size + 1);
 
@@ -12978,7 +12947,6 @@ static char *readEditedFile(char *ed_temp)
 	    HTAlwaysAlert(NULL, MEMORY_EXHAUSTED_FILE);
 	    return 0;
 	}
-	assert(ebuf != NULL);
 
 	if ((fp = fopen(ed_temp, "r")) != 0) {
 	    size = fread(ebuf, (size_t) 1, size, fp);
@@ -13040,8 +13008,6 @@ static int finish_ExtEditForm(LinkInfo * form_link, TextAnchor *start_anchor,
     if ((line = typeMallocn(char, line_used)) == 0)
 	  outofmem(__FILE__, "HText_EditTextArea");
 
-    assert(line != NULL);
-
     anchor_ptr = start_anchor;
     display_size = anchor_ptr->input_field->size;
     if (display_size <= 4 ||
@@ -13615,10 +13581,6 @@ int HText_InsertFile(LinkInfo * form_link)
     if (a == NULL || l == NULL || f == NULL)
 	outofmem(__FILE__, "HText_InsertFile");
 
-    assert(a != NULL);
-    assert(f != NULL);
-    assert(l != NULL);
-
     /*  Init all the fields in the new TextAnchor.                 */
     /*  [anything "special" needed based on ->show_anchor value ?] */
     /* *INDENT-EQLS* */
@@ -13700,8 +13662,6 @@ int HText_InsertFile(LinkInfo * form_link)
     if ((line = typeMallocn(char, MAX_LINE)) == 0)
 	  outofmem(__FILE__, "HText_InsertFile");
 
-    assert(line != NULL);
-
     match_tag = anchor_ptr->number;
 
     lp = fbuf;
@@ -14702,7 +14662,7 @@ static int LYHandleCache(const char *arg,
     target = HTStreamStack(format_in,
 			   format_out,
 			   sink, anAnchor);
-    if (!target || target == NULL) {
+    if (target == NULL) {
 	HTSprintf0(&buf, CANNOT_CONVERT_I_TO_O,
 		   HTAtom_name(format_in), HTAtom_name(format_out));
 	HTAlert(buf);
diff --git a/src/HTFWriter.c b/src/HTFWriter.c
index b893ea22..ee1817d0 100644
--- a/src/HTFWriter.c
+++ b/src/HTFWriter.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTFWriter.c,v 1.106 2013/11/28 11:17:04 tom Exp $
+ * $LynxId: HTFWriter.c,v 1.107 2016/11/24 15:35:29 tom Exp $
  *
  *		FILE WRITER				HTFWrite.h
  *		===========
@@ -536,8 +536,6 @@ HTStream *HTFWriter_new(FILE *fp)
     if (me == NULL)
 	outofmem(__FILE__, "HTFWriter_new");
 
-    assert(me != NULL);
-
     me->isa = &HTFWriter;
 
     me->fp = fp;
@@ -635,8 +633,6 @@ HTStream *HTSaveAndExecute(HTPresentation *pres,
     if (me == NULL)
 	outofmem(__FILE__, "HTSaveAndExecute");
 
-    assert(me != NULL);
-
     me->isa = &HTFWriter;
     me->input_format = pres->rep;
     me->output_format = pres->rep_out;
@@ -772,8 +768,6 @@ HTStream *HTSaveToFile(HTPresentation *pres,
     if (ret_obj == NULL)
 	outofmem(__FILE__, "HTSaveToFile");
 
-    assert(ret_obj != NULL);
-
     ret_obj->isa = &HTFWriter;
     ret_obj->remove_command = NULL;
     ret_obj->end_command = NULL;
@@ -1129,8 +1123,6 @@ HTStream *HTCompressed(HTPresentation *pres,
     if (me == NULL)
 	outofmem(__FILE__, "HTCompressed");
 
-    assert(me != NULL);
-
     me->isa = &HTFWriter;
     me->input_format = pres->rep;
     me->output_format = pres->rep_out;
@@ -1276,8 +1268,6 @@ HTStream *HTDumpToStdout(HTPresentation *pres GCC_UNUSED,
     if (ret_obj == NULL)
 	outofmem(__FILE__, "HTDumpToStdout");
 
-    assert(ret_obj != NULL);
-
     ret_obj->isa = &HTFWriter;
     ret_obj->remove_command = NULL;
     ret_obj->end_command = NULL;
diff --git a/src/HTInit.c b/src/HTInit.c
index 7341bee2..c2c6c71c 100644
--- a/src/HTInit.c
+++ b/src/HTInit.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTInit.c,v 1.88 2014/02/13 21:39:04 tom Exp $
+ * $LynxId: HTInit.c,v 1.89 2016/11/24 15:35:29 tom Exp $
  *
  *		Configuration-specific Initialization		HTInit.c
  *		----------------------------------------
@@ -275,8 +275,6 @@ static char *GetCommand(char *s, char **t)
     if (!s2)
 	ExitWithError(MEMORY_EXHAUSTED_ABORT);
 
-    assert(s2 != NULL);
-
     *t = s2;
     while (non_empty(s)) {
 	if (quoted) {
@@ -376,8 +374,6 @@ static int ProcessMailcapEntry(FILE *fp, struct MailcapEntry *mc, AcceptMedia me
     if (!rawentry)
 	ExitWithError(MEMORY_EXHAUSTED_ABORT);
 
-    assert(rawentry != NULL);
-
     *rawentry = '\0';
     while (LYSafeGets(&LineBuf, fp) != 0) {
 	LYTrimNewline(LineBuf);
@@ -391,8 +387,6 @@ static int ProcessMailcapEntry(FILE *fp, struct MailcapEntry *mc, AcceptMedia me
 
 	    if (!rawentry)
 		ExitWithError(MEMORY_EXHAUSTED_ABORT);
-
-	    assert(rawentry != NULL);
 	}
 	if (len > 0 && LineBuf[len - 1] == ESCAPE) {
 	    LineBuf[len - 1] = '\0';
@@ -862,8 +856,6 @@ static int RememberTestResult(int mode, char *cmd, int result)
 	if (cur == NULL)
 	    outofmem(__FILE__, "RememberTestResult");
 
-	assert(cur != NULL);
-
 	cur->next = cmdlist;
 	StrAllocCopy(cur->cmd, cmd);
 	cur->result = result;
diff --git a/src/HTML.c b/src/HTML.c
index e10efe79..e74d2390 100644
--- a/src/HTML.c
+++ b/src/HTML.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTML.c,v 1.166 2015/12/13 23:08:45 Kihara.Hideto Exp $
+ * $LynxId: HTML.c,v 1.168 2016/11/24 18:18:18 tom Exp $
  *
  *		Structured stream to Rich hypertext converter
  *		============================================
@@ -762,7 +762,6 @@ static void addClassName(const char *prefix,
 	}
 	if (Style_className == NULL)
 	    outofmem(__FILE__, "addClassName");
-	assert(Style_className != NULL);
 	Style_className_end = Style_className + have;
     }
     if (offset)
@@ -4384,6 +4383,7 @@ static int HTML_start_element(HTStructured * me, int element_number,
 		     * Ugh, it's a button for a script.  - FM
 		     */
 		    I.type = value[HTML_BUTTON_TYPE];
+		    CTRACE((tfp, "found button for a script\n"));
 		}
 	    } else {
 		/* default, if no type given, is a submit button */
@@ -7674,7 +7674,6 @@ HTStructured *HTML_new(HTParentAnchor *anchor,
     me = typecalloc(HTStructured);
     if (me == NULL)
 	outofmem(__FILE__, "HTML_new");
-    assert(me != NULL);
 
     /*
      * This used to call 'get_styles()' only on the first time through this
@@ -8034,8 +8033,6 @@ static HTStream *CacheThru_new(HTParentAnchor *anchor,
     if (!stream)
 	outofmem(__FILE__, "CacheThru_new");
 
-    assert(stream != NULL);
-
     stream->isa = &PassThruCache;
     stream->anchor = anchor;
     stream->fp = NULL;
diff --git a/src/LYCgi.c b/src/LYCgi.c
index 31833eac..f4c2bdec 100644
--- a/src/LYCgi.c
+++ b/src/LYCgi.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYCgi.c,v 1.68 2014/07/24 22:02:26 tom Exp $
+ * $LynxId: LYCgi.c,v 1.70 2016/11/24 16:38:22 tom Exp $
  *                   Lynx CGI support                              LYCgi.c
  *                   ================
  *
@@ -114,7 +114,6 @@ static void add_environment_value(const char *env_value)
 	if (env == NULL) {
 	    outofmem(__FILE__, "LYCgi");
 	}
-	assert(env != NULL);
     }
 
     env[envc++] = DeConst(env_value);
@@ -390,7 +389,7 @@ static int LYLoadCGI(const char *arg,
 			       format_out,
 			       sink, anAnchor);
 
-	if (!target || target == NULL) {
+	if (target == NULL) {
 	    char *tmp = 0;
 
 	    HTSprintf0(&tmp, CANNOT_CONVERT_I_TO_O,
@@ -599,7 +598,6 @@ static int LYLoadCGI(const char *arg,
 		if (argv == NULL) {
 		    outofmem(__FILE__, "LYCgi");
 		}
-		assert(argv != NULL);
 
 		cur_argv = argv + 1;	/* For argv[0] */
 		if (pgm_args != NULL) {
diff --git a/src/LYCharUtils.c b/src/LYCharUtils.c
index 15909dc6..d7177861 100644
--- a/src/LYCharUtils.c
+++ b/src/LYCharUtils.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYCharUtils.c,v 1.128 2014/12/10 10:30:58 tom Exp $
+ * $LynxId: LYCharUtils.c,v 1.129 2016/11/24 15:35:29 tom Exp $
  *
  *  Functions associated with LYCharSets.c and the Lynx version of HTML.c - FM
  *  ==========================================================================
@@ -3389,8 +3389,6 @@ void LYformTitle(char **dst,
 	if ((tmp_buffer = (char *) malloc(strlen(src) + 1)) == 0)
 	    outofmem(__FILE__, "LYformTitle");
 
-	assert(tmp_buffer != NULL);
-
 	switch (kanji_code) {	/* 1997/11/22 (Sat) 09:28:00 */
 	case EUC:
 	    TO_EUC((const unsigned char *) src, (unsigned char *) tmp_buffer);
diff --git a/src/LYCookie.c b/src/LYCookie.c
index 57434850..4f9fba59 100644
--- a/src/LYCookie.c
+++ b/src/LYCookie.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYCookie.c,v 1.131 2015/09/30 22:05:41 tom Exp $
+ * $LynxId: LYCookie.c,v 1.134 2016/11/24 17:24:12 tom Exp $
  *
  *			       Lynx Cookie Support		   LYCookie.c
  *			       ===================
@@ -148,8 +148,6 @@ static cookie *newCookie(void)
     if (p == NULL)
 	outofmem(__FILE__, "newCookie");
 
-    assert(p != NULL);
-
     HTSprintf0(&(p->lynxID), "%p", (void *) p);
     p->port = 80;
     return p;
@@ -571,8 +569,6 @@ static void store_cookie(cookie * co, const char *hostname,
 	if (de == NULL)
 	    outofmem(__FILE__, "store_cookie");
 
-	assert(de != NULL);
-
 	de->bv = QUERY_USER;
 	de->invcheck_bv = DEFAULT_INVCHECK_BV;	/* should this go here? */
 	cookie_list = de->cookie_list = HTList_new();
@@ -676,7 +672,7 @@ static void store_cookie(cookie * co, const char *hostname,
 	 * If it's a replacement for a cookie that had not expired, and never
 	 * allow has not been set, add it again without confirmation.  - FM
 	 */
-    } else if ((Replacement == TRUE && de) && de->bv != REJECT_ALWAYS) {
+    } else if ((Replacement == TRUE) && de->bv != REJECT_ALWAYS) {
 	HTList_insertObjectAt(cookie_list, co, pos);
 	total_cookies++;
 
@@ -2444,7 +2440,7 @@ static int LYHandleCookies(const char *arg,
     target = HTStreamStack(format_in,
 			   format_out,
 			   sink, anAnchor);
-    if (!target || target == NULL) {
+    if (target == NULL) {
 	HTSprintf0(&buf, CANNOT_CONVERT_I_TO_O,
 		   HTAtom_name(format_in), HTAtom_name(format_out));
 	HTAlert(buf);
@@ -2676,8 +2672,6 @@ static void cookie_domain_flag_set(char *domainstr,
 	    if (de == NULL)
 		outofmem(__FILE__, "cookie_domain_flag_set");
 
-	    assert(de != NULL);
-
 	    de->bv = ACCEPT_ALWAYS;
 	    de->invcheck_bv = INVCHECK_QUERY;
 
diff --git a/src/LYGetFile.c b/src/LYGetFile.c
index a6ed48d3..3b06cc92 100644
--- a/src/LYGetFile.c
+++ b/src/LYGetFile.c
@@ -1,4 +1,4 @@
-/* $LynxId: LYGetFile.c,v 1.93 2015/04/06 10:33:23 tom Exp $ */
+/* $LynxId: LYGetFile.c,v 1.94 2016/11/24 15:35:29 tom Exp $ */
 #include <HTUtils.h>
 #include <HTTP.h>
 #include <HTAnchor.h>		/* Anchor class */
@@ -1279,8 +1279,6 @@ static struct trust *new_trust(const char *src, const char *path, int type)
     if (tp == NULL)
 	outofmem(__FILE__, "new_trust");
 
-    assert(tp != NULL);
-
     tp->type = type;
     StrAllocCopy(tp->src, src);
     StrAllocCopy(tp->path, path);
diff --git a/src/LYHistory.c b/src/LYHistory.c
index 3f13bbd6..c3b7dd47 100644
--- a/src/LYHistory.c
+++ b/src/LYHistory.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYHistory.c,v 1.87 2015/12/16 01:45:14 tom Exp $
+ * $LynxId: LYHistory.c,v 1.89 2016/11/24 16:38:22 tom Exp $
  */
 #include <HTUtils.h>
 #include <HTTP.h>
@@ -181,8 +181,6 @@ void LYAddVisitedLink(DocInfo *doc)
     if ((tmp = typecalloc(VisitedLink)) == NULL)
 	outofmem(__FILE__, "LYAddVisitedLink");
 
-    assert(tmp != NULL);
-
     StrAllocCopy(tmp->address, doc->address);
     LYformTitle(&(tmp->title), title);
 
@@ -358,8 +356,6 @@ void LYAllocHistory(int entries)
 	if (history == 0)
 	    outofmem(__FILE__, "LYAllocHistory");
 
-	assert(history != NULL);
-
 	while (save < size_history) {
 	    memset(&history[save++], 0, sizeof(history[0]));
 	}
@@ -1100,7 +1096,7 @@ static int LYLoadMESSAGES(const char *arg GCC_UNUSED,
      */
     target = HTStreamStack(format_in, format_out, sink, anAnchor);
 
-    if (!target || target == NULL) {
+    if (target == NULL) {
 	HTSprintf0(&buf, CANNOT_CONVERT_I_TO_O,
 		   HTAtom_name(format_in), HTAtom_name(format_out));
 	HTAlert(buf);
diff --git a/src/LYJump.c b/src/LYJump.c
index 98632df5..0847fd34 100644
--- a/src/LYJump.c
+++ b/src/LYJump.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYJump.c,v 1.50 2014/01/19 11:43:21 tom Exp $
+ * $LynxId: LYJump.c,v 1.51 2016/11/24 15:35:29 tom Exp $
  */
 #include <HTUtils.h>
 #include <HTAlert.h>
@@ -89,8 +89,6 @@ BOOL LYJumpInit(char *config)
 	outofmem(__FILE__, "LYJumpInit");
     }
 
-    assert(jtp != NULL);
-
     /*
      * config is JUMPFILE:path[:optional_key[:optional_prompt]]
      *
@@ -153,8 +151,6 @@ BOOL LYJumpInit(char *config)
 	    outofmem(__FILE__, "LYJumpInit");
 	}
 
-	assert(jtp != NULL);
-
 	StrAllocCopy(jtp->file, JThead->file);
     }
 
diff --git a/src/LYKeymap.c b/src/LYKeymap.c
index 4d24983d..b0595649 100644
--- a/src/LYKeymap.c
+++ b/src/LYKeymap.c
@@ -1,4 +1,4 @@
-/* $LynxId: LYKeymap.c,v 1.118 2015/12/17 01:27:51 tom Exp $ */
+/* $LynxId: LYKeymap.c,v 1.119 2016/11/24 16:38:22 tom Exp $ */
 #include <HTUtils.h>
 #include <LYUtils.h>
 #include <LYGlobalDefs.h>
@@ -1003,7 +1003,7 @@ static int LYLoadKeymap(const char *arg GCC_UNUSED,
      * Set up the stream.  - FM
      */
     target = HTStreamStack(format_in, format_out, sink, anAnchor);
-    if (!target || target == NULL) {
+    if (target == NULL) {
 	HTSprintf0(&buf, CANNOT_CONVERT_I_TO_O,
 		   HTAtom_name(format_in), HTAtom_name(format_out));
 	HTAlert(buf);
diff --git a/src/LYLeaks.c b/src/LYLeaks.c
index f6c71748..d1bdaf97 100644
--- a/src/LYLeaks.c
+++ b/src/LYLeaks.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYLeaks.c,v 1.37 2013/12/07 13:46:58 tom Exp $
+ * $LynxId: LYLeaks.c,v 1.38 2016/11/24 15:35:29 tom Exp $
  *
  *	Copyright (c) 1994, University of Kansas, All Rights Reserved
  *	(this file was rewritten twice - 1998/1999 and 2003/2004)
@@ -858,13 +858,9 @@ void LYLeakSABCopy(bstring **dest,
 	    == NULL)
 	      outofmem(__FILE__, "HTSABCopy");
 
-	assert(t != NULL);
-
 	if ((t->str = (char *) LYLeakMalloc(need, cp_File, ssi_Line)) == NULL)
 	    outofmem(__FILE__, "HTSABCopy");
 
-	assert(t->str != NULL);
-
 	MemCpy(t->str, src, len);
 	t->len = len;
 	t->str[t->len] = '\0';
@@ -915,15 +911,11 @@ void LYLeakSABCat(bstring **dest,
 					      ssi_Line)) == NULL)
 		  outofmem(__FILE__, "HTSACat");
 
-	    assert(t != NULL);
-
 	    t->str = (char *) LYLeakMalloc(need, cp_File, ssi_Line);
 	}
 	if (t->str == NULL)
 	    outofmem(__FILE__, "HTSACat");
 
-	assert(t->str != NULL);
-
 	MemCpy(t->str + t->len, src, len);
 	t->len += len;
 	t->str[t->len] = '\0';
diff --git a/src/LYLocal.c b/src/LYLocal.c
index b72bf829..fcecce15 100644
--- a/src/LYLocal.c
+++ b/src/LYLocal.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYLocal.c,v 1.129 2015/01/05 01:28:10 Thorsten.Glaser Exp $
+ * $LynxId: LYLocal.c,v 1.131 2016/11/24 17:18:55 tom Exp $
  *
  *  Routines to manipulate the local filesystem.
  *  Written by: Rick Mallett, Carleton University
@@ -848,7 +848,7 @@ static int modify_tagged(char *testpath)
 
 	    if (isEmpty(old_path) || strcmp(old_path, src_path)) {
 		if (!ok_stat(src_path, &src_info)
-		    || same_location(&src_info, &dst_info)
+		    || same_location(&dst_info, &src_info)
 		    || !dir_has_same_owner(&dst_info, &src_info)) {
 		    FREE(src_path);
 		    BStrFree(given_target);
@@ -2511,8 +2511,6 @@ void add_menu_item(char *str)
     if (tmp == NULL)
 	outofmem(__FILE__, "add_menu_item");
 
-    assert(tmp != NULL);
-
     /*
      * Conditional on tagged != NULL ?
      */
diff --git a/src/LYMainLoop.c b/src/LYMainLoop.c
index 0edda475..b2bfbdd2 100644
--- a/src/LYMainLoop.c
+++ b/src/LYMainLoop.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYMainLoop.c,v 1.232 2014/12/21 21:27:23 tom Exp $
+ * $LynxId: LYMainLoop.c,v 1.233 2016/11/24 19:50:02 tom Exp $
  */
 #include <HTUtils.h>
 #include <HTAccess.h>
@@ -8133,7 +8133,7 @@ static void status_link(char *curlink_name,
     prefix = (int) strlen(format);
     length = (int) strlen(curlink_name);
 
-    if (prefix > MAX_STATUS || prefix >= MAX_LINE - 1) {
+    if (prefix > MAX_STATUS || prefix >= MAX_LINE - 10) {
 	_user_message("%s", format);	/* no room for url */
     } else {
 	sprintf(format + prefix, "%%.%ds", MAX_STATUS - prefix);
diff --git a/src/LYMap.c b/src/LYMap.c
index b975ecaf..b34ae6d7 100644
--- a/src/LYMap.c
+++ b/src/LYMap.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYMap.c,v 1.48 2013/11/28 11:21:09 tom Exp $
+ * $LynxId: LYMap.c,v 1.49 2016/11/24 16:38:22 tom Exp $
  *			Lynx Client-side Image MAP Support	       LYMap.c
  *			==================================
  *
@@ -522,7 +522,7 @@ static int LYLoadIMGmap(const char *arg,
 			   format_out,
 			   sink, anAnchor);
 
-    if (!target || target == NULL) {
+    if (target == NULL) {
 	HTSprintf0(&buf, CANNOT_CONVERT_I_TO_O,
 		   HTAtom_name(format_in), HTAtom_name(format_out));
 	HTAlert(buf);
diff --git a/src/LYOptions.c b/src/LYOptions.c
index 5ee18534..4c6b98dd 100644
--- a/src/LYOptions.c
+++ b/src/LYOptions.c
@@ -1,4 +1,4 @@
-/* $LynxId: LYOptions.c,v 1.168 2015/12/18 01:01:21 tom Exp $ */
+/* $LynxId: LYOptions.c,v 1.170 2016/11/24 18:30:48 tom Exp $ */
 #include <HTUtils.h>
 #include <HTFTP.h>
 #include <HTTP.h>		/* 'reloading' flag */
@@ -981,7 +981,7 @@ void LYoptions(void)
 		    if (!LYSelectPopups)
 #endif /* !VMS && !USE_SLANG */
 		    {
-			LYmove(L_Rawmode, COL_OPTION_VALUES);
+			LYmove(L_RAWMODE + 1, COL_OPTION_VALUES);
 			LYclrtoeol();
 			ShowBool(LYRawMode);
 		    }
@@ -2617,8 +2617,6 @@ static PostPair *break_data(bstring *data)
     if (q == NULL)
 	outofmem(__FILE__, "break_data(calloc)");
 
-    assert(q != NULL);
-
     do {
 	/*
 	 * First, break up on '&', sliding 'p' on down the line.
@@ -2673,8 +2671,6 @@ static PostPair *break_data(bstring *data)
 	if (q == NULL)
 	    outofmem(__FILE__, "break_data(realloc)");
 
-	assert(q != NULL);
-
 	q[count].tag = NULL;
     } while (p != NULL && p[0] != '\0');
     return q;
diff --git a/src/LYReadCFG.c b/src/LYReadCFG.c
index 6d509779..7524c0a5 100644
--- a/src/LYReadCFG.c
+++ b/src/LYReadCFG.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYReadCFG.c,v 1.188 2016/10/11 23:44:06 tom Exp $
+ * $LynxId: LYReadCFG.c,v 1.189 2016/11/24 15:35:29 tom Exp $
  */
 #ifndef NO_RULES
 #include <HTRules.h>
@@ -243,8 +243,6 @@ static void add_item_to_list(char *buffer,
 	if (cur_item == NULL)
 	    outofmem(__FILE__, "read_cfg");
 
-	assert(cur_item != NULL);
-
 	*list_ptr = cur_item;
 #ifdef LY_FIND_LEAKS
 	atexit(free_all_item_lists);
@@ -262,8 +260,6 @@ static void add_item_to_list(char *buffer,
 	    outofmem(__FILE__, "read_cfg");
 	else
 	    prev_item->next = cur_item;
-
-	assert(cur_item != NULL);
     }
     /* fill-in nonzero default values */
     cur_item->pagelen = 66;
@@ -474,13 +470,9 @@ static void parse_color(char *buffer)
     if (NULL == (fg = find_colon(buffer)))
 	exit_with_color_syntax(buffer);
 
-    assert(fg != NULL);
-
     if (NULL == (bg = find_colon(++fg)))
 	exit_with_color_syntax(buffer);
 
-    assert(bg != NULL);
-
     StrAllocCopy(temp_fg, fg);
     temp_fg[bg++ - fg] = '\0';
 
@@ -625,8 +617,6 @@ static int assumed_color_fun(char *buffer)
 	if (NULL == (bg = find_colon(fg)))
 	    exit_with_color_syntax(buffer);
 
-	assert(bg != NULL);
-
 	StrAllocCopy(temp_fg, fg);
 	temp_fg[bg++ - fg] = '\0';
 
@@ -1275,8 +1265,6 @@ static int parse_html_src_spec(HTlexeme lexeme_code, char *value,
     if (!ts2)
 	BS();
 
-    assert(ts2 != NULL);
-
     *ts2 = '\0';
 
     CTRACE2(TRACE_CFG, (tfp,
diff --git a/src/LYStrings.c b/src/LYStrings.c
index b9411f87..e97481c2 100644
--- a/src/LYStrings.c
+++ b/src/LYStrings.c
@@ -1,4 +1,4 @@
-/* $LynxId: LYStrings.c,v 1.263 2015/12/16 01:18:53 tom Exp $ */
+/* $LynxId: LYStrings.c,v 1.264 2016/11/24 15:35:29 tom Exp $ */
 #include <HTUtils.h>
 #include <HTCJK.h>
 #include <UCAux.h>
@@ -3995,8 +3995,6 @@ static char **sortedList(HTList *list, int ignorecase)
     if (result == 0)
 	outofmem(__FILE__, "sortedList");
 
-    assert(result != 0);
-
     while (!HTList_isEmpty(list))
 	result[j++] = (char *) HTList_nextObject(list);
 
@@ -5913,7 +5911,6 @@ char *SNACopy(char **target,
 	if (*target == NULL) {
 	    CTRACE((tfp, "Tried to malloc %lu bytes\n", (unsigned long) n));
 	    outofmem(__FILE__, "SNACopy");
-	    assert(*target != NULL);
 	}
 	LYStrNCpy(*target, source, n);
     }
@@ -5936,14 +5933,12 @@ char *SNACat(char **target,
 
 	    if (*target == NULL)
 		outofmem(__FILE__, "SNACat");
-	    assert(*target != NULL);
 	    LYStrNCpy(*target + length, source, n);
 	} else {
 	    *target = typeMallocn(char, n + 1);
 
 	    if (*target == NULL)
 		outofmem(__FILE__, "SNACat");
-	    assert(*target != NULL);
 	    MemCpy(*target, source, n);
 	    (*target)[n] = '\0';	/* terminate */
 	}
diff --git a/src/LYUtils.c b/src/LYUtils.c
index b47779e9..f9f4fb6a 100644
--- a/src/LYUtils.c
+++ b/src/LYUtils.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYUtils.c,v 1.275 2016/11/15 09:34:30 tom Exp $
+ * $LynxId: LYUtils.c,v 1.276 2016/11/24 15:35:29 tom Exp $
  */
 #include <HTUtils.h>
 #include <HTTCP.h>
@@ -1437,8 +1437,6 @@ void statusline(const char *text)
 	if ((temp = typecallocn(unsigned char, strlen(text_buff) + 1)) == NULL)
 	      outofmem(__FILE__, "statusline");
 
-	assert(temp != NULL);
-
 	if (kanji_code == EUC) {
 	    TO_EUC((const unsigned char *) text_buff, temp);
 	} else if (kanji_code == SJIS) {
diff --git a/src/LYrcFile.c b/src/LYrcFile.c
index 31ada641..2c39c119 100644
--- a/src/LYrcFile.c
+++ b/src/LYrcFile.c
@@ -1,4 +1,4 @@
-/* $LynxId: LYrcFile.c,v 1.95 2015/12/18 01:57:45 tom Exp $ */
+/* $LynxId: LYrcFile.c,v 1.96 2016/11/24 16:42:46 tom Exp $ */
 #include <HTUtils.h>
 #include <HTFTP.h>
 #include <LYUtils.h>
@@ -705,6 +705,7 @@ BOOL LYsetRcValue(const char *name, const char *param)
 	 */
 	if (tbl->name == 0) {
 	    CTRACE((tfp, "LYrcFile: ignored %s=%s\n", name, value));
+	    FREE(orig_value);
 	    return FALSE;
 	}
     }
diff --git a/src/TRSTable.c b/src/TRSTable.c
index 9b9b3eb4..a988615f 100644
--- a/src/TRSTable.c
+++ b/src/TRSTable.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: TRSTable.c,v 1.34 2016/09/14 01:02:44 tom Exp $
+ * $LynxId: TRSTable.c,v 1.37 2016/11/24 18:14:41 tom Exp $
  *		Simple table object
  *		===================
  * Authors
@@ -582,18 +582,10 @@ static int Stbl_finishCellInRow(STable_rowinfo *me, STable_states *s, int end_td
 	    case CS__0eb:
 		newstate = empty ? CS__0eb : CS__ebc;
 		s->state = newstate;
-		if (me->fixed_line) {
-		    if (empty) {
-			ret = (lastcell->len <= 0 ? 0 : lastcell->len);
-		    } else {
-			ret = (lastcell->len <= 0 ? 0 : -1);
-		    }
+		if (empty) {
+		    ret = (lastcell->len <= 0 ? 0 : lastcell->len);
 		} else {
-		    if (empty) {
-			ret = (lastcell->len <= 0 ? 0 : lastcell->len);
-		    } else {
-			ret = (lastcell->len <= 0 ? 0 : 0);
-		    }
+		    ret = (lastcell->len <= 0 ? 0 : -1);
 		}
 		goto trace_and_return;
 	    case CS__0cb:
@@ -620,18 +612,10 @@ static int Stbl_finishCellInRow(STable_rowinfo *me, STable_states *s, int end_td
 	    case CS__eb:	/* ##484_set_pending_ret_0_if_empty? */
 		newstate = empty ? CS__eb : CS__ebc;
 		s->state = newstate;
-		if (me->fixed_line) {
-		    if (empty) {
-			ret = (lastcell->len <= 0 ? 0 : lastcell->len);
-		    } else {
-			ret = (lastcell->len <= 0 ? 0 : -1);
-		    }
+		if (empty) {
+		    ret = (lastcell->len <= 0 ? 0 : lastcell->len);
 		} else {
-		    if (empty) {
-			ret = (lastcell->len <= 0 ? 0 : lastcell->len);
-		    } else {
-			ret = (lastcell->len <= 0 ? 0 : -1);
-		    }
+		    ret = (lastcell->len <= 0 ? 0 : -1);
 		}
 		goto trace_and_return;
 	    case CS__cb:
@@ -704,18 +688,10 @@ static int Stbl_finishCellInRow(STable_rowinfo *me, STable_states *s, int end_td
 	    case CS__0eb:
 		newstate = empty ? CS__0ef : CS__0cf;	/* ebc?? */
 		s->state = newstate;
-		if (me->fixed_line) {
-		    if (empty) {
-			ret = (lastcell->len <= 0 ? 0 : lastcell->len);
-		    } else {
-			ret = (lastcell->len <= 0 ? 0 : -1);
-		    }
+		if (empty) {
+		    ret = (lastcell->len <= 0 ? 0 : lastcell->len);
 		} else {
-		    if (empty) {
-			ret = (lastcell->len <= 0 ? 0 : lastcell->len);
-		    } else {
-			ret = (lastcell->len <= 0 ? 0 : 0);
-		    }
+		    ret = (lastcell->len <= 0 ? 0 : -1);
 		}
 		goto trace_and_return;
 	    case CS__0cb:
@@ -752,20 +728,12 @@ static int Stbl_finishCellInRow(STable_rowinfo *me, STable_states *s, int end_td
 		newstate = empty ? CS__ef : CS__cf;
 		break;
 	    case CS__eb:
-		newstate = empty ? CS__ef : CS__ef;	/* ##579??? !!!!! */
+		newstate = CS__ef;
 		s->state = newstate;
-		if (me->fixed_line) {
-		    if (empty) {
-			ret = (lastcell->len <= 0 ? 0 : lastcell->len);
-		    } else {
-			ret = (lastcell->len <= 0 ? 0 : -1);
-		    }
+		if (empty) {
+		    ret = (lastcell->len <= 0 ? 0 : lastcell->len);
 		} else {
-		    if (empty) {
-			ret = (lastcell->len <= 0 ? 0 : lastcell->len);
-		    } else {
-			ret = (lastcell->len <= 0 ? 0 : -1);
-		    }
+		    ret = (lastcell->len <= 0 ? 0 : -1);
 		}
 		goto trace_and_return;
 	    case CS__cb:
@@ -889,7 +857,7 @@ static int Stbl_finishCellInRow(STable_rowinfo *me, STable_states *s, int end_td
 		newstate = empty ? CS__0ef : CS__0cf;
 		break;		/* ##630 */
 	    case CS__0eb:
-		newstate = empty ? CS__0ef : CS__0ef;
+		newstate = CS__0ef;
 		break;		/* ??? */
 	    case CS__0cb:
 		newstate = empty ? CS__0cf : CS__cbc;
@@ -923,7 +891,7 @@ static int Stbl_finishCellInRow(STable_rowinfo *me, STable_states *s, int end_td
 		newstate = empty ? CS__ef : CS__cf;
 		break;		/* ??? */
 	    case CS__cb:
-		newstate = empty ? CS__cf : CS__cf;
+		newstate = CS__cf;
 		break;		/* ??? */
 	    case CS__ef:	/* ignored error */
 	    case CS__cf:	/* ignored error */
@@ -1540,9 +1508,7 @@ int Stbl_addCellToTable(STable_info *me, int colspan,
     if (ncells > 0)
 	sumpos += me->sumcols[ncells - 1].pos - lastrow->cells[ncells - 1].pos;
     update_sumcols0(me->sumcols, lastrow, sumpos,
-		    sumpos - ((ncells > 0)
-			      ? me->sumcols[icell].pos
-			      : me->sumcols[icell].pos),
+		    sumpos - me->sumcols[icell].pos,
 		    icell, 0, me->allocated_sumcols);
 
     me->maxpos = me->sumcols[me->allocated_sumcols - 1].pos;
diff --git a/src/UCAuto.c b/src/UCAuto.c
index d6c064c9..1d93faab 100644
--- a/src/UCAuto.c
+++ b/src/UCAuto.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: UCAuto.c,v 1.53 2013/11/29 00:22:00 tom Exp $
+ * $LynxId: UCAuto.c,v 1.54 2016/11/24 15:35:29 tom Exp $
  *
  *  This file contains code for changing the Linux console mode.
  *  Currently some names for font files are hardwired in here.
@@ -312,8 +312,6 @@ void UCChangeTerminalCodepage(int newcs,
 	if (old_font == NULL)
 	    outofmem(__FILE__, "UCChangeTerminalCodepage");
 
-	assert(old_font != NULL);
-
 	if ((fp1 = LYOpenTemp(old_font, ".fnt", BIN_W)) != 0)
 	    fp2 = LYOpenTemp(old_umap, ".uni", BIN_W);
 
diff --git a/src/tidy_tls.c b/src/tidy_tls.c
index f2e7334f..aa8be758 100644
--- a/src/tidy_tls.c
+++ b/src/tidy_tls.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: tidy_tls.c,v 1.34 2016/04/17 15:15:06 tom Exp $
+ * $LynxId: tidy_tls.c,v 1.35 2016/11/24 18:48:02 tom Exp $
  * Copyright 2008-2015,2016 Thomas E. Dickey
  * with fix Copyright 2008 by Thomas Viehmann
  *
@@ -637,8 +637,9 @@ char *X509_NAME_oneline(X509_NAME * source, char *target, int len)
  */
 X509_NAME *X509_get_issuer_name(const X509 * cert)
 {
-    X509_NAME *result;
+    static X509_NAME *result;
 
+    free(result);
     if ((result = typeCalloc(X509_NAME)) != 0) {
 	if (ExtractCertificate(cert, result, 1) < 0) {
 	    free(result);
@@ -653,8 +654,9 @@ X509_NAME *X509_get_issuer_name(const X509 * cert)
  */
 X509_NAME *X509_get_subject_name(const X509 * cert)
 {
-    X509_NAME *result;
+    static X509_NAME *result;
 
+    free(result);
     if ((result = typeCalloc(X509_NAME)) != 0) {
 	if (ExtractCertificate(cert, result, 0) < 0) {
 	    free(result);