about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2014-12-22 01:39:40 -0500
committerThomas E. Dickey <dickey@invisible-island.net>2014-12-22 01:39:40 -0500
commitd75d32cd2f1ca078ec90deb26e3f97c66ce65d06 (patch)
tree65de529114d099674edaedbf998228e802c35dc1 /src
parente369b40ddce7cb880088e8ec9ef07bc57d5ee36c (diff)
downloadlynx-snapshots-d75d32cd2f1ca078ec90deb26e3f97c66ce65d06.tar.gz
snapshot of project "lynx", label v2-8-9dev_2
Diffstat (limited to 'src')
-rw-r--r--src/GridText.c29
-rw-r--r--src/HTML.c5
-rw-r--r--src/LYMainLoop.c4
-rw-r--r--src/LYOptions.c4
-rw-r--r--src/LYUtils.c4
-rw-r--r--src/TRSTable.c65
-rw-r--r--src/makefile.in3
7 files changed, 69 insertions, 45 deletions
diff --git a/src/GridText.c b/src/GridText.c
index f5d59619..b05aaf2f 100644
--- a/src/GridText.c
+++ b/src/GridText.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: GridText.c,v 1.285 2014/12/11 10:07:02 tom Exp $
+ * $LynxId: GridText.c,v 1.286 2014/12/16 01:23:52 tom Exp $
  *
  *		Character grid hypertext object
  *		===============================
@@ -3257,7 +3257,7 @@ static void split_line(HText *text, unsigned split)
     }				/* switch */
     previous->offset = (unsigned short) ((new_offset < 0) ? 0 : new_offset);
 
-    if (text->stbl)
+    if (text->stbl) {
 	/*
 	 * Notify simple table stuff of line split, so that it can
 	 * set the last cell's length.  The last cell should and
@@ -3273,6 +3273,7 @@ static void split_line(HText *text, unsigned split)
 		       text->Lines - 1,
 		       previous->offset,
 		       previous->size - ctrl_chars_on_previous_line);
+    }
 
     text->in_line_1 = NO;	/* unless caller sets it otherwise */
 
@@ -4876,8 +4877,9 @@ void HText_startStblTABLE(HText *me, int alignment)
 	} else
 #endif
 	{
-	    if (me->stbl)
+	    if (me->stbl) {
 		HText_cancelStbl(me);	/* auto cancel previously open table */
+	    }
 	}
 
 	me->stbl = Stbl_startTABLE(alignment);
@@ -4978,8 +4980,9 @@ void HText_startStblTR(HText *me, int alignment)
 {
     if (!me || !me->stbl)
 	return;
-    if (Stbl_addRowToTable(me->stbl, alignment, me->Lines) < 0)
+    if (Stbl_addRowToTable(me->stbl, alignment, me->Lines) < 0) {
 	HText_cancelStbl(me);	/* give up */
+    }
 }
 
 /*	Finish simple table row
@@ -5013,8 +5016,9 @@ void HText_startStblTD(HText *me, int colspan,
     if (Stbl_addCellToTable(me->stbl, colspan, rowspan, alignment, isheader,
 			    me->Lines,
 			    HText_LastLineOffset(me),
-			    HText_LastLineSize(me, FALSE)) < 0)
+			    HText_LastLineSize(me, FALSE)) < 0) {
 	HText_cancelStbl(me);	/* give up */
+    }
 }
 
 /*	Finish simple table cell
@@ -5026,8 +5030,9 @@ void HText_endStblTD(HText *me)
     if (Stbl_finishCellInTable(me->stbl, TRST_ENDCELL_ENDTD,
 			       me->Lines,
 			       HText_LastLineOffset(me),
-			       HText_LastLineSize(me, FALSE)) < 0)
+			       HText_LastLineSize(me, FALSE)) < 0) {
 	HText_cancelStbl(me);	/* give up */
+    }
 }
 
 /*	Remember COL info / Start a COLGROUP and remember info
@@ -5044,8 +5049,9 @@ void HText_startStblCOL(HText *me, int span,
 	CTRACE((tfp, "*** SPAN=%d is too large, ignored!\n", span));
 	span = 1;
     }
-    if (Stbl_addColInfo(me->stbl, span, alignment, isgroup) < 0)
+    if (Stbl_addColInfo(me->stbl, span, alignment, isgroup) < 0) {
 	HText_cancelStbl(me);	/* give up */
