about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--CHANGES7
-rw-r--r--WWW/Library/Implementation/HTMLGen.c4
-rw-r--r--WWW/Library/Implementation/HTUtils.h15
-rw-r--r--WWW/Library/Implementation/SGML.c6
-rw-r--r--WWW/Library/Implementation/SGML.h6
-rw-r--r--lib/dirent.c12
-rw-r--r--makefile.msc14
-rw-r--r--src/GridText.c4
-rw-r--r--src/HTML.c26
-rw-r--r--src/LYCharSets.c6
-rw-r--r--src/LYCharSets.h6
-rw-r--r--src/LYCharUtils.c10
-rw-r--r--src/LYCharUtils.h10
-rw-r--r--src/LYCurses.c17
-rw-r--r--src/LYExtern.c4
-rw-r--r--src/LYForms.c6
-rw-r--r--src/LYOptions.c22
-rw-r--r--src/LYOptions.h6
-rw-r--r--src/LYStrings.c24
-rw-r--r--src/LYStrings.h9
-rw-r--r--src/LYUtils.c10
-rw-r--r--src/UCdomap.c16
-rw-r--r--src/chrtrans/makefile.msc4
23 files changed, 146 insertions, 98 deletions
diff --git a/CHANGES b/CHANGES
index 8f1413c5..d11917e6 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,9 +1,14 @@
--- $LynxId: CHANGES,v 1.580 2012/02/10 01:52:10 tom Exp $
+-- $LynxId: CHANGES,v 1.583 2012/02/10 20:00:53 tom Exp $
 ===============================================================================
 Changes since Lynx 2.8 release
 ===============================================================================
 
 2012-02-09 (2.8.8dev.10)
+* add bzlib to win32 makefile.msc -TD
+* define WIN32_LEAN_AND_MEAN in makefile.msc to accommodate naming conflict
+  in recent Win32 SDKs, which otherwise include winsock.h in windows.h -TD
+* fixes for the dev.9 Win32 feature to toggle between normal/fullscreen,
+  by checking the actual screensize after maximizing the display -TD
 * use ASCII apostrophe for 7-bit approximation to U+02bd as well -TD
 * use ASCII apostrophe 0x27 for 7-bit approximation to Unicode apostrophe
   U+02bc (suggested by Ralph Babel)
diff --git a/WWW/Library/Implementation/HTMLGen.c b/WWW/Library/Implementation/HTMLGen.c
index 3b3195bd..3fc55e9b 100644
--- a/WWW/Library/Implementation/HTMLGen.c
+++ b/WWW/Library/Implementation/HTMLGen.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTMLGen.c,v 1.36 2011/06/11 12:10:02 tom Exp $
+ * $LynxId: HTMLGen.c,v 1.37 2012/02/10 18:32:26 tom Exp $
  *
  *		HTML Generator
  *		==============
