about summary refs log tree commit diff stats
path: root/src/GridText.c
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 /src/GridText.c
parentda3e74522784403f7b98fb00637209557a87c0f3 (diff)
downloadlynx-snapshots-8e90b748a51b502a3b0430d58cfbc7954d4a801d.tar.gz
snapshot of project "lynx", label v2-8-9dev_11c
Diffstat (limited to 'src/GridText.c')
-rw-r--r--src/GridText.c46
1 files changed, 3 insertions, 43 deletions
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);