about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2018-03-20 00:22:41 +0000
committerThomas E. Dickey <dickey@invisible-island.net>2018-03-20 00:22:41 +0000
commitecb7dae178b85d6a0459660495ee4554b2eaac92 (patch)
tree3f937ac779c42f70a1ef985340109e5c52a41d99
parent7cec919da585246a86443c57e1f04fc79cce5954 (diff)
downloadlynx-snapshots-ecb7dae178b85d6a0459660495ee4554b2eaac92.tar.gz
snapshot of project "lynx", label v2-8-9dev_16w
-rw-r--r--BUILD/VS2012X64/lynx/lynx.vcxproj2
-rw-r--r--CHANGES5
-rw-r--r--PACKAGE/lynx.iss4
-rw-r--r--src/LYCurses.c13
-rw-r--r--src/LYOptions.c16
5 files changed, 25 insertions, 15 deletions
diff --git a/BUILD/VS2012X64/lynx/lynx.vcxproj b/BUILD/VS2012X64/lynx/lynx.vcxproj
index c5730419..f3def434 100644
--- a/BUILD/VS2012X64/lynx/lynx.vcxproj
+++ b/BUILD/VS2012X64/lynx/lynx.vcxproj
@@ -90,7 +90,7 @@
     </ClCompile>

     <Link>

       <AdditionalDependencies>pdcurses.lib;zlib.lib;wsock32.lib;user32.lib;advapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>

-      <AdditionalLibraryDirectories>$(VcInstallDir)lib;$(SolutionDir)\lib;$(SolutionDir)..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

+      <AdditionalLibraryDirectories>$(VcInstallDir)lib;$(SolutionDir)lib;$(SolutionDir)..\..\lib;$(SolutionDir)..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <IgnoreSpecificDefaultLibraries>libc;libcmt;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>

       <GenerateDebugInformation>true</GenerateDebugInformation>

       <SubSystem>Console</SubSystem>

diff --git a/CHANGES b/CHANGES
index 678ba021..fd57f873 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,9 +1,10 @@
--- $LynxId: CHANGES,v 1.956 2018/03/18 23:55:09 tom Exp $
+-- $LynxId: CHANGES,v 1.957 2018/03/20 00:22:41 tom Exp $
 ===============================================================================
 Changes since Lynx 2.8 release
 ===============================================================================
 
-2018-03-18 (2.8.9dev.17)
+2018-03-19 (2.8.9dev.17)
+* add checks in options-menu in case no color-styles have been defined -TD
 * add Visual Studio project files for 2010, 2012 -TD
 * improve checks for strings which should not be empty -TD
 * check for empty personal-mail-address (report by TG) -TD
diff --git a/PACKAGE/lynx.iss b/PACKAGE/lynx.iss
index ccba7fde..6e0a3db1 100644
--- a/PACKAGE/lynx.iss
+++ b/PACKAGE/lynx.iss
@@ -1,5 +1,5 @@
-; $LynxId: lynx.iss,v 1.27 2018/03/17 15:40:36 tom Exp $

-; vile:ts=2 sw=2 notabinsert

+; $LynxId: lynx.iss,v 1.28 2018/03/18 17:48:41 tom Exp $

+; vile:ts=4 sw=4 notabinsert fk=8bit

 ;

 ; This is the BASE script for different flavors of the installer for Lynx.

 ; It can be overridden to select different source-executables (and their associated

diff --git a/src/LYCurses.c b/src/LYCurses.c
index 6656f10b..e768aaf5 100644
--- a/src/LYCurses.c
+++ b/src/LYCurses.c
@@ -1,4 +1,4 @@
-/* $LynxId: LYCurses.c,v 1.193 2018/03/18 19:19:12 tom Exp $ */
+/* $LynxId: LYCurses.c,v 1.194 2018/03/19 22:38:49 tom Exp $ */
 #include <HTUtils.h>
 #include <HTAlert.h>
 
@@ -2251,11 +2251,16 @@ int LYstrExtent0(const char *string,
 		 int maxCells GCC_UNUSED,
 		 int retCellNum GCC_UNUSED)
 {
-    int used = (len < 0 ? (int) strlen(string) : len);
-    int result = used;
+    int used, result;
 
+    if (isEmpty(string)) {
+	used = ((len > 0) ? len : 0);
+    } else {
+	used = ((len < 0) ? (int) strlen(string) : len);
+    }
+    result = used;
 #ifdef WIDEC_CURSES
-    if (used > 0 && lynx_called_initscr) {
+    if (non_empty(string) && used > 0 && lynx_called_initscr) {
 	static WINDOW *fake_win;
 	static int fake_max;
 
diff --git a/src/LYOptions.c b/src/LYOptions.c
index b0084396..6b4b0e0a 100644
--- a/src/LYOptions.c
+++ b/src/LYOptions.c
@@ -1,4 +1,4 @@
-/* $LynxId: LYOptions.c,v 1.177 2018/03/18 16:38:00 tom Exp $ */
+/* $LynxId: LYOptions.c,v 1.178 2018/03/19 23:06:50 tom Exp $ */
 #include <HTUtils.h>
 #include <HTFTP.h>
 #include <HTTP.h>		/* 'reloading' flag */
@@ -2119,6 +2119,8 @@ typedef struct {
 
 #define END_OPTIONS {0, 0, 0}
 
+#define HasOptValues(table) (((table) != NULL) && ((table)->LongName != NULL))
+
 typedef struct {
     char *tag;
     char *value;
@@ -3574,7 +3576,7 @@ static void PutLabel(FILE *fp, const char *name,
     int need = LYstrExtent(name, have, want);
     char *buffer = NULL;
 
-    fprintf(fp, "%s%s", MARGIN_STR, LYEntifyTitle(&buffer, name));
+    fprintf(fp, "%s%s", MARGIN_STR, LYEntifyTitle(&buffer, NonNull(name)));
 
     if (will_save_rc(value) && !no_option_save) {
 	while (need++ < want)
@@ -3985,10 +3987,12 @@ static int gen_options(char **newfile)
 
 #ifdef USE_COLOR_STYLE
     /* Color style: ON/OFF */
-    PutLabel(fp0, gettext("Color style"), color_style_string);
-    BeginSelect(fp0, color_style_string);
-    PutOptValues(fp0, get_color_style_value(), color_style_values);
-    EndSelect(fp0);
+    if (HasOptValues(color_style_values)) {
+	PutLabel(fp0, gettext("Color style"), color_style_string);
+	BeginSelect(fp0, color_style_string);
+	PutOptValues(fp0, get_color_style_value(), color_style_values);
+	EndSelect(fp0);
+    }
 #endif
 
 #ifdef USE_DEFAULT_COLORS