about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/GridText.c6
-rw-r--r--src/HTAlert.c4
-rw-r--r--src/HTFWriter.c6
-rw-r--r--src/LYCharUtils.c6
-rw-r--r--src/LYExtern.c4
-rw-r--r--src/LYHistory.c2
-rw-r--r--src/LYReadCFG.c4
-rw-r--r--src/LYStrings.c4
-rw-r--r--src/LYUtils.c6
9 files changed, 21 insertions, 21 deletions
diff --git a/src/GridText.c b/src/GridText.c
index c0dcdfb5..3c010735 100644
--- a/src/GridText.c
+++ b/src/GridText.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: GridText.c,v 1.141 2007/07/22 23:04:06 tom Exp $
+ * $LynxId: GridText.c,v 1.142 2007/08/02 19:30:32 tom Exp $
  *
  *		Character grid hypertext object
  *		===============================
@@ -7847,7 +7847,7 @@ static int TrimmedLength(char *string)
 {
     int result = strlen(string);
     int adjust = result;
-    int ch;
+    unsigned ch;
 
     while (adjust > 0) {
 	ch = UCH(string[adjust - 1]);
@@ -10383,7 +10383,7 @@ static void UpdateBoundary(char **Boundary,
 	    && !memcmp(want, text + j, have)) {
 	    char temp[2];
 
-	    temp[0] = isdigit(text[have + j]) ? 'a' : '0';
+	    temp[0] = isdigit(UCH(text[have + j])) ? 'a' : '0';
 	    temp[1] = '\0';
 	    StrAllocCat(want, temp);
 	    ++have;
diff --git a/src/HTAlert.c b/src/HTAlert.c
index ca29076e..c43c22e9 100644
--- a/src/HTAlert.c
+++ b/src/HTAlert.c
@@ -248,7 +248,7 @@ void HTReadProgress(long bytes, long total)
 	total = total_last;
     }
     if ((bytes > 0) &&
-	(now != first))
+	(now > first))
 	/* 1 sec delay for transfer_rate calculation without g-t-o-d */  {
 	if (transfer_rate <= 0)	/* the very first time */
 	    transfer_rate = (long) ((bytes) / (now - first));	/* bytes/sec */
@@ -272,7 +272,7 @@ void HTReadProgress(long bytes, long total)
 	}
 #endif
 	if (renew) {
-	    if (now != last) {
+	    if (now > last) {
 		last = now;
 		if (bytes_last != bytes)
 		    last_active = now;
diff --git a/src/HTFWriter.c b/src/HTFWriter.c
index fd880949..c3273e90 100644
--- a/src/HTFWriter.c
+++ b/src/HTFWriter.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTFWriter.c,v 1.89 2007/07/31 20:57:23 tom Exp $
+ * $LynxId: HTFWriter.c,v 1.90 2007/08/02 19:40:50 tom Exp $
  *
  *		FILE WRITER				HTFWrite.h
  *		===========
@@ -595,7 +595,7 @@ HTStream *HTSaveAndExecute(HTPresentation *pres,
 	return (NULL);
     }
 #if defined(EXEC_LINKS) || defined(EXEC_SCRIPTS)
-    if (pres->quality == 999.0) {	/* exec link */
+    if (pres->quality >= 999.0) {	/* exec link */
 	if (dump_output_immediately) {
 	    LYCancelledFetch = TRUE;
 	    return (NULL);
@@ -1190,7 +1190,7 @@ HTStream *HTCompressed(HTPresentation *pres,
      */
     if (!dump_output_immediately && !traversal
 #if defined(EXEC_LINKS) || defined(EXEC_SCRIPTS)
-	&& (Pres->quality != 999.0 ||
+	&& (Pres->quality < 999.0 ||
 	    (!no_exec &&	/* allowed exec link or script ? */
 	     (local_exec ||
 	      (local_exec_on_local_files &&
diff --git a/src/LYCharUtils.c b/src/LYCharUtils.c
index a7a7359f..568e4e96 100644
--- a/src/LYCharUtils.c
+++ b/src/LYCharUtils.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYCharUtils.c,v 1.88 2007/07/02 23:58:53 tom Exp $
+ * $LynxId: LYCharUtils.c,v 1.89 2007/08/02 19:31:34 tom Exp $
  *
  *  Functions associated with LYCharSets.c and the Lynx version of HTML.c - FM
  *  ==========================================================================
@@ -2076,7 +2076,7 @@ char *LYParseTagParam(char *from,
 	    return NULL;
     } while (strncasecomp(string, name, len) != 0);
     string += len;
-    while (*string != '\0' && (UCH(isspace(*string)) || *string == '=')) {
+    while (*string != '\0' && (isspace(UCH(*string)) || *string == '=')) {
 	string++;
     }
 
@@ -3021,7 +3021,7 @@ int LYLegitimizeHREF(HTStructured * me, char **href,
 	 */
 
 	/*  Before working on spaces check if we have any, usually none. */
-	for (p = *href; (*p && !isspace(*p)); p++) ;
+	p = LYSkipNonBlanks(*href);
 
 	if (*p) {		/* p == first space character */
 	    /* no reallocs below, all converted in place */
diff --git a/src/LYExtern.c b/src/LYExtern.c
index 6c0da690..a1261759 100644
--- a/src/LYExtern.c
+++ b/src/LYExtern.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYExtern.c,v 1.38 2007/07/24 22:50:21 tom Exp $
+ * $LynxId: LYExtern.c,v 1.39 2007/07/31 21:30:21 tom Exp $
  *
  External application support.
  This feature allows lynx to pass a given URL to an external program.
@@ -304,7 +304,7 @@ static char *lookup_external(char *param,
 				       -1,
 				       FALSE,
 				       TRUE,
-				       (keypad_mode != NUMBERS_AS_ARROWS));
+				       (BOOLEAN) (keypad_mode != NUMBERS_AS_ARROWS));
 	wmove(LYwin, old_y, old_x);
 	CTRACE((tfp, "selected choice %d of %d\n", cur_choice, num_choices));
 	if (cur_choice < 0) {
diff --git a/src/LYHistory.c b/src/LYHistory.c
index 66ec15ca..f65f75bc 100644
--- a/src/LYHistory.c
+++ b/src/LYHistory.c
@@ -115,7 +115,7 @@ void LYAddVisitedLink(DocInfo *doc)
 	    LYIsUIPage(doc->address, UIP_VLINKS) ||
 	    LYIsUIPage(doc->address, UIP_SHOWINFO) ||
 	    isLYNXMESSAGES(doc->address) ||
-	    (related = 0) ||
+	    ((related = 0) == 0) ||
 #ifdef DIRED_SUPPORT
 	    LYIsUIPage(doc->address, UIP_DIRED_MENU) ||
 	    LYIsUIPage(doc->address, UIP_UPLOAD_OPTIONS) ||
diff --git a/src/LYReadCFG.c b/src/LYReadCFG.c
index dcc1b83f..d2999bd4 100644
--- a/src/LYReadCFG.c
+++ b/src/LYReadCFG.c
@@ -1,4 +1,4 @@
-/* $LynxId: LYReadCFG.c,v 1.123 2007/05/23 00:17:02 tom Exp $ */
+/* $LynxId: LYReadCFG.c,v 1.124 2007/08/02 19:40:31 tom Exp $ */
 #ifndef NO_RULES
 #include <HTRules.h>
 #else
@@ -899,7 +899,7 @@ static int suffix_fun(char *value)
     } else {
 	double df = strtod(sq, &p);
 
-	if (p == sq && df == 0.0) {
+	if (p == sq && df <= 0.0) {
 	    CTRACE((tfp, "Invalid q=%s for SUFFIX:%s, using -1.0\n",
 		    sq, value));
 	    q = -1.0;
diff --git a/src/LYStrings.c b/src/LYStrings.c
index 92f386f8..a9493a36 100644
--- a/src/LYStrings.c
+++ b/src/LYStrings.c
@@ -1,4 +1,4 @@
-/* $LynxId: LYStrings.c,v 1.127 2007/07/01 23:16:31 Daniel.Dickman Exp $ */
+/* $LynxId: LYStrings.c,v 1.128 2007/08/02 19:24:50 tom Exp $ */
 #include <HTUtils.h>
 #include <HTCJK.h>
 #include <UCAux.h>
@@ -3127,7 +3127,7 @@ int LYEdit1(EDREC * edit, int ch,
 	    while (is8bits(Buf[Pos]))
 		Pos += 2;
 	} else {
-	    while (!is8bits(Buf[Pos]) && isalnum(Buf[Pos]))
+	    while (!is8bits(Buf[Pos]) && isalnum(UCH(Buf[Pos])))
 		Pos++;		/* '\0' is not a/n */
 	}
 	while ((HTCJK == NOCJK || !is8bits(Buf[Pos])) &&
diff --git a/src/LYUtils.c b/src/LYUtils.c
index cd5423d8..29b12c8b 100644
--- a/src/LYUtils.c
+++ b/src/LYUtils.c
@@ -1,4 +1,4 @@
-/* $LynxId: LYUtils.c,v 1.162 2007/07/31 00:45:03 tom Exp $ */
+/* $LynxId: LYUtils.c,v 1.163 2007/08/02 20:18:36 tom Exp $ */
 #include <HTUtils.h>
 #include <HTTCP.h>
 #include <HTParse.h>
@@ -982,7 +982,7 @@ static int find_cached_style(int cur,
 		    s = GetCachedStyle(LYP, x);
 		    if (s != 0) {
 			SetCachedStyle(LYP, LXP, s);
-			CTRACE((tfp, "found %u, x_offset=%d.\n", s, x - LXP));
+			CTRACE((tfp, "found %d, x_offset=%d.\n", s, x - LXP));
 			break;
 		    }
 		}
@@ -1224,7 +1224,7 @@ void convert_to_spaces(char *string,
     if (!s)
 	return;
 
-    for (; (*s && !isspace(*s)); s++) ;
+    s = LYSkipNonBlanks(s);
     ns = s;
 
     while (*s) {