about summary refs log tree commit diff stats
path: root/WWW/Library
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2018-03-18 23:55:09 +0000
committerThomas E. Dickey <dickey@invisible-island.net>2018-03-18 23:55:09 +0000
commit7cec919da585246a86443c57e1f04fc79cce5954 (patch)
treecafabfdfd6fce21ccbe16aa4834cd703f59863a8 /WWW/Library
parente86c1c8ddabde50e52019b5a00026e5e3a73b5e3 (diff)
downloadlynx-snapshots-7cec919da585246a86443c57e1f04fc79cce5954.tar.gz
snapshot of project "lynx", label v2-8-9dev_16v
Diffstat (limited to 'WWW/Library')
-rw-r--r--WWW/Library/Implementation/HTTP.c11
-rw-r--r--WWW/Library/Implementation/HTUtils.h6
2 files changed, 10 insertions, 7 deletions
diff --git a/WWW/Library/Implementation/HTTP.c b/WWW/Library/Implementation/HTTP.c
index b6af5887..1d8dd2ec 100644
--- a/WWW/Library/Implementation/HTTP.c
+++ b/WWW/Library/Implementation/HTTP.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTTP.c,v 1.167 2018/03/05 22:33:35 tom Exp $
+ * $LynxId: HTTP.c,v 1.168 2018/03/18 18:47:59 tom Exp $
  *
  * HyperText Tranfer Protocol	- Client implementation		HTTP.c
  * ==========================
@@ -1417,11 +1417,11 @@ static int HTLoadHTTP(const char *arg,
 	    }
 	}
 
-	if (language && *language) {
+	if (non_empty(language)) {
 	    HTBprintf(&command, "Accept-Language: %s%c%c", language, CR, LF);
 	}
 
-	if (pref_charset && *pref_charset) {
+	if (non_empty(pref_charset)) {
 	    BStrCat0(command, "Accept-Charset: ");
 	    StrAllocCopy(linebuf, pref_charset);
 	    if (linebuf[strlen(linebuf) - 1] == ',')
@@ -1489,7 +1489,7 @@ static int HTLoadHTTP(const char *arg,
 	    }
 	}
 
-	if (personal_mail_address && !LYNoFromHeader) {
+	if (non_empty(personal_mail_address) && !LYNoFromHeader) {
 	    HTBprintf(&command, "From: %s%c%c", personal_mail_address, CR, LF);
 	}
 
@@ -1966,7 +1966,8 @@ static int HTLoadHTTP(const char *arg,
 
 	CTRACE((tfp, "HTTP: Scanned %d fields from line_buffer\n", fields));
 
-	if (http_error_file) {	/* Make the status code externally available */
+	if (non_empty(http_error_file)) {
+	    /* Make the status code externally available */
 	    FILE *error_file;
 
 #ifdef SERVER_STATUS_ONLY
diff --git a/WWW/Library/Implementation/HTUtils.h b/WWW/Library/Implementation/HTUtils.h
index 17210549..571cc17f 100644
--- a/WWW/Library/Implementation/HTUtils.h
+++ b/WWW/Library/Implementation/HTUtils.h
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTUtils.h,v 1.127 2018/03/11 22:29:50 tom Exp $
+ * $LynxId: HTUtils.h,v 1.128 2018/03/17 15:56:11 tom Exp $
  *
  * Utility macros for the W3 code library
  * MACROS FOR GENERAL USE
@@ -23,7 +23,9 @@
 #else
 # ifdef _MSC_VER
 #  include <malloc.h>
-#  define alloca(size) _alloca(size)
+#  ifndef alloca
+#   define alloca(size) _alloca(size)
+#  endif
 # else
 #  if HAVE_ALLOCA_H
 #   include <alloca.h>