@@ -312,7 +312,7 @@ static void HTMLGen_write(HTStructured * me, const char *s,
  */
 static int HTMLGen_start_element(HTStructured * me, int element_number,
 				 const BOOL *present,
-				 const char **value,
+				 STRING2PTR value,
 				 int charset GCC_UNUSED,
 				 char **insert GCC_UNUSED)
 {
diff --git a/WWW/Library/Implementation/HTUtils.h b/WWW/Library/Implementation/HTUtils.h
index 01086171..5df9c620 100644
--- a/WWW/Library/Implementation/HTUtils.h
+++ b/WWW/Library/Implementation/HTUtils.h
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTUtils.h,v 1.107 2011/05/28 15:13:56 tom Exp $
+ * $LynxId: HTUtils.h,v 1.109 2012/02/10 18:44:24 tom Exp $
  *
  * Utility macros for the W3 code library
  * MACROS FOR GENERAL USE
@@ -196,6 +196,16 @@ extern int ignore_unused;
  */
 #if defined(_WINDOWS) && !defined(__CYGWIN__)
 
+#ifndef __GNUC__
+#pragma warning (disable : 4100)	/* unreferenced formal parameter */
+#pragma warning (disable : 4127)	/* conditional expression is constant */
+#pragma warning (disable : 4201)	/* nameless struct/union */
+#pragma warning (disable : 4214)	/* bit field types other than int */
+#pragma warning (disable : 4310)	/* cast truncates constant value */
+#pragma warning (disable : 4514)	/* unreferenced inline function has been removed */
+#pragma warning (disable : 4996)	/* This function or variable may be unsafe. ... */
+#endif
+
 #if defined(USE_WINSOCK2_H) && (_MSC_VER >= 1300) && (_MSC_VER < 1400)
 #include <winsock2.h>		/* includes windows.h, in turn windef.h */
 #else
@@ -384,6 +394,9 @@ typedef char BOOLEAN;		/* Logical value */
 #define NO (BOOLEAN)0
 #endif
 
+#define STRING1PTR const char *
+#define STRING2PTR const char * const *
+
 extern BOOL LYOutOfMemory;	/* Declared in LYexit.c - FM */
 
 #define TCP_PORT 80		/* Allocated to http by Jon Postel/ISI 24-Jan-92 */
diff --git a/WWW/Library/Implementation/SGML.c b/WWW/Library/Implementation/SGML.c
index fb9d298b..86908a01 100644
--- a/WWW/Library/Implementation/SGML.c
+++ b/WWW/Library/Implementation/SGML.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: SGML.c,v 1.147 2011/12/01 02:11:01 tom Exp $
+ * $LynxId: SGML.c,v 1.148 2012/02/10 18:32:26 tom Exp $
  *
  *			General SGML Parser code		SGML.c
  *			========================
@@ -337,7 +337,7 @@ static void HTMLSRC_apply_markup(HTStream *context,
 	    (*context->actions->start_element) (context->target,
 						(int) ts->element,
 						ts->present,
-						(const char **) ts->value,
+						(STRING2PTR) ts->value,
 						context->current_tag_charset,
 						&context->include);
 	else
@@ -1357,7 +1357,7 @@ static void start_element(HTStream *context)
     status = (*context->actions->start_element) (context->target,
 						 (int) TAGNUM_OF_TAGP(new_tag),
 						 context->present,
-						 (const char **) context->value,	/* coerce type for think c */
+						 (STRING2PTR) context->value,	/* coerce type for think c */
 						 context->current_tag_charset,
 						 &context->include);
     if (status == HT_PARSER_OTHER_CONTENT)
diff --git a/WWW/Library/Implementation/SGML.h b/WWW/Library/Implementation/SGML.h
index 499e1d0c..9fccdda2 100644
--- a/WWW/Library/Implementation/SGML.h
+++ b/WWW/Library/Implementation/SGML.h
@@ -1,5 +1,5 @@
 /*
- * $LynxId: SGML.h,v 1.45 2010/09/24 00:12:09 tom Exp $
+ * $LynxId: SGML.h,v 1.46 2012/02/10 18:32:26 tom Exp $
  *			       SGML parse and stream definition for libwww
  *                             SGML AND STRUCTURED STREAMS
  *
@@ -173,7 +173,7 @@ extern "C" {
     typedef struct {
 	HTTag *tags;		/* Must be in strcmp order by name */
 	int number_of_tags;
-	const char **entity_names;	/* Must be in strcmp order by name */
+	STRING2PTR entity_names;	/* Must be in strcmp order by name */
 	size_t number_of_entities;
 	/*  "entity_names" table probably unused,
 	 *  see comments in HTMLDTD.c near the top
@@ -226,7 +226,7 @@ Structured Object definition
 
 	int (*start_element) (HTStructured * me, int element_number,
 			      const BOOL *attribute_present,
-			      const char **attribute_value,
+			      STRING2PTR attribute_value,
 			      int charset,
 			      char **include);
 
diff --git a/lib/dirent.c b/lib/dirent.c
index 8b8f08f4..a143960f 100644
--- a/lib/dirent.c
+++ b/lib/dirent.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: dirent.c,v 1.4 2010/10/31 17:56:17 tom Exp $
+ * $LynxId: dirent.c,v 1.5 2012/02/10 11:35:49 tom Exp $
  *
  * dir.c for MS-DOS by Samuel Lam <skl@van-bc.UUCP>, June/87 
  */
@@ -27,6 +27,16 @@
 #include "lynx_cfg.h"
 #endif
 
+#ifndef __GNUC__
+#pragma warning (disable : 4100) /* unreferenced formal parameter */
+#pragma warning (disable : 4127) /* conditional expression is constant */
+#pragma warning (disable : 4201) /* nameless struct/union */
+#pragma warning (disable : 4214) /* bit field types other than int */
+#pragma warning (disable : 4310) /* cast truncates constant value */
+#pragma warning (disable : 4514) /* unreferenced inline function has been removed */
+#pragma warning (disable : 4996) /* This function or variable may be unsafe. ... */
+#endif
+
 #include <windows.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/makefile.msc b/makefile.msc
index 298ed421..ca166495 100644
--- a/makefile.msc
+++ b/makefile.msc
@@ -1,4 +1,4 @@
-# $LynxId: makefile.msc,v 1.24 2011/05/28 13:07:55 tom Exp $
+# $LynxId: makefile.msc,v 1.27 2012/02/10 19:30:03 tom Exp $
 #
 # Makefile for `Lynx' browser for Microsoft Visual C++ 4.2 or later
 #
@@ -66,7 +66,7 @@ INCLUDES = \
  /I "$(SRC_DIR)\chrtrans" \
  /I "$(WWW_DIR)" \
  /I "$(ETC_LIB)"
-DEFS = $(CS_DEFS) $(SOCK_DEFS) $(SSL_DEFS) $(SCREEN_DEFS) \
+DEFS = /D "WIN32_LEAN_AND_MEAN" $(CS_DEFS) $(SOCK_DEFS) $(SSL_DEFS) $(SCREEN_DEFS) \
  /D "ACCESS_AUTH" \
  /D "CJK_EX" \
  /D "DIRED_SUPPORT" \
@@ -98,6 +98,7 @@ DEFS = $(CS_DEFS) $(SOCK_DEFS) $(SSL_DEFS) $(SCREEN_DEFS) \
  /D "USE_READPROGRESS" \
  /D "USE_SCROLLBAR" \
  /D "USE_SOURCE_CACHE" \
+ /D "USE_BZLIB" \
  /D "USE_ZLIB" \
  /D "WIN32" \
  /D "WIN_EX" \
@@ -109,16 +110,19 @@ DEFS = $(CS_DEFS) $(SOCK_DEFS) $(SSL_DEFS) $(SCREEN_DEFS) \
  /D _WIN_CC="1" \
  /D VC="2.14FM"
 
+# /GX == /EHsc == 
+# /EHs enable C++ EH (no SEH exceptions)  /EHa enable C++ EH (w/ SEH exceptions)
+# /EHc extern "C" defaults to nothrow     
 !if "$(DEBUG)" == ""
-CFLAGS   = /nologo /MT /W3 /GX /O2 /c
+CFLAGS   = /nologo /MT /W3 /EHsc /O2 /c
 LDFLAGS  = /nologo /subsystem:console /incremental:no /machine:I386
 !else
-CFLAGS   = /nologo /MT /W3 /GX /Zi /c
+CFLAGS   = /nologo /MT /W3 /EHsc /Zi /c
 LDFLAGS  = /debug /nologo /subsystem:console /incremental:no /machine:I386
 !endif
 
 LIBS     = kernel32.lib user32.lib wsock32.lib advapi32.lib /NODEFAULTLIB:libc\
- $(ETC_LIB)\$(SCREEN_LIB).lib $(ETC_LIB)\zlib.lib dirent.obj $(SSL_LIBS)
+ $(ETC_LIB)\$(SCREEN_LIB).lib $(ETC_LIB)\libbz2.lib $(ETC_LIB)\zlib.lib dirent.obj $(SSL_LIBS)
 
 COMPILE = $(CC) $(CFLAGS) $(INCLUDES) $(DEFS)
 LINK    = $(LD) $(LDFLAGS) /map:lynx.map /out:$@
diff --git a/src/GridText.c b/src/GridText.c
index 39d9c9ec..3ef7752c 100644
--- a/src/GridText.c
+++ b/src/GridText.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: GridText.c,v 1.230 2012/02/09 11:49:06 tom Exp $
+ * $LynxId: GridText.c,v 1.231 2012/02/10 18:22:04 tom Exp $
  *
  *		Character grid hypertext object
  *		===============================
@@ -1611,6 +1611,7 @@ static int display_line(HTLine *line,
 		    {
 			int y, x;
 
+			(void) y;
 			getyx(LYwin, y, x);
 			if (x >= DISPLAY_COLS || x == 0)
 			    break;
@@ -2229,6 +2230,7 @@ static void display_page(HText *text,
 		 * line.  -FM
 		 */
 		LYstopTargetEmphasis();
+		(void) y;
 		LYGetYX(y, offset);
 		data = (char *) &data[itmp];
 
diff --git a/src/HTML.c b/src/HTML.c
index 74a990c5..dae978c3 100644
--- a/src/HTML.c
+++ b/src/HTML.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTML.c,v 1.154 2012/02/10 01:26:31 tom Exp $
+ * $LynxId: HTML.c,v 1.155 2012/02/10 18:36:39 tom Exp $
  *
  *		Structured stream to Rich hypertext converter
  *		============================================
@@ -140,7 +140,7 @@ static int HTML_end_element(HTStructured * me, int element_number,
 
 static int HTML_start_element(HTStructured * me, int element_number,
 			      const BOOL *present,
-			      const char **value,
+			      STRING2PTR value,
 			      int tag_charset,
 			      char **include);
 
@@ -150,9 +150,9 @@ static int HTML_start_element(HTStructured * me, int element_number,
 #define VERBOSE_IMG(value,src_type,string) \
       ((verbose_img) ? (newtitle = MakeNewTitle(value,src_type)): string)
 
-static char *MakeNewTitle(const char **value, int src_type);
-static char *MakeNewImageValue(const char **value);
-static char *MakeNewMapValue(const char **value, const char *mapstr);
+static char *MakeNewTitle(STRING2PTR value, int src_type);
+static char *MakeNewImageValue(STRING2PTR value);
+static char *MakeNewMapValue(STRING2PTR value, const char *mapstr);
 
 /*	Set an internal flag that the next call to a stack-affecting method
  *	is only internal and the stack manipulation should be skipped. - kw
@@ -797,7 +797,7 @@ static void HTMLSRC_apply_markup(HTStructured * context, HTlexeme lexeme, int st
 	    HTML_start_element(context,
 			       (int) ts->element,
 			       ts->present,
-			       (const char **) ts->value,
+			       (STRING2PTR) ts->value,
 			       tag_charset,
 			       NULL);
 	else
@@ -849,7 +849,7 @@ static void LYStartArea(HTStructured * obj, const char *href,
 }
 
 static void LYHandleFIG(HTStructured * me, const BOOL *present,
-			const char **value,
+			STRING2PTR value,
 			int isobject,
 			int imagemap,
 			const char *id,
@@ -957,7 +957,7 @@ static void clear_objectdata(HTStructured * me)
  */
 static int HTML_start_element(HTStructured * me, int element_number,
 			      const BOOL *present,
-			      const char **value,
+			      STRING2PTR value,
 			      int tag_charset,
 			      char **include)
 {
@@ -5080,7 +5080,7 @@ static int HTML_start_element(HTStructured * me, int element_number,
 	 * Start a new SELECT block. - FM
 	 */
 	LYHandleSELECT(me,
-		       present, (const char **) value,
+		       present, (STRING2PTR) value,
 		       include,
 		       TRUE);
 	break;
@@ -6068,7 +6068,7 @@ static int HTML_end_element(HTStructured * me, int element_number,
 
     case HTML_P:
 	LYHandlePlike(me,
-		      (const BOOL *) 0, (const char **) 0,
+		      (const BOOL *) 0, (STRING2PTR) 0,
 		      include, 0,
 		      FALSE);
 	break;
@@ -8243,7 +8243,7 @@ int HTLoadError(HTStream *sink GCC_UNUSED, int number,
     return -number;
 }
 
-static char *MakeNewTitle(const char **value, int src_type)
+static char *MakeNewTitle(STRING2PTR value, int src_type)
 {
     char *ptr;
     char *newtitle = NULL;
@@ -8285,7 +8285,7 @@ static char *MakeNewTitle(const char **value, int src_type)
     return newtitle;
 }
 
-static char *MakeNewImageValue(const char **value)
+static char *MakeNewImageValue(STRING2PTR value)
 {
     char *ptr;
     char *newtitle = NULL;
@@ -8303,7 +8303,7 @@ static char *MakeNewImageValue(const char **value)
     return newtitle;
 }
 
-static char *MakeNewMapValue(const char **value, const char *mapstr)
+static char *MakeNewMapValue(STRING2PTR value, const char *mapstr)
 {
     char *ptr;
     char *newtitle = NULL;
diff --git a/src/LYCharSets.c b/src/LYCharSets.c
index 343625b4..f3114ac4 100644
--- a/src/LYCharSets.c
+++ b/src/LYCharSets.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYCharSets.c,v 1.66 2010/09/25 12:46:05 tom Exp $
+ * $LynxId: LYCharSets.c,v 1.67 2012/02/10 18:43:40 tom Exp $
  */
 #include <HTUtils.h>
 #include <HTCJK.h>
@@ -24,7 +24,7 @@ int forced_UCLYhdnl;
 int LYNumCharsets = 0;		/* Will be initialized later by UC_Register. */
 int current_char_set = -1;	/* will be intitialized later in LYMain.c */
 int linedrawing_char_set = -1;
-const char **p_entity_values = NULL;	/* Pointer, for HTML_put_entity() */
+STRING2PTR p_entity_values = NULL;	/* Pointer, for HTML_put_entity() */
 
 			      /* obsolete and probably not used(???)        */
 			      /* will be initialized in HTMLUseCharacterSet */
@@ -342,7 +342,7 @@ const char *SevenBitApproximations[] =
 /*
  * Add the array name to LYCharSets
  */
-const char **LYCharSets[MAXCHARSETS] =
+STRING2PTR LYCharSets[MAXCHARSETS] =
 {
     ISO_Latin1,			/* ISO Latin 1          */
     SevenBitApproximations,	/* 7 Bit Approximations */
diff --git a/src/LYCharSets.h b/src/LYCharSets.h
index c7e83a97..c0d15530 100644
--- a/src/LYCharSets.h
+++ b/src/LYCharSets.h
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYCharSets.h,v 1.33 2010/09/25 01:01:58 tom Exp $
+ * $LynxId: LYCharSets.h,v 1.34 2012/02/10 18:43:40 tom Exp $
  */
 #ifndef LYCHARSETS_H
 #define LYCHARSETS_H
@@ -43,9 +43,9 @@ extern "C" {
  */
     extern int LYCharSetsDeclared(void);
 
-    extern const char **LYCharSets[];
+    extern STRING2PTR LYCharSets[];
     extern const char *SevenBitApproximations[];
-    extern const char **p_entity_values;
+    extern STRING2PTR p_entity_values;
     extern const char *LYchar_set_names[];	/* Full name, not MIME */
     extern int LYlowest_eightbit[];
     extern int LYNumCharsets;
diff --git a/src/LYCharUtils.c b/src/LYCharUtils.c
index 7fc63aba..6ef515cc 100644
--- a/src/LYCharUtils.c
+++ b/src/LYCharUtils.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYCharUtils.c,v 1.116 2011/12/01 09:41:59 tom Exp $
+ * $LynxId: LYCharUtils.c,v 1.117 2012/02/10 18:36:39 tom Exp $
  *
  *  Functions associated with LYCharSets.c and the Lynx version of HTML.c - FM
  *  ==========================================================================
@@ -2022,7 +2022,7 @@ void LYParseRefreshURL(char *content,
  *  This function processes META tags in HTML streams. - FM
  */
 void LYHandleMETA(HTStructured * me, const BOOL *present,
-		  const char **value,
+		  STRING2PTR value,
 		  char **include GCC_UNUSED)
 {
     char *http_equiv = NULL, *name = NULL, *content = NULL, *charset = NULL;
@@ -2594,7 +2594,7 @@ void LYHandleMETA(HTStructured * me, const BOOL *present,
  *  end tag is present or not in the markup. - FM
  */
 void LYHandlePlike(HTStructured * me, const BOOL *present,
-		   const char **value,
+		   STRING2PTR value,
 		   char **include GCC_UNUSED,
 		   int align_idx,
 		   int start)
@@ -2701,7 +2701,7 @@ void LYHandlePlike(HTStructured * me, const BOOL *present,
  *  an end tag. - FM
  */
 void LYHandleSELECT(HTStructured * me, const BOOL *present,
-		    const char **value,
+		    STRING2PTR value,
 		    char **include GCC_UNUSED,
 		    int start)
 {
@@ -3096,7 +3096,7 @@ void LYCheckForContentBase(HTStructured * me)
  *  or ID attribute was present in the tag. - FM
  */
 void LYCheckForID(HTStructured * me, const BOOL *present,
-		  const char **value,
+		  STRING2PTR value,
 		  int attribute)
 {
     HTChildAnchor *ID_A = NULL;
diff --git a/src/LYCharUtils.h b/src/LYCharUtils.h
index 7e87c2ed..2b9ca881 100644
--- a/src/LYCharUtils.h
+++ b/src/LYCharUtils.h
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYCharUtils.h,v 1.27 2011/06/11 10:35:56 tom Exp $
+ * $LynxId: LYCharUtils.h,v 1.28 2012/02/10 18:36:39 tom Exp $
  */
 #ifndef LYCHARUTILS_H
 #define LYCHARUTILS_H
@@ -73,15 +73,15 @@ extern "C" {
     extern char *LYLowercaseI_OL_String(int seqnum);
     extern void LYGetChartransInfo(HTStructured * me);
     extern void LYHandleMETA(HTStructured * me, const BOOL *present,
-			     const char **value,
+			     STRING2PTR value,
 			     char **include);
     extern void LYHandlePlike(HTStructured * me, const BOOL *present,
-			      const char **value,
+			      STRING2PTR value,
 			      char **include,
 			      int align_idx,
 			      int start);
     extern void LYHandleSELECT(HTStructured * me, const BOOL *present,
-			       const char **value,
+			       STRING2PTR value,
 			       char **include,
 			       int start);
     extern int LYLegitimizeHREF(HTStructured * me, char **href,
@@ -89,7 +89,7 @@ extern "C" {
 				int strip_dots);
     extern void LYCheckForContentBase(HTStructured * me);
     extern void LYCheckForID(HTStructured * me, const BOOL *present,
-			     const char **value,
+			     STRING2PTR value,
 			     int attribute);
     extern void LYHandleID(HTStructured * me, const char *id);
     extern BOOLEAN LYoverride_default_alignment(HTStructured * me);
diff --git a/src/LYCurses.c b/src/LYCurses.c
index 13f7eff5..c4575ff3 100644
--- a/src/LYCurses.c
+++ b/src/LYCurses.c
@@ -1,4 +1,4 @@
-/* $LynxId: LYCurses.c,v 1.162 2012/02/05 14:53:36 tom Exp $ */
+/* $LynxId: LYCurses.c,v 1.164 2012/02/10 18:22:15 tom Exp $ */
 #include <HTUtils.h>
 #include <HTAlert.h>
 
@@ -1076,10 +1076,16 @@ void maxmizeWindowSize(void)
 		LYcols = scrsize_x = (disp_width - 4) / font_width;
 		LYlines = scrsize_y = (disp_height - 32) / font_height;
 		LYlines--;
-		CTRACE((tfp, "New Screen Size: (%2d,%2d)\n", scrsize_x, scrsize_y));
+		CTRACE((tfp, "Request maximum screen size: %dx%d\n",
+			scrsize_y, scrsize_x));
 		resize_term(scrsize_y, scrsize_x);
 		Sleep(100);
 		moveWindowHXY(currentWindowHandle, 0, 0);
+		LYlines = LYscreenHeight();
+		LYcols = LYscreenWidth();
+		CTRACE((tfp, "...actual maximum screen size: %dx%d\n",
+			LYlines, LYcols));
+		LYStatusLine = -1;
 		recent_sizechange = TRUE;
 	    }
 	}
@@ -1092,6 +1098,7 @@ void recoverWindowSize(void)
 	LYcols = scrsize_x = saved_scrsize_x2;
 	LYlines = scrsize_y = saved_scrsize_y2;
 	LYlines--;
+	LYStatusLine = -1;
 	wclear(curscr);
 	doupdate();
 	resize_term(scrsize_y, scrsize_x);
@@ -1473,8 +1480,9 @@ void start_curses(void)
 	CTRACE((tfp, "resize_term: x=%d, y=%d\n", scrsize_x, scrsize_y));
 	CTRACE((tfp, "saved terminal size: x=%d, y=%d\n", saved_scrsize_x, saved_scrsize_y));
 	resize_term(scrsize_y, scrsize_x);
-	LYlines = scrsize_y - 1;
-	LYcols = scrsize_x;
+	LYlines = LYscreenHeight();
+	LYcols = LYscreenWidth();
+	LYStatusLine = -1;
 	LYclear();
 #ifdef _WINDOWS
 	adjustWindowPos();
@@ -1935,6 +1943,7 @@ void LYpaddstr(WINDOW * the_window, int width, const char *the_string)
 #endif
 
     getyx(the_window, y, x1);
+    (void) y;
     if (width + x1 > LYcolLimit)
 	width = LYcolLimit - x1;
 #ifdef WIDEC_CURSES
diff --git a/src/LYExtern.c b/src/LYExtern.c
index 7809ca5f..c6b64667 100644
--- a/src/LYExtern.c
+++ b/src/LYExtern.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYExtern.c,v 1.48 2010/12/11 13:08:13 tom Exp $
+ * $LynxId: LYExtern.c,v 1.49 2012/02/10 18:36:39 tom Exp $
  *
  External application support.
  This feature allows lynx to pass a given URL to an external program.
@@ -292,7 +292,7 @@ static char *lookup_external(char *param,
 	cur_choice = LYhandlePopupList(-1,
 				       0,
 				       old_x,
-				       (const char **) choices,
+				       (STRING2PTR) choices,
 				       -1,
 				       -1,
 				       FALSE,
diff --git a/src/LYForms.c b/src/LYForms.c
index aec9f2c9..447403ec 100644
--- a/src/LYForms.c
+++ b/src/LYForms.c
@@ -1,4 +1,4 @@
-/* $LynxId: LYForms.c,v 1.96 2012/02/09 01:01:53 tom Exp $ */
+/* $LynxId: LYForms.c,v 1.97 2012/02/10 18:36:39 tom Exp $ */
 #include <HTUtils.h>
 #include <HTCJK.h>
 #include <HTTP.h>
@@ -104,7 +104,7 @@ int change_form_link_ex(int cur,
 	    (void) LYhandlePopupList(form->num_value,
 				     links[cur].ly,
 				     links[cur].lx,
-				     (const char **) my_data,
+				     (STRING2PTR) my_data,
 				     form->size,
 				     form->size_l,
 				     FormIsReadonly(form),
@@ -120,7 +120,7 @@ int change_form_link_ex(int cur,
 	form->num_value = LYhandlePopupList(form->num_value,
 					    links[cur].ly,
 					    links[cur].lx,
-					    (const char **) my_data,
+					    (STRING2PTR) my_data,
 					    form->size,
 					    form->size_l,
 					    FormIsReadonly(form),
diff --git a/src/LYOptions.c b/src/LYOptions.c
index 694ef7c4..6d1822bb 100644
--- a/src/LYOptions.c
+++ b/src/LYOptions.c
@@ -1,4 +1,4 @@
-/* $LynxId: LYOptions.c,v 1.148 2012/02/09 01:56:18 tom Exp $ */
+/* $LynxId: LYOptions.c,v 1.149 2012/02/10 18:36:39 tom Exp $ */
 #include <HTUtils.h>
 #include <HTFTP.h>
 #include <HTTP.h>		/* 'reloading' flag */
@@ -129,13 +129,13 @@ static void SetupChosenShowColor(void)
 static int boolean_choice(int status,
 			  int line,
 			  int column,
-			  const char **choices);
+			  STRING2PTR choices);
 
 #define LYChooseBoolean(status, line, column, choices) \
-	(BOOLEAN) boolean_choice(status, line, column, (const char **)choices)
+	(BOOLEAN) boolean_choice(status, line, column, (const char *const*)choices)
 
 #define LYChooseEnum(status, line, column, choices) \
-	boolean_choice(status, line, column, (const char **)choices)
+	boolean_choice(status, line, column, (const char *const*)choices)
 
 #define MAXCHOICES 10
 
@@ -278,7 +278,7 @@ void LYoptions(void)
 	"ON",
 	NULL
     };
-    static const char *caseless_choices[] =
+    static const char *const caseless_choices[] =
     {
 	"CASE INSENSITIVE",
 	"CASE SENSITIVE",
@@ -351,7 +351,6 @@ void LYoptions(void)
     int CurrentShowColor = LYShowColor;
     BOOLEAN CurrentRawMode = LYRawMode;
     BOOLEAN AddValueAccepted = FALSE;
-    char *cp = NULL;
     BOOL use_assume_charset;
 
 #if defined(VMS) || defined(USE_SLANG)
@@ -732,7 +731,6 @@ void LYoptions(void)
 	     */
 	    LYsetXDisplay(my_data->str);
 	    validate_x_display();
-	    cp = NULL;
 	    LYaddstr(x_display ? x_display : "NONE");
 	    LYclrtoeol();
 	    summarize_x_display(my_data->str);
@@ -1575,7 +1573,7 @@ void LYoptions(void)
     return;
 }
 
-static int widest_choice(const char **choices)
+static int widest_choice(STRING2PTR choices)
 {
     int n, width = 0;
 
@@ -1604,7 +1602,7 @@ static void show_choice(const char *choice,
 static int boolean_choice(int cur_choice,
 			  int line,
 			  int column,
-			  const char **choices)
+			  STRING2PTR choices)
 {
     int response = 0;
     int cmd = 0;
@@ -2059,7 +2057,7 @@ void edit_bookmarks(void)
 int popup_choice(int cur_choice,
 		 int line,
 		 int column,
-		 const char **choices,
+		 STRING2PTR choices,
 		 int i_length,
 		 int disabled,
 		 int for_mouse)
@@ -2071,7 +2069,7 @@ int popup_choice(int cur_choice,
     cur_choice = LYhandlePopupList(cur_choice,
 				   line,
 				   column,
-				   (const char **) choices,
+				   (STRING2PTR) choices,
 				   -1,
 				   i_length,
 				   disabled,
@@ -3388,7 +3386,7 @@ static void PutLabel(FILE *fp, const char *name,
  * so, return that name, so the subsequence will_save_rc() check in PutLabel()
  * will flag the composite as not-saved.
  */
-static const char *check_if_write_lynxrc(const char **table)
+static const char *check_if_write_lynxrc(STRING2PTR table)
 {
     int n;
     const char *result = NULL;
diff --git a/src/LYOptions.h b/src/LYOptions.h
index ede60134..3d22e43d 100644
--- a/src/LYOptions.h
+++ b/src/LYOptions.h
@@ -1,4 +1,4 @@
-/* $LynxId: LYOptions.h,v 1.29 2010/09/25 11:40:36 tom Exp $ */
+/* $LynxId: LYOptions.h,v 1.30 2012/02/10 18:39:49 tom Exp $ */
 #ifndef LYOPTIONS_H
 #define LYOPTIONS_H
 
@@ -15,13 +15,13 @@ extern "C" {
     extern int popup_choice(int cur_choice,
 			    int line,
 			    int column,
-			    const char **choices,
+			    STRING2PTR choices,
 			    int length,
 			    int disabled,
 			    int mouse);
 
 #define LYChoosePopup(cur, line, column, choices, length, disabled, mouse) \
-	popup_choice(cur, line, column, (const char **)choices, length, disabled, mouse)
+	popup_choice(cur, line, column, (STRING2PTR) choices, length, disabled, mouse)
 
 #ifndef NO_OPTION_FORMS
     extern void LYMenuVisitedLinks(FILE *fp0, int disable_all);
diff --git a/src/LYStrings.c b/src/LYStrings.c
index 0760fda8..8e079313 100644
--- a/src/LYStrings.c
+++ b/src/LYStrings.c
@@ -1,4 +1,4 @@
-/* $LynxId: LYStrings.c,v 1.202 2012/02/09 18:48:45 tom Exp $ */
+/* $LynxId: LYStrings.c,v 1.203 2012/02/10 18:37:31 tom Exp $ */
 #include <HTUtils.h>
 #include <HTCJK.h>
 #include <UCAux.h>
@@ -3652,6 +3652,8 @@ static void remember_column(EDREC * edit, int offset)
 {
     int y0, x0;
 
+    (void) y0;
+    (void) x0;
 #if defined(USE_SLANG)
     y0 = 0;
     x0 = SLsmg_get_column();
@@ -3978,13 +3980,13 @@ static void reinsertEdit(EditFieldData *edit, char *result)
 static int caselessCmpList(const void *a,
 			   const void *b)
 {
-    return strcasecomp(*(const char *const *) a, *(const char *const *) b);
+    return strcasecomp(*(STRING2PTR) a, *(STRING2PTR) b);
 }
 
 static int normalCmpList(const void *a,
 			 const void *b)
 {
-    return strcmp(*(const char *const *) a, *(const char *const *) b);
+    return strcmp(*(STRING2PTR) a, *(STRING2PTR) b);
 }
 
 static char **sortedList(HTList *list, int ignorecase)
@@ -4027,7 +4029,7 @@ static char **sortedList(HTList *list, int ignorecase)
     return result;
 }
 
-int LYarrayLength(const char **list)
+int LYarrayLength(STRING2PTR list)
 {
     int result = 0;
 
@@ -4036,7 +4038,7 @@ int LYarrayLength(const char **list)
     return result;
 }
 
-int LYarrayWidth(const char **list)
+int LYarrayWidth(STRING2PTR list)
 {
     int result = 0;
     int check;
@@ -4065,7 +4067,7 @@ static void FormatChoiceNum(char *dst,
     }
 }
 
-static unsigned options_width(const char **list)
+static unsigned options_width(STRING2PTR list)
 {
     unsigned width = 0;
     int count = 0;
@@ -4137,7 +4139,7 @@ static void draw_option(WINDOW * win, int entry,
 int LYhandlePopupList(int cur_choice,
 		      int ly,
 		      int lx,
-		      const char **choices,
+		      STRING2PTR choices,
 		      int width,
 		      int i_length,
 		      int disabled,
@@ -4168,7 +4170,7 @@ int LYhandlePopupList(int cur_choice,
     int number;
     char buffer[MAX_LINE];
     const char *popup_status_msg = NULL;
-    const char **Cptr = NULL;
+    STRING2PTR Cptr = NULL;
 
 #define CAN_SCROLL_DOWN	1
 #define CAN_SCROLL_UP	2
@@ -5077,6 +5079,8 @@ int LYgetBString(bstring **inputline,
 
     CTRACE((tfp, "called LYgetBString hidden %d, recall %d\n", hidden, recall));
 
+    (void) y;
+    (void) x;
     LYGetYX(y, x);		/* Use screen from cursor position to eol */
 
     if (*inputline == NULL)	/* caller may not have initialized this */
@@ -5174,7 +5178,7 @@ int LYgetBString(bstring **inputline,
 		    char **data = sortedList(list, (BOOL) (recall == RECALL_CMD));
 		    int old_y, old_x;
 		    int cur_choice = 0;
-		    int num_options = LYarrayLength((const char **) data);
+		    int num_options = LYarrayLength((STRING2PTR) data);
 
 		    while (cur_choice < num_options
 			   && strcasecomp(data[cur_choice], Buf) < 0)
@@ -5184,7 +5188,7 @@ int LYgetBString(bstring **inputline,
 		    cur_choice = LYhandlePopupList(cur_choice,
 						   0,
 						   old_x,
-						   (const char **) data,
+						   (STRING2PTR) data,
 						   -1,
 						   -1,
 						   FALSE,
diff --git a/src/LYStrings.h b/src/LYStrings.h
index f661d59b..1334a107 100644
--- a/src/LYStrings.h
+++ b/src/LYStrings.h
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYStrings.h,v 1.86 2012/02/07 19:47:45 tom Exp $
+ * $LynxId: LYStrings.h,v 1.87 2012/02/10 18:36:39 tom Exp $
  */
 #ifndef LYSTRINGS_H
 #define LYSTRINGS_H
@@ -9,6 +9,7 @@
 #ifdef __cplusplus
 extern "C" {
 #endif
+    typedef const char *const Const2CharPtr;
     typedef enum {
 	NORECALL = 0
 	,RECALL_URL
@@ -38,8 +39,8 @@ extern "C" {
     extern int get_popup_number(const char *msg,
 				int *c,
 				int *rel);
-    extern int LYarrayLength(const char **list);
-    extern int LYarrayWidth(const char **list);
+    extern int LYarrayLength(STRING2PTR list);
+    extern int LYarrayWidth(STRING2PTR list);
     extern int LYgetch(void);
     extern int LYgetch_choice(void);
     extern int LYgetch_input(void);
@@ -337,7 +338,7 @@ extern "C" {
     extern int LYhandlePopupList(int cur_choice,
 				 int ly,
 				 int lx,
-				 const char **choices,
+				 STRING2PTR choices,
 				 int width,
 				 int i_length,
 				 int disabled,
diff --git a/src/LYUtils.c b/src/LYUtils.c
index 93cf6c25..9d2131a5 100644
--- a/src/LYUtils.c
+++ b/src/LYUtils.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYUtils.c,v 1.218 2012/02/09 18:56:48 tom Exp $
+ * $LynxId: LYUtils.c,v 1.221 2012/02/10 18:22:50 tom Exp $
  */
 #include <HTUtils.h>
 #include <HTTCP.h>
@@ -629,6 +629,7 @@ static BOOL show_whereis_targets(int flag,
 			    LYstopTargetEmphasis();
 			    TargetEmphasisON = FALSE;
 			    LYGetYX(y, offset);
+			    (void) y;
 			    LYmove(hLine, (offset + 1));
 			} else {
 			    LYaddstr(tmp);
@@ -1535,6 +1536,7 @@ void statusline(const char *text)
 		      ? (chtype) hashStyles[a].color
 		      : A_NORMAL) | ' ');
 	    LYGetYX(y, x);
+	    (void) x;
 	    if (y == at_lineno) {
 		LYclrtoeol();
 	    }
@@ -1723,8 +1725,8 @@ void LYFakeZap(int set)
 
 static int DontCheck(void)
 {
-    static long last;
-    long next;
+    static time_t last;
+    time_t next;
 
     /** Curses or slang setup was not invoked **/
     if (dump_output_immediately)
@@ -6697,7 +6699,7 @@ BOOLEAN LYValidateFilename(bstring **result,
 #ifndef __EMX__
 	if (!LYisAbsPath((*given)->str)) {
 #if defined(__DJGPP__) || defined(_WINDOWS)
-	    if (strchr(*result->str, ':') != NULL)
+	    if (strchr((*result)->str, ':') != NULL)
 		cp = NULL;
 	    else
 #endif /*  __DJGPP__ || _WINDOWS */
diff --git a/src/UCdomap.c b/src/UCdomap.c
index c26d9922..b25c4cfb 100644
--- a/src/UCdomap.c
+++ b/src/UCdomap.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: UCdomap.c,v 1.92 2011/12/01 09:34:49 tom Exp $
+ * $LynxId: UCdomap.c,v 1.93 2012/02/10 18:44:11 tom Exp $
  *
  *  UCdomap.c
  *  =========
@@ -293,7 +293,7 @@ static void UCconsole_map_init(void);
 static int UC_MapGN(int UChndl, int update_flag);
 static int UC_FindGN_byMIME(const char *UC_MIMEcharset);
 static void UCreset_allocated_LYCharSets(void);
-static const char **UC_setup_LYCharSets_repl(int UC_charset_in_hndl, unsigned lowest8);
+static STRING2PTR UC_setup_LYCharSets_repl(int UC_charset_in_hndl, unsigned lowest8);
 static int UC_Register_with_LYCharSets(int s,
 				       const char *UC_MIMEcharset,
 				       const char *UC_LYNXcharset,
@@ -1689,7 +1689,7 @@ int UCGetLYhndl_byMIME(const char *value)
 /*
  * We need to remember which ones were allocated and which are static.
  */
-static const char **remember_allocated_LYCharSets[MAXCHARSETS];
+static STRING2PTR remember_allocated_LYCharSets[MAXCHARSETS];
 
 static void UCreset_allocated_LYCharSets(void)
 {
@@ -1713,10 +1713,10 @@ static void UCfree_allocated_LYCharSets(void)
 }
 #endif
 
-static const char **UC_setup_LYCharSets_repl(int UC_charset_in_hndl,
-					     unsigned lowest8)
+static STRING2PTR UC_setup_LYCharSets_repl(int UC_charset_in_hndl,
+					   unsigned lowest8)
 {
-    const char **ISO_Latin1 = LYCharSets[0];
+    STRING2PTR ISO_Latin1 = LYCharSets[0];
     const char **p;
     char **prepl;
     const u16 *pp;
@@ -1850,7 +1850,7 @@ static const char **UC_setup_LYCharSets_repl(int UC_charset_in_hndl,
 	FREE(prepl);
 	return NULL;
     }
-    return (const char **) prepl;
+    return (STRING2PTR) prepl;
 }
 
 /*
@@ -1862,7 +1862,7 @@ static int UC_Register_with_LYCharSets(int s,
 				       int lowest_eightbit)
 {
     int i, LYhndl, found;
-    const char **repl;
+    STRING2PTR repl;
 
     LYhndl = -1;
     if (LYNumCharsets == 0) {
diff --git a/src/chrtrans/makefile.msc b/src/chrtrans/makefile.msc
index 63a19dd8..28b7435d 100644
--- a/src/chrtrans/makefile.msc
+++ b/src/chrtrans/makefile.msc
@@ -6,8 +6,8 @@ CC       = cl
 LD       = link
 
 INCLUDES = /I "." /I ".." /I "..\.." /I "..\..\WWW\Library\Implementation" /I "..\..\lib"
-DEFS = /D "NDEBUG" /D "__WIN32__" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_WIN32" /D "NO_FILEIO_H" /D "NO_UNISTD_H" /D "_WINDOWS" /D "DOSPATH"
-CFLAGS   = /nologo /MT /W3 /GX /O2 /c
+DEFS = /D "WIN32_LEAN_AND_MEAN" /D "NDEBUG" /D "__WIN32__" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_WIN32" /D "NO_FILEIO_H" /D "NO_UNISTD_H" /D "_WINDOWS" /D "DOSPATH"
+CFLAGS   = /nologo /MT /W3 /EHsc /O2 /c
 
 LDFLAGS  = /nologo /subsystem:console /incremental:no /machine:I386
 LIBS     = user32.lib wsock32.lib