+    }
 }
 
 /*	Finish a COLGROUP
@@ -5054,8 +5060,9 @@ void HText_endStblCOLGROUP(HText *me)
 {
     if (!me || !me->stbl)
 	return;
-    if (Stbl_finishColGroup(me->stbl) < 0)
+    if (Stbl_finishColGroup(me->stbl) < 0) {
 	HText_cancelStbl(me);	/* give up */
+    }
 }
 
 /*	Start a THEAD / TFOOT / TBODY - remember its alignment info
@@ -5064,8 +5071,9 @@ void HText_startStblRowGroup(HText *me, int alignment)
 {
     if (!me || !me->stbl)
 	return;
-    if (Stbl_addRowGroup(me->stbl, alignment) < 0)
+    if (Stbl_addRowGroup(me->stbl, alignment) < 0) {
 	HText_cancelStbl(me);	/* give up */
+    }
 }
 
 static void compute_show_number(TextAnchor *a)
@@ -5739,8 +5747,9 @@ void HText_endAppend(HText *text)
     new_line(text);
 
     if (text->halted) {
-	if (text->stbl)
+	if (text->stbl) {
 	    HText_cancelStbl(text);
+	}
 	/*
 	 * If output was stopped because memory was low, and we made
 	 * it to the end of the document, reset those flags and hope
diff --git a/src/HTML.c b/src/HTML.c
index ed83b825..69e21b24 100644
--- a/src/HTML.c
+++ b/src/HTML.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTML.c,v 1.164 2013/11/28 11:17:39 tom Exp $
+ * $LynxId: HTML.c,v 1.165 2014/12/16 01:21:32 tom Exp $
  *
  *		Structured stream to Rich hypertext converter
  *		============================================
@@ -5301,7 +5301,9 @@ static int HTML_start_element(HTStructured * me, int element_number,
 #ifdef EXP_NESTED_TABLES
 	if (!nested_tables)
 #endif
+	{
 	    HText_cancelStbl(me->text);
+	}
 
 	if (me->inA) {
 	    SET_SKIP_STACK(HTML_A);
@@ -5393,7 +5395,6 @@ static int HTML_start_element(HTStructured * me, int element_number,
 	if (me->sp->style->id == ST_Preformatted) {
 	    CHECK_ID(HTML_TR_ID);
 	    me->inP = FALSE;
-/*	    HText_cancelStbl(me->text);  seems unnecessary here - kw */
 	    break;
 	}
 	if (LYoverride_default_alignment(me)) {
diff --git a/src/LYMainLoop.c b/src/LYMainLoop.c
index b91f7966..0edda475 100644
--- a/src/LYMainLoop.c
+++ b/src/LYMainLoop.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYMainLoop.c,v 1.231 2014/06/06 00:13:03 tom Exp $
+ * $LynxId: LYMainLoop.c,v 1.232 2014/12/21 21:27:23 tom Exp $
  */
 #include <HTUtils.h>
 #include <HTAccess.h>
@@ -3957,7 +3957,7 @@ static BOOLEAN handle_LYK_OPTIONS(int *cmd,
 		      strcmp(CurrentNegoLanguage, NonNull(language)) ||
 		      strcmp(CurrentNegoCharset, NonNull(pref_charset))) &&
 		     (StrNCmp(curdoc.address, "http", 4) == 0 ||
-		      !isLYNXCGI(curdoc.address) == 0))) {
+		      isLYNXCGI(curdoc.address)))) {
 		    /*
 		     * An option has changed which may influence content
 		     * negotiation, and the resource is from a http or https or
diff --git a/src/LYOptions.c b/src/LYOptions.c
index 077379dd..5e7415eb 100644
--- a/src/LYOptions.c
+++ b/src/LYOptions.c
@@ -1,4 +1,4 @@
-/* $LynxId: LYOptions.c,v 1.164 2013/10/25 01:10:17 tom Exp $ */
+/* $LynxId: LYOptions.c,v 1.165 2014/12/21 21:27:45 tom Exp $ */
 #include <HTUtils.h>
 #include <HTFTP.h>
 #include <HTTP.h>		/* 'reloading' flag */
@@ -3404,7 +3404,7 @@ int postoptions(DocInfo *newdoc)
      */
     if ((need_end_reload == TRUE &&
 	 (StrNCmp(newdoc->address, "http", 4) == 0 ||
-	  isLYNXCGI(newdoc->address) == 0))) {
+	  isLYNXCGI(newdoc->address)))) {
 	/*
 	 * An option has changed which may influence content negotiation, and
 	 * the resource is from a http or https or lynxcgi URL (the only
diff --git a/src/LYUtils.c b/src/LYUtils.c
index 1913f869..ea4e7231 100644
--- a/src/LYUtils.c
+++ b/src/LYUtils.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYUtils.c,v 1.270 2014/12/03 00:30:11 tom Exp $
+ * $LynxId: LYUtils.c,v 1.272 2014/12/22 00:22:55 tom Exp $
  */
 #include <HTUtils.h>
 #include <HTTCP.h>
@@ -4587,7 +4587,7 @@ int win32_check_interrupt(void)
     return FALSE;
 }
 
-#if (defined(__MINGW32__) && !defined(HAVE_SLEEP))
+#if (!defined(__MINGW32__) && !defined(sleep)) || (defined(__MINGW32__) && !defined(HAVE_SLEEP))
 void sleep(unsigned sec)
 {
     unsigned int i, j;
diff --git a/src/TRSTable.c b/src/TRSTable.c
index fddb70c7..c74a405b 100644
--- a/src/TRSTable.c
+++ b/src/TRSTable.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: TRSTable.c,v 1.31 2013/05/01 01:00:38 tom Exp $
+ * $LynxId: TRSTable.c,v 1.32 2014/12/16 01:30:48 tom Exp $
  *		Simple table object
  *		===================
  * Authors
@@ -201,9 +201,6 @@ struct _STable_info {
  *    Anything that requires handling cell contents as paragraphs (block
  *    elements), like reflowing.  Vertical alignment.
  */
-static int Stbl_finishCellInRow(STable_rowinfo *me, STable_states *s, int end_td,
-				int lineno,
-				int pos);
 static int Stbl_finishRowInTable(STable_info *me);
 
 static const char *cellstate_s(cellstate_t state)
@@ -585,15 +582,17 @@ static int Stbl_finishCellInRow(STable_rowinfo *me, STable_states *s, int end_td
 		newstate = empty ? CS__0eb : CS__ebc;
 		s->state = newstate;
 		if (me->fixed_line) {
-		    if (empty)
+		    if (empty) {
 			ret = (lastcell->len <= 0 ? 0 : lastcell->len);
-		    else
+		    } else {
 			ret = (lastcell->len <= 0 ? 0 : -1);
+		    }
 		} else {
-		    if (empty)
+		    if (empty) {
 			ret = (lastcell->len <= 0 ? 0 : lastcell->len);
-		    else
+		    } else {
 			ret = (lastcell->len <= 0 ? 0 : 0);
+		    }
 		}
 		goto trace_and_return;
 	    case CS__0cb:
@@ -621,15 +620,17 @@ static int Stbl_finishCellInRow(STable_rowinfo *me, STable_states *s, int end_td
 		newstate = empty ? CS__eb : CS__ebc;
 		s->state = newstate;
 		if (me->fixed_line) {
-		    if (empty)
+		    if (empty) {
 			ret = (lastcell->len <= 0 ? 0 : lastcell->len);
-		    else
+		    } else {
 			ret = (lastcell->len <= 0 ? 0 : -1);
+		    }
 		} else {
-		    if (empty)
+		    if (empty) {
 			ret = (lastcell->len <= 0 ? 0 : lastcell->len);
-		    else
+		    } else {
 			ret = (lastcell->len <= 0 ? 0 : -1);
+		    }
 		}
 		goto trace_and_return;
 	    case CS__cb:
@@ -703,15 +704,17 @@ static int Stbl_finishCellInRow(STable_rowinfo *me, STable_states *s, int end_td
 		newstate = empty ? CS__0ef : CS__0cf;	/* ebc?? */
 		s->state = newstate;
 		if (me->fixed_line) {
-		    if (empty)
+		    if (empty) {
 			ret = (lastcell->len <= 0 ? 0 : lastcell->len);
-		    else
+		    } else {
 			ret = (lastcell->len <= 0 ? 0 : -1);
+		    }
 		} else {
-		    if (empty)
+		    if (empty) {
 			ret = (lastcell->len <= 0 ? 0 : lastcell->len);
-		    else
+		    } else {
 			ret = (lastcell->len <= 0 ? 0 : 0);
+		    }
 		}
 		goto trace_and_return;
 	    case CS__0cb:
@@ -751,15 +754,17 @@ static int Stbl_finishCellInRow(STable_rowinfo *me, STable_states *s, int end_td
 		newstate = empty ? CS__ef : CS__ef;	/* ##579??? !!!!! */
 		s->state = newstate;
 		if (me->fixed_line) {
-		    if (empty)
+		    if (empty) {
 			ret = (lastcell->len <= 0 ? 0 : lastcell->len);
-		    else
+		    } else {
 			ret = (lastcell->len <= 0 ? 0 : -1);
+		    }
 		} else {
-		    if (empty)
+		    if (empty) {
 			ret = (lastcell->len <= 0 ? 0 : lastcell->len);
-		    else
+		    } else {
 			ret = (lastcell->len <= 0 ? 0 : -1);
+		    }
 		}
 		goto trace_and_return;
 	    case CS__cb:
@@ -1451,8 +1456,9 @@ int Stbl_addCellToTable(STable_info *me, int colspan,
     if (!me->rows || !me->nrows)
 	return -1;		/* no row started! */
     /* ##850_fail_if_fail?? */
-    if (me->rows[me->nrows - 1].ended != ROW_not_ended)
+    if (me->rows[me->nrows - 1].ended != ROW_not_ended) {
 	Stbl_addRowToTable(me, alignment, lineno);
+    }
     Stbl_finishCellInTable(me, TRST_ENDCELL_ENDTD, lineno, 0, pos);
     lastrow = me->rows + (me->nrows - 1);
 
@@ -1462,7 +1468,9 @@ int Stbl_addCellToTable(STable_info *me, int colspan,
 	   appropriate amount of cells */
 	if (!NO_AGGRESSIVE_NEWROW && pos == 0 && lastrow->ncells > 0
 	    && lastrow->cells[lastrow->ncells - 1].cLine != lineno) {
-	    int rc = Stbl_fakeFinishCellInTable(me, lastrow, lineno, 0);
+	    int rc;
+
+	    rc = Stbl_fakeFinishCellInTable(me, lastrow, lineno, 0);
 
 	    if (rc < 0)
 		return -1;
@@ -1571,7 +1579,9 @@ int Stbl_finishCellInTable(STable_info *me, int end_td,
 #ifdef EXP_NESTED_TABLES
     if (nested_tables) {
 	if (!NO_AGGRESSIVE_NEWROW && !(end_td & TRST_FAKING_CELLS)) {
-	    int rc = Stbl_fakeFinishCellInTable(me, lastrow, lineno, 1);
+	    int rc;
+
+	    rc = Stbl_fakeFinishCellInTable(me, lastrow, lineno, 1);
 
 	    if (rc) {
 		if (rc < 0)
@@ -1583,8 +1593,9 @@ int Stbl_finishCellInTable(STable_info *me, int end_td,
     }
 #endif
     len = Stbl_finishCellInRow(lastrow, s, end_td, lineno, pos);
-    if (len == -1)
+    if (len == -1) {
 	return len;
+    }
     xlen = (len > 0) ? len : s->pending_len;	/* ##890 use xlen if fixed_line?: */
     if (lastrow->Line == lineno)
 	len = xlen;
@@ -1634,16 +1645,18 @@ int Stbl_finishCellInTable(STable_info *me, int end_td,
     }
 #ifdef EXP_NESTED_TABLES	/* maxlen may already include contribution of a cell in this column */
     if (nested_tables) {
-	if (me->maxlen > MAX_STBL_POS)
+	if (me->maxlen > MAX_STBL_POS) {
 	    return -1;
+	}
     } else
 #endif
     {
 	if (me->maxlen + (xlen - len) > MAX_STBL_POS)
 	    return -1;
     }
-    if (me->maxpos > /* @@@ max. line length we can accept */ MAX_STBL_POS)
+    if (me->maxpos > /* @@@ max. line length we can accept */ MAX_STBL_POS) {
 	return -1;
+    }
 
     if (lineno != lastrow->Line) {
 	/* @@@ Do something here?  Or is it taken care of in
diff --git a/src/makefile.in b/src/makefile.in
index 55611da1..de4cf003 100644
--- a/src/makefile.in
+++ b/src/makefile.in
@@ -1,4 +1,4 @@
-# $LynxId: makefile.in,v 1.73 2014/01/19 14:41:13 tom Exp $
+# $LynxId: makefile.in,v 1.74 2014/12/16 01:10:39 tom Exp $
 # template-makefile for Lynx src directory
 
 SHELL		= @CONFIG_SHELL@
@@ -140,6 +140,7 @@ distclean: clean
 
 CMN=$(top_srcdir)/WWW/Library/Implementation/
 
+GridText$o :		$(top_srcdir)/userdefs.h
 HTFWriter$o :		$(top_srcdir)/userdefs.h
 HTInit$o :		$(top_srcdir)/userdefs.h
 LYCharSets$o :		$(top_srcdir)/userdefs.h