Submitted By: Jim Gifford (patches at jg555 dot com)
Date: 2005-05-12
Initial Package Version: 5.4
Origin: Ncurses Site - Updates/Fixes
Upstream Status: Already Applied
Description: Various Fixes for ncurses
	This patch contains all updates from it's release to
	5-7-2005
	This patch fixes cross-compile issues

 
diff -Naur ncurses-5.4.orig/Ada95/gen/Makefile.in ncurses-5.4/Ada95/gen/Makefile.in
--- ncurses-5.4.orig/Ada95/gen/Makefile.in	2003-10-25 15:39:18.000000000 +0000
+++ ncurses-5.4/Ada95/gen/Makefile.in	2005-05-13 04:09:57.000000000 +0000
@@ -1,5 +1,5 @@
 ##############################################################################
-# Copyright (c) 1998-2002,2003 Free Software Foundation, Inc.                #
+# Copyright (c) 1998-2004,2005 Free Software Foundation, Inc.                #
 #                                                                            #
 # Permission is hereby granted, free of charge, to any person obtaining a    #
 # copy of this software and associated documentation files (the "Software"), #
@@ -28,8 +28,7 @@
 #
 #  Author:  Juergen Pfeifer, 1996
 #
-#  Version Control
-#  $Revision: 1.44 $
+#  $Id: Makefile.in,v 1.48 2005/04/23 17:49:06 tom Exp $
 #
 .SUFFIXES:
 
@@ -68,12 +67,10 @@
 CFLAGS_DEFAULT	= $(CFLAGS_@DFT_UPR_MODEL@)
 
 LINK		= $(HOST_CC)
-LD_FLAGS	= @LD_MODEL@ $(LOCAL_LIBS) @LDFLAGS@ @LIBS@ @LOCAL_LDFLAGS2@ $(LDFLAGS)
+LD_FLAGS	= @LD_MODEL@ $(LOCAL_LIBS) @LDFLAGS@ @LIBS@ @LOCAL_LDFLAGS2@ $(LDFLAGS) @TINFO_ARGS2@
 
 RANLIB		= @RANLIB@
 
-LIB_CURSES      = -L../../lib -lncurses@LIB_SUFFIX@
-
 M4		= m4
 M4FLAGS		=
 
@@ -152,7 +149,7 @@
 
 all \
 libs :	$(GEN_TARGETS)
-	@
+	@echo made $@
 
 sources:
 
@@ -184,7 +181,7 @@
 	-@cd $(ADA_OBJECTS) && rm -f $(ALIB)[-.]*
 
 gen$x:	gen.o
-	@ECHO_LINK@ $(LINK) $(CFLAGS_NORMAL) gen.o $(LD_FLAGS) -o $@ $(LIB_CURSES)
+	@ECHO_LINK@ $(LINK) $(CFLAGS_NORMAL) gen.o $(LD_FLAGS) -o $@
 
 gen.o:	$(srcdir)/gen.c
 	$(HOST_CC) $(CFLAGS_NORMAL) -c -o $@ $(srcdir)/gen.c
@@ -431,7 +428,7 @@
 	@rm -rf html
 
 html : adahtml $(HTML_DIR)/table.html
-	@
+	@echo made $@
 
 ###############################################################################
 # The remainder of this file is automatically generated during configuration
diff -Naur ncurses-5.4.orig/Ada95/gen/gen.c ncurses-5.4/Ada95/gen/gen.c
--- ncurses-5.4.orig/Ada95/gen/gen.c	2003-10-25 15:39:18.000000000 +0000
+++ ncurses-5.4/Ada95/gen/gen.c	2005-05-13 04:09:49.000000000 +0000
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc.                   *
+ * Copyright (c) 1998,2004,2005 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -32,7 +32,7 @@
 
 /*
     Version Control
-    $Revision: 1.36 $
+    $Id: gen.c,v 1.40 2005/01/22 17:03:48 tom Exp $
   --------------------------------------------------------------------------*/
 /*
   This program generates various record structures and constants from the
@@ -55,27 +55,31 @@
 static const char *model = "";
 static int little_endian = 0;
 
-typedef struct {
-  const char *name;
-  unsigned long attr;
-} name_attribute_pair;
+typedef struct
+  {
+    const char *name;
+    unsigned long attr;
+  }
+name_attribute_pair;
 
-static int find_pos (char *s, unsigned len, int *low, int *high)
+static int
+find_pos(char *s, unsigned len, int *low, int *high)
 {
-  unsigned int i,j;
+  unsigned int i, j;
   int l = 0;
 
   *high = -1;
-  *low  = 8*len;
+  *low = 8 * len;
 
-  for(i=0; i < len; i++,s++)
+  for (i = 0; i < len; i++, s++)
     {
       if (*s)
 	{
-	  for(j=0;j<8*sizeof(char);j++)
+	  for (j = 0; j < 8 * sizeof(char); j++)
+
 	    {
-	      if ((( little_endian && ((*s)&0x01)) ||
-		   (!little_endian && ((*s)&0x80))) )
+	      if (((little_endian && ((*s) & 0x01)) ||
+		   (!little_endian && ((*s) & 0x80))))
 		{
 		  if (l > *high)
 		    *high = l;
@@ -102,212 +106,229 @@
  * bit size, i.e. they fit into an (u)int or a (u)short.
  */
 static void
-gen_reps
-(const name_attribute_pair *nap, /* array of name_attribute_pair records */
- const char *name,               /* name of the represented record type  */
- int len,                        /* size of the record in bytes          */
- int bias)
+  gen_reps
+  (const name_attribute_pair * nap,	/* array of name_attribute_pair records */
+   const char *name,		/* name of the represented record type  */
+   int len,			/* size of the record in bytes          */
+   int bias)
 {
-  int i,n,l,cnt = 0,low,high;
+  int i, n, l, cnt = 0, low, high;
   int width = strlen(RES_NAME) + 3;
   unsigned long a;
   unsigned long mask = 0;
 
-  assert (nap!=NULL);
+  assert(nap != NULL);
 
-  for (i=0; nap[i].name != (char *)0; i++)
+  for (i = 0; nap[i].name != (char *)0; i++)
     {
       cnt++;
       l = strlen(nap[i].name);
-      if (l>width)
+      if (l > width)
 	width = l;
     }
-  assert (width > 0);
+  assert(width > 0);
 
-  printf("   type %s is\n",name);
+  printf("   type %s is\n", name);
   printf("      record\n");
-  for (i=0; nap[i].name != (char *)0; i++)
+  for (i = 0; nap[i].name != (char *)0; i++)
     {
-      printf("         %-*s : Boolean;\n",width,nap[i].name);
+      printf("         %-*s : Boolean;\n", width, nap[i].name);
     }
   printf("      end record;\n");
-  printf("   pragma Pack (%s);\n",name);
-  printf("   pragma Convention (C, %s);\n\n",name);
+  printf("   pragma Convention (C, %s);\n\n", name);
 
-  printf("   for %s use\n",name);
+  printf("   for %s use\n", name);
   printf("      record\n");
 
-  for (i=0; nap[i].name != (char *)0; i++)
+  for (i = 0; nap[i].name != (char *)0; i++)
     {
       a = nap[i].attr;
       mask |= a;
-      l = find_pos( (char *)&a,sizeof(a),&low,&high );
-      if (l>=0)
-	printf("         %-*s at 0 range %2d .. %2d;\n",width,nap[i].name,
-	       low-bias,high-bias);
+      l = find_pos((char *)&a, sizeof(a), &low, &high);
+      if (l >= 0)
+	printf("         %-*s at 0 range %2d .. %2d;\n", width, nap[i].name,
+	       low - bias, high - bias);
     }
-  i = 1; n = cnt;
+  i = 1;
+  n = cnt;
   printf("      end record;\n");
-  printf("   for %s'Size use %d;\n", name, 8*len);
+  printf("   for %s'Size use %d;\n", name, 8 * len);
   printf("   --  Please note: this rep. clause is generated and may be\n");
   printf("   --               different on your system.");
 }
 
-
-static void chtype_rep (const char *name, attr_t mask)
+static void
+chtype_rep(const char *name, attr_t mask)
 {
   attr_t x = -1;
   attr_t t = x & mask;
   int low, high;
-  int l = find_pos ((char *)&t, sizeof(t), &low, &high);
-  if (l>=0)
-    printf("         %-5s at 0 range %2d .. %2d;\n",name,low,high);
+  int l = find_pos((char *)&t, sizeof(t), &low, &high);
+
+  if (l >= 0)
+    printf("         %-5s at 0 range %2d .. %2d;\n", name, low, high);
 }
 
-static void gen_chtype_rep(const char *name)
-{
-  printf("   for %s use\n      record\n",name);
-  chtype_rep("Ch",A_CHARTEXT);
-  chtype_rep("Color",A_COLOR);
-  chtype_rep("Attr",(A_ATTRIBUTES&~A_COLOR));
-  printf("      end record;\n   for %s'Size use %ld;\n", name, (long)(8*sizeof(chtype)));
+static void
+gen_chtype_rep(const char *name)
+{
+  printf("   for %s use\n      record\n", name);
+  chtype_rep("Ch", A_CHARTEXT);
+  chtype_rep("Color", A_COLOR);
+  chtype_rep("Attr", (A_ATTRIBUTES & ~A_COLOR));
+  printf("      end record;\n   for %s'Size use %ld;\n",
+	 name, (long)(8 * sizeof(chtype)));
+
   printf("      --  Please note: this rep. clause is generated and may be\n");
   printf("      --               different on your system.\n");
 }
 
-
-static void mrep_rep (const char *name, void *rec)
+static void
+mrep_rep(const char *name, void *rec)
 {
   int low, high;
   int l = find_pos((char *)rec, sizeof(MEVENT), &low, &high);
-  if (l>=0)
-    printf("         %-7s at 0 range %3d .. %3d;\n",name,low,high);
-}
 
+  if (l >= 0)
+    printf("         %-7s at 0 range %3d .. %3d;\n", name, low, high);
+}
 
-static void gen_mrep_rep(const char *name)
+static void
+gen_mrep_rep(const char *name)
 {
   MEVENT x;
 
-  printf("   for %s use\n      record\n",name);
+  printf("   for %s use\n      record\n", name);
 
-  memset(&x,0,sizeof(x));
+  memset(&x, 0, sizeof(x));
   x.id = -1;
-  mrep_rep("Id",&x);
+  mrep_rep("Id", &x);
 
-  memset(&x,0,sizeof(x));
+  memset(&x, 0, sizeof(x));
   x.x = -1;
-  mrep_rep("X",&x);
+  mrep_rep("X", &x);
 
-  memset(&x,0,sizeof(x));
+  memset(&x, 0, sizeof(x));
   x.y = -1;
-  mrep_rep("Y",&x);
+  mrep_rep("Y", &x);
 
-  memset(&x,0,sizeof(x));
+  memset(&x, 0, sizeof(x));
   x.z = -1;
-  mrep_rep("Z",&x);
+  mrep_rep("Z", &x);
 
-  memset(&x,0,sizeof(x));
+  memset(&x, 0, sizeof(x));
   x.bstate = -1;
-  mrep_rep("Bstate",&x);
+  mrep_rep("Bstate", &x);
 
   printf("      end record;\n");
   printf("      --  Please note: this rep. clause is generated and may be\n");
   printf("      --               different on your system.\n");
 }
 
-static void gen_attr_set( const char *name )
+static void
+gen_attr_set(const char *name)
 {
   /* All of the A_xxx symbols are defined in ncurses, but not all are nonzero
    * if "configure --enable-widec" is specified.
    */
-  static const name_attribute_pair nap[] = {
+  static const name_attribute_pair nap[] =
+  {
 #if A_STANDOUT
-    {"Stand_Out",               A_STANDOUT},
+    {"Stand_Out", A_STANDOUT},
 #endif
 #if A_UNDERLINE
-    {"Under_Line",              A_UNDERLINE},
+    {"Under_Line", A_UNDERLINE},
 #endif
 #if A_REVERSE
-    {"Reverse_Video",           A_REVERSE},
+    {"Reverse_Video", A_REVERSE},
 #endif
 #if A_BLINK
-    {"Blink",                   A_BLINK},
+    {"Blink", A_BLINK},
 #endif
 #if A_DIM
-    {"Dim_Character",           A_DIM},
+    {"Dim_Character", A_DIM},
 #endif
 #if A_BOLD
-    {"Bold_Character",          A_BOLD},
+    {"Bold_Character", A_BOLD},
 #endif
 #if A_ALTCHARSET
     {"Alternate_Character_Set", A_ALTCHARSET},
 #endif
 #if A_INVIS
-    {"Invisible_Character",     A_INVIS},
+    {"Invisible_Character", A_INVIS},
 #endif
 #if A_PROTECT
-    {"Protected_Character",     A_PROTECT},
+    {"Protected_Character", A_PROTECT},
 #endif
 #if A_HORIZONTAL
-    {"Horizontal",              A_HORIZONTAL},
+    {"Horizontal", A_HORIZONTAL},
 #endif
 #if A_LEFT
-    {"Left",                    A_LEFT},
+    {"Left", A_LEFT},
 #endif
 #if A_LOW
-    {"Low",                     A_LOW},
+    {"Low", A_LOW},
 #endif
 #if A_RIGHT
-    {"Right",                   A_RIGHT},
+    {"Right", A_RIGHT},
 #endif
 #if A_TOP
-    {"Top",                     A_TOP},
+    {"Top", A_TOP},
 #endif
 #if A_VERTICAL
-    {"Vertical",                A_VERTICAL},
+    {"Vertical", A_VERTICAL},
 #endif
-    {(char *)0,                 0}
+    {(char *)0, 0}
   };
   chtype attr = A_ATTRIBUTES & ~A_COLOR;
-  int start=-1, len=0, i, set;
-  for(i=0;i<(int)(8*sizeof(chtype));i++) {
-    set = attr&1;
-    if (set) {
-      if (start<0)
-	start = i;
-      if (start>=0) {
-	len++;
-      }
+  int start = -1;
+  int len = 0;
+  int i, set;
+  for (i = 0; i < (int)(8 * sizeof(chtype)); i++)
+
+    {
+      set = attr & 1;
+      if (set)
+	{
+	  if (start < 0)
+	    start = i;
+	  if (start >= 0)
+	    {
+	      len++;
+	    }
+	}
+      attr = attr >> 1;
     }
-    attr = attr >> 1;
-  }
-  gen_reps (nap, name, (len+7)/8, little_endian?start:0);
+  gen_reps(nap, name, (len + 7) / 8, little_endian ? start : 0);
 }
 
-static void gen_trace(const char *name)
-{  
-  static const name_attribute_pair nap[] = {
-    {"Times",               TRACE_TIMES},
-    {"Tputs",               TRACE_TPUTS},
-    {"Update",              TRACE_UPDATE},
-    {"Cursor_Move",         TRACE_MOVE},
-    {"Character_Output",    TRACE_CHARPUT},
-    {"Calls",               TRACE_CALLS},
-    {"Virtual_Puts",        TRACE_VIRTPUT},
-    {"Input_Events",        TRACE_IEVENT},
-    {"TTY_State",           TRACE_BITS},
-    {"Internal_Calls",      TRACE_ICALLS},
-    {"Character_Calls",     TRACE_CCALLS},
-    {"Termcap_TermInfo",    TRACE_DATABASE},
-    {(char *)0,                0}
+static void
+gen_trace(const char *name)
+{
+  static const name_attribute_pair nap[] =
+  {
+    {"Times", TRACE_TIMES},
+    {"Tputs", TRACE_TPUTS},
+    {"Update", TRACE_UPDATE},
+    {"Cursor_Move", TRACE_MOVE},
+    {"Character_Output", TRACE_CHARPUT},
+    {"Calls", TRACE_CALLS},
+    {"Virtual_Puts", TRACE_VIRTPUT},
+    {"Input_Events", TRACE_IEVENT},
+    {"TTY_State", TRACE_BITS},
+    {"Internal_Calls", TRACE_ICALLS},
+    {"Character_Calls", TRACE_CCALLS},
+    {"Termcap_TermInfo", TRACE_DATABASE},
+    {(char *)0, 0}
   };
-  gen_reps(nap,name,sizeof(int),0);
+  gen_reps(nap, name, sizeof(int), 0);
 }
 
-static void gen_menu_opt_rep(const char *name)
+static void
+gen_menu_opt_rep(const char *name)
 {
-  static const name_attribute_pair nap[] = {
+  static const name_attribute_pair nap[] =
+  {
 #ifdef O_ONEVALUE
     {"One_Valued", O_ONEVALUE},
 #endif
@@ -328,90 +349,99 @@
 #endif
     {(char *)0, 0}
   };
-  gen_reps (nap, name, sizeof(int),0);
+  gen_reps(nap, name, sizeof(int), 0);
 }
 
-static void gen_item_opt_rep(const char *name)
+static void
+gen_item_opt_rep(const char *name)
 {
-  static const name_attribute_pair nap[] = {
+  static const name_attribute_pair nap[] =
+  {
 #ifdef O_SELECTABLE
     {"Selectable", O_SELECTABLE},
 #endif
-    {(char *)0   , 0}
+    {(char *)0, 0}
   };
-  gen_reps (nap, name, sizeof(int),0);
+  gen_reps(nap, name, sizeof(int), 0);
 }
 
-static void gen_form_opt_rep(const char *name)
+static void
+gen_form_opt_rep(const char *name)
 {
-  static const name_attribute_pair nap[] = {
+  static const name_attribute_pair nap[] =
+  {
 #ifdef O_NL_OVERLOAD
     {"NL_Overload", O_NL_OVERLOAD},
 #endif
 #ifdef O_BS_OVERLOAD
     {"BS_Overload", O_BS_OVERLOAD},
 #endif
-    {(char *)0    , 0}
+    {(char *)0, 0}
   };
-  gen_reps (nap, name, sizeof(int),0);
+  gen_reps(nap, name, sizeof(int), 0);
 }
 
 /*
  * Generate the representation clause for the Field_Option_Set record
  */
-static void gen_field_opt_rep(const char *name)
+static void
+gen_field_opt_rep(const char *name)
 {
-  static const name_attribute_pair nap[] = {
+  static const name_attribute_pair nap[] =
+  {
 #ifdef O_VISIBLE
-    {"Visible",O_VISIBLE},
+    {"Visible", O_VISIBLE},
 #endif
 #ifdef O_ACTIVE
-    {"Active",O_ACTIVE},
+    {"Active", O_ACTIVE},
 #endif
 #ifdef O_PUBLIC
-    {"Public",O_PUBLIC},
+    {"Public", O_PUBLIC},
 #endif
 #ifdef O_EDIT
-    {"Edit",O_EDIT},
+    {"Edit", O_EDIT},
 #endif
 #ifdef O_WRAP
-    {"Wrap",O_WRAP},
+    {"Wrap", O_WRAP},
 #endif
 #ifdef O_BLANK
-    {"Blank",O_BLANK},
+    {"Blank", O_BLANK},
 #endif
 #ifdef O_AUTOSKIP
-    {"Auto_Skip",O_AUTOSKIP},
+    {"Auto_Skip", O_AUTOSKIP},
 #endif
 #ifdef O_NULLOK
-    {"Null_Ok",O_NULLOK},
+    {"Null_Ok", O_NULLOK},
 #endif
 #ifdef O_PASSOK
-    {"Pass_Ok",O_PASSOK},
+    {"Pass_Ok", O_PASSOK},
 #endif
 #ifdef O_STATIC
-    {"Static",O_STATIC},
+    {"Static", O_STATIC},
 #endif
     {(char *)0, 0}
   };
-  gen_reps (nap, name, sizeof(int),0);
+  gen_reps(nap, name, sizeof(int), 0);
 }
 
 /*
  * Generate a single key code constant definition.
  */
-static void keydef(const char *name, const char *old_name, int value, int mode)
+static void
+keydef(const char *name, const char *old_name, int value, int mode)
 {
-  if (mode==0) /* Generate the new name */
-    printf("   %-30s : constant Special_Key_Code := 8#%3o#;\n",name,value);
+  if (mode == 0)		/* Generate the new name */
+    printf("   %-30s : constant Special_Key_Code := 8#%3o#;\n", name, value);
   else
-    { /* generate the old name, but only if it doesn't conflict with the old
-       * name (Ada95 isn't case sensitive!)
-       */
-      const char *s = old_name; const char *t = name;
-      while ( *s && *t && (toupper(*s++) == toupper(*t++)));
+    {				/* generate the old name, but only if it doesn't conflict with the old
+				 * name (Ada95 isn't case sensitive!)
+				 */
+      const char *s = old_name;
+      const char *t = name;
+
+      while (*s && *t && (toupper(*s++) == toupper(*t++)));
       if (*s || *t)
-	printf("   %-16s : Special_Key_Code renames %s;\n",old_name,name);
+	printf("   %-16s : Special_Key_Code renames %s;\n", old_name, name);
     }
 }
 
@@ -422,298 +452,299 @@
  * generated, given that the name wasn't already defined in the "nice"
  * list.
  */
-static void gen_keydefs (int mode)
+static void
+gen_keydefs(int mode)
 {
   char buf[16];
   char obuf[16];
   int i;
 
 #ifdef KEY_CODE_YES
-  keydef("Key_Code_Yes","KEY_CODE_YES",KEY_CODE_YES,mode);
+  keydef("Key_Code_Yes", "KEY_CODE_YES", KEY_CODE_YES, mode);
 #endif
 #ifdef KEY_MIN
-  keydef("Key_Min","KEY_MIN",KEY_MIN,mode);
+  keydef("Key_Min", "KEY_MIN", KEY_MIN, mode);
 #endif
 #ifdef KEY_BREAK
-  keydef("Key_Break","KEY_BREAK",KEY_BREAK,mode);
+  keydef("Key_Break", "KEY_BREAK", KEY_BREAK, mode);
 #endif
 #ifdef KEY_DOWN
-  keydef("Key_Cursor_Down","KEY_DOWN",KEY_DOWN,mode);
+  keydef("Key_Cursor_Down", "KEY_DOWN", KEY_DOWN, mode);
 #endif
 #ifdef KEY_UP
-  keydef("Key_Cursor_Up","KEY_UP",KEY_UP,mode);
+  keydef("Key_Cursor_Up", "KEY_UP", KEY_UP, mode);
 #endif
 #ifdef KEY_LEFT
-  keydef("Key_Cursor_Left","KEY_LEFT",KEY_LEFT,mode);
+  keydef("Key_Cursor_Left", "KEY_LEFT", KEY_LEFT, mode);
 #endif
 #ifdef KEY_RIGHT
-  keydef("Key_Cursor_Right","KEY_RIGHT",KEY_RIGHT,mode);
+  keydef("Key_Cursor_Right", "KEY_RIGHT", KEY_RIGHT, mode);
 #endif
 #ifdef KEY_HOME
-  keydef("Key_Home","KEY_HOME",KEY_HOME,mode);
+  keydef("Key_Home", "KEY_HOME", KEY_HOME, mode);
 #endif
 #ifdef KEY_BACKSPACE
-  keydef("Key_Backspace","KEY_BACKSPACE",KEY_BACKSPACE,mode);
+  keydef("Key_Backspace", "KEY_BACKSPACE", KEY_BACKSPACE, mode);
 #endif
 #ifdef KEY_F0
-  keydef("Key_F0","KEY_F0",KEY_F0,mode);
+  keydef("Key_F0", "KEY_F0", KEY_F0, mode);
 #endif
 #ifdef KEY_F
-  for(i=1;i<=24;i++)
+  for (i = 1; i <= 24; i++)
     {
-      sprintf(buf ,"Key_F%d",i);
-      sprintf(obuf,"KEY_F%d",i);
-      keydef(buf,obuf,KEY_F(i),mode);
+      sprintf(buf, "Key_F%d", i);
+      sprintf(obuf, "KEY_F%d", i);
+      keydef(buf, obuf, KEY_F(i), mode);
     }
 #endif
 #ifdef KEY_DL
-  keydef("Key_Delete_Line","KEY_DL",KEY_DL,mode);
+  keydef("Key_Delete_Line", "KEY_DL", KEY_DL, mode);
 #endif
 #ifdef KEY_IL
-  keydef("Key_Insert_Line","KEY_IL",KEY_IL,mode);
+  keydef("Key_Insert_Line", "KEY_IL", KEY_IL, mode);
 #endif
 #ifdef KEY_DC
-  keydef("Key_Delete_Char","KEY_DC",KEY_DC,mode);
+  keydef("Key_Delete_Char", "KEY_DC", KEY_DC, mode);
 #endif
 #ifdef KEY_IC
-  keydef("Key_Insert_Char","KEY_IC",KEY_IC,mode);
+  keydef("Key_Insert_Char", "KEY_IC", KEY_IC, mode);
 #endif
 #ifdef KEY_EIC
-  keydef("Key_Exit_Insert_Mode","KEY_EIC",KEY_EIC,mode);
+  keydef("Key_Exit_Insert_Mode", "KEY_EIC", KEY_EIC, mode);
 #endif
 #ifdef KEY_CLEAR
-  keydef("Key_Clear_Screen","KEY_CLEAR",KEY_CLEAR,mode);
+  keydef("Key_Clear_Screen", "KEY_CLEAR", KEY_CLEAR, mode);
 #endif
 #ifdef KEY_EOS
-  keydef("Key_Clear_End_Of_Screen","KEY_EOS",KEY_EOS,mode);
+  keydef("Key_Clear_End_Of_Screen", "KEY_EOS", KEY_EOS, mode);
 #endif
 #ifdef KEY_EOL
-  keydef("Key_Clear_End_Of_Line","KEY_EOL",KEY_EOL,mode);
+  keydef("Key_Clear_End_Of_Line", "KEY_EOL", KEY_EOL, mode);
 #endif
 #ifdef KEY_SF
-  keydef("Key_Scroll_1_Forward","KEY_SF",KEY_SF,mode);
+  keydef("Key_Scroll_1_Forward", "KEY_SF", KEY_SF, mode);
 #endif
 #ifdef KEY_SR
-  keydef("Key_Scroll_1_Backward","KEY_SR",KEY_SR,mode);
+  keydef("Key_Scroll_1_Backward", "KEY_SR", KEY_SR, mode);
 #endif
 #ifdef KEY_NPAGE
-  keydef("Key_Next_Page","KEY_NPAGE",KEY_NPAGE,mode);
+  keydef("Key_Next_Page", "KEY_NPAGE", KEY_NPAGE, mode);
 #endif
 #ifdef KEY_PPAGE
-  keydef("Key_Previous_Page","KEY_PPAGE",KEY_PPAGE,mode);
+  keydef("Key_Previous_Page", "KEY_PPAGE", KEY_PPAGE, mode);
 #endif
 #ifdef KEY_STAB
-  keydef("Key_Set_Tab","KEY_STAB",KEY_STAB,mode);
+  keydef("Key_Set_Tab", "KEY_STAB", KEY_STAB, mode);
 #endif
 #ifdef KEY_CTAB
-  keydef("Key_Clear_Tab","KEY_CTAB",KEY_CTAB,mode);
+  keydef("Key_Clear_Tab", "KEY_CTAB", KEY_CTAB, mode);
 #endif
 #ifdef KEY_CATAB
-  keydef("Key_Clear_All_Tabs","KEY_CATAB",KEY_CATAB,mode);
+  keydef("Key_Clear_All_Tabs", "KEY_CATAB", KEY_CATAB, mode);
 #endif
 #ifdef KEY_ENTER
-  keydef("Key_Enter_Or_Send","KEY_ENTER",KEY_ENTER,mode);
+  keydef("Key_Enter_Or_Send", "KEY_ENTER", KEY_ENTER, mode);
 #endif
 #ifdef KEY_SRESET
-  keydef("Key_Soft_Reset","KEY_SRESET",KEY_SRESET,mode);
+  keydef("Key_Soft_Reset", "KEY_SRESET", KEY_SRESET, mode);
 #endif
 #ifdef KEY_RESET
-  keydef("Key_Reset","KEY_RESET",KEY_RESET,mode);
+  keydef("Key_Reset", "KEY_RESET", KEY_RESET, mode);
 #endif
 #ifdef KEY_PRINT
-  keydef("Key_Print","KEY_PRINT",KEY_PRINT,mode);
+  keydef("Key_Print", "KEY_PRINT", KEY_PRINT, mode);
 #endif
 #ifdef KEY_LL
-  keydef("Key_Bottom","KEY_LL",KEY_LL,mode);
+  keydef("Key_Bottom", "KEY_LL", KEY_LL, mode);
 #endif
 #ifdef KEY_A1
-  keydef("Key_Upper_Left_Of_Keypad","KEY_A1",KEY_A1,mode);
+  keydef("Key_Upper_Left_Of_Keypad", "KEY_A1", KEY_A1, mode);
 #endif
 #ifdef KEY_A3
-  keydef("Key_Upper_Right_Of_Keypad","KEY_A3",KEY_A3,mode);
+  keydef("Key_Upper_Right_Of_Keypad", "KEY_A3", KEY_A3, mode);
 #endif
 #ifdef KEY_B2
-  keydef("Key_Center_Of_Keypad","KEY_B2",KEY_B2,mode);
+  keydef("Key_Center_Of_Keypad", "KEY_B2", KEY_B2, mode);
 #endif
 #ifdef KEY_C1
-  keydef("Key_Lower_Left_Of_Keypad","KEY_C1",KEY_C1,mode);
+  keydef("Key_Lower_Left_Of_Keypad", "KEY_C1", KEY_C1, mode);
 #endif
 #ifdef KEY_C3
-  keydef("Key_Lower_Right_Of_Keypad","KEY_C3",KEY_C3,mode);
+  keydef("Key_Lower_Right_Of_Keypad", "KEY_C3", KEY_C3, mode);
 #endif
 #ifdef KEY_BTAB
-  keydef("Key_Back_Tab","KEY_BTAB",KEY_BTAB,mode);
+  keydef("Key_Back_Tab", "KEY_BTAB", KEY_BTAB, mode);
 #endif
 #ifdef KEY_BEG
-  keydef("Key_Beginning","KEY_BEG",KEY_BEG,mode);
+  keydef("Key_Beginning", "KEY_BEG", KEY_BEG, mode);
 #endif
 #ifdef KEY_CANCEL
-  keydef("Key_Cancel","KEY_CANCEL",KEY_CANCEL,mode);
+  keydef("Key_Cancel", "KEY_CANCEL", KEY_CANCEL, mode);
 #endif
 #ifdef KEY_CLOSE
-  keydef("Key_Close","KEY_CLOSE",KEY_CLOSE,mode);
+  keydef("Key_Close", "KEY_CLOSE", KEY_CLOSE, mode);
 #endif
 #ifdef KEY_COMMAND
-  keydef("Key_Command","KEY_COMMAND",KEY_COMMAND,mode);
+  keydef("Key_Command", "KEY_COMMAND", KEY_COMMAND, mode);
 #endif
 #ifdef KEY_COPY
-  keydef("Key_Copy","KEY_COPY",KEY_COPY,mode);
+  keydef("Key_Copy", "KEY_COPY", KEY_COPY, mode);
 #endif
 #ifdef KEY_CREATE
-  keydef("Key_Create","KEY_CREATE",KEY_CREATE,mode);
+  keydef("Key_Create", "KEY_CREATE", KEY_CREATE, mode);
 #endif
 #ifdef KEY_END
-  keydef("Key_End","KEY_END",KEY_END,mode);
+  keydef("Key_End", "KEY_END", KEY_END, mode);
 #endif
 #ifdef KEY_EXIT
-  keydef("Key_Exit","KEY_EXIT",KEY_EXIT,mode);
+  keydef("Key_Exit", "KEY_EXIT", KEY_EXIT, mode);
 #endif
 #ifdef KEY_FIND
-  keydef("Key_Find","KEY_FIND",KEY_FIND,mode);
+  keydef("Key_Find", "KEY_FIND", KEY_FIND, mode);
 #endif
 #ifdef KEY_HELP
-  keydef("Key_Help","KEY_HELP",KEY_HELP,mode);
+  keydef("Key_Help", "KEY_HELP", KEY_HELP, mode);
 #endif
 #ifdef KEY_MARK
-  keydef("Key_Mark","KEY_MARK",KEY_MARK,mode);
+  keydef("Key_Mark", "KEY_MARK", KEY_MARK, mode);
 #endif
 #ifdef KEY_MESSAGE
-  keydef("Key_Message","KEY_MESSAGE",KEY_MESSAGE,mode);
+  keydef("Key_Message", "KEY_MESSAGE", KEY_MESSAGE, mode);
 #endif
 #ifdef KEY_MOVE
-  keydef("Key_Move","KEY_MOVE",KEY_MOVE,mode);
+  keydef("Key_Move", "KEY_MOVE", KEY_MOVE, mode);
 #endif
 #ifdef KEY_NEXT
-  keydef("Key_Next","KEY_NEXT",KEY_NEXT,mode);
+  keydef("Key_Next", "KEY_NEXT", KEY_NEXT, mode);
 #endif
 #ifdef KEY_OPEN
-  keydef("Key_Open","KEY_OPEN",KEY_OPEN,mode);
+  keydef("Key_Open", "KEY_OPEN", KEY_OPEN, mode);
 #endif
 #ifdef KEY_OPTIONS
-  keydef("Key_Options","KEY_OPTIONS",KEY_OPTIONS,mode);
+  keydef("Key_Options", "KEY_OPTIONS", KEY_OPTIONS, mode);
 #endif
 #ifdef KEY_PREVIOUS
-  keydef("Key_Previous","KEY_PREVIOUS",KEY_PREVIOUS,mode);
+  keydef("Key_Previous", "KEY_PREVIOUS", KEY_PREVIOUS, mode);
 #endif
 #ifdef KEY_REDO
-  keydef("Key_Redo","KEY_REDO",KEY_REDO,mode);
+  keydef("Key_Redo", "KEY_REDO", KEY_REDO, mode);
 #endif
 #ifdef KEY_REFERENCE
-  keydef("Key_Reference","KEY_REFERENCE",KEY_REFERENCE,mode);
+  keydef("Key_Reference", "KEY_REFERENCE", KEY_REFERENCE, mode);
 #endif
 #ifdef KEY_REFRESH
-  keydef("Key_Refresh","KEY_REFRESH",KEY_REFRESH,mode);
+  keydef("Key_Refresh", "KEY_REFRESH", KEY_REFRESH, mode);
 #endif
 #ifdef KEY_REPLACE
-  keydef("Key_Replace","KEY_REPLACE",KEY_REPLACE,mode);
+  keydef("Key_Replace", "KEY_REPLACE", KEY_REPLACE, mode);
 #endif
 #ifdef KEY_RESTART
-  keydef("Key_Restart","KEY_RESTART",KEY_RESTART,mode);
+  keydef("Key_Restart", "KEY_RESTART", KEY_RESTART, mode);
 #endif
 #ifdef KEY_RESUME
-  keydef("Key_Resume","KEY_RESUME",KEY_RESUME,mode);
+  keydef("Key_Resume", "KEY_RESUME", KEY_RESUME, mode);
 #endif
 #ifdef KEY_SAVE
-  keydef("Key_Save","KEY_SAVE",KEY_SAVE,mode);
+  keydef("Key_Save", "KEY_SAVE", KEY_SAVE, mode);
 #endif
 #ifdef KEY_SBEG
-  keydef("Key_Shift_Begin","KEY_SBEG",KEY_SBEG,mode);
+  keydef("Key_Shift_Begin", "KEY_SBEG", KEY_SBEG, mode);
 #endif
 #ifdef KEY_SCANCEL
-  keydef("Key_Shift_Cancel","KEY_SCANCEL",KEY_SCANCEL,mode);
+  keydef("Key_Shift_Cancel", "KEY_SCANCEL", KEY_SCANCEL, mode);
 #endif
 #ifdef KEY_SCOMMAND
-  keydef("Key_Shift_Command","KEY_SCOMMAND",KEY_SCOMMAND,mode);
+  keydef("Key_Shift_Command", "KEY_SCOMMAND", KEY_SCOMMAND, mode);
 #endif
 #ifdef KEY_SCOPY
-  keydef("Key_Shift_Copy","KEY_SCOPY",KEY_SCOPY,mode);
+  keydef("Key_Shift_Copy", "KEY_SCOPY", KEY_SCOPY, mode);
 #endif
 #ifdef KEY_SCREATE
-  keydef("Key_Shift_Create","KEY_SCREATE",KEY_SCREATE,mode);
+  keydef("Key_Shift_Create", "KEY_SCREATE", KEY_SCREATE, mode);
 #endif
 #ifdef KEY_SDC
-  keydef("Key_Shift_Delete_Char","KEY_SDC",KEY_SDC,mode);
+  keydef("Key_Shift_Delete_Char", "KEY_SDC", KEY_SDC, mode);
 #endif
 #ifdef KEY_SDL
-  keydef("Key_Shift_Delete_Line","KEY_SDL",KEY_SDL,mode);
+  keydef("Key_Shift_Delete_Line", "KEY_SDL", KEY_SDL, mode);
 #endif
 #ifdef KEY_SELECT
-  keydef("Key_Select","KEY_SELECT",KEY_SELECT,mode);
+  keydef("Key_Select", "KEY_SELECT", KEY_SELECT, mode);
 #endif
 #ifdef KEY_SEND
-  keydef("Key_Shift_End","KEY_SEND",KEY_SEND,mode);
+  keydef("Key_Shift_End", "KEY_SEND", KEY_SEND, mode);
 #endif
 #ifdef KEY_SEOL
-  keydef("Key_Shift_Clear_End_Of_Line","KEY_SEOL",KEY_SEOL,mode);
+  keydef("Key_Shift_Clear_End_Of_Line", "KEY_SEOL", KEY_SEOL, mode);
 #endif
 #ifdef KEY_SEXIT
-  keydef("Key_Shift_Exit","KEY_SEXIT",KEY_SEXIT,mode);
+  keydef("Key_Shift_Exit", "KEY_SEXIT", KEY_SEXIT, mode);
 #endif
 #ifdef KEY_SFIND
-  keydef("Key_Shift_Find","KEY_SFIND",KEY_SFIND,mode);
+  keydef("Key_Shift_Find", "KEY_SFIND", KEY_SFIND, mode);
 #endif
 #ifdef KEY_SHELP
-  keydef("Key_Shift_Help","KEY_SHELP",KEY_SHELP,mode);
+  keydef("Key_Shift_Help", "KEY_SHELP", KEY_SHELP, mode);
 #endif
 #ifdef KEY_SHOME
-  keydef("Key_Shift_Home","KEY_SHOME",KEY_SHOME,mode);
+  keydef("Key_Shift_Home", "KEY_SHOME", KEY_SHOME, mode);
 #endif
 #ifdef KEY_SIC
-  keydef("Key_Shift_Insert_Char","KEY_SIC",KEY_SIC,mode);
+  keydef("Key_Shift_Insert_Char", "KEY_SIC", KEY_SIC, mode);
 #endif
 #ifdef KEY_SLEFT
-  keydef("Key_Shift_Cursor_Left","KEY_SLEFT",KEY_SLEFT,mode);
+  keydef("Key_Shift_Cursor_Left", "KEY_SLEFT", KEY_SLEFT, mode);
 #endif
 #ifdef KEY_SMESSAGE
-  keydef("Key_Shift_Message","KEY_SMESSAGE",KEY_SMESSAGE,mode);
+  keydef("Key_Shift_Message", "KEY_SMESSAGE", KEY_SMESSAGE, mode);
 #endif
 #ifdef KEY_SMOVE
-  keydef("Key_Shift_Move","KEY_SMOVE",KEY_SMOVE,mode);
+  keydef("Key_Shift_Move", "KEY_SMOVE", KEY_SMOVE, mode);
 #endif
 #ifdef KEY_SNEXT
-  keydef("Key_Shift_Next_Page","KEY_SNEXT",KEY_SNEXT,mode);
+  keydef("Key_Shift_Next_Page", "KEY_SNEXT", KEY_SNEXT, mode);
 #endif
 #ifdef KEY_SOPTIONS
-  keydef("Key_Shift_Options","KEY_SOPTIONS",KEY_SOPTIONS,mode);
+  keydef("Key_Shift_Options", "KEY_SOPTIONS", KEY_SOPTIONS, mode);
 #endif
 #ifdef KEY_SPREVIOUS
-  keydef("Key_Shift_Previous_Page","KEY_SPREVIOUS",KEY_SPREVIOUS,mode);
+  keydef("Key_Shift_Previous_Page", "KEY_SPREVIOUS", KEY_SPREVIOUS, mode);
 #endif
 #ifdef KEY_SPRINT
-  keydef("Key_Shift_Print","KEY_SPRINT",KEY_SPRINT,mode);
+  keydef("Key_Shift_Print", "KEY_SPRINT", KEY_SPRINT, mode);
 #endif
 #ifdef KEY_SREDO
-  keydef("Key_Shift_Redo","KEY_SREDO",KEY_SREDO,mode);
+  keydef("Key_Shift_Redo", "KEY_SREDO", KEY_SREDO, mode);
 #endif
 #ifdef KEY_SREPLACE
-  keydef("Key_Shift_Replace","KEY_SREPLACE",KEY_SREPLACE,mode);
+  keydef("Key_Shift_Replace", "KEY_SREPLACE", KEY_SREPLACE, mode);
 #endif
 #ifdef KEY_SRIGHT
-  keydef("Key_Shift_Cursor_Right","KEY_SRIGHT",KEY_SRIGHT,mode);
+  keydef("Key_Shift_Cursor_Right", "KEY_SRIGHT", KEY_SRIGHT, mode);
 #endif
 #ifdef KEY_SRSUME
-  keydef("Key_Shift_Resume","KEY_SRSUME",KEY_SRSUME,mode);
+  keydef("Key_Shift_Resume", "KEY_SRSUME", KEY_SRSUME, mode);
 #endif
 #ifdef KEY_SSAVE
-  keydef("Key_Shift_Save","KEY_SSAVE",KEY_SSAVE,mode);
+  keydef("Key_Shift_Save", "KEY_SSAVE", KEY_SSAVE, mode);
 #endif
 #ifdef KEY_SSUSPEND
-  keydef("Key_Shift_Suspend","KEY_SSUSPEND",KEY_SSUSPEND,mode);
+  keydef("Key_Shift_Suspend", "KEY_SSUSPEND", KEY_SSUSPEND, mode);
 #endif
 #ifdef KEY_SUNDO
-  keydef("Key_Shift_Undo","KEY_SUNDO",KEY_SUNDO,mode);
+  keydef("Key_Shift_Undo", "KEY_SUNDO", KEY_SUNDO, mode);
 #endif
 #ifdef KEY_SUSPEND
-  keydef("Key_Suspend","KEY_SUSPEND",KEY_SUSPEND,mode);
+  keydef("Key_Suspend", "KEY_SUSPEND", KEY_SUSPEND, mode);
 #endif
 #ifdef KEY_UNDO
-  keydef("Key_Undo","KEY_UNDO",KEY_UNDO,mode);
+  keydef("Key_Undo", "KEY_UNDO", KEY_UNDO, mode);
 #endif
 #ifdef KEY_MOUSE
-  keydef("Key_Mouse","KEY_MOUSE",KEY_MOUSE,mode);
+  keydef("Key_Mouse", "KEY_MOUSE", KEY_MOUSE, mode);
 #endif
 #ifdef KEY_RESIZE
-  keydef("Key_Resize","KEY_RESIZE",KEY_RESIZE,mode);
+  keydef("Key_Resize", "KEY_RESIZE", KEY_RESIZE, mode);
 #endif
 }
 
@@ -722,120 +753,122 @@
  * is a reference to the ACS character in the acs_map[] array and
  * will be translated into an index.
  */
-static void acs_def (const char *name, chtype *a)
+static void
+acs_def(const char *name, chtype *a)
 {
   int c = a - &acs_map[0];
-  printf("   %-24s : constant Character := ",name);
-  if (isprint(c) && (c!='`'))
-    printf("'%c';\n",c);
+
+  printf("   %-24s : constant Character := ", name);
+  if (isprint(c) && (c != '`'))
+    printf("'%c';\n", c);
   else
-    printf("Character'Val (%d);\n",c);
+    printf("Character'Val (%d);\n", c);
 }
 
 /*
  * Generate the constants for the ACS characters
  */
-static void gen_acs (void)
+static void
+gen_acs(void)
 {
 #ifdef ACS_ULCORNER
-  acs_def("ACS_Upper_Left_Corner",&ACS_ULCORNER);
+  acs_def("ACS_Upper_Left_Corner", &ACS_ULCORNER);
 #endif
 #ifdef ACS_LLCORNER
-  acs_def("ACS_Lower_Left_Corner",&ACS_LLCORNER);
+  acs_def("ACS_Lower_Left_Corner", &ACS_LLCORNER);
 #endif
 #ifdef ACS_URCORNER
-  acs_def("ACS_Upper_Right_Corner",&ACS_URCORNER);
+  acs_def("ACS_Upper_Right_Corner", &ACS_URCORNER);
 #endif
 #ifdef ACS_LRCORNER
-  acs_def("ACS_Lower_Right_Corner",&ACS_LRCORNER);
+  acs_def("ACS_Lower_Right_Corner", &ACS_LRCORNER);
 #endif
 #ifdef ACS_LTEE
-  acs_def("ACS_Left_Tee",&ACS_LTEE);
+  acs_def("ACS_Left_Tee", &ACS_LTEE);
 #endif
 #ifdef ACS_RTEE
-  acs_def("ACS_Right_Tee",&ACS_RTEE);
+  acs_def("ACS_Right_Tee", &ACS_RTEE);
 #endif
 #ifdef ACS_BTEE
-  acs_def("ACS_Bottom_Tee",&ACS_BTEE);
+  acs_def("ACS_Bottom_Tee", &ACS_BTEE);
 #endif
 #ifdef ACS_TTEE
-  acs_def("ACS_Top_Tee",&ACS_TTEE);
+  acs_def("ACS_Top_Tee", &ACS_TTEE);
 #endif
 #ifdef ACS_HLINE
-  acs_def("ACS_Horizontal_Line",&ACS_HLINE);
+  acs_def("ACS_Horizontal_Line", &ACS_HLINE);
 #endif
 #ifdef ACS_VLINE
-  acs_def("ACS_Vertical_Line",&ACS_VLINE);
+  acs_def("ACS_Vertical_Line", &ACS_VLINE);
 #endif
 #ifdef ACS_PLUS
-  acs_def("ACS_Plus_Symbol",&ACS_PLUS);
+  acs_def("ACS_Plus_Symbol", &ACS_PLUS);
 #endif
 #ifdef ACS_S1
-  acs_def("ACS_Scan_Line_1",&ACS_S1);
+  acs_def("ACS_Scan_Line_1", &ACS_S1);
 #endif
 #ifdef ACS_S9
-  acs_def("ACS_Scan_Line_9",&ACS_S9);
+  acs_def("ACS_Scan_Line_9", &ACS_S9);
 #endif
 #ifdef ACS_DIAMOND
-  acs_def("ACS_Diamond",&ACS_DIAMOND);
+  acs_def("ACS_Diamond", &ACS_DIAMOND);
 #endif
 #ifdef ACS_CKBOARD
-  acs_def("ACS_Checker_Board",&ACS_CKBOARD);
+  acs_def("ACS_Checker_Board", &ACS_CKBOARD);
 #endif
 #ifdef ACS_DEGREE
-  acs_def("ACS_Degree",&ACS_DEGREE);
+  acs_def("ACS_Degree", &ACS_DEGREE);
 #endif
 #ifdef ACS_PLMINUS
-  acs_def("ACS_Plus_Minus",&ACS_PLMINUS);
+  acs_def("ACS_Plus_Minus", &ACS_PLMINUS);
 #endif
 #ifdef ACS_BULLET
-  acs_def("ACS_Bullet",&ACS_BULLET);
+  acs_def("ACS_Bullet", &ACS_BULLET);
 #endif
 #ifdef ACS_LARROW
-  acs_def("ACS_Left_Arrow",&ACS_LARROW);
+  acs_def("ACS_Left_Arrow", &ACS_LARROW);
 #endif
 #ifdef ACS_RARROW
-  acs_def("ACS_Right_Arrow",&ACS_RARROW);
+  acs_def("ACS_Right_Arrow", &ACS_RARROW);
 #endif
 #ifdef ACS_DARROW
-  acs_def("ACS_Down_Arrow",&ACS_DARROW);
+  acs_def("ACS_Down_Arrow", &ACS_DARROW);
 #endif
 #ifdef ACS_UARROW
-  acs_def("ACS_Up_Arrow",&ACS_UARROW);
+  acs_def("ACS_Up_Arrow", &ACS_UARROW);
 #endif
 #ifdef ACS_BOARD
-  acs_def("ACS_Board_Of_Squares",&ACS_BOARD);
+  acs_def("ACS_Board_Of_Squares", &ACS_BOARD);
 #endif
 #ifdef ACS_LANTERN
-  acs_def("ACS_Lantern",&ACS_LANTERN);
+  acs_def("ACS_Lantern", &ACS_LANTERN);
 #endif
 #ifdef ACS_BLOCK
-  acs_def("ACS_Solid_Block",&ACS_BLOCK);
+  acs_def("ACS_Solid_Block", &ACS_BLOCK);
 #endif
 #ifdef ACS_S3
-  acs_def("ACS_Scan_Line_3",&ACS_S3);
+  acs_def("ACS_Scan_Line_3", &ACS_S3);
 #endif
 #ifdef ACS_S7
-  acs_def("ACS_Scan_Line_7",&ACS_S7);
+  acs_def("ACS_Scan_Line_7", &ACS_S7);
 #endif
 #ifdef ACS_LEQUAL
-  acs_def("ACS_Less_Or_Equal",&ACS_LEQUAL);
+  acs_def("ACS_Less_Or_Equal", &ACS_LEQUAL);
 #endif
 #ifdef ACS_GEQUAL
-  acs_def("ACS_Greater_Or_Equal",&ACS_GEQUAL);
+  acs_def("ACS_Greater_Or_Equal", &ACS_GEQUAL);
 #endif
 #ifdef ACS_PI
-  acs_def("ACS_PI",&ACS_PI);
+  acs_def("ACS_PI", &ACS_PI);
 #endif
 #ifdef ACS_NEQUAL
-  acs_def("ACS_Not_Equal",&ACS_NEQUAL);
+  acs_def("ACS_Not_Equal", &ACS_NEQUAL);
 #endif
 #ifdef ACS_STERLING
-  acs_def("ACS_Sterling",&ACS_STERLING);
+  acs_def("ACS_Sterling", &ACS_STERLING);
 #endif
 }
 
-
 #define GEN_EVENT(name,value) \
    printf("   %-25s : constant Event_Mask := 8#%011lo#;\n", \
           #name, value)
@@ -845,7 +878,8 @@
           #name, name)
 
 static
-void gen_mouse_events(void)
+void
+gen_mouse_events(void)
 {
   mmask_t all1 = 0;
   mmask_t all2 = 0;
@@ -959,15 +993,15 @@
 #endif
 #ifdef REPORT_MOUSE_POSITION
   GEN_MEVENT(REPORT_MOUSE_POSITION);
-#endif   
+#endif
 #ifdef ALL_MOUSE_EVENTS
   GEN_MEVENT(ALL_MOUSE_EVENTS);
 #endif
 
-GEN_EVENT(BUTTON1_EVENTS,all1);
-GEN_EVENT(BUTTON2_EVENTS,all2);
-GEN_EVENT(BUTTON3_EVENTS,all3);
-GEN_EVENT(BUTTON4_EVENTS,all4);
+  GEN_EVENT(BUTTON1_EVENTS, all1);
+  GEN_EVENT(BUTTON2_EVENTS, all2);
+  GEN_EVENT(BUTTON3_EVENTS, all3);
+  GEN_EVENT(BUTTON4_EVENTS, all4);
 }
 
 /*
@@ -975,41 +1009,45 @@
  * The name parameter is the name of the facility to be used in
  * the comment.
  */
-static void prologue(const char *name)
+static void
+prologue(const char *name)
 {
-  printf("--  %s binding.\n",name);
+  printf("--  %s binding.\n", name);
   printf("--  This module is generated. Please don't change it manually!\n");
   printf("--  Run the generator instead.\n--  |");
 
   printf("define(`M4_BIT_ORDER',`%s_Order_First')",
-	 little_endian ? "Low":"High");
+	 little_endian ? "Low" : "High");
 }
 
 /*
  * Write the prologue for the curses facility and make sure that
  * KEY_MIN and KEY_MAX are defined for the rest of this source.
  */
-static void basedefs (void)
+static void
+basedefs(void)
 {
   prologue("curses");
 #ifndef KEY_MAX
 #  define KEY_MAX 0777
 #endif
-  printf("define(`M4_KEY_MAX',`8#%o#')",KEY_MAX);
+  printf("define(`M4_KEY_MAX',`8#%o#')", KEY_MAX);
 #ifndef KEY_MIN
 #  define KEY_MIN 0401
 #endif
-  if (KEY_MIN == 256) {
-    fprintf(stderr,"Unexpected value for KEY_MIN: %d\n",KEY_MIN);
-    exit(1);
-  }
-  printf("define(`M4_SPECIAL_FIRST',`8#%o#')",KEY_MIN - 1);
+  if (KEY_MIN == 256)
+    {
+      fprintf(stderr, "Unexpected value for KEY_MIN: %d\n", KEY_MIN);
+      exit(1);
+    }
+  printf("define(`M4_SPECIAL_FIRST',`8#%o#')", KEY_MIN - 1);
 }
 
 /*
  * Write out the comment lines for the menu facility
  */
-static void menu_basedefs (void)
+static void
+menu_basedefs(void)
 {
   prologue("menu");
 }
@@ -1017,7 +1055,8 @@
 /*
  * Write out the comment lines for the form facility
  */
-static void form_basedefs (void)
+static void
+form_basedefs(void)
 {
   prologue("form");
 }
@@ -1025,7 +1064,8 @@
 /*
  * Write out the comment lines for the mouse facility
  */
-static void mouse_basedefs(void)
+static void
+mouse_basedefs(void)
 {
   prologue("mouse");
 }
@@ -1033,9 +1073,10 @@
 /*
  * Write the definition of a single color
  */
-static void color_def (const char *name, int value)
+static void
+color_def(const char *name, int value)
 {
-  printf("   %-16s : constant Color_Number := %d;\n",name,value);
+  printf("   %-16s : constant Color_Number := %d;\n", name, value);
 }
 
 #define HAVE_USE_DEFAULT_COLORS 1
@@ -1043,87 +1084,93 @@
 /*
  * Generate all color definitions
  */
-static void gen_color (void)
+static void
+gen_color(void)
 {
 #ifdef HAVE_USE_DEFAULT_COLORS
-  color_def ("Default_Color",-1);
+  color_def("Default_Color", -1);
 #endif
 #ifdef COLOR_BLACK
-  color_def ("Black",COLOR_BLACK);
+  color_def("Black", COLOR_BLACK);
 #endif
 #ifdef COLOR_RED
-  color_def ("Red",COLOR_RED);
+  color_def("Red", COLOR_RED);
 #endif
 #ifdef COLOR_GREEN
-  color_def ("Green",COLOR_GREEN);
+  color_def("Green", COLOR_GREEN);
 #endif
 #ifdef COLOR_YELLOW
-  color_def ("Yellow",COLOR_YELLOW);
+  color_def("Yellow", COLOR_YELLOW);
 #endif
 #ifdef COLOR_BLUE
-  color_def ("Blue",COLOR_BLUE);
+  color_def("Blue", COLOR_BLUE);
 #endif
 #ifdef COLOR_MAGENTA
-  color_def ("Magenta",COLOR_MAGENTA);
+  color_def("Magenta", COLOR_MAGENTA);
 #endif
 #ifdef COLOR_CYAN
-  color_def ("Cyan",COLOR_CYAN);
+  color_def("Cyan", COLOR_CYAN);
 #endif
 #ifdef COLOR_WHITE
-  color_def ("White",COLOR_WHITE);
+  color_def("White", COLOR_WHITE);
 #endif
 }
 
 /*
  * Generate the linker options for the base facility
  */
-static void gen_linkopts (void)
+static void
+gen_linkopts(void)
 {
-   printf("   pragma Linker_Options (\"-lncurses%s\");\n", model);
+  printf("   pragma Linker_Options (\"-lncurses%s\");\n", model);
 }
 
 /*
  * Generate the linker options for the menu facility
  */
-static void gen_menu_linkopts (void)
+static void
+gen_menu_linkopts(void)
 {
-   printf("   pragma Linker_Options (\"-lmenu%s\");\n", model);
+  printf("   pragma Linker_Options (\"-lmenu%s\");\n", model);
 }
 
 /*
  * Generate the linker options for the form facility
  */
-static void gen_form_linkopts (void)
+static void
+gen_form_linkopts(void)
 {
-   printf("   pragma Linker_Options (\"-lform%s\");\n", model);
+  printf("   pragma Linker_Options (\"-lform%s\");\n", model);
 }
 
 /*
  * Generate the linker options for the panel facility
  */
-static void gen_panel_linkopts (void)
+static void
+gen_panel_linkopts(void)
 {
-   printf("   pragma Linker_Options (\"-lpanel%s\");\n", model);
+  printf("   pragma Linker_Options (\"-lpanel%s\");\n", model);
 }
 
-static void gen_version_info (void)
+static void
+gen_version_info(void)
 {
-  static const char* v1 =
-    "   NC_Major_Version : constant := %d; --  Major version of the library\n";
-  static const char* v2 =
-    "   NC_Minor_Version : constant := %d; --  Minor version of the library\n";
-  static const char* v3 =
-    "   NC_Version : constant String := %c%d.%d%c;  --  Version of library\n";
+  static const char *v1 =
+  "   NC_Major_Version : constant := %d; --  Major version of the library\n";
+  static const char *v2 =
+  "   NC_Minor_Version : constant := %d; --  Minor version of the library\n";
+  static const char *v3 =
+  "   NC_Version : constant String := %c%d.%d%c;  --  Version of library\n";
 
   printf(v1, NCURSES_VERSION_MAJOR);
   printf(v2, NCURSES_VERSION_MINOR);
-  printf(v3, '"',NCURSES_VERSION_MAJOR,NCURSES_VERSION_MINOR,'"');
+  printf(v3, '"', NCURSES_VERSION_MAJOR, NCURSES_VERSION_MINOR, '"');
 }
 
 static int
-eti_gen(char*buf, int code, const char* name, int* etimin, int* etimax)
+eti_gen(char *buf, int code, const char *name, int *etimin, int *etimax)
 {
-  sprintf(buf,"   E_%-16s : constant Eti_Error := %d;\n",name,code);
+  sprintf(buf, "   E_%-16s : constant Eti_Error := %d;\n", name, code);
   if (code < *etimin)
     *etimin = code;
   if (code > *etimax)
@@ -1136,68 +1183,77 @@
     o = offsetof(WINDOW, member);                                   \
     if ((o%sizeof(itype) == 0)) {                                   \
        printf("   Offset%-*s : constant Natural := %2ld; --  %s\n", \
-              12, #member, o/sizeof(itype),#itype);                 \
+              12, #member, (long)(o/sizeof(itype)),#itype);         \
     }                                                               \
   }
-  
+
 static void
 gen_offsets(void)
 {
   long o;
-  const char* s_bool = "";
+  const char *s_bool = "";
 
-  GEN_OFFSET(_maxy,short);
-  GEN_OFFSET(_maxx,short);
-  GEN_OFFSET(_begy,short);
-  GEN_OFFSET(_begx,short);
-  GEN_OFFSET(_cury,short);
-  GEN_OFFSET(_curx,short);
-  GEN_OFFSET(_yoffset,short);
-  GEN_OFFSET(_pary,int);
-  GEN_OFFSET(_parx,int);
-  if (sizeof(bool) == sizeof(char)) {
-    GEN_OFFSET(_notimeout,char);
-    GEN_OFFSET(_clear,char);
-    GEN_OFFSET(_leaveok,char);
-    GEN_OFFSET(_scroll,char);
-    GEN_OFFSET(_idlok,char);
-    GEN_OFFSET(_idcok,char);
-    GEN_OFFSET(_immed,char);
-    GEN_OFFSET(_sync,char);
-    GEN_OFFSET(_use_keypad,char);
-    s_bool = "char";
-  } else if (sizeof(bool) == sizeof(short)) {
-    GEN_OFFSET(_notimeout,short);
-    GEN_OFFSET(_clear,short);
-    GEN_OFFSET(_leaveok,short);
-    GEN_OFFSET(_scroll,short);
-    GEN_OFFSET(_idlok,short);
-    GEN_OFFSET(_idcok,short);
-    GEN_OFFSET(_immed,short);
-    GEN_OFFSET(_sync,short);
-    GEN_OFFSET(_use_keypad,short);
-    s_bool = "short";
-  } else if (sizeof(bool) == sizeof(int)) {
-    GEN_OFFSET(_notimeout,int);
-    GEN_OFFSET(_clear,int);
-    GEN_OFFSET(_leaveok,int);
-    GEN_OFFSET(_scroll,int);
-    GEN_OFFSET(_idlok,int);
-    GEN_OFFSET(_idcok,int);
-    GEN_OFFSET(_immed,int);
-    GEN_OFFSET(_sync,int);
-    GEN_OFFSET(_use_keypad,int);
-    s_bool = "int";
-  }
+  GEN_OFFSET(_maxy, short);
+  GEN_OFFSET(_maxx, short);
+  GEN_OFFSET(_begy, short);
+  GEN_OFFSET(_begx, short);
+  GEN_OFFSET(_cury, short);
+  GEN_OFFSET(_curx, short);
+  GEN_OFFSET(_yoffset, short);
+  GEN_OFFSET(_pary, int);
+  GEN_OFFSET(_parx, int);
+  if (sizeof(bool) == sizeof(char))
+    {
+      GEN_OFFSET(_notimeout, char);
+      GEN_OFFSET(_clear, char);
+      GEN_OFFSET(_leaveok, char);
+      GEN_OFFSET(_scroll, char);
+      GEN_OFFSET(_idlok, char);
+      GEN_OFFSET(_idcok, char);
+      GEN_OFFSET(_immed, char);
+      GEN_OFFSET(_sync, char);
+      GEN_OFFSET(_use_keypad, char);
+
+      s_bool = "char";
+    }
+  else if (sizeof(bool) == sizeof(short))
+    {
+      GEN_OFFSET(_notimeout, short);
+      GEN_OFFSET(_clear, short);
+      GEN_OFFSET(_leaveok, short);
+      GEN_OFFSET(_scroll, short);
+      GEN_OFFSET(_idlok, short);
+      GEN_OFFSET(_idcok, short);
+      GEN_OFFSET(_immed, short);
+      GEN_OFFSET(_sync, short);
+      GEN_OFFSET(_use_keypad, short);
+
+      s_bool = "short";
+    }
+  else if (sizeof(bool) == sizeof(int))
+    {
+      GEN_OFFSET(_notimeout, int);
+      GEN_OFFSET(_clear, int);
+      GEN_OFFSET(_leaveok, int);
+      GEN_OFFSET(_scroll, int);
+      GEN_OFFSET(_idlok, int);
+      GEN_OFFSET(_idcok, int);
+      GEN_OFFSET(_immed, int);
+      GEN_OFFSET(_sync, int);
+      GEN_OFFSET(_use_keypad, int);
+
+      s_bool = "int";
+    }
   printf("   Sizeof%-*s : constant Natural := %2ld; --  %s\n",
-	 12, "_bool", (long) sizeof(bool),"bool");
+	 12, "_bool", (long)sizeof(bool), "bool");
+
   /* In ncurses _maxy and _maxx needs an offset for the "public"
    * value
    */
   printf("   Offset%-*s : constant Natural := %2d; --  %s\n",
-	 12, "_XY",1,"int");
+	 12, "_XY", 1, "int");
   printf("\n");
-  printf("   type Curses_Bool is mod 2 ** Interfaces.C.%s'Size;\n",s_bool);
+  printf("   type Curses_Bool is mod 2 ** Interfaces.C.%s'Size;\n", s_bool);
 }
 
 /*
@@ -1213,7 +1269,8 @@
  * The second character then denotes the specific output that should be
  * generated for the selected facility.
  */
-int main(int argc, char *argv[])
+int
+main(int argc, char *argv[])
 {
   int x = 0x12345678;
   char *s = (char *)&x;
@@ -1221,216 +1278,226 @@
   if (*s == 0x78)
     little_endian = 1;
 
-  if (argc!=4)
+  if (argc != 4)
     exit(1);
   model = *++argv;
 
-  switch(argv[1][0])
+  switch (argv[1][0])
     {
-      /* ---------------------------------------------------------------*/   
-    case 'B': /* The Base facility */
-      switch(argv[2][0])
+      /* --------------------------------------------------------------- */
+    case 'B':			/* The Base facility */
+      switch (argv[2][0])
 	{
-	case 'A': /* chtype translation into Ada95 record type */
+	case 'A':		/* chtype translation into Ada95 record type */
 	  gen_attr_set("Character_Attribute_Set");
 	  break;
-	case 'K': /* translation of keycodes */
+	case 'K':		/* translation of keycodes */
 	  gen_keydefs(0);
 	  break;
-	case 'B': /* write some initial comment lines */
+	case 'B':		/* write some initial comment lines */
 	  basedefs();
 	  break;
-	case 'C': /* generate color constants */
+	case 'C':		/* generate color constants */
 	  gen_color();
 	  break;
-	case 'D': /* generate displacements of fields in WINDOW struct. */
+	case 'D':		/* generate displacements of fields in WINDOW struct. */
 	  gen_offsets();
 	  break;
-	case 'E': /* generate Mouse Event codes */
+	case 'E':		/* generate Mouse Event codes */
 	  gen_mouse_events();
 	  break;
-	case 'M': /* generate constants for the ACS characters */
+	case 'M':		/* generate constants for the ACS characters */
 	  gen_acs();
 	  break;
-	case 'L': /* generate the Linker_Options pragma */
+	case 'L':		/* generate the Linker_Options pragma */
 	  gen_linkopts();
 	  break;
-	case 'O': /* generate definitions of the old key code names */
+	case 'O':		/* generate definitions of the old key code names */
 	  gen_keydefs(1);
 	  break;
-	case 'R': /* generate representation clause for Attributed character */
+	case 'R':		/* generate representation clause for Attributed character */
 	  gen_chtype_rep("Attributed_Character");
 	  break;
-	case 'V': /* generate version info */
+	case 'V':		/* generate version info */
 	  gen_version_info();
 	  break;
-	case 'T': /* generate the Trace info */
+	case 'T':		/* generate the Trace info */
 	  gen_trace("Trace_Attribute_Set");
 	  break;
 	default:
 	  break;
 	}
       break;
-      /* ---------------------------------------------------------------*/   
-    case 'M': /* The Menu facility */
-      switch(argv[2][0])
+      /* --------------------------------------------------------------- */
+    case 'M':			/* The Menu facility */
+      switch (argv[2][0])
 	{
-	case 'R': /* generate representation clause for Menu_Option_Set */
+	case 'R':		/* generate representation clause for Menu_Option_Set */
 	  gen_menu_opt_rep("Menu_Option_Set");
 	  break;
-	case 'B': /* write some initial comment lines */
+	case 'B':		/* write some initial comment lines */
 	  menu_basedefs();
 	  break;
-	case 'L': /* generate the Linker_Options pragma */
+	case 'L':		/* generate the Linker_Options pragma */
 	  gen_menu_linkopts();
 	  break;
-	case 'I': /* generate representation clause for Item_Option_Set */
+	case 'I':		/* generate representation clause for Item_Option_Set */
 	  gen_item_opt_rep("Item_Option_Set");
 	  break;
 	default:
 	  break;
 	}
       break;
-      /* ---------------------------------------------------------------*/   
-    case 'F': /* The Form facility */
-      switch(argv[2][0])
+      /* --------------------------------------------------------------- */
+    case 'F':			/* The Form facility */
+      switch (argv[2][0])
 	{
-	case 'R': /* generate representation clause for Form_Option_Set */
+	case 'R':		/* generate representation clause for Form_Option_Set */
 	  gen_form_opt_rep("Form_Option_Set");
 	  break;
-	case 'B': /* write some initial comment lines */
+	case 'B':		/* write some initial comment lines */
 	  form_basedefs();
 	  break;
-	case 'L': /* generate the Linker_Options pragma */
+	case 'L':		/* generate the Linker_Options pragma */
 	  gen_form_linkopts();
 	  break;
-	case 'I': /* generate representation clause for Field_Option_Set */
+	case 'I':		/* generate representation clause for Field_Option_Set */
 	  gen_field_opt_rep("Field_Option_Set");
 	  break;
 	default:
 	  break;
 	}
       break;
-      /* ---------------------------------------------------------------*/   
-    case 'P': /* The Pointer(=Mouse) facility */
-      switch(argv[2][0]) {
-	case 'B': /* write some initial comment lines */
+      /* --------------------------------------------------------------- */
+    case 'P':			/* The Pointer(=Mouse) facility */
+      switch (argv[2][0])
+	{
+	case 'B':		/* write some initial comment lines */
 	  mouse_basedefs();
 	  break;
-	case 'M': /* generate representation clause for Mouse_Event */
+	case 'M':		/* generate representation clause for Mouse_Event */
 	  gen_mrep_rep("Mouse_Event");
 	  break;
-	case 'L': /* generate the Linker_Options pragma */
+	case 'L':		/* generate the Linker_Options pragma */
 	  gen_panel_linkopts();
 	  break;
 	default:
 	  break;
 	}
-	break;
-      /* ---------------------------------------------------------------*/   
-    case 'E' : /* chtype size detection */
-      switch(argv[2][0]) {
-      case 'C':
+      break;
+      /* --------------------------------------------------------------- */
+    case 'E':			/* chtype size detection */
+      switch (argv[2][0])
 	{
-	  const char* fmt  = "   type    C_Chtype   is new %s;\n";
-	  const char* afmt = "   type    C_AttrType is new %s;\n";
-
-	  if (sizeof(chtype)==sizeof(int)) {
-	    if (sizeof(int)==sizeof(long))
-	      printf(fmt,"C_ULong");
+	case 'C':
+	  {
+	    const char *fmt = "   type    C_Chtype   is new %s;\n";
+	    const char *afmt = "   type    C_AttrType is new %s;\n";
+
+	    if (sizeof(chtype) == sizeof(int))
+	      {
+		if (sizeof(int) == sizeof(long))
+		    printf(fmt, "C_ULong");
+
+		else
+		  printf(fmt, "C_UInt");
+	      }
+	    else if (sizeof(chtype) == sizeof(long))
+	      {
+		printf(fmt, "C_ULong");
+	      }
 	    else
-	      printf(fmt,"C_UInt");
-	  }
-	  else if (sizeof(chtype)==sizeof(long)) {
-	    printf(fmt,"C_ULong");
-	  }
-	  else
-	    printf("Error\n");
+	      printf("Error\n");
 
-	  if (sizeof(attr_t)==sizeof(int)) {
-	    if (sizeof(int)==sizeof(long))
-	      printf(afmt,"C_ULong");
+	    if (sizeof(attr_t) == sizeof(int))
+	      {
+		if (sizeof(int) == sizeof(long))
+		    printf(afmt, "C_ULong");
+
+		else
+		  printf(afmt, "C_UInt");
+	      }
+	    else if (sizeof(attr_t) == sizeof(long))
+	      {
+		printf(afmt, "C_ULong");
+	      }
 	    else
-	      printf(afmt,"C_UInt");
-	  }
-	  else if (sizeof(attr_t)==sizeof(long)) {
-	    printf(afmt,"C_ULong");
-	  }
-	  else
-	    printf("Error\n");
+	      printf("Error\n");
 
-	  printf("define(`CF_CURSES_OK',`%d')",OK);
-	  printf("define(`CF_CURSES_ERR',`%d')",ERR);
-	  printf("define(`CF_CURSES_TRUE',`%d')",TRUE);
-	  printf("define(`CF_CURSES_FALSE',`%d')",FALSE);
-	}
-	break;
-      case 'E':
-	{
-	  char* buf  = (char*)malloc(2048);
-	  char* p    = buf;
-	  int etimin = E_OK;
-	  int etimax = E_OK;
-	  if (p) {
-	    p += eti_gen(p, E_OK, "Ok", &etimin, &etimax);
-	    p += eti_gen(p, E_SYSTEM_ERROR,"System_Error", &etimin, &etimax);
-	    p += eti_gen(p, E_BAD_ARGUMENT, "Bad_Argument", &etimin, &etimax);
-	    p += eti_gen(p, E_POSTED, "Posted", &etimin, &etimax);
-	    p += eti_gen(p, E_CONNECTED, "Connected", &etimin, &etimax);
-	    p += eti_gen(p, E_BAD_STATE, "Bad_State", &etimin, &etimax);
-	    p += eti_gen(p, E_NO_ROOM, "No_Room", &etimin, &etimax);
-	    p += eti_gen(p, E_NOT_POSTED, "Not_Posted", &etimin, &etimax);
-	    p += eti_gen(p, E_UNKNOWN_COMMAND,
-			 "Unknown_Command", &etimin, &etimax);
-	    p += eti_gen(p, E_NO_MATCH, "No_Match", &etimin, &etimax);
-	    p += eti_gen(p, E_NOT_SELECTABLE,
-			 "Not_Selectable", &etimin, &etimax);
-	    p += eti_gen(p, E_NOT_CONNECTED,
-			 "Not_Connected", &etimin, &etimax);
-	    p += eti_gen(p, E_REQUEST_DENIED,
-			 "Request_Denied", &etimin, &etimax);
-	    p += eti_gen(p, E_INVALID_FIELD,
-			 "Invalid_Field", &etimin, &etimax);
-	    p += eti_gen(p, E_CURRENT,
-			 "Current", &etimin, &etimax);
+	    printf("define(`CF_CURSES_OK',`%d')", OK);
+	    printf("define(`CF_CURSES_ERR',`%d')", ERR);
+	    printf("define(`CF_CURSES_TRUE',`%d')", TRUE);
+	    printf("define(`CF_CURSES_FALSE',`%d')", FALSE);
+	  }
+	  break;
+	case 'E':
+	  {
+	    char *buf = (char *)malloc(2048);
+	    char *p = buf;
+	    int etimin = E_OK;
+	    int etimax = E_OK;
+
+	    if (p)
+	      {
+		p += eti_gen(p, E_OK, "Ok", &etimin, &etimax);
+		p += eti_gen(p, E_SYSTEM_ERROR, "System_Error", &etimin, &etimax);
+		p += eti_gen(p, E_BAD_ARGUMENT, "Bad_Argument", &etimin, &etimax);
+		p += eti_gen(p, E_POSTED, "Posted", &etimin, &etimax);
+		p += eti_gen(p, E_CONNECTED, "Connected", &etimin, &etimax);
+		p += eti_gen(p, E_BAD_STATE, "Bad_State", &etimin, &etimax);
+		p += eti_gen(p, E_NO_ROOM, "No_Room", &etimin, &etimax);
+		p += eti_gen(p, E_NOT_POSTED, "Not_Posted", &etimin, &etimax);
+		p += eti_gen(p, E_UNKNOWN_COMMAND,
+			     "Unknown_Command", &etimin, &etimax);
+		p += eti_gen(p, E_NO_MATCH, "No_Match", &etimin, &etimax);
+		p += eti_gen(p, E_NOT_SELECTABLE,
+			     "Not_Selectable", &etimin, &etimax);
+		p += eti_gen(p, E_NOT_CONNECTED,
+			     "Not_Connected", &etimin, &etimax);
+		p += eti_gen(p, E_REQUEST_DENIED,
+			     "Request_Denied", &etimin, &etimax);
+		p += eti_gen(p, E_INVALID_FIELD,
+			     "Invalid_Field", &etimin, &etimax);
+		p += eti_gen(p, E_CURRENT,
+			     "Current", &etimin, &etimax);
+	      }
+	    printf("   subtype Eti_Error is C_Int range %d .. %d;\n\n",
+		   etimin, etimax);
+	    printf(buf);
 	  }
-	  printf("   subtype Eti_Error is C_Int range %d .. %d;\n\n",
-		 etimin,etimax);
-	  printf(buf);
+	  break;
+	default:
+	  break;
 	}
-	break;
-      default:
-	break;
-      }
       break;
-      /* ---------------------------------------------------------------*/   
-    case 'V' : /* plain version dump */
+      /* --------------------------------------------------------------- */
+    case 'V':			/* plain version dump */
       {
-	switch(argv[2][0]) {
-	case '1': /* major version */
+	switch (argv[2][0])
+	  {
+	  case '1':		/* major version */
 #ifdef NCURSES_VERSION_MAJOR
-	  printf("%d",NCURSES_VERSION_MAJOR);
+	    printf("%d", NCURSES_VERSION_MAJOR);
 #endif
-	  break;
-	case '2': /* minor version */
+	    break;
+	  case '2':		/* minor version */
 #ifdef NCURSES_VERSION_MINOR
-	  printf("%d",NCURSES_VERSION_MINOR);
+	    printf("%d", NCURSES_VERSION_MINOR);
 #endif
-	  break;
-	case '3': /* patch level */
+	    break;
+	  case '3':		/* patch level */
 #ifdef NCURSES_VERSION_PATCH
-	  printf("%d",NCURSES_VERSION_PATCH);
+	    printf("%d", NCURSES_VERSION_PATCH);
 #endif
-	  break;
-	default:
-	  break;
-	}
+	    break;
+	  default:
+	    break;
+	  }
       }
       break;
-      /* ---------------------------------------------------------------*/	
+      /* --------------------------------------------------------------- */
     default:
       break;
     }
   return 0;
 }
-  
diff -Naur ncurses-5.4.orig/Ada95/gen/terminal_interface-curses-mouse.ads.m4 ncurses-5.4/Ada95/gen/terminal_interface-curses-mouse.ads.m4
--- ncurses-5.4.orig/Ada95/gen/terminal_interface-curses-mouse.ads.m4	2003-10-25 15:39:18.000000000 +0000
+++ ncurses-5.4/Ada95/gen/terminal_interface-curses-mouse.ads.m4	2005-05-13 04:09:49.000000000 +0000
@@ -10,7 +10,7 @@
 --                                 S P E C                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+-- Copyright (c) 1998,2004 Free Software Foundation, Inc.                   --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -38,7 +38,8 @@
 ------------------------------------------------------------------------------
 --  Author:  Juergen Pfeifer, 1996
 --  Version Control:
---  $Revision: 1.22 $
+--  $Revision: 1.25 $
+--  $Date: 2004/08/21 21:37:00 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 include(`Mouse_Base_Defs')
@@ -169,7 +170,6 @@
          Bstate  : Event_Mask;
       end record;
    pragma Convention (C, Mouse_Event);
-   pragma Pack (Mouse_Event);
 
 include(`Mouse_Event_Rep')
    Generation_Bit_Order : constant System.Bit_Order := System.M4_BIT_ORDER;
diff -Naur ncurses-5.4.orig/Ada95/gen/terminal_interface-curses.ads.m4 ncurses-5.4/Ada95/gen/terminal_interface-curses.ads.m4
--- ncurses-5.4.orig/Ada95/gen/terminal_interface-curses.ads.m4	2003-10-25 15:39:18.000000000 +0000
+++ ncurses-5.4/Ada95/gen/terminal_interface-curses.ads.m4	2005-05-13 04:09:49.000000000 +0000
@@ -9,7 +9,7 @@
 --                                 S P E C                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+-- Copyright (c) 1998,2004 Free Software Foundation, Inc.                   --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -37,7 +37,8 @@
 ------------------------------------------------------------------------------
 --  Author:  Juergen Pfeifer, 1996
 --  Version Control:
---  $Revision: 1.31 $
+--  $Revision: 1.35 $
+--  $Date: 2004/08/21 21:37:00 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 include(`Base_Defs')
@@ -59,11 +60,12 @@
    subtype Column_Count is Column_Position range 1 .. Column_Position'Last;
    --  Type to count columns. We do not allow null windows, so must be positive
 
-   type Key_Code is new Natural;
+   type Key_Code is new Integer;
    --  That is anything including real characters, special keys and logical
    --  request codes.
 
-   subtype Real_Key_Code is Key_Code range 0 .. M4_KEY_MAX;
+   --  FIXME: The "-1" should be Curses_Err
+   subtype Real_Key_Code is Key_Code range -1 .. M4_KEY_MAX;
    --  This are the codes that potentially represent a real keystroke.
    --  Not all codes may be possible on a specific terminal. To check the
    --  availability of a special key, the Has_Key function is provided.
diff -Naur ncurses-5.4.orig/Ada95/samples/Makefile.in ncurses-5.4/Ada95/samples/Makefile.in
--- ncurses-5.4.orig/Ada95/samples/Makefile.in	2003-10-25 15:39:18.000000000 +0000
+++ ncurses-5.4/Ada95/samples/Makefile.in	2005-05-13 04:09:49.000000000 +0000
@@ -1,5 +1,5 @@
 ##############################################################################
-# Copyright (c) 1998 Free Software Foundation, Inc.                          #
+# Copyright (c) 1998-2004,2005 Free Software Foundation, Inc.                #
 #                                                                            #
 # Permission is hereby granted, free of charge, to any person obtaining a    #
 # copy of this software and associated documentation files (the "Software"), #
@@ -28,8 +28,7 @@
 #
 #  Author:  Juergen Pfeifer, 1996
 #
-#  Version Control
-#  $Revision: 1.30 $
+#  $Id: Makefile.in,v 1.32 2005/01/22 20:11:48 tom Exp $
 #
 .SUFFIXES:
 
@@ -84,7 +83,7 @@
 ABASE        = $(ALIB)-curses
 
 CARGS        =-cargs $(ADAFLAGS)
-LARGS        =-largs -L../../lib @TEST_ARGS@ $(LD_FLAGS) -lAdaCurses @EXTRA_LIBS@
+LARGS        =-largs -L../../lib @TEST_ARGS@ $(LD_FLAGS) -lAdaCurses
  
 PROGS        = tour rain ncurses 
 
@@ -111,19 +110,19 @@
 
 
 all ::  tour$x rain$x ncurses$x
-	@
+	@echo made $@
 
 sources :
-	@
+	@echo made $@
 
 libs \
 install \
 install.libs ::
-	@
+	@echo made $@
 
 uninstall \
 uninstall.libs ::
-	@
+	@echo made $@
 
 ncurses$x :
 	$(ADAMAKE) $(ADAMAKEFLAGS) ncurses $(CARGS) $(LARGS)
@@ -138,7 +137,7 @@
 	$(ADAMAKE) $(ADAMAKEFLAGS) rain $(CARGS) $(LARGS)
 
 mostlyclean:
-	@
+	@echo made $@
 
 clean :: mostlyclean
 	rm -f *.o *.ali b_t*.* *.s $(PROGS) a.out core b_*_test.c *.xr[bs] \
@@ -148,6 +147,4 @@
 	rm -f Makefile
 
 realclean :: distclean
-	@
-
-
+	@echo made $@
diff -Naur ncurses-5.4.orig/Ada95/samples/ncurses2-acs_and_scroll.adb ncurses-5.4/Ada95/samples/ncurses2-acs_and_scroll.adb
--- ncurses-5.4.orig/Ada95/samples/ncurses2-acs_and_scroll.adb	2000-12-02 22:31:22.000000000 +0000
+++ ncurses-5.4/Ada95/samples/ncurses2-acs_and_scroll.adb	2005-05-13 04:09:49.000000000 +0000
@@ -7,7 +7,7 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 2000 Free Software Foundation, Inc.                        --
+-- Copyright (c) 2000,2004 Free Software Foundation, Inc.                   --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -35,7 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
 --  Version Control
---  $Revision: 1.1 $
+--  $Revision: 1.6 $
+--  $Date: 2004/08/21 21:37:00 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 --  Windows and scrolling tester.
@@ -224,8 +225,8 @@
          );
 
       buf : Bounded_String;
-      do_keypad : Boolean := HaveKeyPad (curpw);
-      do_scroll : Boolean := HaveScroll (curpw);
+      do_keypad : constant Boolean := HaveKeyPad (curpw);
+      do_scroll : constant Boolean := HaveScroll (curpw);
 
       pos : Natural;
 
@@ -331,8 +332,8 @@
       res : pair;
       i : Line_Position := 0;
       j : Column_Position := 0;
-      si : Line_Position := lri - uli + 1;
-      sj : Column_Position := lrj - ulj + 1;
+      si : constant Line_Position := lri - uli + 1;
+      sj : constant Column_Position := lrj - ulj + 1;
    begin
       res.y := uli;
       res.x := ulj;
@@ -714,7 +715,7 @@
 
    Allow_Scrolling (Mode => True);
 
-   End_Mouse;
+   End_Mouse (Mask2);
    Set_Raw_Mode (SwitchOn => True);
    Erase;
    End_Windows;
diff -Naur ncurses-5.4.orig/Ada95/samples/ncurses2-acs_display.adb ncurses-5.4/Ada95/samples/ncurses2-acs_display.adb
--- ncurses-5.4.orig/Ada95/samples/ncurses2-acs_display.adb	2000-12-02 22:31:23.000000000 +0000
+++ ncurses-5.4/Ada95/samples/ncurses2-acs_display.adb	2005-05-13 04:09:49.000000000 +0000
@@ -7,7 +7,7 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 2000 Free Software Foundation, Inc.                        --
+-- Copyright (c) 2000,2004 Free Software Foundation, Inc.                   --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -35,7 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
 --  Version Control
---  $Revision: 1.1 $
+--  $Revision: 1.4 $
+--  $Date: 2004/08/21 21:37:00 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 with ncurses2.util; use ncurses2.util;
@@ -57,8 +58,8 @@
 
 
    procedure show_upper_chars (first : Integer)  is
-      C1 : Boolean := (first = 128);
-      last : Integer := first + 31;
+      C1 : constant Boolean := (first = 128);
+      last : constant Integer := first + 31;
       package p is new ncurses2.genericPuts (200);
       use p;
       use p.BS;
@@ -91,9 +92,11 @@
 
       for code in first .. last loop
          declare
-            row : Line_Position := Line_Position (4 + ((code - first) mod 16));
-            col : Column_Position := Column_Position (((code - first) / 16) *
-                                                      Integer (Columns) / 2);
+            row : constant Line_Position
+                := Line_Position (4 + ((code - first) mod 16));
+            col : constant Column_Position
+                := Column_Position (((code - first) / 16) *
+                                    Integer (Columns) / 2);
             tmp3 : String (1 .. 3);
             tmpx : String (1 .. Integer (Columns / 4));
             reply : Key_Code;
@@ -129,8 +132,8 @@
                         code :  Attributed_Character)
                        return Integer is
       height : constant Integer := 16;
-      row : Line_Position := Line_Position (4 + (N mod height));
-      col : Column_Position := Column_Position ((N / height) *
+      row : constant Line_Position := Line_Position (4 + (N mod height));
+      col : constant Column_Position := Column_Position ((N / height) *
                                                 Integer (Columns) / 2);
       tmpx : String (1 .. Integer (Columns) / 3);
    begin
diff -Naur ncurses-5.4.orig/Ada95/samples/ncurses2-attr_test.adb ncurses-5.4/Ada95/samples/ncurses2-attr_test.adb
--- ncurses-5.4.orig/Ada95/samples/ncurses2-attr_test.adb	2001-07-21 21:34:37.000000000 +0000
+++ ncurses-5.4/Ada95/samples/ncurses2-attr_test.adb	2005-05-13 04:09:49.000000000 +0000
@@ -7,7 +7,7 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 2000 Free Software Foundation, Inc.                        --
+-- Copyright (c) 2000,2001,2004 Free Software Foundation, Inc.              --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -35,7 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
 --  Version Control
---  $Revision: 1.2 $
+--  $Revision: 1.5 $
+--  $Date: 2004/08/21 21:37:00 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 with ncurses2.util; use ncurses2.util;
@@ -222,7 +223,7 @@
             elsif ncv > 0 and has_A_COLOR (Get_Background) then
                declare
                   Color_Supported_Attributes :
-                    Character_Attribute_Set := make_record (ncv);
+                    constant Character_Attribute_Set := make_record (ncv);
                begin
                   if intersect (Color_Supported_Attributes, attr) then
                      Add (Str => " (NCV) ");
@@ -236,7 +237,7 @@
 
    procedure attr_getc (skip : out Integer; fg, bg : in out Color_Number;
                                             result : out Boolean) is
-      ch : Key_Code := Getchar;
+      ch : constant Key_Code := Getchar;
       nc : constant Color_Number := Color_Number (Number_Of_Colors);
       curscr : Window;
       pragma Import (C, curscr, "curscr");
@@ -293,7 +294,7 @@
          --  row := 2; -- weird, row is set to 0 without this.
          --  TODO delete the above line, it was a gdb quirk that confused me
          if Has_Colors then declare
-            pair : Color_Pair :=
+            pair : constant Color_Pair :=
               Color_Pair (fg * Color_Number (Number_Of_Colors) + bg);
          begin
             --  Go though each color pair. Assume that the number of
diff -Naur ncurses-5.4.orig/Ada95/samples/ncurses2-color_edit.adb ncurses-5.4/Ada95/samples/ncurses2-color_edit.adb
--- ncurses-5.4.orig/Ada95/samples/ncurses2-color_edit.adb	2000-12-02 22:31:24.000000000 +0000
+++ ncurses-5.4/Ada95/samples/ncurses2-color_edit.adb	2005-05-13 04:09:49.000000000 +0000
@@ -7,7 +7,7 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 2000 Free Software Foundation, Inc.                        --
+-- Copyright (c) 2000,2004 Free Software Foundation, Inc.                   --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -35,7 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
 --  Version Control
---  $Revision: 1.1 $
+--  $Revision: 1.4 $
+--  $Date: 2004/08/21 21:37:00 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 with ncurses2.util; use ncurses2.util;
@@ -101,7 +102,6 @@
    current : Color_Number := 0;
    field : RGB_Enum := Redx;
    this_c : Key_Code := 0;
-   last_c : Key_Code;
 begin
    Refresh;
 
@@ -185,7 +185,6 @@
 
       Move_Cursor (Line => 2 + Line_Position (current), Column => 0);
 
-      last_c := this_c;
       this_c := Getchar;
       if Is_Digit (this_c) then
          value := 0;
diff -Naur ncurses-5.4.orig/Ada95/samples/ncurses2-demo_forms.adb ncurses-5.4/Ada95/samples/ncurses2-demo_forms.adb
--- ncurses-5.4.orig/Ada95/samples/ncurses2-demo_forms.adb	2000-12-02 22:31:25.000000000 +0000
+++ ncurses-5.4/Ada95/samples/ncurses2-demo_forms.adb	2005-05-13 04:09:49.000000000 +0000
@@ -7,7 +7,7 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 2000 Free Software Foundation, Inc.                        --
+-- Copyright (c) 2000,2004 Free Software Foundation, Inc.                   --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -35,7 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
 --  Version Control
---  $Revision: 1.1 $
+--  $Revision: 1.4 $
+--  $Date: 2004/08/21 21:37:00 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 with ncurses2.util; use ncurses2.util;
@@ -282,7 +283,7 @@
          );
 
       c : Key_Code := Getchar (w);
-      me : Field := Current (f);
+      me : constant Field := Current (f);
 
    begin
       if c = Character'Pos (']') mod 16#20# then
@@ -314,7 +315,7 @@
    end form_virtualize;
 
    function my_form_driver (f : Form; c : Key_Code) return Boolean is
-      flag : Driver_Result := Driver (f, F_Validate_Field);
+      flag : constant Driver_Result := Driver (f, F_Validate_Field);
    begin
       if c = Form_Request_Code'Last + 1
         and flag = Form_Ok then
@@ -328,7 +329,7 @@
    function make_label (frow  : Line_Position;
                         fcol  : Column_Position;
                         label : String) return Field is
-      f : Field := Create (1, label'Length, frow, fcol, 0, 0);
+      f : constant Field := Create (1, label'Length, frow, fcol, 0, 0);
       o : Field_Option_Set := Get_Options (f);
    begin
       if f /= Null_Field then
diff -Naur ncurses-5.4.orig/Ada95/samples/ncurses2-demo_pad.adb ncurses-5.4/Ada95/samples/ncurses2-demo_pad.adb
--- ncurses-5.4.orig/Ada95/samples/ncurses2-demo_pad.adb	2000-12-02 22:31:26.000000000 +0000
+++ ncurses-5.4/Ada95/samples/ncurses2-demo_pad.adb	2005-05-13 04:09:49.000000000 +0000
@@ -7,7 +7,7 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 2000 Free Software Foundation, Inc.                        --
+-- Copyright (c) 2000,2004 Free Software Foundation, Inc.                   --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -35,7 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
 --  Version Control
---  $Revision: 1.1 $
+--  $Revision: 1.5 $
+--  $Date: 2004/08/21 21:37:00 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 with ncurses2.util; use ncurses2.util;
@@ -104,7 +105,7 @@
       package myP is new System.Address_To_Access_Conversions (timeval);
       use myP;
 
-      t : Object_Pointer := new timeval;
+      t : constant Object_Pointer := new timeval;
 
       function gettimeofday
         (TP : System.Storage_Elements.Integer_Address;
@@ -116,8 +117,13 @@
                            (myP.To_Address (t)),
                            System.Storage_Elements.To_Integer
                            (myP.To_Address (null)));
-      retval.seconds := Integer (t.tv_sec);
-      retval.microseconds := Integer (t.tv_usec);
+      if tmp < 0 then
+         retval.seconds := 0;
+         retval.microseconds := 0;
+      else
+         retval.seconds := Integer (t.tv_sec);
+         retval.microseconds := Integer (t.tv_usec);
+      end if;
       return retval;
    end gettime;
 
@@ -202,7 +208,7 @@
          "Use <,> (or h,l) to grow/shrink the panner horizontally.     ");
       legendsize : constant := 4;
 
-      n : Integer := legendsize - Integer (Lines - line);
+      n : constant Integer := legendsize - Integer (Lines - line);
    begin
       if line < Lines and n >= 0 then
          Move_Cursor (Line => line, Column => 0);
@@ -216,9 +222,10 @@
    end panner_legend;
 
    procedure panner_legend (line : Line_Position) is
-      tmp : Boolean;
    begin
-      tmp := panner_legend (line);
+      if not panner_legend (line) then
+         Beep;
+      end if;
    end panner_legend;
 
    procedure panner_h_cleanup (from_y : Line_Position;
@@ -435,8 +442,8 @@
             when Key_Cursor_Right =>
                --  pan rightwards
                --  if (basex + portx - (pymax > porty) < pxmax)
-               if (basex + portx -
-                   Column_Position (greater (pymax, porty)) < pxmax) then
+               if basex + portx -
+                   Column_Position (greater (pymax, porty)) < pxmax then
                   --  if basex + portx  < pxmax or
                   --      (pymax > porty and basex + portx - 1 < pxmax) then
                   basex := basex + 1;
@@ -455,8 +462,8 @@
             when Key_Cursor_Down =>
                --  pan downwards
                --  same as if (basey + porty - (pxmax > portx) < pymax)
-               if (basey + porty -
-                   Line_Position (greater (pxmax, portx)) < pymax) then
+               if basey + porty -
+                   Line_Position (greater (pxmax, portx)) < pymax then
                   --  if (basey + porty  < pymax) or
                   --      (pxmax > portx and basey + porty - 1 < pymax) then
                   basey := basey + 1;
@@ -472,9 +479,10 @@
             when   Character'Pos ('E') |
               Key_End |
               Key_Select =>
-               basey := pymax - porty;
-               if basey < 0 then --  basey := max(basey, 0);
+               if pymax < porty then
                   basey := 0;
+               else
+                  basey := pymax - porty;
                end if;
 
             when others =>
@@ -500,7 +508,7 @@
          --  in C was ... pxmax > portx - 1
          if scrollers and pxmax >= portx then
             declare
-               length : Column_Position := portx - top_x - 1;
+               length : constant Column_Position := portx - top_x - 1;
                lowend, highend : Column_Position;
             begin
                --  Instead of using floats, I'll use integers only.
@@ -527,7 +535,7 @@
 
          if scrollers and pymax >= porty then
             declare
-               length : Line_Position := porty - top_y - 1;
+               length : constant Line_Position := porty - top_y - 1;
                lowend, highend : Line_Position;
             begin
                lowend := top_y + (basey * length) / pymax;
diff -Naur ncurses-5.4.orig/Ada95/samples/ncurses2-demo_panels.adb ncurses-5.4/Ada95/samples/ncurses2-demo_panels.adb
--- ncurses-5.4.orig/Ada95/samples/ncurses2-demo_panels.adb	2000-12-02 22:31:37.000000000 +0000
+++ ncurses-5.4/Ada95/samples/ncurses2-demo_panels.adb	2005-05-13 04:09:49.000000000 +0000
@@ -7,7 +7,7 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 2000 Free Software Foundation, Inc.                        --
+-- Copyright (c) 2000,2004 Free Software Foundation, Inc.                   --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -35,7 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
 --  Version Control
---  $Revision: 1.1 $
+--  $Revision: 1.4 $
+--  $Date: 2004/08/21 21:37:00 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 with ncurses2.util; use ncurses2.util;
@@ -115,10 +116,10 @@
    procedure wait_a_while (msec : Integer) is
    begin
       --  The C version had some #ifdef blocks here
-      if nap_msec = 1 then
+      if msec = 1 then
          Getchar;
       else
-         Nap_Milli_Seconds (nap_msec);
+         Nap_Milli_Seconds (msec);
       end if;
    end wait_a_while;
 
@@ -137,8 +138,8 @@
    use PUD;
 
    procedure fill_panel (pan : Panel) is
-      win : Window := Panel_Window (pan);
-      num : Character := Get_User_Data (pan) (2);
+      win : constant Window := Panel_Window (pan);
+      num : constant Character := Get_User_Data (pan) (2);
       tmp6 : String (1 .. 6) := "-panx-";
       maxy : Line_Count;
       maxx : Column_Count;
@@ -158,7 +159,7 @@
       end loop;
    end fill_panel;
 
-   modstr : array (0 .. 5) of String (1 .. 5) :=
+   modstr : constant array (0 .. 5) of String (1 .. 5) :=
      ("test ",
       "TEST ",
       "(**) ",
@@ -185,11 +186,11 @@
    for y in 0 .. 4 loop
       declare
          p1, p2, p3, p4, p5 : Panel;
-         U1 : User_Data_Access := new User_Data'("p1");
-         U2 : User_Data_Access := new User_Data'("p2");
-         U3 : User_Data_Access := new User_Data'("p3");
-         U4 : User_Data_Access := new User_Data'("p4");
-         U5 : User_Data_Access := new User_Data'("p5");
+         U1 : constant User_Data_Access := new User_Data'("p1");
+         U2 : constant User_Data_Access := new User_Data'("p2");
+         U3 : constant User_Data_Access := new User_Data'("p3");
+         U4 : constant User_Data_Access := new User_Data'("p4");
+         U5 : constant User_Data_Access := new User_Data'("p5");
 
       begin
          p1 := mkpanel (Red, Lines / 2 - 2, Columns / 8 + 1, 0, 0);
@@ -295,8 +296,8 @@
 
          for itmp in  0 ..  5 loop
             declare
-               w4 : Window := Panel_Window (p4);
-               w5 : Window := Panel_Window (p5);
+               w4 : constant Window := Panel_Window (p4);
+               w5 : constant Window := Panel_Window (p5);
             begin
 
                saywhat ("m4; press any key to continue");
@@ -364,7 +365,7 @@
          rmpanel (p5);
          pflush;
          wait_a_while (nap_msec);
-         if (nap_msec = 1) then
+         if nap_msec = 1 then
             exit;
          else
             nap_msec := 100;
diff -Naur ncurses-5.4.orig/Ada95/samples/ncurses2-getch_test.adb ncurses-5.4/Ada95/samples/ncurses2-getch_test.adb
--- ncurses-5.4.orig/Ada95/samples/ncurses2-getch_test.adb	2000-12-02 22:31:01.000000000 +0000
+++ ncurses-5.4/Ada95/samples/ncurses2-getch_test.adb	2005-05-13 04:09:49.000000000 +0000
@@ -7,7 +7,7 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 2000 Free Software Foundation, Inc.                        --
+-- Copyright (c) 2000,2004 Free Software Foundation, Inc.                   --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -35,7 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
 --  Version Control
---  $Revision: 1.1 $
+--  $Revision: 1.5 $
+--  $Date: 2004/08/21 21:37:00 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 --  Character input test
@@ -96,6 +97,7 @@
    y : Line_Position;
    tmpx : Integer;
    incount : Integer := 0;
+
 begin
    Refresh;
    tmp2 := Start_Mouse (All_Events);
@@ -135,7 +137,7 @@
             Add (Ch => newl);
          elsif c > 16#80# then --  TODO fix, use constant if possible
             declare
-               c2 : Character := Character'Val (c mod 16#80#);
+               c2 : constant Character := Character'Val (c mod 16#80#);
             begin
                if Ada.Characters.Handling.Is_Graphic (c2) then
                   Add (Str => "M-");
@@ -150,7 +152,7 @@
                Add (Ch => newl);
             end;
          else declare
-            c2 : Character := Character'Val (c mod 16#80#);
+            c2 : constant Character := Character'Val (c mod 16#80#);
          begin
             if Ada.Characters.Handling.Is_Graphic (c2) then
                Add (Ch => c2);
@@ -242,7 +244,7 @@
       end loop;
    end loop;
 
-   tmp2 := Start_Mouse (No_Events);
+   End_Mouse (tmp2);
    Set_Timeout_Mode (Mode => Blocking, Amount => 0); --  amount is ignored
    Set_Raw_Mode (SwitchOn => False);
    Set_NL_Mode (SwitchOn => True);
diff -Naur ncurses-5.4.orig/Ada95/samples/ncurses2-getopt.adb ncurses-5.4/Ada95/samples/ncurses2-getopt.adb
--- ncurses-5.4.orig/Ada95/samples/ncurses2-getopt.adb	2004-01-30 23:56:40.000000000 +0000
+++ ncurses-5.4/Ada95/samples/ncurses2-getopt.adb	2005-05-13 04:09:49.000000000 +0000
@@ -35,7 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
 --  Version Control
---  $Revision: 1.3 $
+--  $Revision: 1.6 $
+--  $Date: 2004/08/21 21:37:00 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 --  A simplified version of the  GNU getopt function
@@ -47,8 +48,6 @@
 
 package body ncurses2.getopt is
 
-   optopt : Character := '?';
-
    nextchar : Natural := 0;
 
    --  Ncurses doesn't use the non option elements so we are spared
@@ -104,13 +103,12 @@
       --  Look at and handle the next short option-character.
       declare
          c : Character := argv (optind) (nextchar);
-         temp : Natural :=
+         temp : constant Natural :=
            Ada.Strings.Fixed.Index (optstring, String'(1 => c));
       begin
          if temp = 0 or c = ':' then
             Put_Line (Standard_Error,
                       argv (optind) & ": invalid option -- " & c);
-            optopt := c;
             c := '?';
             return;
          end if;
@@ -134,7 +132,6 @@
                   Put_Line (Standard_Error,
                             argv (optind) &
                             ": option requires an argument -- " & c);
-                  optopt := c;
                   if optstring (1) = ':'  then
                      c := ':';
                   else
diff -Naur ncurses-5.4.orig/Ada95/samples/ncurses2-m.adb ncurses-5.4/Ada95/samples/ncurses2-m.adb
--- ncurses-5.4.orig/Ada95/samples/ncurses2-m.adb	2004-01-30 23:56:51.000000000 +0000
+++ ncurses-5.4/Ada95/samples/ncurses2-m.adb	2005-05-13 04:09:49.000000000 +0000
@@ -35,7 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
 --  Version Control
---  $Revision: 1.2 $
+--  $Revision: 1.5 $
+--  $Date: 2004/08/21 21:37:00 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 --  TODO use Default_Character where appropriate
@@ -332,7 +333,7 @@
                default_colors := True;
             when 'e' =>
                myio.Get (optarg.all, tmpi, length);
-               if Integer (tmpi) > 3 then
+               if tmpi > 3 then
                   usage;
                   return 1;
                end if;
diff -Naur ncurses-5.4.orig/Ada95/samples/ncurses2-menu_test.adb ncurses-5.4/Ada95/samples/ncurses2-menu_test.adb
--- ncurses-5.4.orig/Ada95/samples/ncurses2-menu_test.adb	2000-12-02 22:31:04.000000000 +0000
+++ ncurses-5.4/Ada95/samples/ncurses2-menu_test.adb	2005-05-13 04:09:49.000000000 +0000
@@ -7,7 +7,7 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 2000 Free Software Foundation, Inc.                        --
+-- Copyright (c) 2000,2004 Free Software Foundation, Inc.                   --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -35,7 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
 --  Version Control
---  $Revision: 1.1 $
+--  $Revision: 1.5 $
+--  $Date: 2004/08/21 21:37:00 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 with ncurses2.util; use ncurses2.util;
@@ -92,6 +93,7 @@
    items_a : Item_Array_Access := new Item_Array (1 .. animals'Last + 1);
 
    tmp : Event_Mask;
+
    procedure xAdd (l : Line_Position; c : Column_Position; s : String) is
    begin
       Add (Line => l, Column => c, Str => s);
@@ -161,5 +163,5 @@
 
    Delete (m);
 
-   tmp := Start_Mouse (No_Events);
+   End_Mouse (tmp);
 end ncurses2.menu_test;
diff -Naur ncurses-5.4.orig/Ada95/samples/ncurses2-overlap_test.adb ncurses-5.4/Ada95/samples/ncurses2-overlap_test.adb
--- ncurses-5.4.orig/Ada95/samples/ncurses2-overlap_test.adb	2000-12-02 22:31:05.000000000 +0000
+++ ncurses-5.4/Ada95/samples/ncurses2-overlap_test.adb	2005-05-13 04:09:49.000000000 +0000
@@ -7,7 +7,7 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 2000 Free Software Foundation, Inc.                        --
+-- Copyright (c) 2000,2004 Free Software Foundation, Inc.                   --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -35,7 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
 --  Version Control
---  $Revision: 1.1 $
+--  $Revision: 1.4 $
+--  $Date: 2004/08/21 21:37:00 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 with ncurses2.util; use ncurses2.util;
@@ -71,8 +72,8 @@
       Get_Size (win, y1, x1);
       for y in 0 .. y1 - 1 loop
          for x in 0 .. x1 - 1 loop
-            if (((x > (x1 - 1) / 3) and (x <= (2 * (x1 - 1)) / 3))
-                or (((y > (y1 - 1) / 3) and (y <= (2 * (y1 - 1)) / 3)))) then
+            if ((x > (x1 - 1) / 3) and (x <= (2 * (x1 - 1)) / 3))
+                or (((y > (y1 - 1) / 3) and (y <= (2 * (y1 - 1)) / 3))) then
                Move_Cursor (win, y, x);
                Add (win, Ch => ch);
             end if;
diff -Naur ncurses-5.4.orig/Ada95/samples/ncurses2-slk_test.adb ncurses-5.4/Ada95/samples/ncurses2-slk_test.adb
--- ncurses-5.4.orig/Ada95/samples/ncurses2-slk_test.adb	2000-12-02 22:31:05.000000000 +0000
+++ ncurses-5.4/Ada95/samples/ncurses2-slk_test.adb	2005-05-13 04:09:49.000000000 +0000
@@ -7,7 +7,7 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 2000 Free Software Foundation, Inc.                        --
+-- Copyright (c) 2000,2004 Free Software Foundation, Inc.                   --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -35,7 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
 --  Version Control
---  $Revision: 1.1 $
+--  $Revision: 1.6 $
+--  $Date: 2004/08/21 21:37:00 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 with ncurses2.util; use ncurses2.util;
@@ -63,10 +64,13 @@
                          Len : int) return int;
       pragma Import (C, Wgetnstr, "wgetnstr");
 
-      Txt : char_array (0 .. 10);
+      --  FIXME: how to construct "(Len > 0) ? Len : 80"?
+      Ask : constant Interfaces.C.size_t := Interfaces.C.size_t'Val (Len + 80);
+      Txt : char_array (0 .. Ask);
+
    begin
       Txt (0) := Interfaces.C.char'First;
-      if Wgetnstr (Win, Txt, 8) = Curses_Err then
+      if Wgetnstr (Win, Txt, Txt'Length) = Curses_Err then
          raise Curses_Exception;
       end if;
       Str := To_Unbounded_String (To_Ada (Txt, True));
diff -Naur ncurses-5.4.orig/Ada95/samples/ncurses2-util.adb ncurses-5.4/Ada95/samples/ncurses2-util.adb
--- ncurses-5.4.orig/Ada95/samples/ncurses2-util.adb	2000-12-02 22:31:07.000000000 +0000
+++ ncurses-5.4/Ada95/samples/ncurses2-util.adb	2005-05-13 04:09:49.000000000 +0000
@@ -7,7 +7,7 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 2000 Free Software Foundation, Inc.                        --
+-- Copyright (c) 2000,2004 Free Software Foundation, Inc.                   --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -35,7 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
 --  Version Control
---  $Revision: 1.1 $
+--  $Revision: 1.5 $
+--  $Date: 2004/08/21 21:37:00 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 with Terminal_Interface.Curses; use Terminal_Interface.Curses;
@@ -104,9 +105,10 @@
    end Getchar;
 
    procedure Getchar (win : Window := Standard_Window) is
-      x : Key_Code;
    begin
-      x := Getchar (win);
+      if Getchar (win) < 0 then
+         Beep;
+      end if;
    end Getchar;
 
 
diff -Naur ncurses-5.4.orig/Ada95/samples/sample-curses_demo.adb ncurses-5.4/Ada95/samples/sample-curses_demo.adb
--- ncurses-5.4.orig/Ada95/samples/sample-curses_demo.adb	2003-10-25 15:39:18.000000000 +0000
+++ ncurses-5.4/Ada95/samples/sample-curses_demo.adb	2005-05-13 04:09:49.000000000 +0000
@@ -7,7 +7,7 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+-- Copyright (c) 1998,2004 Free Software Foundation, Inc.                   --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -35,7 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author:  Juergen Pfeifer, 1996
 --  Version Control
---  $Revision: 1.12 $
+--  $Revision: 1.15 $
+--  $Date: 2004/08/21 21:37:00 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 with Terminal_Interface.Curses; use Terminal_Interface.Curses;
@@ -74,7 +75,7 @@
          New_Item ("Mouse Demo"),
          Null_Item);
       M  : Menu := New_Menu (Itm);
-      U1 : User_Data_Access := new User_Data'(4711);
+      U1 : constant User_Data_Access := new User_Data'(4711);
       U2 : User_Data_Access;
 
       function My_Driver (M : Menu;
diff -Naur ncurses-5.4.orig/Ada95/samples/sample-explanation.adb ncurses-5.4/Ada95/samples/sample-explanation.adb
--- ncurses-5.4.orig/Ada95/samples/sample-explanation.adb	2003-10-25 15:39:18.000000000 +0000
+++ ncurses-5.4/Ada95/samples/sample-explanation.adb	2005-05-13 04:09:49.000000000 +0000
@@ -7,7 +7,7 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+-- Copyright (c) 1998,2004 Free Software Foundation, Inc.                   --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -35,7 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author:  Juergen Pfeifer, 1996
 --  Version Control
---  $Revision: 1.15 $
+--  $Revision: 1.18 $
+--  $Date: 2004/08/21 21:37:00 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 --  Poor mans help system. This scans a sequential file for key lines and
@@ -57,7 +58,7 @@
    Help_Keys : constant String := "HELPKEYS";
    In_Help   : constant String := "INHELP";
 
-   File_Name : String := "explain.msg";
+   File_Name : constant String := "explain.msg";
    F : File_Type;
 
    type Help_Line;
@@ -116,7 +117,7 @@
       Current  : Help_Line_Access;
       Top_Line : Help_Line_Access;
 
-      Has_More : Boolean;
+      Has_More : Boolean := True;
 
       procedure Unknown_Key
       is
diff -Naur ncurses-5.4.orig/Ada95/samples/sample-form_demo-aux.adb ncurses-5.4/Ada95/samples/sample-form_demo-aux.adb
--- ncurses-5.4.orig/Ada95/samples/sample-form_demo-aux.adb	2003-10-25 15:39:18.000000000 +0000
+++ ncurses-5.4/Ada95/samples/sample-form_demo-aux.adb	2005-05-13 04:09:49.000000000 +0000
@@ -7,7 +7,7 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+-- Copyright (c) 1998,2004 Free Software Foundation, Inc.                   --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -35,7 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author:  Juergen Pfeifer, 1996
 --  Version Control
---  $Revision: 1.13 $
+--  $Revision: 1.16 $
+--  $Date: 2004/08/21 21:37:00 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 with Ada.Characters.Latin_1; use Ada.Characters.Latin_1;
@@ -198,7 +199,7 @@
                   Text        : String) return Field
    is
       Fld : Field;
-      C : Column_Count := Column_Count (Text'Length);
+      C : constant Column_Count := Column_Count (Text'Length);
    begin
       Fld := New_Field (1, C, Top, Left);
       Set_Buffer (Fld, 0, Text);
@@ -215,7 +216,7 @@
                    Left        : Column_Position;
                    Off_Screen  : Natural := 0) return Field
    is
-      Fld : Field := New_Field (Height, Width, Top, Left, Off_Screen);
+      Fld : constant Field := New_Field (Height, Width, Top, Left, Off_Screen);
    begin
       if Has_Colors then
          Set_Foreground (Fld => Fld, Color => Form_Fore_Color);
@@ -231,6 +232,9 @@
                             P : Panel) return Boolean
    is
    begin
+      if P = Null_Panel then
+         raise Panel_Exception;
+      end if;
       if K in User_Key_Code'Range and then K = QUIT then
          if Driver (F, F_Validate_Field) = Form_Ok  then
             return True;
diff -Naur ncurses-5.4.orig/Ada95/samples/sample-form_demo-handler.adb ncurses-5.4/Ada95/samples/sample-form_demo-handler.adb
--- ncurses-5.4.orig/Ada95/samples/sample-form_demo-handler.adb	2003-10-25 15:39:18.000000000 +0000
+++ ncurses-5.4/Ada95/samples/sample-form_demo-handler.adb	2005-05-13 04:09:49.000000000 +0000
@@ -7,7 +7,7 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+-- Copyright (c) 1998,2004 Free Software Foundation, Inc.                   --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -35,7 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author:  Juergen Pfeifer, 1996
 --  Version Control
---  $Revision: 1.10 $
+--  $Revision: 1.13 $
+--  $Date: 2004/08/21 21:37:00 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 with Sample.Form_Demo.Aux;
@@ -72,7 +73,7 @@
       end if;
       loop
          declare
-            K : Key_Code := Aux.Get_Request (F, Pan, Handle_CRLF);
+            K : constant Key_Code := Aux.Get_Request (F, Pan, Handle_CRLF);
             R : Driver_Result;
          begin
             if (K = 13 or else K = 10) and then not Handle_CRLF then
diff -Naur ncurses-5.4.orig/Ada95/samples/sample-form_demo.adb ncurses-5.4/Ada95/samples/sample-form_demo.adb
--- ncurses-5.4.orig/Ada95/samples/sample-form_demo.adb	2003-10-25 15:39:18.000000000 +0000
+++ ncurses-5.4/Ada95/samples/sample-form_demo.adb	2005-05-13 04:09:49.000000000 +0000
@@ -7,7 +7,7 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+-- Copyright (c) 1998,2004 Free Software Foundation, Inc.                   --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -35,13 +35,13 @@
 ------------------------------------------------------------------------------
 --  Author:  Juergen Pfeifer, 1996
 --  Version Control
---  $Revision: 1.10 $
+--  $Revision: 1.13 $
+--  $Date: 2004/08/21 21:37:00 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 with Terminal_Interface.Curses; use Terminal_Interface.Curses;
 with Terminal_Interface.Curses.Forms; use Terminal_Interface.Curses.Forms;
 with Terminal_Interface.Curses.Forms.Field_User_Data;
-with Terminal_Interface.Curses.Forms.Form_User_Data;
 with Sample.My_Field_Type; use Sample.My_Field_Type;
 with Sample.Explanation; use Sample.Explanation;
 with Sample.Form_Demo.Aux; use Sample.Form_Demo.Aux;
@@ -66,10 +66,6 @@
      Terminal_Interface.Curses.Forms.Field_User_Data (User_Data,
                                                       User_Access);
 
-   package Frm_U is new
-     Terminal_Interface.Curses.Forms.Form_User_Data (User_Data,
-                                                     User_Access);
-
    type Weekday is (Sunday, Monday, Tuesday, Wednesday, Thursday,
                     Friday, Saturday);
 
diff -Naur ncurses-5.4.orig/Ada95/samples/sample-function_key_setting.adb ncurses-5.4/Ada95/samples/sample-function_key_setting.adb
--- ncurses-5.4.orig/Ada95/samples/sample-function_key_setting.adb	2003-10-25 15:39:18.000000000 +0000
+++ ncurses-5.4/Ada95/samples/sample-function_key_setting.adb	2005-05-13 04:09:49.000000000 +0000
@@ -7,7 +7,7 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+-- Copyright (c) 1998,2004 Free Software Foundation, Inc.                   --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -35,7 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author:  Juergen Pfeifer, 1996
 --  Version Control
---  $Revision: 1.10 $
+--  $Revision: 1.13 $
+--  $Date: 2004/08/21 21:37:00 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 with Ada.Unchecked_Deallocation;
@@ -97,7 +98,7 @@
       P.Help := Active_Context;
       P.Notepad := Active_Notepad;
       --  The notepad must now vanish and the new notepad is empty.
-      if (P.Notepad /= Null_Panel) then
+      if P.Notepad /= Null_Panel then
          Hide (P.Notepad);
          Update_Panels;
       end if;
diff -Naur ncurses-5.4.orig/Ada95/samples/sample-header_handler.adb ncurses-5.4/Ada95/samples/sample-header_handler.adb
--- ncurses-5.4.orig/Ada95/samples/sample-header_handler.adb	2003-10-25 15:39:18.000000000 +0000
+++ ncurses-5.4/Ada95/samples/sample-header_handler.adb	2005-05-13 04:09:49.000000000 +0000
@@ -7,7 +7,7 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+-- Copyright (c) 1998,2004 Free Software Foundation, Inc.                   --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -35,7 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author:  Juergen Pfeifer, 1996
 --  Version Control
---  $Revision: 1.11 $
+--  $Revision: 1.14 $
+--  $Date: 2004/08/21 21:37:00 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 with Ada.Calendar; use Ada.Calendar;
@@ -111,12 +112,12 @@
          "November ",
          "December ");
 
-      Now : Time := Clock;
-      Sec : Integer := Integer (Seconds (Now));
-      Hour   : Integer := Sec / 3600;
-      Minute : Integer := (Sec - Hour * 3600) / 60;
-      Mon    : Month_Number := Month (Now);
-      D      : Day_Number   := Day (Now);
+      Now    : constant Time         := Clock;
+      Sec    : constant Integer      := Integer (Seconds (Now));
+      Hour   : constant Integer      := Sec / 3600;
+      Minute : constant Integer      := (Sec - Hour * 3600) / 60;
+      Mon    : constant Month_Number := Month (Now);
+      D      : constant Day_Number   := Day (Now);
    begin
       if Header_Window /= Null_Window then
          if Minute /= Display_Min or else Hour /= Display_Hour
diff -Naur ncurses-5.4.orig/Ada95/samples/sample-keyboard_handler.adb ncurses-5.4/Ada95/samples/sample-keyboard_handler.adb
--- ncurses-5.4.orig/Ada95/samples/sample-keyboard_handler.adb	2003-10-25 15:39:18.000000000 +0000
+++ ncurses-5.4/Ada95/samples/sample-keyboard_handler.adb	2005-05-13 04:09:49.000000000 +0000
@@ -7,7 +7,7 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+-- Copyright (c) 1998,2004 Free Software Foundation, Inc.                   --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -35,7 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author:  Juergen Pfeifer, 1996
 --  Version Control
---  $Revision: 1.9 $
+--  $Revision: 1.12 $
+--  $Date: 2004/08/21 21:37:00 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 with Ada.Strings; use Ada.Strings;
@@ -95,6 +96,9 @@
          is
             Ch : Character;
          begin
+            if P = Null_Panel then
+               raise Panel_Exception;
+            end if;
             if C in User_Key_Code'Range and then C = QUIT then
                if Driver (F, F_Validate_Field) = Form_Ok  then
                   K := Key_None;
@@ -102,7 +106,7 @@
                end if;
             elsif C in Normal_Key_Code'Range then
                Ch := Character'Val (C);
-               if (Ch = LF or else Ch = CR) then
+               if Ch = LF or else Ch = CR then
                   if Driver (F, F_Validate_Field) = Form_Ok  then
                      declare
                         Buffer : String (1 .. Positive (Columns - 11));
diff -Naur ncurses-5.4.orig/Ada95/samples/sample-menu_demo-handler.adb ncurses-5.4/Ada95/samples/sample-menu_demo-handler.adb
--- ncurses-5.4.orig/Ada95/samples/sample-menu_demo-handler.adb	2003-10-25 15:39:18.000000000 +0000
+++ ncurses-5.4/Ada95/samples/sample-menu_demo-handler.adb	2005-05-13 04:09:49.000000000 +0000
@@ -7,7 +7,7 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+-- Copyright (c) 1998,2004 Free Software Foundation, Inc.                   --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -35,7 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author:  Juergen Pfeifer, 1996
 --  Version Control
---  $Revision: 1.12 $
+--  $Revision: 1.15 $
+--  $Date: 2004/08/21 21:37:00 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 with Sample.Menu_Demo.Aux;
@@ -75,7 +76,7 @@
       loop
          declare
             K : Key_Code := Aux.Get_Request (M, Pan);
-            R : Driver_Result := Driver (M, K);
+            R : constant Driver_Result := Driver (M, K);
          begin
             case R is
                when Menu_Ok => null;
diff -Naur ncurses-5.4.orig/Ada95/samples/sample-menu_demo.adb ncurses-5.4/Ada95/samples/sample-menu_demo.adb
--- ncurses-5.4.orig/Ada95/samples/sample-menu_demo.adb	2003-10-25 15:39:18.000000000 +0000
+++ ncurses-5.4/Ada95/samples/sample-menu_demo.adb	2005-05-13 04:09:49.000000000 +0000
@@ -7,7 +7,7 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+-- Copyright (c) 1998,2004 Free Software Foundation, Inc.                   --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -35,7 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author:  Juergen Pfeifer, 1996
 --  Version Control
---  $Revision: 1.13 $
+--  $Revision: 1.17 $
+--  $Date: 2004/08/21 21:37:00 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 with Terminal_Interface.Curses; use Terminal_Interface.Curses;
@@ -105,6 +106,12 @@
                              P : Panel) return Boolean
          is
          begin
+            if M = Null_Menu then
+               raise Menu_Exception;
+            end if;
+            if P = Null_Panel then
+               raise Panel_Exception;
+            end if;
             To_Change := No_Change;
             if K in User_Key_Code'Range then
                if K = QUIT then
@@ -331,9 +338,9 @@
          Null_Item);
       M : Menu := New_Menu (Itm);
 
-      U1 : User_Data_Access := new User_Data'(4711);
+      U1 : constant User_Data_Access := new User_Data'(4711);
       U2 : User_Data_Access;
-      U3 : User_Data_Access := new User_Data'(4712);
+      U3 : constant User_Data_Access := new User_Data'(4712);
       U4 : User_Data_Access;
 
       function My_Driver (M : Menu;
diff -Naur ncurses-5.4.orig/Ada95/samples/sample-my_field_type.adb ncurses-5.4/Ada95/samples/sample-my_field_type.adb
--- ncurses-5.4.orig/Ada95/samples/sample-my_field_type.adb	2003-10-25 15:39:18.000000000 +0000
+++ ncurses-5.4/Ada95/samples/sample-my_field_type.adb	2005-05-13 04:09:49.000000000 +0000
@@ -7,7 +7,7 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+-- Copyright (c) 1998,2004 Free Software Foundation, Inc.                   --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -35,7 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author:  Juergen Pfeifer, 1996
 --  Version Control
---  $Revision: 1.9 $
+--  $Revision: 1.13 $
+--  $Date: 2004/08/21 21:37:00 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 with Terminal_Interface.Curses.Forms; use Terminal_Interface.Curses.Forms;
@@ -45,11 +46,14 @@
 --
 package body Sample.My_Field_Type is
 
-   --  That's simple. There are no field validity checks.
+   --  That's simple. There are minimal field validity checks.
    function Field_Check (Fld : Field;
                          Typ : My_Data) return Boolean
    is
    begin
+      if Fld = Null_Field or Typ.Ch = Character'Val (0) then
+         return False;
+      end if;
       return True;
    end Field_Check;
 
diff -Naur ncurses-5.4.orig/Ada95/samples/sample-text_io_demo.adb ncurses-5.4/Ada95/samples/sample-text_io_demo.adb
--- ncurses-5.4.orig/Ada95/samples/sample-text_io_demo.adb	2003-10-25 15:39:18.000000000 +0000
+++ ncurses-5.4/Ada95/samples/sample-text_io_demo.adb	2005-05-13 04:09:49.000000000 +0000
@@ -7,7 +7,7 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+-- Copyright (c) 1998,2004 Free Software Foundation, Inc.                   --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -35,7 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author:  Juergen Pfeifer, 1996
 --  Version Control
---  $Revision: 1.11 $
+--  $Revision: 1.14 $
+--  $Date: 2004/08/21 21:37:00 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 with Ada.Numerics.Generic_Elementary_Functions;
@@ -109,9 +110,9 @@
       W : Window;
       P : Panel := Create (Standard_Window);
       K : Real_Key_Code;
-      Im : Complex := (0.0, 1.0);
-      Fx : Fix := 3.14;
-      Dc : Dec := 2.72;
+      Im : constant Complex := (0.0, 1.0);
+      Fx : constant Fix := 3.14;
+      Dc : constant Dec := 2.72;
       L : Md;
 
    begin
diff -Naur ncurses-5.4.orig/Ada95/src/Makefile.in ncurses-5.4/Ada95/src/Makefile.in
--- ncurses-5.4.orig/Ada95/src/Makefile.in	2003-10-25 15:39:18.000000000 +0000
+++ ncurses-5.4/Ada95/src/Makefile.in	2005-05-13 04:09:49.000000000 +0000
@@ -1,5 +1,5 @@
 ##############################################################################
-# Copyright (c) 1998 Free Software Foundation, Inc.                          #
+# Copyright (c) 1998-2003,2004 Free Software Foundation, Inc.                #
 #                                                                            #
 # Permission is hereby granted, free of charge, to any person obtaining a    #
 # copy of this software and associated documentation files (the "Software"), #
@@ -28,8 +28,7 @@
 #
 #  Author:  Juergen Pfeifer, 1996
 #
-#  Version Control
-#  $Revision: 1.28 $
+#  $Id: Makefile.in,v 1.30 2004/08/21 21:29:50 tom Exp $
 #
 .SUFFIXES:
 
@@ -175,17 +174,17 @@
 	@sh -c 'for f in $(LIBALIS) $(GENALIS); do test -f $$f || touch $$f; done'
 
 sources :
-	@
+	@echo made $@
 
 libs \
 install \
 install.libs \
 uninstall \
 uninstall.libs ::
-	@
+	@echo made $@
 
 generics: $(GENALIS)
-	@
+	@echo made $@
 
 mostlyclean ::
 	rm -f *.o *.ali b_t*.* *.s $(PROGS) a.out core b_*_test.c *.xr[bs] *.a
@@ -232,7 +231,7 @@
 
 $(ABASE)-trace.adb : $(srcdir)/$(ABASE)-trace.adb_p
 	rm -f $@
-	$(ADAPREP) -DADA_TRACE=@ADA_TRACE@ $(srcdir)/$(ABASE)-trace.adb_p $@
+	$(ADAPREP) -DADA_TRACE=@ADA_TRACE@ -DPRAGMA_UNREF=@PRAGMA_UNREF@ $(srcdir)/$(ABASE)-trace.adb_p $@
 
 $(ABASE)-trace.o: \
 		$(ABASE)-trace.ads \
diff -Naur ncurses-5.4.orig/Ada95/src/terminal_interface-curses-forms-field_types-enumeration-ada.adb ncurses-5.4/Ada95/src/terminal_interface-curses-forms-field_types-enumeration-ada.adb
--- ncurses-5.4.orig/Ada95/src/terminal_interface-curses-forms-field_types-enumeration-ada.adb	2003-10-25 15:39:18.000000000 +0000
+++ ncurses-5.4/Ada95/src/terminal_interface-curses-forms-field_types-enumeration-ada.adb	2005-05-13 04:09:49.000000000 +0000
@@ -7,7 +7,7 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+-- Copyright (c) 1998,2004 Free Software Foundation, Inc.                   --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -35,7 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author:  Juergen Pfeifer, 1996
 --  Version Control:
---  $Revision: 1.7 $
+--  $Revision: 1.10 $
+--  $Date: 2004/08/21 21:37:00 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 with Ada.Characters.Handling; use Ada.Characters.Handling;
@@ -54,7 +55,7 @@
       I.Match_Must_Be_Unique := Must_Be_Unique;
 
       for E in T'Range loop
-         I.Names (J) := new String'(T'Image (T (E)));
+         I.Names (J) := new String'(T'Image (E));
          --  The Image attribute defaults to upper case, so we have to handle
          --  only the other ones...
          if Set /= Upper_Case then
diff -Naur ncurses-5.4.orig/Ada95/src/terminal_interface-curses-forms-field_types-user-choice.adb ncurses-5.4/Ada95/src/terminal_interface-curses-forms-field_types-user-choice.adb
--- ncurses-5.4.orig/Ada95/src/terminal_interface-curses-forms-field_types-user-choice.adb	2003-10-25 15:39:18.000000000 +0000
+++ ncurses-5.4/Ada95/src/terminal_interface-curses-forms-field_types-user-choice.adb	2005-05-13 04:09:49.000000000 +0000
@@ -7,7 +7,7 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+-- Copyright (c) 1998,2004 Free Software Foundation, Inc.                   --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -35,7 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author:  Juergen Pfeifer, 1996
 --  Version Control:
---  $Revision: 1.10 $
+--  $Revision: 1.13 $
+--  $Date: 2004/08/21 21:37:00 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 with Ada.Unchecked_Conversion;
@@ -53,7 +54,7 @@
                           Usr : System.Address) return C_Int
    is
       Result : Boolean;
-      Udf    : User_Defined_Field_Type_With_Choice_Access :=
+      Udf    : constant User_Defined_Field_Type_With_Choice_Access :=
         User_Defined_Field_Type_With_Choice_Access
         (To_Argument_Access (Usr).Typ);
    begin
@@ -65,7 +66,7 @@
                           Usr : System.Address) return C_Int
    is
       Result : Boolean;
-      Udf    : User_Defined_Field_Type_With_Choice_Access :=
+      Udf    : constant User_Defined_Field_Type_With_Choice_Access :=
         User_Defined_Field_Type_With_Choice_Access
         (To_Argument_Access (Usr).Typ);
    begin
diff -Naur ncurses-5.4.orig/Ada95/src/terminal_interface-curses-forms-field_types-user.adb ncurses-5.4/Ada95/src/terminal_interface-curses-forms-field_types-user.adb
--- ncurses-5.4.orig/Ada95/src/terminal_interface-curses-forms-field_types-user.adb	2003-10-25 15:39:18.000000000 +0000
+++ ncurses-5.4/Ada95/src/terminal_interface-curses-forms-field_types-user.adb	2005-05-13 04:09:49.000000000 +0000
@@ -7,7 +7,7 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+-- Copyright (c) 1998,2004 Free Software Foundation, Inc.                   --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -35,7 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author:  Juergen Pfeifer, 1996
 --  Version Control:
---  $Revision: 1.10 $
+--  $Revision: 1.13 $
+--  $Date: 2004/08/21 21:37:00 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 with Ada.Unchecked_Conversion;
@@ -63,7 +64,8 @@
       function Allocate_Arg (T : User_Defined_Field_Type'Class)
                              return Argument_Access
       is
-         Ptr : Field_Type_Access := new User_Defined_Field_Type'Class'(T);
+         Ptr : constant Field_Type_Access
+             := new User_Defined_Field_Type'Class'(T);
       begin
          return new Argument'(Usr => System.Null_Address,
                               Typ => Ptr,
@@ -84,7 +86,7 @@
                                  Usr : System.Address) return C_Int
    is
       Result : Boolean;
-      Udf    : User_Defined_Field_Type_Access :=
+      Udf    : constant User_Defined_Field_Type_Access :=
         User_Defined_Field_Type_Access (To_Argument_Access (Usr).Typ);
    begin
       Result := Field_Check (Fld, Udf.all);
@@ -95,7 +97,7 @@
                                 Usr : System.Address) return C_Int
    is
       Result : Boolean;
-      Udf    : User_Defined_Field_Type_Access :=
+      Udf    : constant User_Defined_Field_Type_Access :=
         User_Defined_Field_Type_Access (To_Argument_Access (Usr).Typ);
    begin
       Result := Character_Check (Character'Val (Ch), Udf.all);
diff -Naur ncurses-5.4.orig/Ada95/src/terminal_interface-curses-forms-field_types.adb ncurses-5.4/Ada95/src/terminal_interface-curses-forms-field_types.adb
--- ncurses-5.4.orig/Ada95/src/terminal_interface-curses-forms-field_types.adb	2003-10-25 15:39:18.000000000 +0000
+++ ncurses-5.4/Ada95/src/terminal_interface-curses-forms-field_types.adb	2005-05-13 04:09:49.000000000 +0000
@@ -7,7 +7,7 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+-- Copyright (c) 1998,2004 Free Software Foundation, Inc.                   --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -35,7 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author:  Juergen Pfeifer, 1996
 --  Version Control:
---  $Revision: 1.14 $
+--  $Revision: 1.17 $
+--  $Date: 2004/08/21 21:37:00 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 with Interfaces.C;
@@ -144,7 +145,7 @@
                            Typ : Field_Type'Class;
                            Cft : C_Field_Type := C_Builtin_Router)
    is
-      Usr_Arg   : System.Address := Get_Arg (Fld);
+      Usr_Arg   : constant System.Address := Get_Arg (Fld);
       Low_Level : constant C_Field_Type := Get_Fieldtype (Fld);
       Arg : Argument_Access;
       Res : Eti_Error;
diff -Naur ncurses-5.4.orig/Ada95/src/terminal_interface-curses-forms.adb ncurses-5.4/Ada95/src/terminal_interface-curses-forms.adb
--- ncurses-5.4.orig/Ada95/src/terminal_interface-curses-forms.adb	2003-10-25 15:39:18.000000000 +0000
+++ ncurses-5.4/Ada95/src/terminal_interface-curses-forms.adb	2005-05-13 04:09:49.000000000 +0000
@@ -7,7 +7,7 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+-- Copyright (c) 1998,2004 Free Software Foundation, Inc.                   --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -35,7 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author:  Juergen Pfeifer, 1996
 --  Version Control:
---  $Revision: 1.22 $
+--  $Revision: 1.25 $
+--  $Date: 2004/08/21 21:37:00 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 with Ada.Unchecked_Deallocation;
@@ -330,7 +331,7 @@
                                Opt : C_Int) return C_Int;
       pragma Import (C, Set_Field_Opts, "set_field_opts");
 
-      Opt : C_Int := FOS_2_CInt (Options);
+      Opt : constant C_Int := FOS_2_CInt (Options);
       Res : Eti_Error;
    begin
       Res := Set_Field_Opts (Fld, Opt);
@@ -353,7 +354,7 @@
       pragma Import (C, Field_Opts_Off, "field_opts_off");
 
       Err : Eti_Error;
-      Opt : C_Int := FOS_2_CInt (Options);
+      Opt : constant C_Int := FOS_2_CInt (Options);
    begin
       if On then
          Err := Field_Opts_On (Fld, Opt);
@@ -373,7 +374,7 @@
       function Field_Opts (Fld : Field) return C_Int;
       pragma Import (C, Field_Opts, "field_opts");
 
-      Res : C_Int := Field_Opts (Fld);
+      Res : constant C_Int := Field_Opts (Fld);
    begin
       Options := CInt_2_FOS (Res);
    end Get_Options;
@@ -845,7 +846,7 @@
                               Opt : C_Int) return C_Int;
       pragma Import (C, Set_Form_Opts, "set_form_opts");
 
-      Opt : C_Int := FrmOS_2_CInt (Options);
+      Opt : constant C_Int := FrmOS_2_CInt (Options);
       Res : Eti_Error;
    begin
       Res := Set_Form_Opts (Frm, Opt);
@@ -868,7 +869,7 @@
       pragma Import (C, Form_Opts_Off, "form_opts_off");
 
       Err : Eti_Error;
-      Opt : C_Int := FrmOS_2_CInt (Options);
+      Opt : constant C_Int := FrmOS_2_CInt (Options);
    begin
       if On then
          Err := Form_Opts_On (Frm, Opt);
@@ -888,7 +889,7 @@
       function Form_Opts (Frm : Form) return C_Int;
       pragma Import (C, Form_Opts, "form_opts");
 
-      Res : C_Int := Form_Opts (Frm);
+      Res : constant C_Int := Form_Opts (Frm);
    begin
       Options := CInt_2_FrmOS (Res);
    end Get_Options;
@@ -995,7 +996,7 @@
       function Frm_Driver (Frm : Form; Key : C_Int) return C_Int;
       pragma Import (C, Frm_Driver, "form_driver");
 
-      R : Eti_Error := Frm_Driver (Frm, C_Int (Key));
+      R : constant Eti_Error := Frm_Driver (Frm, C_Int (Key));
    begin
       if R /= E_Ok then
          if R = E_Unknown_Command then
@@ -1135,7 +1136,7 @@
    begin
       if FA /= null and then Free_Fields then
          for I in FA'First .. (FA'Last - 1) loop
-            if (FA (I) /= Null_Field) then
+            if FA (I) /= Null_Field then
                Delete (FA (I));
             end if;
          end loop;
diff -Naur ncurses-5.4.orig/Ada95/src/terminal_interface-curses-menus.adb ncurses-5.4/Ada95/src/terminal_interface-curses-menus.adb
--- ncurses-5.4.orig/Ada95/src/terminal_interface-curses-menus.adb	2003-10-25 15:39:18.000000000 +0000
+++ ncurses-5.4/Ada95/src/terminal_interface-curses-menus.adb	2005-05-13 04:09:49.000000000 +0000
@@ -7,7 +7,7 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+-- Copyright (c) 1998,2004 Free Software Foundation, Inc.                   --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -35,7 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author:  Juergen Pfeifer, 1996
 --  Version Control:
---  $Revision: 1.22 $
+--  $Revision: 1.25 $
+--  $Date: 2004/08/21 21:37:00 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 with Ada.Unchecked_Deallocation;
@@ -105,8 +106,8 @@
       type Desc_String_Ptr is access Desc_String;
       pragma Controlled (Desc_String_Ptr);
 
-      Name_Str : Name_String_Ptr := new Name_String;
-      Desc_Str : Desc_String_Ptr := new Desc_String;
+      Name_Str : constant Name_String_Ptr := new Name_String;
+      Desc_Str : constant Desc_String_Ptr := new Desc_String;
       Name_Len, Desc_Len : size_t;
       Result : Item;
    begin
@@ -194,7 +195,7 @@
                               Opt : C_Int) return C_Int;
       pragma Import (C, Set_Item_Opts, "set_item_opts");
 
-      Opt : C_Int := IOS_2_CInt (Options);
+      Opt : constant C_Int := IOS_2_CInt (Options);
       Res : Eti_Error;
    begin
       Res := Set_Item_Opts (Itm, Opt);
@@ -214,7 +215,7 @@
                               Opt : C_Int) return C_Int;
       pragma Import (C, Item_Opts_Off, "item_opts_off");
 
-      Opt : C_Int := IOS_2_CInt (Options);
+      Opt : constant C_Int := IOS_2_CInt (Options);
       Err : Eti_Error;
    begin
       if On then
@@ -233,7 +234,7 @@
       function Item_Opts (Itm : Item) return C_Int;
       pragma Import (C, Item_Opts, "item_opts");
 
-      Res : C_Int := Item_Opts (Itm);
+      Res : constant C_Int := Item_Opts (Itm);
    begin
       Options := CInt_2_IOS (Res);
    end Get_Options;
@@ -374,7 +375,7 @@
                               Opt : C_Int) return C_Int;
       pragma Import (C, Set_Menu_Opts, "set_menu_opts");
 
-      Opt : C_Int := MOS_2_CInt (Options);
+      Opt : constant C_Int := MOS_2_CInt (Options);
       Res : Eti_Error;
    begin
       Res := Set_Menu_Opts (Men, Opt);
@@ -394,7 +395,7 @@
                               Opt : C_Int) return C_Int;
       pragma Import (C, Menu_Opts_Off, "menu_opts_off");
 
-      Opt : C_Int := MOS_2_CInt (Options);
+      Opt : constant C_Int := MOS_2_CInt (Options);
       Err : Eti_Error;
    begin
       if On then
@@ -413,7 +414,7 @@
       function Menu_Opts (Men : Menu) return C_Int;
       pragma Import (C, Menu_Opts, "menu_opts");
 
-      Res : C_Int := Menu_Opts (Men);
+      Res : constant C_Int := Menu_Opts (Men);
    begin
       Options := CInt_2_MOS (Res);
    end Get_Options;
@@ -973,7 +974,7 @@
                        Key : C_Int) return C_Int;
       pragma Import (C, Driver, "menu_driver");
 
-      R : Eti_Error := Driver (Men, C_Int (Key));
+      R : constant Eti_Error := Driver (Men, C_Int (Key));
    begin
       if R /= E_Ok then
          case R is
@@ -996,7 +997,7 @@
    begin
       if IA /= null and then Free_Items then
          for I in IA'First .. (IA'Last - 1) loop
-            if (IA (I) /= Null_Item) then
+            if IA (I) /= Null_Item then
                Delete (IA (I));
             end if;
          end loop;
diff -Naur ncurses-5.4.orig/Ada95/src/terminal_interface-curses-mouse.adb ncurses-5.4/Ada95/src/terminal_interface-curses-mouse.adb
--- ncurses-5.4.orig/Ada95/src/terminal_interface-curses-mouse.adb	2003-10-25 15:39:18.000000000 +0000
+++ ncurses-5.4/Ada95/src/terminal_interface-curses-mouse.adb	2005-05-13 04:09:49.000000000 +0000
@@ -7,7 +7,7 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+-- Copyright (c) 1998,2004 Free Software Foundation, Inc.                   --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -35,7 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author:  Juergen Pfeifer, 1996
 --  Version Control:
---  $Revision: 1.18 $
+--  $Revision: 1.21 $
+--  $Date: 2004/08/21 21:37:00 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 with System;
@@ -116,13 +117,18 @@
       Old : aliased Event_Mask;
    begin
       R := MMask (Mask, Old'Access);
+      if R = No_Events then
+         Beep;
+      end if;
       return Old;
    end Start_Mouse;
 
    procedure End_Mouse (Mask : in Event_Mask := No_Events)
    is
    begin
-      null;
+      if Mask /= No_Events then
+         Beep;
+      end if;
    end End_Mouse;
 
    procedure Dispatch_Event (Mask   : in  Event_Mask;
diff -Naur ncurses-5.4.orig/Ada95/src/terminal_interface-curses-panels.adb ncurses-5.4/Ada95/src/terminal_interface-curses-panels.adb
--- ncurses-5.4.orig/Ada95/src/terminal_interface-curses-panels.adb	2003-10-25 15:39:18.000000000 +0000
+++ ncurses-5.4/Ada95/src/terminal_interface-curses-panels.adb	2005-05-13 04:09:49.000000000 +0000
@@ -7,7 +7,7 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+-- Copyright (c) 1998,2004 Free Software Foundation, Inc.                   --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -35,7 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author:  Juergen Pfeifer, 1996
 --  Version Control:
---  $Revision: 1.10 $
+--  $Revision: 1.13 $
+--  $Date: 2004/08/21 21:37:00 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
@@ -104,7 +105,7 @@
       function Panel_Win (Pan : Panel) return Window;
       pragma Import (C, Panel_Win, "panel_window");
 
-      Win : Window := Panel_Win (Pan);
+      Win : constant Window := Panel_Win (Pan);
    begin
       if Win = Null_Window then
          raise Panel_Exception;
diff -Naur ncurses-5.4.orig/Ada95/src/terminal_interface-curses-termcap.adb ncurses-5.4/Ada95/src/terminal_interface-curses-termcap.adb
--- ncurses-5.4.orig/Ada95/src/terminal_interface-curses-termcap.adb	2004-01-30 23:57:01.000000000 +0000
+++ ncurses-5.4/Ada95/src/terminal_interface-curses-termcap.adb	2005-05-13 04:09:49.000000000 +0000
@@ -35,7 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author:  Juergen Pfeifer, 1996
 --  Version Control:
---  $Revision: 1.6 $
+--  $Revision: 1.9 $
+--  $Date: 2004/08/21 21:37:00 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 
@@ -52,7 +53,7 @@
       pragma Import (C, tgetent, "tgetent");
       NameTxt : char_array (0 .. Name'Length);
       Length  : size_t;
-      ignored : char_array (0 .. 0) := (0 => nul);
+      ignored : constant char_array (0 .. 0) := (0 => nul);
       result  : C_Int;
    begin
       To_C (Name, NameTxt, Length);
@@ -111,7 +112,7 @@
       Length : size_t;
       Txt2   : chars_ptr;
       type t is new char_array (0 .. 1024); --  does it need to be 1024?
-      Return_Buffer : t := (others => nul);
+      Return_Buffer : constant t := (others => nul);
    begin
       To_C (Name, Txt, Length);
       Txt2 := tgetstr (Txt, char_array (Return_Buffer));
@@ -132,7 +133,7 @@
       Length : size_t;
       Txt2   : chars_ptr;
       type t is new char_array (0 .. 1024); --  does it need to be 1024?
-      Phony_Txt : t := (others => nul);
+      Phony_Txt : constant t := (others => nul);
    begin
       To_C (Name, Txt, Length);
       Txt2 := tgetstr (Txt, char_array (Phony_Txt));
diff -Naur ncurses-5.4.orig/Ada95/src/terminal_interface-curses-text_io.adb ncurses-5.4/Ada95/src/terminal_interface-curses-text_io.adb
--- ncurses-5.4.orig/Ada95/src/terminal_interface-curses-text_io.adb	2003-10-25 15:39:18.000000000 +0000
+++ ncurses-5.4/Ada95/src/terminal_interface-curses-text_io.adb	2005-05-13 04:09:49.000000000 +0000
@@ -7,7 +7,7 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+-- Copyright (c) 1998,2004 Free Software Foundation, Inc.                   --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -35,7 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author:  Juergen Pfeifer, 1996
 --  Version Control:
---  $Revision: 1.14 $
+--  $Revision: 1.17 $
+--  $Date: 2004/08/21 21:37:00 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 package body Terminal_Interface.Curses.Text_IO is
@@ -86,9 +87,9 @@
       N_Cols  : Column_Count;
    begin
       Get_Size (Win, N_Lines, N_Cols);
-      if Natural (N_Cols) > Natural (Count'Last) then
-         raise Layout_Error;
-      end if;
+      --  if Natural (N_Cols) > Natural (Count'Last) then
+      --     raise Layout_Error;
+      --  end if;
       return Count (N_Cols);
    end Line_Length;
 
@@ -107,9 +108,9 @@
          return 0;
       else
          Get_Size (Win, N_Lines, N_Cols);
-         if Natural (N_Lines) > Natural (Count'Last) then
-            raise Layout_Error;
-         end if;
+         --  if Natural (N_Lines) > Natural (Count'Last) then
+         --     raise Layout_Error;
+         --  end if;
          return Count (N_Lines);
       end if;
    end Page_Length;
@@ -229,9 +230,9 @@
    begin
       Get_Cursor_Position (Win, Y, X);
       N := Natural (X); N := N + 1;
-      if N > Natural (Count'Last) then
-         raise Layout_Error;
-      end if;
+      --  if N > Natural (Count'Last) then
+      --     raise Layout_Error;
+      --  end if;
       return Positive_Count (N);
    end Col;
 
@@ -249,9 +250,9 @@
    begin
       Get_Cursor_Position (Win, Y, X);
       N := Natural (Y); N := N + 1;
-      if N > Natural (Count'Last) then
-         raise Layout_Error;
-      end if;
+      --  if N > Natural (Count'Last) then
+      --     raise Layout_Error;
+      --  end if;
       return Positive_Count (N);
    end Line;
 
diff -Naur ncurses-5.4.orig/Ada95/src/terminal_interface-curses-trace.adb_p ncurses-5.4/Ada95/src/terminal_interface-curses-trace.adb_p
--- ncurses-5.4.orig/Ada95/src/terminal_interface-curses-trace.adb_p	2003-10-25 15:39:18.000000000 +0000
+++ ncurses-5.4/Ada95/src/terminal_interface-curses-trace.adb_p	2005-05-13 04:09:49.000000000 +0000
@@ -7,7 +7,7 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 2000 Free Software Foundation, Inc.                        --
+-- Copyright (c) 2000,2004 Free Software Foundation, Inc.                   --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -35,7 +35,7 @@
 ------------------------------------------------------------------------------
 --  Author:  Juergen Pfeifer, 1996
 --  Version Control:
---  $Revision: 1.4 $
+--  $Revision: 1.5 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 #if ADA_TRACE then
@@ -78,11 +78,17 @@
    end Trace_Put;
 #else
    procedure Trace_On (x : Trace_Attribute_Set) is
+#if PRAGMA_UNREF
+   pragma Unreferenced (x);
+#end if;
    begin
       null;
    end Trace_On;
 
    procedure Trace_Put (str : String) is
+#if PRAGMA_UNREF
+   pragma Unreferenced (str);
+#end if;
    begin
       null;
    end Trace_Put;
diff -Naur ncurses-5.4.orig/Ada95/src/terminal_interface-curses.adb ncurses-5.4/Ada95/src/terminal_interface-curses.adb
--- ncurses-5.4.orig/Ada95/src/terminal_interface-curses.adb	2003-10-25 15:39:18.000000000 +0000
+++ ncurses-5.4/Ada95/src/terminal_interface-curses.adb	2005-05-13 04:09:49.000000000 +0000
@@ -7,7 +7,7 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+-- Copyright (c) 1998,2004 Free Software Foundation, Inc.                   --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -35,7 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author: Juergen Pfeifer, 1996
 --  Version Control:
---  $Revision: 1.29 $
+--  $Revision: 1.32 $
+--  $Date: 2004/08/21 21:37:00 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 with System;
@@ -373,7 +374,7 @@
       function Dupwin (Win : Window) return Window;
       pragma Import (C, Dupwin, "dupwin");
 
-      W : Window := Dupwin (Win);
+      W : constant Window := Dupwin (Win);
    begin
       if W = Null_Window then
          raise Curses_Exception;
@@ -935,6 +936,9 @@
       procedure No_Qiflush;
       pragma Import (C, No_Qiflush, "noqiflush");
    begin
+      if Win = Null_Window then
+         raise Curses_Exception;
+      end if;
       if Flush then
          Qiflush;
       else
@@ -1398,8 +1402,10 @@
    is
       --  Please note: in ncurses they are one off.
       --  This might be different in other implementations of curses
-      Y : C_Int := C_Int (W_Get_Short (Win, Offset_maxy)) + C_Int (Offset_XY);
-      X : C_Int := C_Int (W_Get_Short (Win, Offset_maxx)) + C_Int (Offset_XY);
+      Y : constant C_Int := C_Int (W_Get_Short (Win, Offset_maxy))
+                          + C_Int (Offset_XY);
+      X : constant C_Int := C_Int (W_Get_Short (Win, Offset_maxx))
+                          + C_Int (Offset_XY);
    begin
       Number_Of_Lines   := Line_Count (Y);
       Number_Of_Columns := Column_Count (X);
@@ -1410,8 +1416,8 @@
       Top_Left_Line   : out Line_Position;
       Top_Left_Column : out Column_Position)
    is
-      Y : C_Short := W_Get_Short (Win, Offset_begy);
-      X : C_Short := W_Get_Short (Win, Offset_begx);
+      Y : constant C_Short := W_Get_Short (Win, Offset_begy);
+      X : constant C_Short := W_Get_Short (Win, Offset_begx);
    begin
       Top_Left_Line   := Line_Position (Y);
       Top_Left_Column := Column_Position (X);
@@ -1422,8 +1428,8 @@
       Line   : out Line_Position;
       Column : out Column_Position)
    is
-      Y : C_Short := W_Get_Short (Win, Offset_cury);
-      X : C_Short := W_Get_Short (Win, Offset_curx);
+      Y : constant C_Short := W_Get_Short (Win, Offset_cury);
+      X : constant C_Short := W_Get_Short (Win, Offset_curx);
    begin
       Line   := Line_Position (Y);
       Column := Column_Position (X);
@@ -1435,8 +1441,8 @@
       Top_Left_Column    : out Column_Position;
       Is_Not_A_Subwindow : out Boolean)
    is
-      Y : C_Int := W_Get_Int (Win, Offset_pary);
-      X : C_Int := W_Get_Int (Win, Offset_parx);
+      Y : constant C_Int := W_Get_Int (Win, Offset_pary);
+      X : constant C_Int := W_Get_Int (Win, Offset_parx);
    begin
       if Y = -1 then
          Top_Left_Line   := Line_Position'Last;
@@ -1762,7 +1768,8 @@
       pragma Import (C, Winchnstr, "winchnstr");
 
       N   : Integer := Len;
-      Txt : chtype_array (0 .. Str'Length) := (0 => Default_Character);
+      Txt : constant chtype_array (0 .. Str'Length)
+          := (0 => Default_Character);
       Cnt : Natural := 0;
    begin
       if N < 0 then
@@ -2457,7 +2464,7 @@
       pragma Import (C, C_Assume_Default_Colors, "assume_default_colors");
 
       Err : constant C_Int := C_Assume_Default_Colors (C_Int (Fore),
-                                                       C_Int (Black));
+                                                       C_Int (Back));
    begin
       if Err = Curses_Err then
          raise Curses_Exception;
diff -Naur ncurses-5.4.orig/INSTALL ncurses-5.4/INSTALL
--- ncurses-5.4.orig/INSTALL	2004-02-07 21:06:05.000000000 +0000
+++ ncurses-5.4/INSTALL	2005-05-13 04:09:57.000000000 +0000
@@ -1,4 +1,4 @@
--- $Id: INSTALL,v 1.71 2004/02/07 21:06:05 tom Exp $
+-- $Id: INSTALL,v 1.83 2005/04/23 18:27:03 tom Exp $
 ---------------------------------------------------------------------
              How to install Ncurses/Terminfo on your system
 ---------------------------------------------------------------------
@@ -19,12 +19,6 @@
 If you are converting from BSD curses and do not have root access, be sure
 to read the BSD CONVERSION NOTES section below.
 
-If you are using a version of XFree86 xterm older than 3.1.2F, see the section
-on RECENT XTERM VERSIONS below.
-
-If you are trying to build GNU Emacs using ncurses for terminal support,
-read the USING NCURSES WITH EMACS section below.
-
 If you are trying to build applications using gpm with ncurses,
 read the USING NCURSES WITH GPM section below.
 
@@ -45,7 +39,7 @@
 REQUIREMENTS:
 ------------
 
-You will need the following in order to build and install ncurses under UNIX:
+You will need the following to build and install ncurses under UNIX:
 
 	* ANSI C compiler  (gcc, for instance)
 	* sh               (bash will do)
@@ -64,9 +58,10 @@
     with it.
 
     The --prefix option to configure changes the root directory for installing
-    ncurses.  The default is in subdirectories of /usr/local.  Use
-    --prefix=/usr to replace your default curses distribution.  This is the
-    default for Linux and BSD/OS users.
+    ncurses.  The default is normally in subdirectories of /usr/local, except
+    for systems where ncurses is normally installed as a system library, e.g.,
+    Linux, the various BSD systems and Cygwin.  Use --prefix=/usr to replace
+    your default curses distribution.
 
     The package gets installed beneath the --prefix directory as follows:
 
@@ -77,9 +72,20 @@
     In $(prefix)/include:      C header files
     Under $(prefix)/man:       the manual pages
 
-    Note however that the configure script attempts to locate previous
-    installation of ncurses, and will set the default prefix according to where
-    it finds the ncurses headers.
+    Note that the configure script attempts to locate previous installation of
+    ncurses, and will set the default prefix according to where it finds the
+    ncurses headers.
+
+    Do not use commands such as
+
+    	make install prefix=XXX
+
+    to change the prefix after configuration, since the prefix value is used
+    for some absolute pathnames such as TERMINFO.  Instead do this
+
+    	make install DESTDIR=XXX
+
+    See also the discussion of --with-install-prefix.
 
 2.  Type `./configure' in the top-level directory of the distribution to
     configure ncurses for your operating system and create the Makefiles.
@@ -298,6 +304,11 @@
 	For testing, compile-in code that frees memory that normally would not
 	be freed, to simplify analysis of memory-leaks.
 
+    --disable-lp64
+	The header files will ignore use of the _LP64 symbol to make chtype
+	and mmask_t types 32 bits (they may be long on 64-bit hosts, for
+	compatibility with older releases).
+
     --disable-macros
 	For testing, use functions rather than macros.  The program will run
 	more slowly, but it is simpler to debug.  This makes a header file
@@ -379,6 +390,22 @@
 	For testing, generate functions for certain macros to make them visible
 	as such to the debugger.  See also the --disable-macros option.
 
+    --enable-ext-colors
+	Extend the cchar_t structure to allow more than 16 colors to be
+	encoded.  This applies only to the wide-character (--enable-widec)
+	configuration.
+
+	NOTE: this option is not yet complete (2005/1/29).
+
+	NOTE:  using this option will make libraries which are not binary-
+	compatible with libncursesw 5.4.  None of the interfaces change, but
+	applications which have an array of cchar_t's must be recompiled.
+
+    --enable-ext-mouse
+	Modify the encoding of mouse state to make room for a 5th mouse button.
+	That allows one to use ncurses with a wheel mouse with xterm or
+	similar X terminal emulators.
+
     --enable-getcap
 	Use the 4.4BSD getcap code if available, or a bundled version of it to
 	fetch termcap entries.  Entries read in this way cannot use (make
@@ -401,6 +428,9 @@
 	may not be accurate, or that your stty settings have disabled the use
 	of tabs.
 
+    --enable-largefile
+	Modify compiler flags as needed to use large-file interfaces.
+
     --enable-no-padding
 	Compile-in support for the $NCURSES_NO_PADDING environment variable,
 	which allows you to suppress the effect of non-mandatory padding in
@@ -444,9 +474,9 @@
 	Turn on GCC compiler warnings.  There should be only a few.
 
     --enable-widec
-	Compile with experimental wide-character code.  This makes a different
-	version of the libraries (e.g., libncursesw.so), which stores
-	characters as wide-characters,
+	Compile with wide-character code.  This makes a different version of
+	the libraries (e.g., libncursesw.so), which stores characters as
+	wide-characters,
 
 	NOTE: applications compiled with this configuration are not compatible
 	with those built for 8-bit characters.  You cannot simply make a
@@ -551,7 +581,11 @@
     --with-install-prefix=XXX
 	Allows you to specify an alternate location for installing ncurses
 	after building it.  The value you specify is prepended to the "real"
-	install location.  This simplifies making binary packages.
+	install location.  This simplifies making binary packages.  The
+	makefile variable DESTDIR is set by this option.  It is also possible
+	to use
+		make install DESTDIR=XXX
+	since the makefiles pass that variable to subordinate makes.
 
 	NOTE:  a few systems build shared libraries with fixed pathnames; this
 	option probably will not work for those configurations.
@@ -657,12 +691,19 @@
 	Specify a search-list of terminfo directories which will be compiled
 	into the ncurses library (default: DATADIR/terminfo)
 
-    --with-termlib
+    --with-termlib[=XXX]
 	When building the ncurses library, organize this as two parts:  the
 	curses library (libncurses) and the low-level terminfo library
 	(libtinfo).  This is done to accommodate applications that use only
 	the latter.  The terminfo library is about half the size of the total.
 
+	If an option value is given, that overrides the name of the terminfo
+	library.  For instance, if the wide-character version is built, the
+	terminfo library would be named libtinfow.  But the libtinfow interface
+	is upward compatible from libtinfo, so it would be possible to overlay
+	libtinfo.so with a "wide" version of libtinfow.so by renaming it with
+	this option.
+
     --with-termpath=XXX
 	Specify a search-list of termcap files which will be compiled into the
 	ncurses library (default:  /etc/termcap:/usr/share/misc/termcap)
@@ -698,6 +739,11 @@
 	programs (e.g., tic).  The test applications will still be built if you
 	type "make", though not if you simply do "make install".
 
+    --without-xterm-new
+	Tell the configure script to use "xterm-old" for the entry used in
+	the terminfo database.  This will work with variations such as
+	X11R5 and X11R6 xterm.
+
 
 COMPATIBILITY WITH OLDER VERSIONS OF NCURSES:
 --------------------------------------------
@@ -1063,17 +1109,10 @@
 ---------------------
 
 	The terminfo database file included with this distribution assumes you
-	are running an XFree86 xterm based on X11R6 (i.e., xterm-r6).  The
-	earlier X11R5 entry (xterm-r5) is provided as well.
-
-	If you are running XFree86 version 3.2 (actually 3.1.2F and up), you
-	should consider using the xterm-xf86-v32 (or later, the most recent
-	version is always named "xterm-xfree86") entry, which adds ANSI color
-	and the VT220 capabilities which have been added in XFree86.  If you
-	are running a mixed network, however, where this terminal description
-	may be used on an older xterm, you may have problems, since
-	applications that assume these capabilities will produce incorrect
-	output on the older xterm (e.g., highlighting is not cleared).
+	are running a modern xterm based on XFree86 (i.e., xterm-new).  The
+	earlier X11R6 entry (xterm-r6) and X11R5 entry (xterm-r5) is provided
+	as well.  See the --without-xterm-new configure script option if you
+	are unable to update your system.
 
 
 CONFIGURING FALLBACK ENTRIES:
@@ -1186,17 +1225,6 @@
 	can't hard-link across them.  The --enable-symlinks option copes
 	with this by making tic use symbolic links.
 
-USING NCURSES WITH EMACS:
-	GNU Emacs has its own termcap support.  By default, it uses a mixture
-	of those functions and code linked from the host system's libraries.
-	You need to foil this and shut out the GNU termcap library entirely.
-
-	In order to do this, hack the Linux config file (s/linux.h) to contain
-	a #define TERMINFO and set the symbol LIBS_TERMCAP to "-lncurses".
-
-	We have submitted such a change for the 19.30 release, so it may
-	already be applied in your sources -- check for the #define TERMINFO.
-
 USING NCURSES WITH GPM:
 	Ncurses 4.1 and up can be configured to use GPM (General Purpose Mouse)
 	which is used on Linux console.  Be aware that GPM is commonly
@@ -1210,13 +1238,9 @@
 		cc -o foo foo.o -lncurses -lgpm -lncurses
 
 	but the linker may not cooperate, producing mysterious errors.
-	A patched version of gpm is available:
-
-		dickey.his.com:/ncurses/gpm-1.10-970125.tar.gz
+	See the FAQ:
 
-	This patch is incorporated in gpm 1.12; however some integrators
-	are slow to update this library.  Current distributions of gpm can
-	be configured properly using the --without-curses option.
+	http://invisible-island.net/ncurses/ncurses.faq.html#using_gpm_lib
 
 BUILDING NCURSES WITH A CROSS-COMPILER
 	Ncurses can be built with a cross-compiler.  Some parts must be built
diff -Naur ncurses-5.4.orig/MANIFEST ncurses-5.4/MANIFEST
--- ncurses-5.4.orig/MANIFEST	2004-01-03 23:04:44.000000000 +0000
+++ ncurses-5.4/MANIFEST	2005-05-13 04:09:58.000000000 +0000
@@ -433,6 +433,7 @@
 ./doc/ncurses-intro.doc
 ./form/Makefile.in
 ./form/READ.ME
+./form/f_trace.c
 ./form/fld_arg.c
 ./form/fld_attr.c
 ./form/fld_current.c
@@ -663,6 +664,7 @@
 ./menu/m_scale.c
 ./menu/m_spacing.c
 ./menu/m_sub.c
+./menu/m_trace.c
 ./menu/m_userptr.c
 ./menu/m_win.c
 ./menu/menu.h
@@ -677,11 +679,13 @@
 ./misc/emx.src
 ./misc/form.def
 ./misc/form.ref
-./misc/indent.pro
+./misc/gen_edit.sh
+./misc/jpf-indent
 ./misc/makedef.cmd
 ./misc/makellib
 ./misc/menu.def
 ./misc/menu.ref
+./misc/ncu-indent
 ./misc/ncurses.def
 ./misc/ncurses.ref
 ./misc/panel.def
@@ -738,6 +742,7 @@
 ./ncurses/base/lib_initscr.c
 ./ncurses/base/lib_insch.c
 ./ncurses/base/lib_insdel.c
+./ncurses/base/lib_insnstr.c
 ./ncurses/base/lib_instr.c
 ./ncurses/base/lib_isendwin.c
 ./ncurses/base/lib_leaveok.c
@@ -958,6 +963,7 @@
 ./test/demo_keyok.c
 ./test/demo_menus.c
 ./test/demo_panels.c
+./test/demo_termcap.c
 ./test/ditto.c
 ./test/dots.c
 ./test/edit_field.c
@@ -973,6 +979,7 @@
 ./test/inserts.c
 ./test/keynames.c
 ./test/knight.c
+./test/linux-color.dat
 ./test/listused.sh
 ./test/lrtest.c
 ./test/modules
@@ -990,3 +997,5 @@
 ./test/view.c
 ./test/worm.c
 ./test/xmas.c
+./test/xterm-16color.dat
+./test/xterm-88color.dat
diff -Naur ncurses-5.4.orig/Makefile.in ncurses-5.4/Makefile.in
--- ncurses-5.4.orig/Makefile.in	2001-10-27 18:17:22.000000000 +0000
+++ ncurses-5.4/Makefile.in	2005-05-13 04:09:49.000000000 +0000
@@ -1,6 +1,6 @@
-# $Id: Makefile.in,v 1.22 2001/10/27 18:17:22 tom Exp $
+# $Id: Makefile.in,v 1.24 2005/01/29 19:30:06 tom Exp $
 ##############################################################################
-# Copyright (c) 1998 Free Software Foundation, Inc.                          #
+# Copyright (c) 1998-2004,2005 Free Software Foundation, Inc.                #
 #                                                                            #
 # Permission is hereby granted, free of charge, to any person obtaining a    #
 # copy of this software and associated documentation files (the "Software"), #
@@ -65,6 +65,9 @@
 	@ echo ''
 	@ echo '** Configuration summary for NCURSES $(NCURSES_MAJOR).$(NCURSES_MINOR) $(NCURSES_PATCH):'
 	@ echo ''
+	@ echo '     extended funcs: '`test @NCURSES_EXT_FUNCS@ != 0 && echo yes || echo no`
+	@ echo '     xterm terminfo: '@WHICH_XTERM@
+	@ echo ''
 	@ echo '      bin directory: '$(bindir)
 	@ echo '      lib directory: '$(libdir)
 	@ echo '  include directory: '$(includedir)
@@ -89,5 +92,6 @@
 realclean \
 depend \
 sources \
+tags \
 uninstall \
 install ::
diff -Naur ncurses-5.4.orig/NEWS ncurses-5.4/NEWS
--- ncurses-5.4.orig/NEWS	2004-02-08 21:15:26.000000000 +0000
+++ ncurses-5.4/NEWS	2005-05-13 04:09:59.000000000 +0000
@@ -1,4 +1,4 @@
--- $Id: NEWS,v 1.797 2004/02/08 21:15:26 tom Exp $
+-- $Id: NEWS,v 1.894 2005/05/07 23:44:35 tom Exp $
 
 This is a log of changes that ncurses has gone through since Zeyd started
 working with Pavel Curtis' original work, pcurses, in 1992.
@@ -6,6 +6,598 @@
 Changes through 1.9.9e are recorded by Zeyd M. Ben-Halim.
 Changes since 1.9.9e are recorded by Thomas Dickey.
 
+20050507
+	+ regenerated html documentation for manpages.
+	+ add $(BUILD_EXEEXT) suffix to invocation of make_keys in
+	  ncurses/Makefile (Gentoo #89772).
+	+ modify c++/demo.cc to build with g++ -fno-implicit-templates option
+	  (patch by Mike Frysinger).
+	+ modify tic to filter out long extended names when translating to
+	  termcap format.  Only two characters are permissible for termcap
+	  capability names.
+
+20050430
+	+ modify terminfo entries xterm-new and rxvt to add strings for
+	  shift-, control-cursor keys.
+	+ workaround to allow c++ binding to compile with g++ 2.95.3, which
+	  has a broken implementation of static_cast<> (patch by Jeff Chua).
+	+ modify initialization of key lookup table so that if an extended
+	  capability (tic -x) string is defined, and its name begins with 'k',
+	  it will automatically be treated as a key.
+	+ modify test/keynames.c to allow for the possibility of extended
+	  key names, e.g., via define_key(), or via "tic -x".
+	+ add test/demo_termcap.c to show the contents of given entry via the
+	  termcap interface.
+
+20050423
+	+ minor fixes for vt100/vt52 entries -TD
+	+ add configure option --enable-largefile
+	+ corrected libraries used to build Ada95/gen/gen, found in testing
+	  gcc 4.0.0.
+
+20050416
+	+ update config.guess, config.sub
+	+ modify configure script check for _XOPEN_SOURCE, disable that on
+	  Darwin whose header files have problems (patch by Chris Zubrzycki).
+	+ modify form library Is_Printable_String() to use iswprint() rather
+	  than wcwidth() for determining if a character is printable.  The
+	  latter caused it to reject menu items containing non-spacing
+	  characters.
+	+ modify ncurses test program's F-test to handle non-spacing characters
+	  by combining them with a reverse-video blank.
+	+ review/fix several gcc -Wconversion warnings.
+
+20050409
+	+ correct an off-by-one error in m_driver() for mouse-clicks used to
+	  position the mouse to a particular item.
+	+ implement test/demo_menus.c
+	+ add some checks in lib_mouse to ensure SP is set.
+	+ modify C++ binding to make 20050403 changes work with the configure
+	  --enable-const option.
+
+20050403
+	+ modify start_color() to return ERR if it cannot allocate memory.
+	+ address g++ compiler warnings in C++ binding by adding explicit
+	  member initialization, assignment operators and copy constructors.
+	  Most of the changes simply preserve the existing semantics of the
+	  binding, which can leak memory, etc., but by making these features
+	  visible, it provides a framework for improving the binding.
+	+ improve C++ binding using static_cast, etc.
+	+ modify configure script --enable-warnings to add options to g++ to
+	  correspond to the gcc --enable-warnings.
+	+ modify C++ binding to use some C internal functions to make it
+	  compile properly on Solaris (and other platforms).
+
+20050327
+	+ amend change from 20050320 to limit it to configurations with a
+	  valid locale.
+	+ fix a bug introduced in 20050320 which broke the translation of
+	  nonprinting characters to uparrow form (report by TAKAHASHI Tamotsu).
+
+20050326
+	+ add ifdef's for _LP64 in curses.h to avoid using wasteful 64-bits for
+	  chtype and mmask_t, but add configure option --disable-lp64 in case
+	  anyone used that configuration.
+	+ update misc/shlib script to account for Mac OS X (report by Michail
+	  Vidiassov).
+	+ correct comparison for wrapping multibyte characters in
+	  waddch_literal() (report by TAKAHASHI Tamotsu).
+
+20050320
+	+ add -c and -w options to tset to allow user to suppress ncurses'
+	  resizing of the terminal emulator window in the special case where it
+	  is not able to detect the true size (report by Win Delvaux, Debian
+	  #300419).
+	+ modify waddch_nosync() to account for locale zn_CH.GBK, which uses
+	  codes 128-159 as part of multibyte characters (report by WANG
+	  WenRui, Debian #300512).
+
+20050319
+	+ modify ncurses.c 'd' test to make it work with 88-color
+	  configuration, i.e., by implementing scrolling.
+	+ improve scrolling in ncurses.c 'c' and 'C' tests, e.g., for 88-color
+	  configuration.
+
+20050312
+	+ change tracemunch to use strict checking.
+	+ modify ncurses.c 'p' test to test line-drawing within a pad.
+	+ implement environment variable NCURSES_NO_UTF8_ACS to support
+	  miscellaneous terminal emulators which ignore alternate character
+	  set escape sequences when in UTF-8 mode.
+
+20050305
+	+ change NCursesWindow::err_handler() to a virtual function (request by
+	  Steve Beal).
+	+ modify ftp_int.c and fty_num.c to handle wide characters (report by
+	  Wolfgang Gutjahr).
+	+ adapt fix for fty_alpha.c to fty_alnum.c, which also handled normal
+	  and wide characters inconsistently (report by Wolfgang Gutjahr).
+	+ update llib-* files to reflect internal interface additions/changes.
+
+20050226
+	+ improve test/configure script, adding tests for _XOPEN_SOURCE, etc.,
+	  from lynx.
+	+ add aixterm-16color terminfo entry -TD
+	+ modified xterm-new terminfo entry to work with tgetent() changes -TD
+	+ extended changes in tgetent() from 20040710 to allow the substring of
+	  sgr0 which matches rmacs to be at the beginning of the sgr0 string
+	  (request by Thomas Wolff, who says the visual effect in combination
+	  with pre-20040710 ncurses is improved).
+	+ fix off-by-one in winnstr() call which caused form field validation
+	  of multibyte characters to ignore the last character in a field.
+	+ correct logic in winsch() for inserting multibyte strings; the code
+	  would clear cells after the insertion rather than push them to the
+	  right (cf: 20040228).
+	+ fix an inconsistency in Check_Alpha_Field() between normal and wide
+	  character logic (report by Wolfgang Gutjahr).
+
+20050219
+	+ fix a bug in editing wide-characters in form library: deleting a
+	  nonwide character modified the previous wide-character.
+	+ update manpage to describe NCURSES_MOUSE_VERSION 2.
+	+ correct manpage description of mouseinterval() (Debian #280687).
+	+ add a note to default_colors.3x explaining why this extension was
+	  added (Debian #295083).
+	+ add traces to panel library.
+
+20050212
+	+ improve editing of wide-characters in form library:  left/right
+	  cursor movement, and single-character deletions work properly.
+	+ disable GPM mouse support when $TERM happens to be prefixed with
+	  "xterm".  Gpm_Open() would otherwise assert that it can deal with
+	  mouse events in this case.
+	+ modify GPM mouse support so it closes the server connection when
+	  the caller disables the mouse (report by Stanislav Ievlev).
+
+20050205
+	+ add traces for callback functions in form library.
+	+ add experimental configure option --enable-ext-mouse, which defines
+	  NCURSES_MOUSE_VERSION 2, and modifies the encoding of mouse events to
+	  support wheel mice, which may transmit buttons 4 and 5.  This works
+	  with xterm and similar X terminal emulators (prompted by question by
+	  Andreas Henningsson, this is also related to Debian #230990).
+	+ improve configure macros CF_XOPEN_SOURCE and CF_POSIX_C_SOURCE to
+	  avoid redefinition warnings on cygwin.
+
+20050129
+	+ merge remaining development changes for extended colors (mostly
+	  complete, does not appear to break other configurations).
+	+ add xterm-88color.dat (part of extended colors testing).
+	+ improve _tracedump() handling of color pairs past 96. 
+	+ modify return-value from start_color() to return OK if colors have
+	  already been started.
+	+ modify curs_color.3x list error conditions for init_pair(),
+	  pair_content() and color_content().
+	+ modify pair_content() to return -1 for consistency with init_pair()
+	  if it corresponds to the default-color.
+	+ change internal representation of default-color to allow application
+	  to use color number 255.  This does not affect the total number of
+	  color pairs which are allowed.
+	+ add a top-level tags rule.
+
+20050122
+	+ add a null-pointer check in wgetch() in case it is called without
+	  first calling initscr().
+	+ add some null-pointer checks for SP, which is not set by libtinfo.
+	+ modify misc/shlib to ensure that absolute pathnames are used.
+	+ modify test/Makefile.in, etc., to link test programs only against the
+	  libraries needed, e.g., omit form/menu/panel library for the ones
+	  that are curses-specific.
+	+ change SP->_current_attr to a pointer, adjust ifdef's to ensure that
+	  libtinfo.so and libtinfow.so have the same ABI.  The reason for this
+	  is that the corresponding data which belongs to the upper-level
+	  ncurses library has a different size in each model (report by
+	  Stanislav Ievlev).
+
+20050115
+	+ minor fixes to allow test-compiles with g++.
+	+ correct column value shown in tic's warnings, which did not account
+	  for leading whitespace.
+	+ add a check in _nc_trans_string() for improperly ended strings, i.e.,
+	  where a following line begins in column 1.
+	+ modify _nc_save_str() to return a null pointer on buffer overflow.
+	+ improve repainting while scrolling wide-character data (Eungkyu Song).
+
+20050108
+	+ merge some development changes to extend color capabilities.
+
+20050101
+	+ merge some development changes to extend color capabilities.
+	+ fix manpage typo (FreeBSD report docs/75544).
+	+ update config.guess, config.sub
+	> patches by Albert Chin-A-Young (for configure script):
+	+ improved fix to make mbstate_t recognized on HPUX 11i (cf: 
+	  20030705), making vsscanf() prototype visible on IRIX64.  Tested for
+	  on HP-UX 11i, Solaris 7, 8, 9, AIX 4.3.3, 5.2, Tru64 UNIX 4.0D, 5.1,
+	  IRIX64 6.5, Redhat Linux 7.1, 9, and RHEL 2.1, 3.0.
+	+ print the result of the --disable-home-terminfo option.
+	+ use -rpath when compiling with SGI C compiler.
+
+20041225
+	+ add trace calls to remaining public functions in form and menu
+	  libraries.
+	+ fix check for numeric digits in test/ncurses.c 'b' and 'B' tests.
+	+ fix typo in test/ncurses.c 'c' test from 20041218.
+
+20041218
+	+ revise test/ncurses.c 'c' color test to improve use for xterm-88color
+	  and xterm-256color, added 'C' test using the wide-character color_set
+	  and attr_set functions.
+
+20041211
+	+ modify configure script to work with Intel compiler.
+	+ fix an limit-check in wadd_wchnstr() which caused labels in the
+	  forms-demo to be one character short.
+	+ fix typo in curs_addchstr.3x (Jared Yanovich).
+	+ add trace calls to most functions in form and menu libraries.
+	+ update working-position for adding wide-characters when window is
+	  scrolled (prompted by related report by Eungkyu Song).
+
+20041204
+	+ replace some references on Linux to wcrtomb() which use it to obtain
+	  the length of a multibyte string with _nc_wcrtomb, since wcrtomb() is
+	  broken in glibc (see Debian #284260).
+	+ corrected length-computation in wide-character support for
+	  field_buffer().
+	+ some fixes to frm_driver.c to allow it to accept multibyte input.
+	+ modify configure script to work with Intel 8.0 compiler.
+
+20041127
+	+ amend change to setupterm() in 20030405 which would reuse the value
+	  of cur_term if the same output was selected.  This now reuses it only
+	  when setupterm() is called from tgetent(), which has no notion of
+	  separate SCREENs.  Note that tgetent() must be called after initscr()
+	  or newterm() to use this feature (Redhat Bugzilla #140326).
+	+ add a check in CF_BUILD_CC macro to ensure that developer has given
+	  the --with-build-cc option when cross-compiling (report by Alexandre
+	  Campo).
+	+ improved configure script checks for _XOPEN_SOURCE and
+	  _POSIX_C_SOURCE (fix for IRIX 5.3 from Georg Schwarz, _POSIX_C_SOURCE
+	  updates from lynx).
+	+ cosmetic fix to test/gdc.c to recolor the bottom edge of the box
+	  for consistency (comment by Dan Nelson).
+
+20041120
+	+ update wsvt25 terminfo entry -TD
+	+ modify test/ins_wide.c to test all flavors of ins_wstr().
+	+ ignore filler-cells in wadd_wchnstr() when adding a cchar_t array
+	  which consists of multi-column characters, since this function
+	  constructs them (cf: 20041023).
+	+ modify winnstr() to return multibyte character strings for the
+	  wide-character configuration.
+
+20041106
+	+ fixes to make slk_set() and slk_wset() accept and store multibyte
+	  or multicolumn characters.
+
+20041030
+	+ improve color optimization a little by making _nc_do_color() check
+	  if the old/new pairs are equivalent to the default pair 0.
+	+ modify assume_default_colors() to not require that
+	  use_default_colors() be called first.
+
+20041023
+	+ modify term_attrs() to use termattrs(), add the extended attributes
+	  such as enter_horizontal_hl_mode for WA_HORIZONTAL to term_attrs().
+	+ add logic in waddch_literal() to clear orphaned cells when one
+	  multi-column character partly overwrites another.
+	+ improved logic for clearing cells when a multi-column character
+	  must be wrapped to a new line.
+	+ revise storage of cells for multi-column characters to correct a
+	  problem with repainting.  In the old scheme, it was possible for
+	  doupdate() to decide that only part of a multi-column character
+	  should be repainted since the filler cells stored only an attribute
+	  to denote them as fillers, rather than the character value and the
+	  attribute.
+
+20041016
+	+ minor fixes for traces.
+	+ add SP->_screen_acs_map[], used to ensure that mapping of missing
+	  line-drawing characters is handled properly.  For example, ACS_DARROW
+	  is absent from xterm-new, and it was coincidentally displayed the
+	  same as ACS_BTEE.
+
+20041009
+	+ amend 20021221 workaround for broken acs to reset the sgr, rmacs
+	  and smacs strings as well.  Also modify the check for screen's
+	  limitations in that area to allow the multi-character shift-in
+	  and shift-out which seem to work.
+	+ change GPM initialization, using dl library to load it dynamically
+	  at runtime (Debian #110586).
+
+20041002
+	+ correct logic for color pair in setcchar() and getcchar() (patch by
+	  Marcin 'Qrczak' Kowalczyk).
+	+ add t/T commands to ncurses b/B tests to allow a different color to
+	  be tested for the attrset part of the test than is used in the
+	  background color.
+
+20040925
+	+ fix to make setcchar() to work when its wchar_t* parameter is
+	  pointing to a string which contains more data than can be converted.
+	+ modify wget_wstr() and example in ncurses.c to work if wchar_t and
+	  wint_t are different sizes (report by Marcin 'Qrczak' Kowalczyk).
+
+20040918
+	+ remove check in wget_wch() added to fix an infinite loop, appears to
+	  have been working around a transitory glibc bug, and interferes
+	  with normal operation (report by Marcin 'Qrczak' Kowalczyk).
+	+ correct wadd_wch() and wecho_wch(), which did not pass the rendition
+	  information (report by Marcin 'Qrczak' Kowalczyk).
+	+ fix aclocal.m4 so that the wide-character version of ncurses gets
+	  compiled as libncursesw.5.dylib, instead of libncurses.5w.dylib
+	  (adapted from patch by James J Ramsey).
+	+ change configure script for --with-caps option to indicate that it
+	  is no longer experimental.
+	+ change configure script to reflect the fact that --enable-widec has
+	  not been "experimental" since 5.3 (report by Bruno Lustosa).
+
+20040911
+	+ add 'B' test to ncurses.c, to exercise some wide-character functions.
+
+20040828
+	+ modify infocmp -i option to match 8-bit controls against its table
+	  entries, e.g., so it can analyze the xterm-8bit entry.
+	+ add morphos terminfo entry, improve amiga-8bit entry (Pavel Fedin).
+	+ correct translation of "%%" in terminfo format to termcap, e.g.,
+	  using "tic -C" (Redhat Bugzilla #130921).
+	+ modified configure script CF_XOPEN_SOURCE macro to ensure that if
+	  it defines _POSIX_C_SOURCE, that it defines it to a specific value
+	  (comp.os.stratus newsgroup comment).
+
+20040821
+	+ fixes to build with Ada95 binding with gnat 3.4 (all warnings are
+	  fatal, and gnat does not follow the guidelines for pragmas).
+	  However that did find a coding error in Assume_Default_Colors().
+	+ modify several terminfo entries to ensure xterm mouse and cursor
+	  visibility are reset in rs2 string:  hurd, putty, gnome,
+	  konsole-base, mlterm, Eterm, screen (Debian #265784, #55637).  The
+	  xterm entries are left alone - old ones for compatibility, and the
+	  new ones do not require this change. -TD
+
+20040814
+	+ fake a SIGWINCH in newterm() to accommodate buggy terminal emulators
+	  and window managers (Debian #265631).
+	> terminfo updates -TD
+	+ remove dch/dch1 from rxvt because they are implemented inconsistently
+	  with the common usage of bce/ech
+	+ remove khome from vt220 (vt220's have no home key)
+	+ add rxvt+pcfkeys
+
+20040807
+	+ modify test/ncurses.c 'b' test, adding v/V toggles to cycle through
+	  combinations of video attributes so that for instance bold and
+	  underline can be tested.  This made the legend too crowded, added
+	  a help window as well.
+	+ modify test/ncurses.c 'b' test to cycle through default colors if
+	  the -d option is set.
+	+ update putty terminfo entry (Robert de Bath).
+
+20040731
+	+ modify test/cardfile.c to allow it to read more data than can be
+	  displayed.
+	+ correct logic in resizeterm.c which kept it from processing all
+	  levels of window hierarchy (reports by Folkert van Heusden,
+	  Chris Share).
+
+20040724
+	+ modify "tic -cv" to ignore delays when comparing strings.  Also
+	  modify it to ignore a canceled sgr string, e.g., for terminals which
+	  cannot properly combine attributes in one control sequence.
+	+ corrections for gnome and konsole entries (Redhat Bugzilla #122815,
+	  patch by Hans de Goede)
+	> terminfo updates -TD
+	+ make ncsa-m rmacs/smacs consistent with sgr
+	+ add sgr, rc/sc and ech to syscons entries
+	+ add function-keys to decansi
+	+ add sgr to mterm-ansi
+	+ add sgr, civis, cnorm to emu
+	+ correct/simplify cup in addrinfo
+
+20040717
+	> terminfo updates -TD
+	+ add xterm-pc-fkeys
+	+ review/update gnome and gnome-rh90 entries (prompted by Redhat
+	  Bugzilla #122815).
+	+ review/update konsole entries
+	+ add sgr, correct sgr0 for kterm and mlterm
+	+ correct tsl string in kterm
+
+20040711
+	+ add configure option --without-xterm-new
+
+20040710
+	+ add check in wget_wch() for printable bytes that are not part of a
+	  multibyte character.
+	+ modify wadd_wchnstr() to render text using window's background
+	  attributes.
+	+ improve tic's check to compare sgr and sgr0.
+	+ fix c++ directory's .cc.i rule.
+	+ modify logic in tgetent() which adjusts the termcap "me" string
+	  to work with ISO-2022 string used in xterm-new (cf: 20010908).
+	+ modify tic's check for conflicting function keys to omit that if
+	  converting termcap to termcap format.
+	+ add -U option to tic and infocmp.
+	+ add rmam/smam to linux terminfo entry (Trevor Van Bremen)
+	> terminfo updates -TD
+	+ minor fixes for emu
+	+ add emu-220
+	+ change wyse acsc strings to use 'i' map rather than 'I'
+	+ fixes for avatar0
+	+ fixes for vp3a+
+
+20040703
+	+ use tic -x to install terminfo database -TD
+	+ add -x to infocmp's usage message.
+	+ correct field used for comparing O_ROWMAJOR in set_menu_format()
+	  (report/patch by Tony Li).
+	+ fix a missing nul check in set_field_buffer() from 20040508 changes.
+	> terminfo updates -TD
+	  + make xterm-xf86-v43 derived from xterm-xf86-v40 rather than
+	    xterm-basic -TD
+	  + align with xterm patch #192's use of xterm-new -TD
+	  + update xterm-new and xterm-8bit for cvvis/cnorm strings -TD
+	  + make xterm-new the default "xterm" entry -TD
+
+20040626
+	+ correct BUILD_CPPFLAGS substitution in ncurses/Makefile.in, to allow
+	  cross-compiling from a separate directory tree (report/patch by
+	  Dan Engel).
+	+ modify is_term_resized() to ensure that window sizes are nonzero,
+	  as documented in the manpage (report by Ian Collier).
+	+ modify CF_XOPEN_SOURCE configure macro to make Hurd port build
+	  (Debian #249214, report/patch by Jeff Bailey).
+	+ configure-script mods from xterm, e.g., updates to CF_ADD_CFLAGS
+	+ update config.guess, config.sub
+	> terminfo updates -TD
+	  + add mlterm
+	  + add xterm-xf86-v44
+	  + modify xterm-new aka xterm-xfree86 to accommodate luit, which
+	    relies on G1 being used via an ISO-2022 escape sequence (report by
+	    Juliusz Chroboczek)
+	  + add 'hurd' entry
+
+20040619
+	+ reconsidered winsnstr(), decided after comparing other
+	  implementations that wrapping is an X/Open documentation error.
+	+ modify test/inserts.c to test all flavors of insstr().
+
+20040605
+	+ add setlocale() calls to a few test programs which may require it:
+	  demo_forms.c, filter.c, ins_wide.c, inserts.c
+	+ correct a few misspelled function names in ncurses-intro.html (report
+	  by Tony Li).
+	+ correct internal name of key_defined() manpage, which conflicted with
+	  define_key().
+
+20040529
+	+ correct size of internal pad used for holding wide-character
+	  field_buffer() results.
+	+ modify data_ahead() to work with wide-characters.
+
+20040522
+	+ improve description of terminfo if-then-else expressions (suggested
+	  by Arne Thomassen).
+	+ improve test/ncurses.c 'd' test, allow it to use external file for
+	  initial palette (added xterm-16color.dat and linux-color.dat), and
+	  reset colors to the initial palette when starting/ending the test.
+	+ change limit-check in init_color() to allow r/g/b component to
+	  reach 1000 (cf: 20020928).
+
+20040516
+	+ modify form library to use cchar_t's rather than char's in the
+	  wide-character configuration for storing data for field buffers.
+	+ correct logic of win_wchnstr(), which did not work for more than
+	  one cell.
+
+20040508
+	+ replace memset/memcpy usage in form library with for-loops to
+	  simplify changing the datatype of FIELD.buf, part of wide-character
+	  changes.
+	+ fix some inconsistent use of #if/#ifdef (report by Alain Guibert).
+
+20040501
+	+ modify menu library to account for actual number of columns used by
+	  multibyte character strings, in the wide-character configuration
+	  (adapted from patch by Philipp Tomsich).
+	+ add "-x" option to infocmp like tic's "-x", for use in "-F"
+	  comparisons.  This modifies infocmp to only report extended
+	  capabilities if the -x option is given, making this more consistent
+	  with tic.  Some scripts may break, since infocmp previous gave this
+	  information without an option.
+	+ modify termcap-parsing to retain 2-character aliases at the beginning
+	  of an entry if the "-x" option is used in tic.
+
+20040424
+	+ minor compiler-warning and test-program fixes.
+
+20040417
+	+ modify tic's missing-sgr warning to apply to terminfo only.
+	+ free some memory leaks in tic.
+	+ remove check in post_menu() that prevented menus from extending
+	  beyond the screen (request by Max J. Werner).
+	+ remove check in newwin() that prevents allocating windows
+	  that extend beyond the screen.  Solaris curses does this.
+	+ add ifdef in test/color_set.c to allow it to compile with older
+	  curses.
+	+ add napms() calls to test/dots.c to make it not be a CPU hog.
+
+20040403
+	+ modify unctrl() to return null if its parameter does not correspond
+	  to an unsigned char.
+	+ add some limit-checks to guard isprint(), etc., from being used on
+	  values that do not fit into an unsigned char (report by Sami Farin).
+
+20040328
+	+ fix a typo in the _nc_get_locale() change.
+
+20040327
+	+ modify _nc_get_locale() to use setlocale() to query the program's
+	  current locale rather than using getenv().  This fixes a case in tin
+	  which relies on legacy treatment of 8-bit characters when the locale
+	  is not initialized (reported by Urs Jansen).
+	+ add sgr string to screen's and rxvt's terminfo entries -TD.
+	+ add a check in tic for terminfo entries having an sgr0 but no sgr
+	  string.  This confuses Tru64 and HPUX curses when combined with
+	  color, e.g., making them leave line-drawing characters in odd places.
+	+ correct casts used in ABSENT_BOOLEAN, CANCELLED_BOOLEAN, matches the
+	  original definitions used in Debian package to fix PowerPC bug before
+	  20030802 (Debian #237629).
+
+20040320
+	+ modify PutAttrChar() and PUTC() macro to improve use of
+	  A_ALTCHARSET attribute to prevent line-drawing characters from
+	  being lost in situations where the locale would otherwise treat the
+	  raw data as nonprintable (Debian #227879).
+
+20040313
+	+ fix a redefinition of CTRL() macro in test/view.c for AIX 5.2 (report
+	  by Jim Idle).
+	+ remove ".PP" after ".SH NAME" in a few manpages; this confuses
+	  some apropos script (Debian #237831).
+
+20040306
+	+ modify ncurses.c 'r' test so editing commands, like inserted text,
+	  set the field background, and the state of insert/overlay editing
+	  mode is shown in that test.
+	+ change syntax of dummy targets in Ada95 makefiles to work with pmake.
+	+ correct logic in test/ncurses.c 'b' for noncolor terminals which
+	  did not recognize a quit-command (cf: 20030419).
+
+20040228
+	+ modify _nc_insert_ch() to allow for its input to be part of a
+	  multibyte string.
+	+ split out lib_insnstr.c, to prepare to rewrite it.  X/Open states
+	  that this function performs wrapping, unlike all of the other
+	  insert-functions.  Currently it does not wrap.
+	+ check for nl_langinfo(CODESET), use it if available (report by
+	  Stanislav Ievlev).
+	+ split-out CF_BUILD_CC macro, actually did this for lynx first.
+	+ fixes for configure script CF_WITH_DBMALLOC and CF_WITH_DMALLOC,
+	  which happened to work with bash, but not with Bourne shell (report
+	  by Marco d'Itri via tin-dev).
+
+20040221
+	+ some changes to adapt the form library to wide characters, incomplete
+	  (request by Mike Aubury).
+	+ add symbol to curses.h which can be used to suppress include of
+	  stdbool.h, e.g.,
+	  	#define NCURSES_ENABLE_STDBOOL_H 0
+		#include <curses.h>
+	  (discussion on XFree86 mailing list).
+
+20040214
+	+ modify configure --with-termlib option to accept a value which sets
+	  the name of the terminfo library.  This would allow a packager to
+	  build libtinfow.so renamed to coincide with libtinfo.so (discussion
+	  with Stanislav Ievlev).
+	+ improve documentation of --with-install-prefix, --prefix and
+	  $(DESTDIR) in INSTALL (prompted by discussion with Paul Lew).
+	+ add configure check if the compiler can use -c -o options to rename
+	  its output file, use that to omit the 'cd' command which was used to
+	  ensure object files are created in a separate staging directory
+	  (prompted by comments by Johnny Wezel, Martin Mokrejs).
+
 20040208 5.4 release for upload to ftp.gnu.org
 	+ update TO-DO.
 
@@ -6014,7 +6606,8 @@
 	+ added has_key()
 	+ added 't' to ncurses.c test.
 	+ moved delay_output() to lib_tputs.c
-	+ removed tparam().
+	+ removed tparam() (was added in 1.9.9, but conflicts with emacs and
+	  is not part of X/Open Curses).
 	+ misc cursor & optimization fixes.
 
 960504	- snapshot
diff -Naur ncurses-5.4.orig/README ncurses-5.4/README
--- ncurses-5.4.orig/README	2003-02-08 19:36:39.000000000 +0000
+++ ncurses-5.4/README	2005-05-13 04:09:49.000000000 +0000
@@ -1,4 +1,4 @@
--- $Id: README,v 1.21 2003/02/08 19:36:39 tom Exp $
+-- $Id: README,v 1.22 2004/08/07 23:42:43 tom Exp $
 -------------------------------------------------------------------------------
 		README file for the ncurses package
 
@@ -64,7 +64,7 @@
 In the `Ada95' directory, you'll find code and documentation for an
 Ada95 binding of the curses API, to be used with the GNAT compiler.
 This binding is built by a normal top-level `make' if configure detects
-an usable version of GNAT (3.10 or above). It is not installed automatically.
+an usable version of GNAT (3.11 or above). It is not installed automatically.
 See the Ada95 directory for more build and installation instructions and
 for documentation of the binding.
 
diff -Naur ncurses-5.4.orig/TO-DO ncurses-5.4/TO-DO
--- ncurses-5.4.orig/TO-DO	2004-02-08 21:09:00.000000000 +0000
+++ ncurses-5.4/TO-DO	2005-05-13 04:09:49.000000000 +0000
@@ -1,4 +1,4 @@
--- $Id: TO-DO,v 1.43 2004/02/08 21:09:00 tom Exp $
+-- $Id: TO-DO,v 1.44 2004/03/07 02:04:20 tom Exp $
 
 SHORT-TERM TO-DO ITEMS:
 
@@ -6,9 +6,6 @@
 
 * The form/menu libraries do not use wide-character features.
 
-* Some users would like to build a single version of libtinfo which can be
-  used from either libncursesw or libncurses.
-
 * libtool does not work with GNAT.
 
 * The screen optimization has been tested only in an ad hoc manner.  We should
diff -Naur ncurses-5.4.orig/aclocal.m4 ncurses-5.4/aclocal.m4
--- ncurses-5.4.orig/aclocal.m4	2004-01-30 20:59:56.000000000 +0000
+++ ncurses-5.4/aclocal.m4	2005-05-13 04:09:56.000000000 +0000
@@ -1,5 +1,5 @@
 dnl***************************************************************************
-dnl Copyright (c) 1998-2003,2004 Free Software Foundation, Inc.              *
+dnl Copyright (c) 1998-2004,2005 Free Software Foundation, Inc.              *
 dnl                                                                          *
 dnl Permission is hereby granted, free of charge, to any person obtaining a  *
 dnl copy of this software and associated documentation files (the            *
@@ -26,15 +26,38 @@
 dnl authorization.                                                           *
 dnl***************************************************************************
 dnl
-dnl Author: Thomas E. Dickey 1995-2003
+dnl Author: Thomas E. Dickey 1995-on
 dnl
-dnl $Id: aclocal.m4,v 1.333 2004/01/30 20:59:56 tom Exp $
+dnl $Id: aclocal.m4,v 1.354 2005/04/16 23:08:58 tom Exp $
 dnl Macros used in NCURSES auto-configuration script.
 dnl
 dnl See http://invisible-island.net/autoconf/ for additional information.
 dnl
 dnl ---------------------------------------------------------------------------
 dnl ---------------------------------------------------------------------------
+dnl AM_LANGINFO_CODESET version: 3 updated: 2002/10/27 23:21:42
+dnl -------------------
+dnl Inserted as requested by gettext 0.10.40
+dnl File from /usr/share/aclocal
+dnl codeset.m4
+dnl ====================
+dnl serial AM1
+dnl
+dnl From Bruno Haible.
+AC_DEFUN([AM_LANGINFO_CODESET],
+[
+  AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
+    [AC_TRY_LINK([#include <langinfo.h>],
+      [char* cs = nl_langinfo(CODESET);],
+      am_cv_langinfo_codeset=yes,
+      am_cv_langinfo_codeset=no)
+    ])
+  if test $am_cv_langinfo_codeset = yes; then
+    AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
+      [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
+  fi
+])dnl
+dnl ---------------------------------------------------------------------------
 dnl CF_ADA_INCLUDE_DIRS version: 4 updated: 2002/12/01 00:12:15
 dnl -------------------
 dnl Construct the list of include-options for the C programs in the Ada95
@@ -59,18 +82,44 @@
 AC_SUBST(ACPPFLAGS)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_ADD_CFLAGS version: 5 updated: 2002/12/01 00:12:15
+dnl CF_ADD_CFLAGS version: 7 updated: 2004/04/25 17:48:30
 dnl -------------
 dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGS
 dnl The second parameter if given makes this macro verbose.
+dnl
+dnl Put any preprocessor definitions that use quoted strings in $EXTRA_CPPFLAGS,
+dnl to simplify use of $CPPFLAGS in compiler checks, etc., that are easily
+dnl confused by the quotes (which require backslashes to keep them usable).
 AC_DEFUN([CF_ADD_CFLAGS],
 [
+cf_fix_cppflags=no
 cf_new_cflags=
 cf_new_cppflags=
+cf_new_extra_cppflags=
+
 for cf_add_cflags in $1
 do
+case $cf_fix_cppflags in
+no)
 	case $cf_add_cflags in #(vi
 	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
+		case $cf_add_cflags in
+		-D*)
+			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[[^=]]*='\''\"[[^"]]*//'`
+
+			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+			&& test -z "${cf_tst_cflags}" \
+			&& cf_fix_cppflags=yes
+
+			if test $cf_fix_cppflags = yes ; then
+				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+				continue
+			elif test "${cf_tst_cflags}" = "\"'" ; then
+				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+				continue
+			fi
+			;;
+		esac
 		case "$CPPFLAGS" in
 		*$cf_add_cflags) #(vi
 			;;
@@ -83,6 +132,17 @@
 		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
 		;;
 	esac
+	;;
+yes)
+	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+
+	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[[^"]]*"'\''//'`
+
+	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+	&& test -z "${cf_tst_cflags}" \
+	&& cf_fix_cppflags=no
+	;;
+esac
 done
 
 if test -n "$cf_new_cflags" ; then
@@ -95,6 +155,13 @@
 	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
 fi
 
+if test -n "$cf_new_extra_cppflags" ; then
+	ifelse($2,,,[CF_VERBOSE(add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags)])
+	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+fi
+
+AC_SUBST(EXTRA_CPPFLAGS)
+
 ])dnl
 dnl ---------------------------------------------------------------------------
 dnl CF_ANSI_CC_CHECK version: 9 updated: 2001/12/30 17:53:34
@@ -282,6 +349,77 @@
 fi
 ])dnl
 dnl ---------------------------------------------------------------------------
+dnl CF_BUILD_CC version: 4 updated: 2004/11/27 16:03:59
+dnl -----------
+dnl If we're cross-compiling, allow the user to override the tools and their
+dnl options.  The configure script is oriented toward identifying the host
+dnl compiler, etc., but we need a build compiler to generate parts of the
+dnl source.
+dnl
+dnl $1 = default for $CPPFLAGS
+dnl $2 = default for $LIBS
+AC_DEFUN([CF_BUILD_CC],[
+AC_REQUIRE([CF_PROG_EXT])
+if test "$cross_compiling" = yes ; then
+	# defaults that we might want to override
+	: ${BUILD_CC:='$(CC)'}
+	: ${BUILD_CPP:='$(CC) -E'}
+	: ${BUILD_CFLAGS:=''}
+	: ${BUILD_CPPFLAGS:='ifelse([$1],,,[$1])'}
+	: ${BUILD_LDFLAGS:=''}
+	: ${BUILD_LIBS:='ifelse([$2],,,[$2])'}
+	: ${BUILD_EXEEXT:='$x'}
+	: ${BUILD_OBJEXT:='o'}
+	AC_ARG_WITH(build-cc,
+		[  --with-build-cc=XXX     the build C compiler ($BUILD_CC)],
+		[BUILD_CC="$withval"],
+		[AC_CHECK_PROGS(BUILD_CC, $CC gcc cc)])
+	AC_ARG_WITH(build-cpp,
+		[  --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)],
+		[BUILD_CPP="$withval"],
+		[BUILD_CPP='$(CC) -E'])
+	AC_ARG_WITH(build-cflags,
+		[  --with-build-cflags=XXX the build C compiler-flags],
+		[BUILD_CFLAGS="$withval"])
+	AC_ARG_WITH(build-cppflags,
+		[  --with-build-cppflags=XXX the build C preprocessor-flags],
+		[BUILD_CPPFLAGS="$withval"])
+	AC_ARG_WITH(build-ldflags,
+		[  --with-build-ldflags=XXX the build linker-flags],
+		[BUILD_LDFLAGS="$withval"])
+	AC_ARG_WITH(build-libs,
+		[  --with-build-libs=XXX   the build libraries],
+		[BUILD_LIBS="$withval"])
+	# this assumes we're on Unix.
+	BUILD_EXEEXT=
+	BUILD_OBJEXT=o
+
+	if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '$(CC)' ) ; then
+		AC_MSG_ERROR([Cross-build requires two compilers.
+Use --with-build-cc to specify the native compiler.])
+	fi
+
+else
+	: ${BUILD_CC:='$(CC)'}
+	: ${BUILD_CPP:='$(CPP)'}
+	: ${BUILD_CFLAGS:='$(CFLAGS)'}
+	: ${BUILD_CPPFLAGS:='$(CPPFLAGS)'}
+	: ${BUILD_LDFLAGS:='$(LDFLAGS)'}
+	: ${BUILD_LIBS:='$(LIBS)'}
+	: ${BUILD_EXEEXT:='$x'}
+	: ${BUILD_OBJEXT:='o'}
+fi
+
+AC_SUBST(BUILD_CC)
+AC_SUBST(BUILD_CPP)
+AC_SUBST(BUILD_CFLAGS)
+AC_SUBST(BUILD_CPPFLAGS)
+AC_SUBST(BUILD_LDFLAGS)
+AC_SUBST(BUILD_LIBS)
+AC_SUBST(BUILD_EXEEXT)
+AC_SUBST(BUILD_OBJEXT)
+])dnl
+dnl ---------------------------------------------------------------------------
 dnl CF_CFG_DEFAULTS version: 6 updated: 2003/07/12 15:15:19
 dnl ---------------
 dnl Determine the default configuration into which we'll install ncurses.  This
@@ -359,7 +497,7 @@
 test "$cf_cv_cgetent" = yes && AC_DEFINE(HAVE_BSD_CGETENT)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_CHECK_CACHE version: 9 updated: 2004/01/30 15:59:13
+dnl CF_CHECK_CACHE version: 10 updated: 2004/05/23 13:03:31
 dnl --------------
 dnl Check if we're accidentally using a cache from a different machine.
 dnl Derive the system name, as a check for reusing the autoconf cache.
@@ -373,7 +511,7 @@
 dnl autoconf 2.5x broke compatibility with autoconf 2.13
 AC_DEFUN([CF_CHECK_CACHE],
 [
-if test -f $srcdir/config.guess ; then
+if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
 	ifelse([$1],,[AC_CANONICAL_HOST],[$1])
 	system_name="$host_os"
 else
@@ -627,6 +765,41 @@
 CXXFLAGS="$cf_save_CXXFLAGS"
 ])
 dnl ---------------------------------------------------------------------------
+dnl CF_FUNC_DLSYM version: 1 updated: 2004/06/16 20:52:45
+dnl -------------
+dnl Test for dlsym() and related functions, as well as libdl.
+dnl
+dnl Sets
+dnl	$cf_have_dlsym
+dnl	$cf_have_libdl
+AC_DEFUN([CF_FUNC_DLSYM],[
+cf_have_dlsym=no
+AC_CHECK_FUNC(dlsym,cf_have_dlsym=yes,[
+
+cf_have_libdl=no
+AC_CHECK_LIB(dl,dlsym,[
+	cf_have_dlsym=yes
+	cf_have_libdl=yes])])
+
+if test "$cf_have_dlsym" = yes ; then
+	test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
+
+	AC_MSG_CHECKING(whether able to link to dl*() functions)
+	AC_TRY_LINK([#include <dlfcn.h>],[
+		void *obj;
+		if ((obj = dlopen("filename", 0)) != 0) {
+			if (dlsym(obj, "symbolname") == 0) {
+			dlclose(obj);
+			}
+		}],[
+		AC_DEFINE(HAVE_LIBDL)],[
+		AC_MSG_ERROR(Cannot link test program for libdl)])
+	AC_MSG_RESULT(ok)
+else
+	AC_MSG_ERROR(Cannot find dlsym function)
+fi
+])
+dnl ---------------------------------------------------------------------------
 dnl CF_FUNC_MEMMOVE version: 5 updated: 2000/08/12 23:18:52
 dnl ---------------
 dnl Check for memmove, or a bcopy that can handle overlapping copy.  If neither
@@ -850,7 +1023,7 @@
 fi
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_GCC_WARNINGS version: 15 updated: 2003/07/05 18:42:30
+dnl CF_GCC_WARNINGS version: 18 updated: 2004/12/03 20:51:07
 dnl ---------------
 dnl Check if the compiler supports useful warning options.  There's a few that
 dnl we don't use, simply because they're too noisy:
@@ -862,10 +1035,36 @@
 dnl		is enabled for ncurses using "--enable-const".
 dnl	-pedantic
 dnl
+dnl Parameter:
+dnl	$1 is an optional list of gcc warning flags that a particular
+dnl		application might want to use, e.g., "no-unused" for
+dnl		-Wno-unused
+dnl Special:
+dnl	If $with_ext_const is "yes", add a check for -Wwrite-strings
+dnl
 AC_DEFUN([CF_GCC_WARNINGS],
 [
+AC_REQUIRE([CF_INTEL_COMPILER])
 AC_REQUIRE([CF_GCC_VERSION])
-if test "$GCC" = yes
+if test "$INTEL_COMPILER" = yes
+then
+# The "-wdXXX" options suppress warnings:
+# remark #1419: external declaration in primary source file
+# remark #193: zero used for undefined preprocessing identifier
+# remark #593: variable "curs_sb_left_arrow" was set but never used
+# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
+# remark #869: parameter "tw" was never referenced
+# remark #981: operands are evaluated in unspecified order
+# warning #269: invalid format string conversion
+	EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall \
+ -wd1419 \
+ -wd193 \
+ -wd279 \
+ -wd593 \
+ -wd810 \
+ -wd869 \
+ -wd981"
+elif test "$GCC" = yes
 then
 	cat > conftest.$ac_ext <<EOF
 #line __oline__ "configure"
@@ -887,7 +1086,7 @@
 		Wpointer-arith \
 		Wshadow \
 		Wstrict-prototypes \
-		Wundef $cf_warn_CONST
+		Wundef $cf_warn_CONST $1
 	do
 		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
 		if AC_TRY_EVAL(ac_compile); then
@@ -913,10 +1112,43 @@
 AC_SUBST(EXTRA_CFLAGS)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_GNAT_TRY_RUN version: 2 updated: 1998/07/19 00:25:18
+dnl CF_GNAT_TRY_LINK version: 1 updated: 2004/08/21 19:02:08
+dnl ----------------
+dnl Verify that a test program compiles/links with GNAT.
+dnl $cf_ada_make is set to the program that compiles/links
+dnl $ADAFLAGS may be set to the GNAT flags.
+dnl
+dnl $1 is the text of the spec
+dnl $2 is the text of the body
+dnl $3 is the shell command to execute if successful
+dnl $4 is the shell command to execute if not successful
+AC_DEFUN([CF_GNAT_TRY_LINK],
+[
+rm -f conftest*
+cat >>conftest.ads <<CF_EOF
+$1
+CF_EOF
+cat >>conftest.adb <<CF_EOF
+$2
+CF_EOF
+if ( $cf_ada_make $ADAFLAGS conftest 1>&AC_FD_CC 2>&1 ) ; then
+ifelse($3,,      :,[      $3])
+ifelse($4,,,[else
+   $4])
+fi
+rm -f conftest*
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_GNAT_TRY_RUN version: 3 updated: 2004/08/21 19:02:08
 dnl ---------------
 dnl Verify that a test program compiles and runs with GNAT
 dnl $cf_ada_make is set to the program that compiles/links
+dnl $ADAFLAGS may be set to the GNAT flags.
+dnl
+dnl $1 is the text of the spec
+dnl $2 is the text of the body
+dnl $3 is the shell command to execute if successful
+dnl $4 is the shell command to execute if not successful
 AC_DEFUN([CF_GNAT_TRY_RUN],
 [
 rm -f conftest*
@@ -926,7 +1158,7 @@
 cat >>conftest.adb <<CF_EOF
 $2
 CF_EOF
-if ( $cf_ada_make conftest 1>&AC_FD_CC 2>&1 ) ; then
+if ( $cf_ada_make $ADAFLAGS conftest 1>&AC_FD_CC 2>&1 ) ; then
    if ( ./conftest 1>&AC_FD_CC 2>&1 ) ; then
 ifelse($3,,      :,[      $3])
 ifelse($4,,,[   else
@@ -967,7 +1199,7 @@
 esac
 ])
 dnl ---------------------------------------------------------------------------
-dnl CF_GNU_SOURCE version: 3 updated: 2000/10/29 23:30:53
+dnl CF_GNU_SOURCE version: 4 updated: 2004/12/03 20:43:00
 dnl -------------
 dnl Check if we must define _GNU_SOURCE to get a reasonable value for
 dnl _XOPEN_SOURCE, upon which many POSIX definitions depend.  This is a defect
@@ -977,6 +1209,9 @@
 dnl Well, yes we could work around it...
 AC_DEFUN([CF_GNU_SOURCE],
 [
+AC_REQUIRE([CF_INTEL_COMPILER])
+
+if test "$INTEL_COMPILER" = no ; then
 AC_CACHE_CHECK(if we must define _GNU_SOURCE,cf_cv_gnu_source,[
 AC_TRY_COMPILE([#include <sys/types.h>],[
 #ifndef _XOPEN_SOURCE
@@ -995,6 +1230,7 @@
 	])
 ])
 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
+fi
 ])dnl
 dnl ---------------------------------------------------------------------------
 dnl CF_GPP_LIBRARY version: 8 updated: 2003/02/02 01:41:46
@@ -1054,6 +1290,93 @@
 fi
 ])dnl
 dnl ---------------------------------------------------------------------------
+dnl CF_GXX_WARNINGS version: 2 updated: 2005/04/02 13:49:56
+dnl ---------------
+dnl Check if the compiler supports useful warning options.
+dnl
+dnl Most of gcc's options apply to g++, except:
+dnl	-Wbad-function-cast
+dnl	-Wmissing-declarations
+dnl	-Wnested-externs
+dnl
+dnl Omit a few (for now):
+dnl	-Winline
+dnl
+dnl Parameter:
+dnl	$1 is an optional list of g++ warning flags that a particular
+dnl		application might want to use, e.g., "no-unused" for
+dnl		-Wno-unused
+dnl Special:
+dnl	If $with_ext_const is "yes", add a check for -Wwrite-strings
+dnl
+AC_DEFUN([CF_GXX_WARNINGS],
+[
+AC_REQUIRE([CF_INTEL_COMPILER])
+AC_REQUIRE([CF_GXX_VERSION])
+
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+
+if test "$INTEL_COMPILER" = yes
+then
+# The "-wdXXX" options suppress warnings:
+# remark #1419: external declaration in primary source file
+# remark #193: zero used for undefined preprocessing identifier
+# remark #593: variable "curs_sb_left_arrow" was set but never used
+# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
+# remark #869: parameter "tw" was never referenced
+# remark #981: operands are evaluated in unspecified order
+# warning #269: invalid format string conversion
+	EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wall \
+ -wd1419 \
+ -wd193 \
+ -wd279 \
+ -wd593 \
+ -wd810 \
+ -wd869 \
+ -wd981"
+elif test "$GXX" = yes
+then
+	cat > conftest.$ac_ext <<EOF
+#line __oline__ "configure"
+int main(int argc, char *argv[[]]) { return (argv[[argc-1]] == 0) ; }
+EOF
+	AC_CHECKING([for $CXX warning options])
+	cf_save_CXXFLAGS="$CXXFLAGS"
+	EXTRA_CXXFLAGS="-W -Wall"
+	cf_warn_CONST=""
+	test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
+	for cf_opt in \
+		Wabi \
+		fabi-version=0 \
+		Woverloaded-virtual \
+		Wsign-promo \
+		Wsynth \
+		Wold-style-cast \
+		Weffc++ \
+		Wcast-align \
+		Wcast-qual \
+		Wmissing-prototypes \
+		Wpointer-arith \
+		Wshadow \
+		Wstrict-prototypes \
+		Wundef $cf_warn_CONST $1
+	do
+		CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
+		if AC_TRY_EVAL(ac_compile); then
+			test -n "$verbose" && AC_MSG_RESULT(... -$cf_opt)
+			EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
+		else
+			test -n "$verbose" && AC_MSG_RESULT(... no -$cf_opt)
+		fi
+	done
+	rm -f conftest*
+	CXXFLAGS="$cf_save_CXXFLAGS"
+fi
+AC_LANG_RESTORE
+AC_SUBST(EXTRA_CXXFLAGS)
+])dnl
+dnl ---------------------------------------------------------------------------
 dnl CF_HELP_MESSAGE version: 3 updated: 1998/01/14 10:56:23
 dnl ---------------
 dnl Insert text into the help-message, for readability, from AC_ARG_WITH.
@@ -1087,6 +1410,40 @@
 AC_SUBST(CPPFLAGS)
 ])dnl
 dnl ---------------------------------------------------------------------------
+dnl CF_INTEL_COMPILER version: 1 updated: 2004/12/03 20:27:48
+dnl -----------------
+dnl Check if the given compiler is really the Intel compiler for Linux.
+dnl It tries to imitate gcc, but does not return an error when it finds a
+dnl mismatch between prototypes, e.g., as exercised by CF_MISSING_CHECK.
+dnl
+dnl This macro should be run "soon" after AC_PROG_CC, to ensure that it is
+dnl not mistaken for gcc.
+AC_DEFUN([CF_INTEL_COMPILER],[
+AC_REQUIRE([AC_PROG_CC])
+
+INTEL_COMPILER=no
+
+if test "$GCC" = yes ; then
+	case $host_os in
+	linux*|gnu*)
+		AC_MSG_CHECKING(if this is really Intel compiler)
+		cf_save_CFLAGS="$CFLAGS"
+		CFLAGS="$CFLAGS -no-gcc"
+		AC_TRY_COMPILE([],[
+#ifdef __INTEL_COMPILER
+#else
+make an error
+#endif
+],[INTEL_COMPILER=yes
+cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
+],[])
+		CFLAGS="$cf_save_CFLAGS"
+		AC_MSG_RESULT($INTEL_COMPILER)
+		;;
+	esac
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
 dnl CF_ISASCII version: 3 updated: 2000/08/12 23:18:52
 dnl ----------
 dnl Check if we have either a function or macro for 'isascii()'.
@@ -1138,7 +1495,7 @@
 	AC_SUBST(LIB_PREFIX)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_LIB_RULES version: 30 updated: 2004/01/10 15:50:50
+dnl CF_LIB_RULES version: 35 updated: 2004/09/18 17:54:16
 dnl ------------
 dnl Append definitions and rules for the given models to the subdirectory
 dnl Makefiles, and the recursion rule for the top-level Makefile.  If the
@@ -1170,13 +1527,33 @@
 				case "$cf_cv_shlib_version" in #(vi
 				rel) #(vi
 					case "$cf_cv_system_name" in #(vi
-					darwin*) cf_suffix='.$(REL_VERSION)'"$cf_suffix" ;; #(vi
+					darwin*)
+					case .${LIB_SUFFIX} in
+					.w*)
+						cf_suffix=`echo $cf_suffix | sed 's/^w//'`
+						cf_suffix=w'.$(REL_VERSION)'"$cf_suffix"
+						;;
+					*)
+						cf_suffix='.$(REL_VERSION)'"$cf_suffix"
+						;;
+					esac
+					;; #(vi
 					*) cf_suffix="$cf_suffix"'.$(REL_VERSION)' ;;
 					esac
 					;;
 				abi)
 					case "$cf_cv_system_name" in #(vi
-					darwin*) cf_suffix='.$(ABI_VERSION)'"$cf_suffix" ;; #(vi
+					darwin*)
+					case .${LIB_SUFFIX} in
+					.w*)
+						cf_suffix=`echo $cf_suffix | sed 's/^w//'`
+						cf_suffix=w'.$(ABI_VERSION)'"$cf_suffix"
+						;;
+					*)
+						cf_suffix='.$(ABI_VERSION)'"$cf_suffix"
+						;;
+					esac
+					;; #(vi
 					*) cf_suffix="$cf_suffix"'.$(ABI_VERSION)' ;;
 					esac
 					;;
@@ -1199,7 +1576,7 @@
 			cf_subsets="$LIB_SUBSETS"
 			cf_termlib=`echo "$cf_subsets" |sed -e 's/ .*$//'`
 			if test "$cf_termlib" != "$cf_subsets" ; then
-				cf_item=`echo $LIBS_TO_MAKE |sed -e s%$LIB_NAME%$TINFO_NAME%g`
+				cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
 				LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
 			fi
 		else
@@ -1226,6 +1603,22 @@
 			CF_LIB_SUFFIX($cf_item,cf_suffix)
 			CF_OBJ_SUBDIR($cf_item,cf_subdir)
 
+			# Test for case where we build libtinfo with a different name.
+			cf_libname=$cf_dir
+			if test $cf_dir = ncurses ; then
+				case $cf_subset in
+				*base*)
+					;;
+				termlib*)
+					cf_libname=$TINFO_LIB_SUFFIX
+					if test -n "${DFT_ARG_SUFFIX}" ; then
+						# undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
+						cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
+					fi
+				;;
+				esac
+			fi
+
 			# These dependencies really are for development, not
 			# builds, but they are useful in porting, too.
 			cf_depend="../include/ncurses_cfg.h"
@@ -1241,8 +1634,22 @@
 				cf_depend="$cf_depend $cf_reldir/curses.priv.h"
 			fi
 
+ 			cf_dir_suffix=
+ 			old_cf_suffix="$cf_suffix"
+ 			if test "$cf_cv_shlib_version_infix" = yes ; then
+			if test -n "$LIB_SUFFIX" ; then
+				case $LIB_SUFFIX in
+				w*)
+					cf_libname=`echo $cf_libname | sed 's/w$//'`
+					cf_suffix=`echo $cf_suffix | sed 's/^w//'`
+					cf_dir_suffix=w
+					;;
+				esac
+			fi
+ 			fi
+
 			$AWK -f $srcdir/mk-1st.awk \
-				name=$cf_dir \
+				name=${cf_libname}${cf_dir_suffix} \
 				traces=$LIB_TRACING \
 				MODEL=$CF_ITEM \
 				model=$cf_subdir \
@@ -1258,6 +1665,9 @@
 				depend="$cf_depend" \
 				host="$host" \
 				$srcdir/$cf_dir/modules >>$cf_dir/Makefile
+
+			cf_suffix="$old_cf_suffix"
+
 			for cf_subdir2 in $cf_subdirs lib
 			do
 				test $cf_subdir = $cf_subdir2 && break
@@ -1271,6 +1681,8 @@
 				subset=$cf_subset \
 				srcdir=$srcdir \
 				echo=$WITH_ECHO \
+				crenames=$cf_cv_prog_CC_c_o \
+				cxxrenames=$cf_cv_prog_CXX_c_o \
 				$srcdir/$cf_dir/modules >>$cf_dir/Makefile
 			cf_subdirs="$cf_subdirs $cf_subdir"
 			done
@@ -2346,6 +2758,14 @@
 fi
 ])dnl
 dnl ---------------------------------------------------------------------------
+dnl CF_MSG_LOG version: 3 updated: 1997/09/07 14:05:52
+dnl ----------
+dnl Write a debug message to config.log, along with the line number in the
+dnl configure script.
+AC_DEFUN([CF_MSG_LOG],[
+echo "(line __oline__) testing $* ..." 1>&AC_FD_CC
+])dnl
+dnl ---------------------------------------------------------------------------
 dnl CF_NUMBER_SYNTAX version: 1 updated: 2003/09/20 18:12:49
 dnl ----------------
 dnl Check if the given variable is a number.  If not, report an error.
@@ -2429,6 +2849,65 @@
 esac
 ])dnl
 dnl ---------------------------------------------------------------------------
+dnl CF_POSIX_C_SOURCE version: 3 updated: 2005/02/04 06:56:22
+dnl -----------------
+dnl Define _POSIX_C_SOURCE to the given level, and _POSIX_SOURCE if needed.
+dnl
+dnl	POSIX.1-1990				_POSIX_SOURCE
+dnl	POSIX.1-1990 and			_POSIX_SOURCE and
+dnl		POSIX.2-1992 C-Language			_POSIX_C_SOURCE=2
+dnl		Bindings Option
+dnl	POSIX.1b-1993				_POSIX_C_SOURCE=199309L
+dnl	POSIX.1c-1996				_POSIX_C_SOURCE=199506L
+dnl	X/Open 2000				_POSIX_C_SOURCE=200112L
+dnl
+dnl Parameters:
+dnl	$1 is the nominal value for _POSIX_C_SOURCE
+AC_DEFUN([CF_POSIX_C_SOURCE],
+[
+cf_POSIX_C_SOURCE=ifelse($1,,199506L,$1)
+AC_CACHE_CHECK(if we should define _POSIX_C_SOURCE,cf_cv_posix_c_source,[
+	CF_MSG_LOG(if the symbol is already defined go no further)
+	AC_TRY_COMPILE([#include <sys/types.h>],[
+#ifndef _POSIX_C_SOURCE
+make an error
+#endif],
+	[cf_cv_posix_c_source=no],
+	[cf_want_posix_source=no
+	 case .$cf_POSIX_C_SOURCE in
+	 .[[12]]??*)
+		cf_cv_posix_c_source="-U_POSIX_C_SOURCE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
+		;;
+	 .2)
+		cf_cv_posix_c_source="-U_POSIX_C_SOURCE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
+		cf_want_posix_source=yes
+		;;
+	 .*)
+		cf_want_posix_source=yes
+		;;
+	 esac
+	 if test "$cf_want_posix_source" = yes ; then
+		AC_TRY_COMPILE([#include <sys/types.h>],[
+#ifdef _POSIX_SOURCE
+make an error
+#endif],[],
+		cf_cv_posix_c_source="$cf_cv_posix_c_source -U_POSIX_SOURCE -D_POSIX_SOURCE")
+	 fi
+	 CF_MSG_LOG(ifdef from value $cf_POSIX_C_SOURCE)
+	 cf_save="$CPPFLAGS"
+	 CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
+	 CF_MSG_LOG(if the second compile does not leave our definition intact error)
+	 AC_TRY_COMPILE([#include <sys/types.h>],[
+#ifndef _POSIX_C_SOURCE
+make an error
+#endif],,
+	[cf_cv_posix_c_source=no])
+	CPPFLAGS="$cf_save"
+	])
+])
+test "$cf_cv_posix_c_source" != no && CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
+])dnl
+dnl ---------------------------------------------------------------------------
 dnl CF_PREDEFINE version: 1 updated: 2003/07/26 17:53:56
 dnl ------------
 dnl Add definitions to CPPFLAGS to ensure they're predefined for all compiles.
@@ -2462,6 +2941,45 @@
 fi
 ])dnl
 dnl ---------------------------------------------------------------------------
+dnl CF_PROG_CC_C_O version: 1 updated: 2004/02/14 15:00:43
+dnl --------------
+dnl Analogous to AC_PROG_CC_C_O, but more useful: tests only $CC, ensures that
+dnl the output file can be renamed, and allows for a shell variable that can
+dnl be used later.  The parameter is either CC or CXX.  The result is the
+dnl cache variable:
+dnl	$cf_cv_prog_CC_c_o
+dnl	$cf_cv_prog_CXX_c_o
+AC_DEFUN([CF_PROG_CC_C_O],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_MSG_CHECKING([whether [$]$1 understands -c and -o together])
+AC_CACHE_VAL(cf_cv_prog_$1_c_o,
+[
+cat > conftest.$ac_ext <<CF_EOF
+#include <stdio.h>
+int main()
+{
+	return 0;
+}
+CF_EOF
+# We do the test twice because some compilers refuse to overwrite an
+# existing .o file with -o, though they will create one.
+ac_try='[$]$1 -c conftest.$ac_ext -o conftest2.$ac_objext >&AC_FD_CC'
+if AC_TRY_EVAL(ac_try) &&
+  test -f conftest2.$ac_objext && AC_TRY_EVAL(ac_try);
+then
+  eval cf_cv_prog_$1_c_o=yes
+else
+  eval cf_cv_prog_$1_c_o=no
+fi
+rm -f conftest*
+])dnl
+if test $cf_cv_prog_$1_c_o = yes; then
+  AC_MSG_RESULT([yes])
+else
+  AC_MSG_RESULT([no])
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
 dnl CF_PROG_EXT version: 10 updated: 2004/01/03 19:28:18
 dnl -----------
 dnl Compute $PROG_EXT, used for non-Unix ports, such as OS/2 EMX.
@@ -2559,7 +3077,7 @@
 esac
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_SHARED_OPTS version: 30 updated: 2003/12/27 20:48:07
+dnl CF_SHARED_OPTS version: 31 updated: 2005/01/01 16:39:44
 dnl --------------
 dnl Attempt to determine the appropriate CC/LD options for creating a shared
 dnl library.
@@ -2661,8 +3179,13 @@
 		;;
 	irix*)
 		if test "$cf_cv_ld_rpath" = yes ; then
-			cf_ld_rpath_opt="-Wl,-rpath,"
-			EXTRA_LDFLAGS="-Wl,-rpath,\$(libdir) $EXTRA_LDFLAGS"
+			if test "$GCC" = yes; then
+				cf_ld_rpath_opt="-Wl,-rpath,"
+				EXTRA_LDFLAGS="-Wl,-rpath,\$(libdir) $EXTRA_LDFLAGS"
+			else
+				cf_ld_rpath_opt="-rpath "
+				EXTRA_LDFLAGS="-rpath \$(libdir) $EXTRA_LDFLAGS"
+			fi
 		fi
 		# tested with IRIX 5.2 and 'cc'.
 		if test "$GCC" != yes; then
@@ -2904,7 +3427,7 @@
 fi
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_SRC_MODULES version: 15 updated: 2004/01/10 16:05:16
+dnl CF_SRC_MODULES version: 17 updated: 2005/01/22 15:26:37
 dnl --------------
 dnl For each parameter, test if the source-directory exists, and if it contains
 dnl a 'modules' file.  If so, add to the list $cf_cv_src_modules which we'll
@@ -2924,9 +3447,6 @@
 	TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
 fi
 
-# dependencies and linker-arguments for utility-programs
-test "$with_termlib" != yes && PROG_ARGS="$TEST_ARGS"
-
 cf_cv_src_modules=
 for cf_dir in $1
 do
@@ -2970,9 +3490,6 @@
 AC_SUBST(TEST_DEPS)
 AC_SUBST(TEST_ARGS)
 
-PROG_ARGS="-L${LIB_DIR} $PROG_ARGS"
-AC_SUBST(PROG_ARGS)
-
 SRC_SUBDIRS="man include"
 for cf_dir in $cf_cv_src_modules
 do
@@ -3356,33 +3873,37 @@
 ])
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_WITH_DBMALLOC version: 2 updated: 2002/12/29 21:11:45
+dnl CF_WITH_DBMALLOC version: 4 updated: 2004/02/28 05:49:27
 dnl ----------------
-dnl Configure-option for dbmalloc
+dnl Configure-option for dbmalloc.  The optional parameter is used to override
+dnl the updating of $LIBS, e.g., to avoid conflict with subsequent tests.
 AC_DEFUN([CF_WITH_DBMALLOC],[
 AC_MSG_CHECKING(if you want to link with dbmalloc for testing)
 AC_ARG_WITH(dbmalloc,
-	[  --with-dbmalloc         test: use Conor Cahill's dbmalloc library],
+	[  --with-dbmalloc         use Conor Cahill's dbmalloc library],
 	[with_dbmalloc=$withval],
 	[with_dbmalloc=no])
 AC_MSG_RESULT($with_dbmalloc)
-if test $with_dbmalloc = yes ; then
-	AC_CHECK_LIB(dbmalloc,debug_malloc)
+if test "$with_dbmalloc" = yes ; then
+	AC_CHECK_HEADER(dbmalloc.h,
+		[AC_CHECK_LIB(dbmalloc,[debug_malloc]ifelse($1,,[],[,$1]))])
 fi
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_WITH_DMALLOC version: 2 updated: 2002/12/29 21:11:45
+dnl CF_WITH_DMALLOC version: 4 updated: 2004/02/28 05:49:27
 dnl ---------------
-dnl Configure-option for dmalloc
+dnl Configure-option for dmalloc.  The optional parameter is used to override
+dnl the updating of $LIBS, e.g., to avoid conflict with subsequent tests.
 AC_DEFUN([CF_WITH_DMALLOC],[
 AC_MSG_CHECKING(if you want to link with dmalloc for testing)
 AC_ARG_WITH(dmalloc,
-	[  --with-dmalloc          test: use Gray Watson's dmalloc library],
+	[  --with-dmalloc          use Gray Watson's dmalloc library],
 	[with_dmalloc=$withval],
 	[with_dmalloc=no])
 AC_MSG_RESULT($with_dmalloc)
-if test $with_dmalloc = yes ; then
-	AC_CHECK_LIB(dmalloc,dmalloc_debug)
+if test "$with_dmalloc" = yes ; then
+	AC_CHECK_HEADER(dmalloc.h,
+		[AC_CHECK_LIB(dmalloc,[dmalloc_debug]ifelse($1,,[],[,$1]))])
 fi
 ])dnl
 dnl ---------------------------------------------------------------------------
@@ -3631,22 +4152,41 @@
 fi
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_XOPEN_SOURCE version: 11 updated: 2004/01/26 20:58:41
+dnl CF_XOPEN_SOURCE version: 18 updated: 2005/04/16 19:02:58
 dnl ---------------
 dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions,
 dnl or adapt to the vendor's definitions to get equivalent functionality.
+dnl
+dnl Parameters:
+dnl	$1 is the nominal value for _XOPEN_SOURCE
+dnl	$2 is the nominal value for _POSIX_C_SOURCE
 AC_DEFUN([CF_XOPEN_SOURCE],[
+
+cf_XOPEN_SOURCE=ifelse($1,,500,$1)
+cf_POSIX_C_SOURCE=ifelse($2,,199506L,$2)
+
 case $host_os in #(vi
+aix[[45]]*) #(vi
+	CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
+	;;
+darwin*) #(vi                                                                  
+	# setting _XOPEN_SOURCE breaks things on Darwin                         
+	;;                                                                      
 freebsd*) #(vi
-	CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600"
+	# 5.x headers associate
+	#	_XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
+	#	_XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
+	cf_POSIX_C_SOURCE=200112L
+	cf_XOPEN_SOURCE=600
+	CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
 	;;
 hpux*) #(vi
 	CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
 	;;
-irix6.*) #(vi
+irix[[56]].*) #(vi
 	CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
 	;;
-linux*) #(vi
+linux*|gnu*) #(vi
 	CF_GNU_SOURCE
 	;;
 mirbsd*) #(vi
@@ -3675,37 +4215,18 @@
 #endif],
 	[cf_cv_xopen_source=no],
 	[cf_save="$CPPFLAGS"
-	 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500"
+	 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
 	 AC_TRY_COMPILE([#include <sys/types.h>],[
 #ifdef _XOPEN_SOURCE
 make an error
 #endif],
 	[cf_cv_xopen_source=no],
-	[cf_cv_xopen_source=yes])
-	CPPFLAGS="$cf_save"
-	])
-])
-test "$cf_cv_xopen_source" = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500"
-
-	# FreeBSD 5.x headers demand this...
-	AC_CACHE_CHECK(if we should define _POSIX_C_SOURCE,cf_cv_xopen_source,[
-	AC_TRY_COMPILE([#include <sys/types.h>],[
-#ifndef _POSIX_C_SOURCE
-make an error
-#endif],
-	[cf_cv_xopen_source=no],
-	[cf_save="$CPPFLAGS"
-	 CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE"
-	 AC_TRY_COMPILE([#include <sys/types.h>],[
-#ifdef _POSIX_C_SOURCE
-make an error
-#endif],
-	[cf_cv_xopen_source=no],
-	[cf_cv_xopen_source=yes])
+	[cf_cv_xopen_source=$cf_XOPEN_SOURCE])
 	CPPFLAGS="$cf_save"
 	])
 ])
-test "$cf_cv_xopen_source" = yes && CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE"
+test "$cf_cv_xopen_source" != no && CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE -D_XOPEN_SOURCE=$cf_cv_xopen_source"
+	CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE)
 	;;
 esac
 ])
diff -Naur ncurses-5.4.orig/c++/Makefile.in ncurses-5.4/c++/Makefile.in
--- ncurses-5.4.orig/c++/Makefile.in	2004-01-16 22:44:56.000000000 +0000
+++ ncurses-5.4/c++/Makefile.in	2005-05-13 04:09:54.000000000 +0000
@@ -1,6 +1,6 @@
-# $Id: Makefile.in,v 1.72 2004/01/16 22:44:56 tom Exp $
+# $Id: Makefile.in,v 1.76 2005/04/02 18:47:38 tom Exp $
 ##############################################################################
-# Copyright (c) 1998-2002,2003 Free Software Foundation, Inc.                #
+# Copyright (c) 1998-2004,2005 Free Software Foundation, Inc.                #
 #                                                                            #
 # Permission is hereby granted, free of charge, to any person obtaining a    #
 # copy of this software and associated documentation files (the "Software"), #
@@ -67,8 +67,8 @@
 RANLIB		= @LIB_PREP@
 
 CXX		= @CXX@
-CPP		= @CPP@
-CXXFLAGS	= @CXXFLAGS@
+CPP		= @CXXCPP@
+CXXFLAGS	= @CXXFLAGS@ @EXTRA_CXXFLAGS@
 CXXLIBS		= @CXXLIBS@
 
 INCDIR		= ../include
@@ -108,7 +108,7 @@
 LINK_SHARED	= $(LINK_FLAGS)
 
 LDFLAGS		= @TEST_ARGS@ @LDFLAGS@ \
-	@LD_MODEL@ @LIBS@ @EXTRA_LIBS@ @LOCAL_LDFLAGS@ $(CXXLIBS)
+	@LD_MODEL@ @LIBS@ @LOCAL_LDFLAGS@ $(CXXLIBS)
 
 LDFLAGS_LIBTOOL	= $(LDFLAGS) $(CFLAGS_LIBTOOL)
 LDFLAGS_NORMAL	= $(LDFLAGS) $(CFLAGS_NORMAL)
@@ -130,6 +130,9 @@
 
 depend :
 
+tags:
+	ctags *.[h] *.cc
+
 # Build a conventional library for installing, since a shared library would
 # pull in all of the ncurses libraries (panel, menu, form, ncurses) as direct
 # dependencies.
diff -Naur ncurses-5.4.orig/c++/cursesapp.cc ncurses-5.4/c++/cursesapp.cc
--- ncurses-5.4.orig/c++/cursesapp.cc	2003-10-25 15:04:46.000000000 +0000
+++ ncurses-5.4/c++/cursesapp.cc	2005-05-13 04:09:54.000000000 +0000
@@ -1,6 +1,6 @@
 // * this is for making emacs happy: -*-Mode: C++;-*-
 /****************************************************************************
- * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -34,14 +34,15 @@
 #include "internal.h"
 #include "cursesapp.h"
 
-MODULE_ID("$Id: cursesapp.cc,v 1.10 2003/10/25 15:04:46 tom Exp $")
+MODULE_ID("$Id: cursesapp.cc,v 1.13 2005/04/03 12:25:23 tom Exp $")
 
 void
-NCursesApplication::init(bool bColors) {
+NCursesApplication::init(bool bColors)
+{
   if (bColors)
     NCursesWindow::useColors();
-  
-  if (Root_Window->colors() > 1) {    
+
+  if (Root_Window->colors() > 1) {
     b_Colors = TRUE;
     Root_Window->setcolor(1);
     Root_Window->setpalette(COLOR_YELLOW,COLOR_BLUE);
@@ -66,7 +67,8 @@
 NCursesWindow* NCursesApplication::titleWindow = 0;
 NCursesApplication::SLK_Link* NCursesApplication::slk_stack = 0;
 
-NCursesApplication::~NCursesApplication() {
+NCursesApplication::~NCursesApplication()
+{
   Soft_Label_Key_Set* S;
 
   delete titleWindow;
@@ -78,12 +80,14 @@
   ::endwin();
 }
 
-int NCursesApplication::rinit(NCursesWindow& w) {
+int NCursesApplication::rinit(NCursesWindow& w)
+{
   titleWindow = &w;
   return OK;
 }
 
-void NCursesApplication::push(Soft_Label_Key_Set& S) {
+void NCursesApplication::push(Soft_Label_Key_Set& S)
+{
   SLK_Link* L = new SLK_Link;
   assert(L != 0);
   L->prev = slk_stack;
@@ -93,7 +97,8 @@
     S.show();
 }
 
-bool NCursesApplication::pop() {
+bool NCursesApplication::pop()
+{
   if (slk_stack) {
     SLK_Link* L = slk_stack;
     slk_stack = slk_stack->prev;
@@ -104,22 +109,24 @@
   return (slk_stack ? FALSE : TRUE);
 }
 
-Soft_Label_Key_Set* NCursesApplication::top() const {
+Soft_Label_Key_Set* NCursesApplication::top() const
+{
   if (slk_stack)
     return slk_stack->SLKs;
   else
-    return (Soft_Label_Key_Set*)0;
+    return static_cast<Soft_Label_Key_Set*>(0);
 }
 
-int NCursesApplication::operator()(void) {
+int NCursesApplication::operator()(void)
+{
   bool bColors = b_Colors;
-  Soft_Label_Key_Set* S;
+  Soft_Label_Key_Set* S = 0;
 
   int ts = titlesize();
   if (ts>0)
     NCursesWindow::ripoffline(ts,rinit);
   Soft_Label_Key_Set::Label_Layout fmt = useSLKs();
-  if (fmt!=Soft_Label_Key_Set::None) {    
+  if (fmt!=Soft_Label_Key_Set::None) {
     S = new Soft_Label_Key_Set(fmt);
     assert(S != 0);
     init_labels(*S);
@@ -137,8 +144,10 @@
   return run();
 }
 
-NCursesApplication::NCursesApplication(bool bColors) {
-  b_Colors = bColors;
+NCursesApplication::NCursesApplication(bool bColors)
+  : b_Colors(bColors),
+    Root_Window(NULL)
+{
   if (theApp)
     THROW(new NCursesException("Application object already created."));
   else
diff -Naur ncurses-5.4.orig/c++/cursesapp.h ncurses-5.4/c++/cursesapp.h
--- ncurses-5.4.orig/c++/cursesapp.h	2003-10-25 15:04:46.000000000 +0000
+++ ncurses-5.4/c++/cursesapp.h	2005-05-13 04:09:54.000000000 +0000
@@ -1,6 +1,6 @@
 // * This makes emacs happy -*-Mode: C++;-*-
 /****************************************************************************
- * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -31,7 +31,7 @@
  *   Author: Juergen Pfeifer, 1997                                          *
  ****************************************************************************/
 
-// $Id: cursesapp.h,v 1.9 2003/10/25 15:04:46 tom Exp $
+// $Id: cursesapp.h,v 1.10 2005/04/03 12:22:50 tom Exp $
 
 #ifndef NCURSES_CURSESAPP_H_incl
 #define NCURSES_CURSESAPP_H_incl
@@ -86,11 +86,24 @@
   // be the exit value of your application.
   virtual int run() = 0;
 
-
   // The constructor is protected, so you may use it in your derived
   // class constructor. The argument tells whether or not you want colors.
   NCursesApplication(bool wantColors = FALSE);
 
+  NCursesApplication& operator=(const NCursesApplication& rhs)
+  {
+    if (this != &rhs) {
+      *this = rhs;
+    }
+    return *this;
+  }
+
+  NCursesApplication(const NCursesApplication& rhs)
+    : b_Colors(rhs.b_Colors),
+      Root_Window(rhs.Root_Window)
+  {
+  }
+
 public:
   virtual ~NCursesApplication();
 
diff -Naur ncurses-5.4.orig/c++/cursesf.cc ncurses-5.4/c++/cursesf.cc
--- ncurses-5.4.orig/c++/cursesf.cc	2003-10-25 15:04:46.000000000 +0000
+++ ncurses-5.4/c++/cursesf.cc	2005-05-13 04:09:54.000000000 +0000
@@ -1,6 +1,6 @@
 // * this is for making emacs happy: -*-Mode: C++;-*-
 /****************************************************************************
- * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -35,9 +35,10 @@
 #include "cursesf.h"
 #include "cursesapp.h"
 
-MODULE_ID("$Id: cursesf.cc,v 1.16 2003/10/25 15:04:46 tom Exp $")
+MODULE_ID("$Id: cursesf.cc,v 1.20 2005/04/02 20:33:08 tom Exp $")
 
-NCursesFormField::~NCursesFormField () {
+NCursesFormField::~NCursesFormField ()
+{
   if (field)
     OnError(::free_field (field));
 }
@@ -46,7 +47,8 @@
  * objects.
  */
 FIELD**
-NCursesForm::mapFields(NCursesFormField* nfields[]) {
+NCursesForm::mapFields(NCursesFormField* nfields[])
+{
   int fieldCount = 0,lcv;
   FIELD** old_fields;
 
@@ -65,13 +67,14 @@
   my_fields = nfields;
 
   if (form && (old_fields = ::form_fields(form))) {
-    ::set_form_fields(form,(FIELD**)0);
+    ::set_form_fields(form, static_cast<FIELD**>(0));
     delete[] old_fields;
   }
   return fields;
 }
 
-void NCursesForm::setDefaultAttributes() {
+void NCursesForm::setDefaultAttributes()
+{
   NCursesApplication* S = NCursesApplication::getApplication();
 
   int n = count();
@@ -102,7 +105,8 @@
 void
 NCursesForm::InitForm(NCursesFormField* nfields[],
 		      bool with_frame,
-		      bool autoDelete_Fields) {
+		      bool autoDelete_Fields)
+{
   int mrows, mcols;
 
   keypad(TRUE);
@@ -111,7 +115,7 @@
   b_framed = with_frame;
   b_autoDelete = autoDelete_Fields;
 
-  form = (FORM*)0;
+  form = static_cast<FORM*>(0);
   form = ::new_form(mapFields(nfields));
   if (!form)
     OnError (E_SYSTEM_ERROR);
@@ -120,12 +124,12 @@
   hook->m_user   = NULL;
   hook->m_back   = this;
   hook->m_owner  = form;
-  ::set_form_userptr(form,(void*)hook);
+  ::set_form_userptr(form, reinterpret_cast<void*>(hook));
 
-  ::set_form_init  (form, NCursesForm::frm_init);
-  ::set_form_term  (form, NCursesForm::frm_term);
-  ::set_field_init (form, NCursesForm::fld_init);
-  ::set_field_term (form, NCursesForm::fld_term);
+  ::set_form_init  (form, _nc_xx_frm_init);
+  ::set_form_term  (form, _nc_xx_frm_term);
+  ::set_field_init (form, _nc_xx_fld_init);
+  ::set_field_term (form, _nc_xx_fld_term);
 
   scale(mrows, mcols);
   ::set_form_win(form, w);
@@ -138,25 +142,26 @@
     b_sub_owner = TRUE;
   }
   else {
-    sub = (NCursesWindow*)0;
+    sub = static_cast<NCursesWindow*>(0);
     b_sub_owner = FALSE;
   }
   options_on(O_NL_OVERLOAD);
   setDefaultAttributes();
 }
 
-NCursesForm::~NCursesForm() {
-  UserHook* hook = (UserHook*)::form_userptr(form);
+NCursesForm::~NCursesForm()
+{
+  UserHook* hook = reinterpret_cast<UserHook*>(::form_userptr(form));
   delete hook;
   if (b_sub_owner) {
     delete sub;
-    ::set_form_sub(form,(WINDOW *)0);
+    ::set_form_sub(form, static_cast<WINDOW *>(0));
   }
   if (form) {
     FIELD** fields = ::form_fields(form);
     int cnt = count();
 
-    OnError(::set_form_fields(form,(FIELD**)0));
+    OnError(::set_form_fields(form, static_cast<FIELD**>(0)));
 
     if (b_autoDelete) {
       if (cnt>0) {
@@ -173,7 +178,8 @@
 }
 
 void
-NCursesForm::setSubWindow(NCursesWindow& nsub) {
+NCursesForm::setSubWindow(NCursesWindow& nsub)
+{
   if (!isDescendant(nsub))
     OnError(E_SYSTEM_ERROR);
   else {
@@ -190,46 +196,55 @@
  * implementing a virtual method in a derived class
  */
 void
-NCursesForm::frm_init(FORM *f) {
-  getHook(f)->On_Form_Init();
+_nc_xx_frm_init(FORM *f)
+{
+  NCursesForm::getHook(f)->On_Form_Init();
 }
 
 void
-NCursesForm::frm_term(FORM *f) {
-  getHook(f)->On_Form_Termination();
+_nc_xx_frm_term(FORM *f)
+{
+  NCursesForm::getHook(f)->On_Form_Termination();
 }
 
 void
-NCursesForm::fld_init(FORM *f) {
-  NCursesForm* F = getHook(f);
+_nc_xx_fld_init(FORM *f)
+{
+  NCursesForm* F = NCursesForm::getHook(f);
   F->On_Field_Init (*(F->current_field ()));
 }
 
 void
-NCursesForm::fld_term(FORM *f) {
-  NCursesForm* F = getHook(f);
+_nc_xx_fld_term(FORM *f)
+{
+  NCursesForm* F = NCursesForm::getHook(f);
   F->On_Field_Termination (*(F->current_field ()));
 }
 
 void
-NCursesForm::On_Form_Init() {
+NCursesForm::On_Form_Init()
+{
 }
 
 void
-NCursesForm::On_Form_Termination() {
+NCursesForm::On_Form_Termination()
+{
 }
 
 void
-NCursesForm::On_Field_Init(NCursesFormField& field) {
+NCursesForm::On_Field_Init(NCursesFormField& field)
+{
 }
 
 void
-NCursesForm::On_Field_Termination(NCursesFormField& field) {
+NCursesForm::On_Field_Termination(NCursesFormField& field)
+{
 }
 
 // call the form driver and do basic error checking.
 int
-NCursesForm::driver (int c) {
+NCursesForm::driver (int c)
+{
   int res = ::form_driver (form, c);
   switch (res) {
   case E_OK:
@@ -243,22 +258,26 @@
   return (res);
 }
 
-void NCursesForm::On_Request_Denied(int c) const {
+void NCursesForm::On_Request_Denied(int c) const
+{
   ::beep();
 }
 
-void NCursesForm::On_Invalid_Field(int c) const {
+void NCursesForm::On_Invalid_Field(int c) const
+{
   ::beep();
 }
 
-void NCursesForm::On_Unknown_Command(int c) const {
+void NCursesForm::On_Unknown_Command(int c) const
+{
   ::beep();
 }
 
 static const int CMD_QUIT = MAX_COMMAND + 1;
 
 NCursesFormField*
-NCursesForm::operator()(void) {
+NCursesForm::operator()(void)
+{
   int drvCmnd;
   int err;
   int c;
@@ -296,7 +315,8 @@
 // The default implementation provides a hopefully straightforward
 // mapping for the most common keystrokes and form requests.
 int
-NCursesForm::virtualize(int c) {
+NCursesForm::virtualize(int c)
+{
   switch(c) {
 
   case KEY_HOME      : return(REQ_FIRST_FIELD);
@@ -351,76 +371,84 @@
 // User Defined Fieldtypes
 // -------------------------------------------------------------------------
 //
-bool UserDefinedFieldType::fcheck(FIELD *f, const void *u) {
-  NCursesFormField* F = (NCursesFormField*)u;
+bool _nc_xx_fld_fcheck(FIELD *f, const void *u)
+{
+  NCursesFormField* F = reinterpret_cast<NCursesFormField*>(const_cast<void *>(u));
   assert(F != 0);
-  UserDefinedFieldType* udf = (UserDefinedFieldType*)(F->fieldtype());
+  UserDefinedFieldType* udf = reinterpret_cast<UserDefinedFieldType*>(F->fieldtype());
   assert(udf != 0);
   return udf->field_check(*F);
 }
 
-bool UserDefinedFieldType::ccheck(int c, const void *u) {
-  NCursesFormField* F = (NCursesFormField*)u;
+bool _nc_xx_fld_ccheck(int c, const void *u)
+{
+  NCursesFormField* F = reinterpret_cast<NCursesFormField*>(const_cast<void *>(u));
   assert(F != 0);
   UserDefinedFieldType* udf =
-    (UserDefinedFieldType*)(F->fieldtype());
+    reinterpret_cast<UserDefinedFieldType*>(F->fieldtype());
   assert(udf != 0);
   return udf->char_check(c);
 }
 
-void* UserDefinedFieldType::makearg(va_list* va) {
+void* _nc_xx_fld_makearg(va_list* va)
+{
   return va_arg(*va,NCursesFormField*);
 }
 
 FIELDTYPE* UserDefinedFieldType::generic_fieldtype =
-  ::new_fieldtype(UserDefinedFieldType::fcheck,
-		  UserDefinedFieldType::ccheck);
+  ::new_fieldtype(_nc_xx_fld_fcheck,
+		  _nc_xx_fld_ccheck);
 
 FIELDTYPE* UserDefinedFieldType_With_Choice::generic_fieldtype_with_choice =
-  ::new_fieldtype(UserDefinedFieldType::fcheck,
-		  UserDefinedFieldType::ccheck);
+  ::new_fieldtype(_nc_xx_fld_fcheck,
+		  _nc_xx_fld_ccheck);
 
-bool UserDefinedFieldType_With_Choice::next_choice(FIELD *f, const void *u) {
-  NCursesFormField* F = (NCursesFormField*)u;
+bool _nc_xx_next_choice(FIELD *f, const void *u)
+{
+  NCursesFormField* F = reinterpret_cast<NCursesFormField*>(const_cast<void *>(u));
   assert(F != 0);
   UserDefinedFieldType_With_Choice* udf =
-    (UserDefinedFieldType_With_Choice*)(F->fieldtype());
+    reinterpret_cast<UserDefinedFieldType_With_Choice*>(F->fieldtype());
   assert(udf != 0);
   return udf->next(*F);
 }
 
-bool UserDefinedFieldType_With_Choice::prev_choice(FIELD *f, const void *u) {
-  NCursesFormField* F = (NCursesFormField*)u;
+bool _nc_xx_prev_choice(FIELD *f, const void *u)
+{
+  NCursesFormField* F = reinterpret_cast<NCursesFormField*>(const_cast<void *>(u));
   assert(F != 0);
   UserDefinedFieldType_With_Choice* udf =
-    (UserDefinedFieldType_With_Choice*)(F->fieldtype());
+    reinterpret_cast<UserDefinedFieldType_With_Choice*>(F->fieldtype());
   assert(udf != 0);
   return udf->previous(*F);
 }
 
-class UDF_Init {
+class UDF_Init
+{
 private:
   int code;
   static UDF_Init* I;
+
 public:
-  UDF_Init() {
+  UDF_Init()
+    : code()
+  {
     code = ::set_fieldtype_arg(UserDefinedFieldType::generic_fieldtype,
-			       UserDefinedFieldType::makearg,
+			       _nc_xx_fld_makearg,
 			       NULL,
 			       NULL);
     if (code==E_OK)
       code = ::set_fieldtype_arg
 	(UserDefinedFieldType_With_Choice::generic_fieldtype_with_choice,
-	 UserDefinedFieldType::makearg,
+	 _nc_xx_fld_makearg,
 	 NULL,
 	 NULL);
     if (code==E_OK)
       code = ::set_fieldtype_choice
 	(UserDefinedFieldType_With_Choice::generic_fieldtype_with_choice,
-	 UserDefinedFieldType_With_Choice::next_choice,
-	 UserDefinedFieldType_With_Choice::prev_choice);
+	 _nc_xx_next_choice,
+	 _nc_xx_prev_choice);
   }
 };
 
 UDF_Init* UDF_Init::I = new UDF_Init();
-
diff -Naur ncurses-5.4.orig/c++/cursesf.h ncurses-5.4/c++/cursesf.h
--- ncurses-5.4.orig/c++/cursesf.h	2004-01-15 00:43:46.000000000 +0000
+++ ncurses-5.4/c++/cursesf.h	2005-05-13 04:09:58.000000000 +0000
@@ -1,6 +1,6 @@
 // * This makes emacs happy -*-Mode: C++;-*-
 /****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -31,7 +31,7 @@
  *   Author: Juergen Pfeifer, 1997                                          *
  ****************************************************************************/
 
-// $Id: cursesf.h,v 1.19 2004/01/15 00:43:46 tom Exp $
+// $Id: cursesf.h,v 1.25 2005/04/30 20:26:05 Jeff.Chua Exp $
 
 #ifndef NCURSES_CURSESF_H_incl
 #define NCURSES_CURSESF_H_incl 1
@@ -51,7 +51,8 @@
 
 // Class to represent builtin field types as well as C++ written new
 // fieldtypes (see classes UserDefineFieldType...
-class NCURSES_IMPEXP NCursesFieldType {
+class NCURSES_IMPEXP NCursesFieldType
+{
   friend class NCursesFormField;
 
 protected:
@@ -71,8 +72,24 @@
   virtual void set(NCursesFormField& f) = 0;
 
 public:
-  NCursesFieldType() : fieldtype((FIELDTYPE*)0) {
+  NCursesFieldType()
+    : fieldtype(STATIC_CAST(FIELDTYPE*)(0))
+  {
+  }
+
+  NCursesFieldType& operator=(const NCursesFieldType& rhs)
+  {
+    if (this != &rhs) {
+      *this = rhs;
+    }
+    return *this;
   }
+
+  NCursesFieldType(const NCursesFieldType& rhs)
+    : fieldtype(rhs.fieldtype)
+  {
+  }
+
 };
 
 //
@@ -80,11 +97,12 @@
 // The class representing a forms field, wrapping the lowlevel FIELD struct
 // -------------------------------------------------------------------------
 //
-class NCURSES_IMPEXP NCursesFormField {
+class NCURSES_IMPEXP NCursesFormField
+{
   friend class NCursesForm;
 
 protected:
-  FIELD *field;              // lowlevel structure
+  FIELD *field;		     // lowlevel structure
   NCursesFieldType* ftype;   // Associated field type
 
   // Error handler
@@ -96,27 +114,45 @@
 public:
   // Create a 'Null' field. Can be used to delimit a field list
   NCursesFormField()
-    : field((FIELD*)0), ftype((NCursesFieldType*)0) {
+    : field(STATIC_CAST(FIELD*)(0)),
+      ftype(STATIC_CAST(NCursesFieldType*)(0))
+  {
   }
 
   // Create a new field
   NCursesFormField (int rows,
-		    int cols,
+		    int ncols,
 		    int first_row = 0,
 		    int first_col = 0,
 		    int offscreen_rows = 0,
 		    int additional_buffers = 0)
-    : ftype((NCursesFieldType*)0) {
-      field = ::new_field(rows,cols,first_row,first_col,
+    : field(),
+      ftype(STATIC_CAST(NCursesFieldType*)(0))
+  {
+      field = ::new_field(rows, ncols, first_row, first_col,
 			  offscreen_rows, additional_buffers);
       if (!field)
 	OnError(errno);
   }
 
+  NCursesFormField& operator=(const NCursesFormField& rhs)
+  {
+    if (this != &rhs) {
+      *this = rhs;
+    }
+    return *this;
+  }
+
+  NCursesFormField(const NCursesFormField& rhs)
+    : field(rhs.field), ftype(rhs.ftype)
+  {
+  }
+
   virtual ~NCursesFormField ();
 
   // Duplicate the field at a new position
-  inline NCursesFormField* dup(int first_row, int first_col) {
+  inline NCursesFormField* dup(int first_row, int first_col)
+  {
     NCursesFormField* f = new NCursesFormField();
     if (!f)
       OnError(E_SYSTEM_ERROR);
@@ -149,10 +185,10 @@
   }
 
   // Retrieve info about the field
-  inline void info(int& rows, int& cols,
+  inline void info(int& rows, int& ncols,
 		   int& first_row, int& first_col,
 		   int& offscreen_rows, int& additional_buffers) const {
-    OnError(::field_info(field, &rows, &cols,
+    OnError(::field_info(field, &rows, &ncols,
 			 &first_row, &first_col,
 			 &offscreen_rows, &additional_buffers));
   }
@@ -195,8 +231,8 @@
     return ::field_just(field);
   }
   // Set the foreground attribute for the field
-  inline void set_foreground(chtype fore) {
-    OnError(::set_field_fore(field,fore));
+  inline void set_foreground(chtype foreground) {
+    OnError(::set_field_fore(field,foreground));
   }
 
   // Retrieve the fields foreground attribute
@@ -205,8 +241,8 @@
   }
 
   // Set the background attribute for the field
-  inline void set_background(chtype back) {
-    OnError(::set_field_back(field,back));
+  inline void set_background(chtype background) {
+    OnError(::set_field_back(field,background));
   }
 
   // Retrieve the fields background attribute
@@ -215,8 +251,8 @@
   }
 
   // Set the padding character for the field
-  inline void set_pad_character(int pad) {
-    OnError(::set_field_pad(field,pad));
+  inline void set_pad_character(int padding) {
+    OnError(::set_field_pad(field, padding));
   }
 
   // Retrieve the fields padding character
@@ -225,13 +261,13 @@
   }
 
   // Switch on the fields options
-  inline void options_on (Field_Options options) {
-    OnError (::field_opts_on (field, options));
+  inline void options_on (Field_Options opts) {
+    OnError (::field_opts_on (field, opts));
   }
 
   // Switch off the fields options
-  inline void options_off (Field_Options options) {
-    OnError (::field_opts_off (field, options));
+  inline void options_off (Field_Options opts) {
+    OnError (::field_opts_off (field, opts));
   }
 
   // Retrieve the fields options
@@ -240,8 +276,8 @@
   }
 
   // Set the fields options
-  inline void set_options (Field_Options options) {
-    OnError (::set_field_opts (field, options));
+  inline void set_options (Field_Options opts) {
+    OnError (::set_field_opts (field, opts));
   }
 
   // Mark the field as changed
@@ -283,19 +319,30 @@
 
 };
 
+  // This are the built-in hook functions in this C++ binding. In C++ we use
+  // virtual member functions (see below On_..._Init and On_..._Termination)
+  // to provide this functionality in an object oriented manner.
+extern "C" {
+  void _nc_xx_frm_init(FORM *);
+  void _nc_xx_frm_term(FORM *);
+  void _nc_xx_fld_init(FORM *);
+  void _nc_xx_fld_term(FORM *);
+}
+
 //
 // -------------------------------------------------------------------------
 // The class representing a form, wrapping the lowlevel FORM struct
 // -------------------------------------------------------------------------
 //
-class NCURSES_IMPEXP NCursesForm : public NCursesPanel {
+class NCURSES_IMPEXP NCursesForm : public NCursesPanel
+{
 protected:
   FORM* form;  // the lowlevel structure
 
 private:
   NCursesWindow* sub;   // the subwindow object
   bool b_sub_owner;     // is this our own subwindow?
-  bool b_framed;        // has the form a border?
+  bool b_framed;	// has the form a border?
   bool b_autoDelete;    // Delete fields when deleting form?
 
   NCursesFormField** my_fields; // The array of fields for this form
@@ -303,25 +350,22 @@
   // This structure is used for the form's user data field to link the
   // FORM* to the C++ object and to provide extra space for a user pointer.
   typedef struct {
-    void*              m_user;      // the pointer for the user's data
+    void*	       m_user;	    // the pointer for the user's data
     const NCursesForm* m_back;      // backward pointer to C++ object
-    const FORM*        m_owner;
+    const FORM*	       m_owner;
   } UserHook;
 
   // Get the backward pointer to the C++ object from a FORM
   static inline NCursesForm* getHook(const FORM *f) {
-    UserHook* hook = (UserHook*)::form_userptr(f);
+    UserHook* hook = reinterpret_cast<UserHook*>(::form_userptr(f));
     assert(hook != 0 && hook->m_owner==f);
-    return (NCursesForm*)(hook->m_back);
+    return const_cast<NCursesForm*>(hook->m_back);
   }
 
-  // This are the built-in hook functions in this C++ binding. In C++ we use
-  // virtual member functions (see below On_..._Init and On_..._Termination)
-  // to provide this functionality in an object oriented manner.
-  static void frm_init(FORM *);
-  static void frm_term(FORM *);
-  static void fld_init(FORM *);
-  static void fld_term(FORM *);
+  friend void _nc_xx_frm_init(FORM *);
+  friend void _nc_xx_frm_term(FORM *);
+  friend void _nc_xx_fld_init(FORM *);
+  friend void _nc_xx_fld_term(FORM *);
 
   // Calculate FIELD* array for the menu
   FIELD** mapFields(NCursesFormField* nfields[]);
@@ -329,13 +373,13 @@
 protected:
   // internal routines
   inline void set_user(void *user) {
-    UserHook* uptr = (UserHook*)::form_userptr (form);
+    UserHook* uptr = reinterpret_cast<UserHook*>(::form_userptr (form));
     assert (uptr != 0 && uptr->m_back==this && uptr->m_owner==form);
     uptr->m_user = user;
   }
 
   inline void *get_user() {
-    UserHook* uptr = (UserHook*)::form_userptr (form);
+    UserHook* uptr = reinterpret_cast<UserHook*>(::form_userptr (form));
     assert (uptr != 0 && uptr->m_back==this && uptr->m_owner==form);
     return uptr->m_user;
   }
@@ -354,35 +398,75 @@
 
   // 'Internal' constructor, builds an object without association to a
   // field array.
-  NCursesForm( int  lines,
-	       int  cols,
+  NCursesForm( int  nlines,
+	       int  ncols,
 	       int  begin_y = 0,
 	       int  begin_x = 0)
-    : NCursesPanel(lines,cols,begin_y,begin_x),
-      form ((FORM*)0) {
+    : NCursesPanel(nlines, ncols, begin_y, begin_x),
+      form (STATIC_CAST(FORM*)(0)),
+      sub(),
+      b_sub_owner(),
+      b_framed(),
+      b_autoDelete(),
+      my_fields()
+  {
   }
 
 public:
   // Create form for the default panel.
   NCursesForm (NCursesFormField* Fields[],
-	       bool with_frame=FALSE,         // reserve space for a frame?
+	       bool with_frame=FALSE,	      // reserve space for a frame?
 	       bool autoDelete_Fields=FALSE)  // do automatic cleanup?
-    : NCursesPanel() {
+    : NCursesPanel(),
+      form(),
+      sub(),
+      b_sub_owner(),
+      b_framed(),
+      b_autoDelete(),
+      my_fields()
+  {
     InitForm(Fields, with_frame, autoDelete_Fields);
   }
 
   // Create a form in a panel with the given position and size.
   NCursesForm (NCursesFormField* Fields[],
-	       int  lines,
-	       int  cols,
+	       int  nlines,
+	       int  ncols,
 	       int  begin_y,
 	       int  begin_x,
-	       bool with_frame=FALSE,        // reserve space for a frame?
+	       bool with_frame=FALSE,	     // reserve space for a frame?
 	       bool autoDelete_Fields=FALSE) // do automatic cleanup?
-    : NCursesPanel(lines, cols, begin_y, begin_x) {
+    : NCursesPanel(nlines, ncols, begin_y, begin_x),
+      form(),
+      sub(),
+      b_sub_owner(),
+      b_framed(),
+      b_autoDelete(),
+      my_fields()
+  {
       InitForm(Fields, with_frame, autoDelete_Fields);
   }
 
+  NCursesForm& operator=(const NCursesForm& rhs)
+  {
+    if (this != &rhs) {
+      *this = rhs;
+      NCursesPanel::operator=(rhs);
+    }
+    return *this;
+  }
+
+  NCursesForm(const NCursesForm& rhs)
+    : NCursesPanel(rhs),
+      form(rhs.form),
+      sub(rhs.sub),
+      b_sub_owner(rhs.b_sub_owner),
+      b_framed(rhs.b_framed),
+      b_autoDelete(rhs.b_autoDelete),
+      my_fields(rhs.my_fields)
+  {
+  }
+
   virtual ~NCursesForm();
 
   // Set the default attributes for the form
@@ -452,8 +536,8 @@
   virtual void On_Field_Termination(NCursesFormField& field);
 
   // Calculate required window size for the form.
-  void scale(int& rows, int& cols) const {
-    OnError(::scale_form(form,&rows,&cols));
+  void scale(int& rows, int& ncols) const {
+    OnError(::scale_form(form,&rows,&ncols));
   }
 
   // Retrieve number of fields in the form.
@@ -462,8 +546,8 @@
   }
 
   // Make the page the current page of the form.
-  void set_page(int page) {
-    OnError(::set_form_page(form,page));
+  void set_page(int pageNum) {
+    OnError(::set_form_page(form, pageNum));
   }
 
   // Retrieve current page number
@@ -472,13 +556,13 @@
   }
 
   // Switch on the forms options
-  inline void options_on (Form_Options options) {
-    OnError (::form_opts_on (form, options));
+  inline void options_on (Form_Options opts) {
+    OnError (::form_opts_on (form, opts));
   }
 
   // Switch off the forms options
-  inline void options_off (Form_Options options) {
-    OnError (::form_opts_off (form, options));
+  inline void options_off (Form_Options opts) {
+    OnError (::form_opts_off (form, opts));
   }
 
   // Retrieve the forms options
@@ -487,8 +571,8 @@
   }
 
   // Set the forms options
-  inline void set_options (Form_Options options) {
-    OnError (::set_form_opts (form, options));
+  inline void set_options (Form_Options opts) {
+    OnError (::set_form_opts (form, opts));
   }
 
   // Are there more data in the current field after the data shown
@@ -545,28 +629,28 @@
 {
 public:
   NCursesUserField (int rows,
-		    int cols,
+		    int ncols,
 		    int first_row = 0,
 		    int first_col = 0,
-		    const T* p_UserData = (T*)0,
+		    const T* p_UserData = STATIC_CAST(T*)(0),
 		    int offscreen_rows = 0,
 		    int additional_buffers = 0)
-    : NCursesFormField (rows, cols,
+    : NCursesFormField (rows, ncols,
 			first_row, first_col,
 			offscreen_rows, additional_buffers) {
       if (field)
-	OnError(::set_field_userptr(field,(void *)p_UserData));
+	OnError(::set_field_userptr(field, STATIC_CAST(void *)(p_UserData)));
   }
 
   virtual ~NCursesUserField() {};
 
   inline const T* UserData (void) const {
-    return (const T*)::field_userptr (field);
+    return reinterpret_cast<const T*>(::field_userptr (field));
   }
 
   inline virtual void setUserData(const T* p_UserData) {
     if (field)
-      OnError (::set_field_userptr (field, (void *)p_UserData));
+      OnError (::set_field_userptr (field, STATIC_CAST(void *)(p_UserData)));
   }
 };
 //
@@ -579,50 +663,50 @@
 protected:
   // 'Internal' constructor, builds an object without association to a
   // field array.
-  NCursesUserForm( int  lines,
-		   int  cols,
+  NCursesUserForm( int  nlines,
+		   int  ncols,
 		   int  begin_y = 0,
 		   int  begin_x = 0,
-		   const T* p_UserData = (T*)0)
-    : NCursesForm(lines,cols,begin_y,begin_x) {
+		   const T* p_UserData = STATIC_CAST(T*)(0))
+    : NCursesForm(nlines,ncols,begin_y,begin_x) {
       if (form)
-	set_user ((void *)p_UserData);
+	set_user (const_cast<void *>(p_UserData));
   }
 
 public:
   NCursesUserForm (NCursesFormField Fields[],
-		   const T* p_UserData = (T*)0,
+		   const T* p_UserData = STATIC_CAST(T*)(0),
 		   bool with_frame=FALSE,
 		   bool autoDelete_Fields=FALSE)
     : NCursesForm (Fields, with_frame, autoDelete_Fields) {
       if (form)
-	set_user ((void *)p_UserData);
+	set_user (const_cast<void *>(p_UserData));
   };
 
   NCursesUserForm (NCursesFormField Fields[],
-		   int lines,
-		   int cols,
+		   int nlines,
+		   int ncols,
 		   int begin_y = 0,
 		   int begin_x = 0,
-		   const T* p_UserData = (T*)0,
+		   const T* p_UserData = STATIC_CAST(T*)(0),
 		   bool with_frame=FALSE,
 		   bool autoDelete_Fields=FALSE)
-    : NCursesForm (Fields, lines, cols, begin_y, begin_x,
+    : NCursesForm (Fields, nlines, ncols, begin_y, begin_x,
 		   with_frame, autoDelete_Fields) {
       if (form)
-	set_user ((void *)p_UserData);
+	set_user (const_cast<void *>(p_UserData));
   };
 
   virtual ~NCursesUserForm() {
   };
 
   inline T* UserData (void) const {
-    return (T*)get_user ();
+    return reinterpret_cast<T*>(get_user ());
   };
 
   inline virtual void setUserData (const T* p_UserData) {
     if (form)
-      set_user ((void *)p_UserData);
+      set_user (const_cast<void *>(p_UserData));
   }
 
 };
@@ -631,7 +715,8 @@
 // Builtin Fieldtypes
 // -------------------------------------------------------------------------
 //
-class NCURSES_IMPEXP Alpha_Field : public NCursesFieldType {
+class NCURSES_IMPEXP Alpha_Field : public NCursesFieldType
+{
 private:
   int min_field_width;
 
@@ -646,7 +731,8 @@
   }
 };
 
-class NCURSES_IMPEXP Alphanumeric_Field : public NCursesFieldType {
+class NCURSES_IMPEXP Alphanumeric_Field : public NCursesFieldType
+{
 private:
   int min_field_width;
 
@@ -661,7 +747,8 @@
   }
 };
 
-class NCURSES_IMPEXP Integer_Field : public NCursesFieldType {
+class NCURSES_IMPEXP Integer_Field : public NCursesFieldType
+{
 private:
   int precision;
   long lower_limit, upper_limit;
@@ -678,7 +765,8 @@
   }
 };
 
-class NCURSES_IMPEXP Numeric_Field : public NCursesFieldType {
+class NCURSES_IMPEXP Numeric_Field : public NCursesFieldType
+{
 private:
   int precision;
   double lower_limit, upper_limit;
@@ -695,7 +783,8 @@
   }
 };
 
-class NCURSES_IMPEXP Regular_Expression_Field : public NCursesFieldType {
+class NCURSES_IMPEXP Regular_Expression_Field : public NCursesFieldType
+{
 private:
   char* regex;
 
@@ -703,11 +792,35 @@
     OnError(::set_field_type(f.get_field(),fieldtype,regex));
   }
 
+  void copy_regex(const char *source)
+  {
+    regex = new char[1 + ::strlen(source)];
+    (::strcpy)(regex, source);
+  }
+
 public:
   Regular_Expression_Field(const char *expr)
-    : NCursesFieldType(TYPE_REGEXP) {
-      regex = new char[1 + ::strlen(expr)];
-      (::strcpy)(regex,expr);
+    : NCursesFieldType(TYPE_REGEXP),
+      regex(NULL)
+  {
+    copy_regex(expr);
+  }
+
+  Regular_Expression_Field& operator=(const Regular_Expression_Field& rhs)
+  {
+    if (this != &rhs) {
+      *this = rhs;
+      copy_regex(rhs.regex);
+      NCursesFieldType::operator=(rhs);
+    }
+    return *this;
+  }
+
+  Regular_Expression_Field(const Regular_Expression_Field& rhs)
+    : NCursesFieldType(rhs),
+      regex(NULL)
+  {
+    copy_regex(rhs.regex);
   }
 
   ~Regular_Expression_Field() {
@@ -715,7 +828,8 @@
   }
 };
 
-class NCURSES_IMPEXP Enumeration_Field : public NCursesFieldType {
+class NCURSES_IMPEXP Enumeration_Field : public NCursesFieldType
+{
 private:
   const char** list;
   int case_sensitive;
@@ -731,12 +845,30 @@
 		    bool non_unique=FALSE)
     : NCursesFieldType(TYPE_ENUM),
       list(enums),
-      case_sensitive(case_sens?-1:0),
-      non_unique_matches(non_unique?-1:0) {
+      case_sensitive(case_sens ? -1 : 0),
+      non_unique_matches(non_unique ? -1 : 0) {
+  }
+
+  Enumeration_Field& operator=(const Enumeration_Field& rhs)
+  {
+    if (this != &rhs) {
+      *this = rhs;
+      NCursesFieldType::operator=(rhs);
+    }
+    return *this;
+  }
+
+  Enumeration_Field(const Enumeration_Field& rhs)
+    : NCursesFieldType(rhs),
+      list(rhs.list),
+      case_sensitive(rhs.case_sensitive),
+      non_unique_matches(rhs.non_unique_matches)
+  {
   }
 };
 
-class NCURSES_IMPEXP IPV4_Address_Field : public NCursesFieldType {
+class NCURSES_IMPEXP IPV4_Address_Field : public NCursesFieldType
+{
 private:
   void set(NCursesFormField& f) {
     OnError(::set_field_type(f.get_field(),fieldtype));
@@ -746,12 +878,20 @@
   IPV4_Address_Field() : NCursesFieldType(TYPE_IPV4) {
   }
 };
+
+extern "C" {
+  bool _nc_xx_fld_fcheck(FIELD *, const void*);
+  bool _nc_xx_fld_ccheck(int c, const void *);
+  void* _nc_xx_fld_makearg(va_list*);
+}
+
 //
 // -------------------------------------------------------------------------
 // Abstract base class for User-Defined Fieldtypes
 // -------------------------------------------------------------------------
 //
-class NCURSES_IMPEXP UserDefinedFieldType : public NCursesFieldType {
+class NCURSES_IMPEXP UserDefinedFieldType : public NCursesFieldType
+{
   friend class UDF_Init; // Internal helper to set up statics
 private:
   // For all C++ defined fieldtypes we need only one generic lowlevel
@@ -761,9 +901,9 @@
 protected:
   // This are the functions required by the low level libforms functions
   // to construct a fieldtype.
-  static bool fcheck(FIELD *, const void*);
-  static bool ccheck(int c, const void *);
-  static void* makearg(va_list*);
+  friend bool _nc_xx_fld_fcheck(FIELD *, const void*);
+  friend bool _nc_xx_fld_ccheck(int c, const void *);
+  friend void* _nc_xx_fld_makearg(va_list*);
 
   void set(NCursesFormField& f) {
     OnError(::set_field_type(f.get_field(),fieldtype,&f));
@@ -782,12 +922,19 @@
   UserDefinedFieldType() : NCursesFieldType(generic_fieldtype) {
   }
 };
+
+extern "C" {
+  bool _nc_xx_next_choice(FIELD*, const void *);
+  bool _nc_xx_prev_choice(FIELD*, const void *);
+}
+
 //
 // -------------------------------------------------------------------------
 // Abstract base class for User-Defined Fieldtypes with Choice functions
 // -------------------------------------------------------------------------
 //
-class NCURSES_IMPEXP UserDefinedFieldType_With_Choice : public UserDefinedFieldType {
+class NCURSES_IMPEXP UserDefinedFieldType_With_Choice : public UserDefinedFieldType
+{
   friend class UDF_Init; // Internal helper to set up statics
 private:
   // For all C++ defined fieldtypes with choice functions we need only one
@@ -796,8 +943,8 @@
 
   // This are the functions required by the low level libforms functions
   // to construct a fieldtype with choice functions.
-  static bool next_choice(FIELD*, const void *);
-  static bool prev_choice(FIELD*, const void *);
+  friend bool _nc_xx_next_choice(FIELD*, const void *);
+  friend bool _nc_xx_prev_choice(FIELD*, const void *);
 
 protected:
   // Redefine this function to do the retrieval of the next choice value.
diff -Naur ncurses-5.4.orig/c++/cursesm.cc ncurses-5.4/c++/cursesm.cc
--- ncurses-5.4.orig/c++/cursesm.cc	2003-10-25 15:04:46.000000000 +0000
+++ ncurses-5.4/c++/cursesm.cc	2005-05-13 04:09:54.000000000 +0000
@@ -1,6 +1,6 @@
 // * this is for making emacs happy: -*-Mode: C++;-*-
 /****************************************************************************
- * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -35,23 +35,27 @@
 #include "cursesm.h"
 #include "cursesapp.h"
 
-MODULE_ID("$Id: cursesm.cc,v 1.18 2003/10/25 15:04:46 tom Exp $")
+MODULE_ID("$Id: cursesm.cc,v 1.22 2005/04/02 20:39:05 tom Exp $")
 
-NCursesMenuItem::~NCursesMenuItem() {
+NCursesMenuItem::~NCursesMenuItem()
+{
   if (item)
     OnError(::free_item(item));
 }
 
 bool
-NCursesMenuItem::action() {
+NCursesMenuItem::action()
+{
   return FALSE;
-};
+}
 
-NCursesMenuCallbackItem::~NCursesMenuCallbackItem() {
+NCursesMenuCallbackItem::~NCursesMenuCallbackItem()
+{
 }
 
 bool
-NCursesMenuCallbackItem::action() {
+NCursesMenuCallbackItem::action()
+{
   if (p_fct)
     return p_fct (*this);
   else
@@ -64,24 +68,28 @@
  * implementing a virtual method in a derived class
  */
 void
-NCursesMenu::mnu_init(MENU *m) {
-  getHook(m)->On_Menu_Init();
+_nc_xx_mnu_init(MENU *m)
+{
+  NCursesMenu::getHook(m)->On_Menu_Init();
 }
 
 void
-NCursesMenu::mnu_term(MENU *m) {
-  getHook(m)->On_Menu_Termination();
+_nc_xx_mnu_term(MENU *m)
+{
+  NCursesMenu::getHook(m)->On_Menu_Termination();
 }
 
 void
-NCursesMenu::itm_init(MENU *m) {
-  NCursesMenu* M = getHook(m);
+_nc_xx_itm_init(MENU *m)
+{
+  NCursesMenu* M = NCursesMenu::getHook(m);
   M->On_Item_Init (*(M->current_item ()));
 }
 
 void
-NCursesMenu::itm_term(MENU *m) {
-  NCursesMenu* M = getHook(m);
+_nc_xx_itm_term(MENU *m)
+{
+  NCursesMenu* M = NCursesMenu::getHook(m);
   M->On_Item_Termination (*(M->current_item ()));
 }
 
@@ -89,30 +97,32 @@
  * objects.
  */
 ITEM**
-NCursesMenu::mapItems(NCursesMenuItem* nitems[]) {
+NCursesMenu::mapItems(NCursesMenuItem* nitems[])
+{
   int itemCount = 0,lcv;
 
   for (lcv=0; nitems[lcv]->item; ++lcv)
     ++itemCount;
 
-  ITEM** items = new ITEM*[itemCount + 1];
+  ITEM** itemArray = new ITEM*[itemCount + 1];
 
   for (lcv=0;nitems[lcv]->item;++lcv) {
-    items[lcv] = nitems[lcv]->item;
+    itemArray[lcv] = nitems[lcv]->item;
   }
-  items[lcv] = NULL;
+  itemArray[lcv] = NULL;
 
   my_items = nitems;
 
   if (menu)
     delete[] ::menu_items(menu);
-  return items;
+  return itemArray;
 }
 
 void
 NCursesMenu::InitMenu(NCursesMenuItem* nitems[],
 		      bool with_frame,
-		      bool autoDelete_Items) {
+		      bool autoDelete_Items)
+{
   int mrows, mcols;
 
   keypad(TRUE);
@@ -121,7 +131,7 @@
   b_framed = with_frame;
   b_autoDelete = autoDelete_Items;
 
-  menu = (MENU*)0;
+  menu = static_cast<MENU*>(0);
   menu = ::new_menu(mapItems(nitems));
   if (!menu)
     OnError (E_SYSTEM_ERROR);
@@ -130,12 +140,12 @@
   hook->m_user   = NULL;
   hook->m_back   = this;
   hook->m_owner  = menu;
-  ::set_menu_userptr(menu,(void*)hook);
+  ::set_menu_userptr(menu, static_cast<void*>(hook));
 
-  ::set_menu_init (menu, NCursesMenu::mnu_init);
-  ::set_menu_term (menu, NCursesMenu::mnu_term);
-  ::set_item_init (menu, NCursesMenu::itm_init);
-  ::set_item_term (menu, NCursesMenu::itm_term);
+  ::set_menu_init (menu, _nc_xx_mnu_init);
+  ::set_menu_term (menu, _nc_xx_mnu_term);
+  ::set_item_init (menu, _nc_xx_itm_init);
+  ::set_item_term (menu, _nc_xx_itm_term);
 
   scale(mrows, mcols);
   ::set_menu_win(menu, w);
@@ -148,14 +158,15 @@
     b_sub_owner = TRUE;
   }
   else {
-    sub = (NCursesWindow*)0;
+    sub = static_cast<NCursesWindow*>(0);
     b_sub_owner = FALSE;
   }
   setDefaultAttributes();
 }
 
 void
-NCursesMenu::setDefaultAttributes() {
+NCursesMenu::setDefaultAttributes()
+{
   NCursesApplication* S = NCursesApplication::getApplication();
   if (S) {
     ::set_menu_fore(menu, S->foregrounds());
@@ -164,18 +175,19 @@
   }
 }
 
-NCursesMenu::~NCursesMenu() {
-  UserHook* hook = (UserHook*)::menu_userptr(menu);
+NCursesMenu::~NCursesMenu()
+{
+  UserHook* hook = reinterpret_cast<UserHook*>(::menu_userptr(menu));
   delete hook;
   if (b_sub_owner) {
     delete sub;
-    ::set_menu_sub(menu,(WINDOW *)0);
+    ::set_menu_sub(menu, static_cast<WINDOW *>(0));
   }
   if (menu) {
     ITEM** itms = ::menu_items(menu);
     int cnt = count();
 
-    OnError(::set_menu_items(menu,(ITEM**)0));
+    OnError(::set_menu_items(menu, static_cast<ITEM**>(0)));
 
     if (b_autoDelete) {
       if (cnt>0) {
@@ -192,7 +204,8 @@
 }
 
 void
-NCursesMenu::setSubWindow(NCursesWindow& nsub) {
+NCursesMenu::setSubWindow(NCursesWindow& nsub)
+{
   if (!isDescendant(nsub))
     OnError(E_SYSTEM_ERROR);
   else {
@@ -204,7 +217,8 @@
 }
 
 bool
-NCursesMenu::set_pattern (const char *pat) {
+NCursesMenu::set_pattern (const char *pat)
+{
   int res = ::set_menu_pattern (menu, pat);
   switch(res) {
   case E_OK:
@@ -219,7 +233,8 @@
 
 // call the menu driver and do basic error checking.
 int
-NCursesMenu::driver (int c) {
+NCursesMenu::driver (int c)
+{
   int res = ::menu_driver (menu, c);
   switch (res) {
   case E_OK:
@@ -244,7 +259,8 @@
 // mapping for the most common keystrokes and menu requests.
 // -------------------------------------------------------------------------
 int
-NCursesMenu::virtualize(int c) {
+NCursesMenu::virtualize(int c)
+{
   switch(c) {
   case CTRL('X')     : return(CMD_QUIT);              // eXit
 
@@ -281,7 +297,8 @@
 }
 
 NCursesMenuItem*
-NCursesMenu::operator()(void) {
+NCursesMenu::operator()(void)
+{
   int drvCmnd;
   int err;
   int c;
@@ -290,9 +307,9 @@
   post();
   show();
   refresh();
-  
+
   while (!b_action && ((drvCmnd = virtualize((c=getKey()))) != CMD_QUIT)) {
-    
+
     switch((err=driver(drvCmnd))) {
     case E_REQUEST_DENIED:
       On_Request_Denied(c);
@@ -346,37 +363,45 @@
 }
 
 void
-NCursesMenu::On_Menu_Init() {
+NCursesMenu::On_Menu_Init()
+{
 }
 
 void
-NCursesMenu::On_Menu_Termination() {
+NCursesMenu::On_Menu_Termination()
+{
 }
 
 void
-NCursesMenu::On_Item_Init(NCursesMenuItem& item) {
+NCursesMenu::On_Item_Init(NCursesMenuItem& item)
+{
 }
 
 void
-NCursesMenu::On_Item_Termination(NCursesMenuItem& item) {
+NCursesMenu::On_Item_Termination(NCursesMenuItem& item)
+{
 }
 
 void
-NCursesMenu::On_Request_Denied(int c) const {
+NCursesMenu::On_Request_Denied(int c) const
+{
   ::beep();
 }
 
 void
-NCursesMenu::On_Not_Selectable(int c) const {
+NCursesMenu::On_Not_Selectable(int c) const
+{
   ::beep();
 }
 
 void
-NCursesMenu::On_No_Match(int c) const {
+NCursesMenu::On_No_Match(int c) const
+{
   ::beep();
 }
 
 void
-NCursesMenu::On_Unknown_Command(int c) const {
+NCursesMenu::On_Unknown_Command(int c) const
+{
   ::beep();
 }
diff -Naur ncurses-5.4.orig/c++/cursesm.h ncurses-5.4/c++/cursesm.h
--- ncurses-5.4.orig/c++/cursesm.h	2003-10-25 15:04:46.000000000 +0000
+++ ncurses-5.4/c++/cursesm.h	2005-05-13 04:09:58.000000000 +0000
@@ -1,6 +1,6 @@
 // * This makes emacs happy -*-Mode: C++;-*-
 /****************************************************************************
- * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -31,7 +31,7 @@
  *   Author: Juergen Pfeifer, 1997                                          *
  ****************************************************************************/
 
-// $Id: cursesm.h,v 1.17 2003/10/25 15:04:46 tom Exp $
+// $Id: cursesm.h,v 1.23 2005/04/30 20:26:05 Jeff.Chua Exp $
 
 #ifndef NCURSES_CURSESM_H_incl
 #define NCURSES_CURSESM_H_incl 1
@@ -46,9 +46,10 @@
 // This wraps the ITEM type of <menu.h>
 // -------------------------------------------------------------------------
 //
-class NCURSES_IMPEXP NCursesMenuItem {
+class NCURSES_IMPEXP NCursesMenuItem
+{
   friend class NCursesMenu;
-  
+
 protected:
   ITEM *item;
 
@@ -59,15 +60,30 @@
 
 public:
   NCursesMenuItem (const char* p_name     = NULL,
-		   const char* p_descript = NULL ) { 
-    item = p_name ? ::new_item (p_name, p_descript) : (ITEM*)0; 
+		   const char* p_descript = NULL)
+    : item()
+  {
+    item = p_name ? ::new_item (p_name, p_descript) : STATIC_CAST(ITEM*)(0);
     if (p_name && !item)
       OnError (E_SYSTEM_ERROR);
   }
   // Create an item. If you pass both parameters as NULL, a delimiting
   // item is constructed which can be used to terminate a list of
   // NCursesMenu objects.
-  
+
+  NCursesMenuItem& operator=(const NCursesMenuItem& rhs)
+  {
+    if (this != &rhs) {
+      *this = rhs;
+    }
+    return *this;
+  }
+
+  NCursesMenuItem(const NCursesMenuItem& rhs)
+    : item()
+  {
+  }
+
   virtual ~NCursesMenuItem ();
   // Release the items memory
 
@@ -80,19 +96,19 @@
     return ::item_description (item);
   }
   // Description of the item
-  
+
   inline int (index) (void) const {
     return ::item_index (item);
   }
   // Index of the item in an item array (or -1)
 
-  inline void options_on (Item_Options options) {
-    OnError (::item_opts_on (item, options));
+  inline void options_on (Item_Options opts) {
+    OnError (::item_opts_on (item, opts));
   }
   // Switch on the items options
 
-  inline void options_off (Item_Options options) {
-    OnError (::item_opts_off (item, options));
+  inline void options_off (Item_Options opts) {
+    OnError (::item_opts_off (item, opts));
   }
   // Switch off the item's option
 
@@ -101,8 +117,8 @@
   }
   // Retrieve the items options
 
-  inline void set_options (Item_Options options) {
-    OnError (::set_item_opts (item, options));
+  inline void set_options (Item_Options opts) {
+    OnError (::set_item_opts (item, opts));
   }
   // Set the items options
 
@@ -115,7 +131,7 @@
     return ::item_value (item);
   }
   // Retrieve the items selection state
-  
+
   inline bool visible () const {
     return ::item_visible (item);
   }
@@ -135,7 +151,8 @@
 // If you don't like to create a child class for individual items to
 // overload action(), you may use this class and provide a callback
 // function pointer for items.
-class NCURSES_IMPEXP NCursesMenuCallbackItem : public NCursesMenuItem {
+class NCURSES_IMPEXP NCursesMenuCallbackItem : public NCursesMenuItem
+{
 private:
   ITEMCALLBACK* p_fct;
 
@@ -146,17 +163,43 @@
     : NCursesMenuItem (p_name, p_descript),
       p_fct (fct) {
   }
-  
+
+  NCursesMenuCallbackItem& operator=(const NCursesMenuCallbackItem& rhs)
+  {
+    if (this != &rhs) {
+      *this = rhs;
+    }
+    return *this;
+  }
+
+  NCursesMenuCallbackItem(const NCursesMenuCallbackItem& rhs)
+    : NCursesMenuItem(rhs),
+      p_fct()
+  {
+  }
+
   virtual ~NCursesMenuCallbackItem();
 
   bool action();
 };
+
+  // This are the built-in hook functions in this C++ binding. In C++ we use
+  // virtual member functions (see below On_..._Init and On_..._Termination)
+  // to provide this functionality in an object oriented manner.
+extern "C" {
+  void _nc_xx_mnu_init(MENU *);
+  void _nc_xx_mnu_term(MENU *);
+  void _nc_xx_itm_init(MENU *);
+  void _nc_xx_itm_term(MENU *);
+}
+
 //
 // -------------------------------------------------------------------------
 // This wraps the MENU type of <menu.h>
 // -------------------------------------------------------------------------
 //
-class NCURSES_IMPEXP NCursesMenu : public NCursesPanel {
+class NCURSES_IMPEXP NCursesMenu : public NCursesPanel
+{
 protected:
   MENU *menu;
 
@@ -178,36 +221,33 @@
 
   // Get the backward pointer to the C++ object from a MENU
   static inline NCursesMenu* getHook(const MENU *m) {
-    UserHook* hook = (UserHook*)::menu_userptr(m);
+    UserHook* hook = STATIC_CAST(UserHook*)(::menu_userptr(m));
     assert(hook != 0 && hook->m_owner==m);
-    return (NCursesMenu*)(hook->m_back);
+    return const_cast<NCursesMenu*>(hook->m_back);
   }
 
-  // This are the built-in hook functions in this C++ binding. In C++ we use
-  // virtual member functions (see below On_..._Init and On_..._Termination)
-  // to provide this functionality in an object oriented manner.
-  static void mnu_init(MENU *);
-  static void mnu_term(MENU *);
-  static void itm_init(MENU *);
-  static void itm_term(MENU *);
-  
+  friend void _nc_xx_mnu_init(MENU *);
+  friend void _nc_xx_mnu_term(MENU *);
+  friend void _nc_xx_itm_init(MENU *);
+  friend void _nc_xx_itm_term(MENU *);
+
   // Calculate ITEM* array for the menu
   ITEM** mapItems(NCursesMenuItem* nitems[]);
-  
+
 protected:
-  // internal routines 
+  // internal routines
   inline void set_user(void *user) {
-    UserHook* uptr = (UserHook*)::menu_userptr (menu);
+    UserHook* uptr = STATIC_CAST(UserHook*)(::menu_userptr (menu));
     assert (uptr != 0 && uptr->m_back==this && uptr->m_owner==menu);
     uptr->m_user = user;
   }
 
   inline void *get_user() {
-    UserHook* uptr = (UserHook*)::menu_userptr (menu);
+    UserHook* uptr = STATIC_CAST(UserHook*)(::menu_userptr (menu));
     assert (uptr != 0 && uptr->m_back==this && uptr->m_owner==menu);
     return uptr->m_user;
-  }  
-  
+  }
+
   void InitMenu (NCursesMenuItem* menu[],
 		 bool with_frame,
 		 bool autoDeleteItems);
@@ -216,18 +256,24 @@
     if (err != E_OK)
       THROW(new NCursesMenuException (this, err));
   }
-  
+
   // this wraps the menu_driver call.
   virtual int driver (int c) ;
-  
+
   // 'Internal' constructor to create a menu without association to
   // an array of items.
-  NCursesMenu( int  lines, 
-	       int  cols, 
-	       int  begin_y = 0, 
-	       int  begin_x = 0) 
-    : NCursesPanel(lines,cols,begin_y,begin_x), 
-      menu ((MENU*)0) {
+  NCursesMenu( int  nlines,
+	       int  ncols,
+	       int  begin_y = 0,
+	       int  begin_x = 0)
+    : NCursesPanel(nlines,ncols,begin_y,begin_x),
+      menu (STATIC_CAST(MENU*)(0)),
+      sub(),
+      b_sub_owner(),
+      b_framed(),
+      b_autoDelete(),
+      my_items()
+  {
   }
 
 public:
@@ -235,22 +281,56 @@
   NCursesMenu (NCursesMenuItem* Items[],
 	       bool with_frame=FALSE,        // Reserve space for a frame?
 	       bool autoDelete_Items=FALSE)  // Autocleanup of Items?
-    : NCursesPanel() {
+    : NCursesPanel(),
+      menu(),
+      sub(),
+      b_sub_owner(),
+      b_framed(),
+      b_autoDelete(),
+      my_items()
+  {
       InitMenu(Items, with_frame, autoDelete_Items);
   }
 
   // Make a menu with a window of this size.
-  NCursesMenu (NCursesMenuItem* Items[], 
-	       int  lines, 
-	       int  cols, 
-	       int  begin_y = 0, 
+  NCursesMenu (NCursesMenuItem* Items[],
+	       int  nlines,
+	       int  ncols,
+	       int  begin_y = 0,
 	       int  begin_x = 0,
 	       bool with_frame=FALSE,        // Reserve space for a frame?
 	       bool autoDelete_Items=FALSE)  // Autocleanup of Items?
-    : NCursesPanel(lines, cols, begin_y, begin_x) {
+    : NCursesPanel(nlines, ncols, begin_y, begin_x),
+      menu(),
+      sub(),
+      b_sub_owner(),
+      b_framed(),
+      b_autoDelete(),
+      my_items()
+  {
       InitMenu(Items, with_frame, autoDelete_Items);
   }
 
+  NCursesMenu& operator=(const NCursesMenu& rhs)
+  {
+    if (this != &rhs) {
+      *this = rhs;
+      NCursesPanel::operator=(rhs);
+    }
+    return *this;
+  }
+
+  NCursesMenu(const NCursesMenu& rhs)
+    : NCursesPanel(rhs),
+      menu(rhs.menu),
+      sub(rhs.sub),
+      b_sub_owner(rhs.b_sub_owner),
+      b_framed(rhs.b_framed),
+      b_autoDelete(rhs.b_autoDelete),
+      my_items(rhs.my_items)
+  {
+  }
+
   virtual ~NCursesMenu ();
 
   // Retrieve the menus subwindow
@@ -264,17 +344,17 @@
 
   // Set these items for the menu
   inline void setItems(NCursesMenuItem* Items[]) {
-    OnError(::set_menu_items(menu,mapItems(Items)));    
+    OnError(::set_menu_items(menu,mapItems(Items)));
   }
 
   // Remove the menu from the screen
-  inline void unpost (void) { 
-    OnError (::unpost_menu (menu)); 
+  inline void unpost (void) {
+    OnError (::unpost_menu (menu));
   }
-  
+
   // Post the menu to the screen if flag is true, unpost it otherwise
   inline void post(bool flag = TRUE) {
-    flag ? OnError (::post_menu(menu)) : OnError (::unpost_menu (menu)); 
+    flag ? OnError (::post_menu(menu)) : OnError (::unpost_menu (menu));
   }
 
   // Get the numer of rows and columns for this menu
@@ -286,35 +366,35 @@
   inline void set_format(int mrows, int mcols) {
     OnError (::set_menu_format(menu, mrows, mcols));
   }
-  
+
   // Get the format of this menu
-  inline void menu_format(int& rows,int& cols) { 
-    ::menu_format(menu,&rows,&cols); 
+  inline void menu_format(int& rows,int& ncols) {
+    ::menu_format(menu,&rows,&ncols);
   }
-  
+
   // Items of the menu
   inline NCursesMenuItem* items() const {
-    return *my_items; 
+    return *my_items;
   }
 
   // Get the number of items in this menu
   inline int count() const {
-    return ::item_count(menu); 
+    return ::item_count(menu);
   }
 
   // Get the current item (i.e. the one the cursor is located)
   inline NCursesMenuItem* current_item() const {
     return my_items[::item_index(::current_item(menu))];
   }
-  
+
   // Get the marker string
   inline const char* mark() const {
     return ::menu_mark(menu);
   }
 
   // Set the marker string
-  inline void set_mark(const char *mark) {
-    OnError (::set_menu_mark (menu, mark));
+  inline void set_mark(const char *marker) {
+    OnError (::set_menu_mark (menu, marker));
   }
 
   // Get the name of the request code c
@@ -363,7 +443,7 @@
   inline chtype set_grey(chtype a) {
     return ::set_menu_grey(menu,a);
   }
-  
+
   inline void options_on (Menu_Options opts) {
     OnError (::menu_opts_on (menu,opts));
   }
@@ -375,7 +455,7 @@
   inline Menu_Options options() const {
     return ::menu_opts(menu);
   }
-  
+
   inline void set_options (Menu_Options opts) {
     OnError (::set_menu_opts (menu,opts));
   }
@@ -387,7 +467,7 @@
   inline void set_pad (int padch) {
     OnError (::set_menu_pad (menu, padch));
   }
-  
+
   // Position the cursor to the current item
   inline void position_cursor () const {
     OnError (::pos_menu_cursor (menu));
@@ -418,7 +498,7 @@
 			       spc_rows,
 			       spc_columns));
   }
-  
+
   // Get the spacing info for the menu
   inline void Spacing(int& spc_description,
 		      int& spc_rows,
@@ -443,7 +523,7 @@
     else
       OnError(E_SYSTEM_ERROR);
   }
-  
+
   inline void label(const char *topLabel, const char *bottomLabel) {
     if (b_framed)
       NCursesPanel::label(topLabel,bottomLabel);
@@ -468,7 +548,7 @@
 
   // Called before this item is left as current item.
   virtual void On_Item_Termination(NCursesMenuItem& item);
-  
+
   // Provide a default key virtualization. Translate the keyboard
   // code c into a menu request code.
   // The default implementation provides a hopefully straightforward
@@ -495,7 +575,7 @@
 
   // Called if the request is denied
   virtual void On_Request_Denied(int c) const;
-  
+
   // Called if the item is not selectable
   virtual void On_Not_Selectable(int c) const;
 
@@ -519,21 +599,21 @@
 public:
   NCursesUserItem (const char* p_name,
 		   const char* p_descript = NULL,
-		   const T* p_UserData    = (T*)0)
+		   const T* p_UserData    = STATIC_CAST(T*)(0))
     : NCursesMenuItem (p_name, p_descript) {
       if (item)
-	OnError (::set_item_userptr (item, (void *)p_UserData));
-  };
+	OnError (::set_item_userptr (item, const_cast<void *>(reinterpret_cast<const void*>(p_UserData))));
+  }
 
-  virtual ~NCursesUserItem() {};
+  virtual ~NCursesUserItem() {}
 
   inline const T* UserData (void) const {
-    return (const T*)::item_userptr (item);
+    return reinterpret_cast<const T*>(::item_userptr (item));
   };
 
   inline virtual void setUserData(const T* p_UserData) {
     if (item)
-      OnError (::set_item_userptr (item, (void *)p_UserData));
+      OnError (::set_item_userptr (item, const_cast<void *>(reinterpret_cast<const void *>(p_UserData))));
   }
 };
 //
@@ -544,48 +624,48 @@
 template<class T> class NCURSES_IMPEXP NCursesUserMenu : public NCursesMenu
 {
 protected:
-  NCursesUserMenu( int  lines, 
-		   int  cols, 
-		   int  begin_y = 0, 
+  NCursesUserMenu( int  nlines,
+		   int  ncols,
+		   int  begin_y = 0,
 		   int  begin_x = 0,
-		   const T* p_UserData = (T*)0) 
-    : NCursesMenu(lines,cols,begin_y,begin_x) {
+		   const T* p_UserData = STATIC_CAST(T*)(0))
+    : NCursesMenu(nlines,ncols,begin_y,begin_x) {
       if (menu)
-	set_user ((void *)p_UserData);
+	set_user (const_cast<void *>(p_UserData));
   }
 
 public:
   NCursesUserMenu (NCursesMenuItem Items[],
-		   const T* p_UserData = (T*)0,
+		   const T* p_UserData = STATIC_CAST(T*)(0),
 		   bool with_frame=FALSE,
 		   bool autoDelete_Items=FALSE)
     : NCursesMenu (Items, with_frame, autoDelete_Items) {
       if (menu)
-	set_user ((void *)p_UserData);
+	set_user (const_cast<void *>(p_UserData));
   };
-  
+
   NCursesUserMenu (NCursesMenuItem Items[],
-		   int lines, 
-		   int cols, 
-		   int begin_y = 0, 
+		   int nlines,
+		   int ncols,
+		   int begin_y = 0,
 		   int begin_x = 0,
-		   const T* p_UserData = (T*)0,
+		   const T* p_UserData = STATIC_CAST(T*)(0),
 		   bool with_frame=FALSE)
-    : NCursesMenu (Items, lines, cols, begin_y, begin_x, with_frame) {
+    : NCursesMenu (Items, nlines, ncols, begin_y, begin_x, with_frame) {
       if (menu)
-	set_user ((void *)p_UserData);
-  };  
-  
+	set_user (const_cast<void *>(p_UserData));
+  };
+
   virtual ~NCursesUserMenu() {
   };
-  
+
   inline T* UserData (void) const {
-    return (T*)get_user ();
+    return reinterpret_cast<T*>(get_user ());
   };
 
   inline virtual void setUserData (const T* p_UserData) {
     if (menu)
-      set_user ((void *)p_UserData);
+      set_user (const_cast<void *>(p_UserData));
   }
 };
 
diff -Naur ncurses-5.4.orig/c++/cursesp.cc ncurses-5.4/c++/cursesp.cc
--- ncurses-5.4.orig/c++/cursesp.cc	2003-10-25 15:04:46.000000000 +0000
+++ ncurses-5.4/c++/cursesp.cc	2005-05-13 04:09:56.000000000 +0000
@@ -1,6 +1,6 @@
 // * this is for making emacs happy: -*-Mode: C++;-*-
 /****************************************************************************
- * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -35,11 +35,12 @@
 #include "cursesp.h"
 #include <string.h>
 
-MODULE_ID("$Id: cursesp.cc,v 1.21 2003/10/25 15:04:46 tom Exp $")
+MODULE_ID("$Id: cursesp.cc,v 1.24 2005/04/09 14:12:23 tom Exp $")
 
-NCursesPanel* NCursesPanel::dummy = (NCursesPanel*)0;
+NCursesPanel* NCursesPanel::dummy = static_cast<NCursesPanel*>(0);
 
-void NCursesPanel::init() {
+void NCursesPanel::init()
+{
   p = ::new_panel(w);
   if (!p)
     OnError(ERR);
@@ -48,11 +49,12 @@
   hook->m_user  = NULL;
   hook->m_back  = this;
   hook->m_owner = p;
-  ::set_panel_userptr(p, (void *)hook);
+  ::set_panel_userptr(p, reinterpret_cast<void *>(hook));
 }
 
-NCursesPanel::~NCursesPanel() {
-  UserHook* hook = (UserHook*)::panel_userptr(p);
+NCursesPanel::~NCursesPanel()
+{
+  UserHook* hook = UserPointer();
   assert(hook != 0 && hook->m_back==this && hook->m_owner==p);
   delete hook;
   ::del_panel(p);
@@ -60,7 +62,8 @@
 }
 
 void
-NCursesPanel::redraw() {
+NCursesPanel::redraw()
+{
   PANEL *pan;
 
   pan = ::panel_above(NULL);
@@ -73,26 +76,30 @@
 }
 
 int
-NCursesPanel::refresh() {
+NCursesPanel::refresh()
+{
   ::update_panels();
   return ::doupdate();
 }
 
 int
-NCursesPanel::noutrefresh() {
+NCursesPanel::noutrefresh()
+{
   ::update_panels();
   return OK;
 }
 
 void
-NCursesPanel::boldframe(const char *title, const char* btitle) {
+NCursesPanel::boldframe(const char *title, const char* btitle)
+{
   standout();
   frame(title, btitle);
   standend();
 }
 
 void
-NCursesPanel::frame(const char *title,const char *btitle) {
+NCursesPanel::frame(const char *title,const char *btitle)
+{
   int err = OK;
   if (!title && !btitle) {
     err = box();
@@ -106,7 +113,8 @@
 }
 
 void
-NCursesPanel::label(const char *tLabel, const char *bLabel) {
+NCursesPanel::label(const char *tLabel, const char *bLabel)
+{
   if (tLabel)
     centertext(0,tLabel);
   if (bLabel)
@@ -114,16 +122,18 @@
 }
 
 void
-NCursesPanel::centertext(int row,const char *label) {
-  if (label) {
-    int x = (maxx() - ::strlen(label)) / 2;
+NCursesPanel::centertext(int row,const char *labelText)
+{
+  if (labelText) {
+    int x = (maxx() - ::strlen(labelText)) / 2;
     if (x<0)
       x=0;
-    OnError(addstr(row, x, label, width()));
+    OnError(addstr(row, x, labelText, width()));
   }
 }
 
 int
-NCursesPanel::getKey(void) {
+NCursesPanel::getKey(void)
+{
   return getch();
 }
diff -Naur ncurses-5.4.orig/c++/cursesp.h ncurses-5.4/c++/cursesp.h
--- ncurses-5.4.orig/c++/cursesp.h	2003-10-25 15:04:46.000000000 +0000
+++ ncurses-5.4/c++/cursesp.h	2005-05-13 04:09:58.000000000 +0000
@@ -1,6 +1,6 @@
 // * This makes emacs happy -*-Mode: C++;-*-
 /****************************************************************************
- * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -34,7 +34,7 @@
 #ifndef NCURSES_CURSESP_H_incl
 #define NCURSES_CURSESP_H_incl 1
 
-// $Id: cursesp.h,v 1.18 2003/10/25 15:04:46 tom Exp $
+// $Id: cursesp.h,v 1.23 2005/04/30 21:01:56 Jeff.Chua Exp $
 
 #include <cursesw.h>
 
@@ -42,7 +42,9 @@
 #  include <panel.h>
 }
 
-class NCURSES_IMPEXP NCursesPanel : public NCursesWindow {
+class NCURSES_IMPEXP NCursesPanel
+  : public NCursesWindow
+{
 protected:
   PANEL *p;
   static NCursesPanel *dummy;
@@ -56,23 +58,33 @@
     const PANEL*        m_owner;     // the panel itself
   } UserHook;
 
+  inline UserHook *UserPointer()
+  {
+    UserHook* uptr = reinterpret_cast<UserHook*>(
+                           const_cast<void *>(::panel_userptr (p)));
+    return 0;
+  }
+
   void init();                       // Initialize the panel object
 
 protected:
-  void set_user(void *user) {
-    UserHook* uptr = (UserHook*)::panel_userptr (p);
+  void set_user(void *user)
+  {
+    UserHook* uptr = UserPointer();
     assert (uptr != 0 && uptr->m_back==this && uptr->m_owner==p);
     uptr->m_user = user;
   }
   // Set the user pointer of the panel.
-  
-  void *get_user() {
-    UserHook* uptr = (UserHook*)::panel_userptr (p);
+
+  void *get_user()
+  {
+    UserHook* uptr = UserPointer();
     assert (uptr != 0 && uptr->m_back==this && uptr->m_owner==p);
     return uptr->m_user;
   }
-  
-  void OnError (int err) const THROWS((NCursesPanelException)) {
+
+  void OnError (int err) const THROWS((NCursesPanelException))
+  {
     if (err==ERR)
       THROW(new NCursesPanelException (this, err));
   }
@@ -83,50 +95,76 @@
   virtual int getKey(void);
 
 public:
-  NCursesPanel(int lines,
-	       int cols,
+  NCursesPanel(int nlines,
+	       int ncols,
 	       int begin_y = 0,
 	       int begin_x = 0)
-    : NCursesWindow(lines,cols,begin_y,begin_x) {
-      init();
-  } 
+    : NCursesWindow(nlines,ncols,begin_y,begin_x), p()
+  {
+    init();
+  }
   // Create a panel with this size starting at the requested position.
 
-  NCursesPanel() : NCursesWindow(::stdscr) { init(); }
+  NCursesPanel()
+    : NCursesWindow(::stdscr), p()
+  {
+    init();
+  }
   // This constructor creates the default Panel associated with the
   // ::stdscr window
 
+  NCursesPanel& operator=(const NCursesPanel& rhs)
+  {
+    if (this != &rhs) {
+      *this = rhs;
+      NCursesWindow::operator=(rhs);
+    }
+    return *this;
+  }
+
+  NCursesPanel(const NCursesPanel& rhs)
+    : NCursesWindow(rhs),
+      p(rhs.p)
+  {
+  }
+
   virtual ~NCursesPanel();
-  
+
   // basic manipulation
-  inline void hide() {
+  inline void hide()
+  {
     OnError (::hide_panel(p));
   }
   // Hide the panel. It stays in the stack but becomes invisible.
 
-  inline void show() {
+  inline void show()
+  {
     OnError (::show_panel(p));
   }
   // Show the panel, i.e. make it visible.
 
-  inline void top() {
+  inline void top()
+  {
     OnError (::top_panel(p));
   }
   // Make this panel the top panel in the stack.
-  
-  inline void bottom() {
+
+  inline void bottom()
+  {
     OnError (::bottom_panel(p));
   }
   // Make this panel the bottom panel in the stack.
   // N.B.: The panel associated with ::stdscr is always on the bottom. So
   // actually bottom() makes the panel the first above ::stdscr.
-  
-  virtual int mvwin(int y, int x) {
+
+  virtual int mvwin(int y, int x)
+  {
     OnError(::move_panel(p, y, x));
     return OK;
   }
-  
-  inline bool hidden() const {
+
+  inline bool hidden() const
+  {
     return (::panel_hidden (p) ? TRUE : FALSE);
   }
   // Return TRUE if the panel is hidden, FALSE otherwise.
@@ -138,12 +176,14 @@
    need a reverse mapping from PANEL to NCursesPanel which needs some
    redesign of the low level stuff. At the moment, we define them in the
    interface but they will always produce an error. */
-  inline NCursesPanel& above() const {
+  inline NCursesPanel& above() const
+  {
     OnError(ERR);
     return *dummy;
   }
 
-  inline NCursesPanel& below() const {
+  inline NCursesPanel& below() const
+  {
     OnError(ERR);
     return *dummy;
   }
@@ -151,7 +191,7 @@
   // Those two are rewrites of the corresponding virtual members of
   // NCursesWindow
   virtual int refresh();
-  // Propagate all panel changes to the virtual screen and update the 
+  // Propagate all panel changes to the virtual screen and update the
   // physical screen.
 
   virtual int noutrefresh();
@@ -159,9 +199,9 @@
 
   static void redraw();
   // Redraw all panels.
- 
+
   // decorations
-  virtual void frame(const char* title=NULL, 
+  virtual void frame(const char* title=NULL,
 		     const char* btitle=NULL);
   // Put a frame around the panel and put the title centered in the top line
   // and btitle in the bottom line.
@@ -179,41 +219,45 @@
 };
 
 /* We use templates to provide a typesafe mechanism to associate
- * user data with a panel. A NCursesUserPanel<T> is a panel 
+ * user data with a panel. A NCursesUserPanel<T> is a panel
  * associated with some user data of type T.
  */
 template<class T> class NCursesUserPanel : public NCursesPanel
 {
 public:
-  NCursesUserPanel (int lines,
-		    int cols,
+  NCursesUserPanel (int nlines,
+		    int ncols,
 		    int begin_y = 0,
 		    int begin_x = 0,
-		    const T* p_UserData = (T*)0)
-    : NCursesPanel (lines, cols, begin_y, begin_x) {
+		    const T* p_UserData = STATIC_CAST(T*)(0))
+    : NCursesPanel (nlines, ncols, begin_y, begin_x)
+  {
       if (p)
-	set_user ((void *)p_UserData);
+	set_user (const_cast<void *>(p_UserData));
   };
   // This creates an user panel of the requested size with associated
   // user data pointed to by p_UserData.
-  
-  NCursesUserPanel(const T* p_UserData = (T*)0) : NCursesPanel() {
+
+  NCursesUserPanel(const T* p_UserData = STATIC_CAST(T*)(0)) : NCursesPanel()
+  {
     if (p)
-      set_user((void *)p_UserData);
+      set_user(const_cast<void *>(p_UserData));
   };
   // This creates an user panel associated with the ::stdscr and user data
   // pointed to by p_UserData.
 
   virtual ~NCursesUserPanel() {};
 
-  T* UserData (void) const {
-    return (T*)get_user ();
+  T* UserData (void) const
+  {
+    return reinterpret_cast<T*>(get_user ());
   };
   // Retrieve the user data associated with the panel.
-  
-  virtual void setUserData (const T* p_UserData) {
+
+  virtual void setUserData (const T* p_UserData)
+  {
     if (p)
-      set_user ((void *)p_UserData);
+      set_user (const_cast<void *>(p_UserData));
   }
   // Associate the user panel with the user data pointed to by p_UserData.
 };
diff -Naur ncurses-5.4.orig/c++/cursespad.cc ncurses-5.4/c++/cursespad.cc
--- ncurses-5.4.orig/c++/cursespad.cc	2003-10-25 15:04:46.000000000 +0000
+++ ncurses-5.4/c++/cursespad.cc	2005-05-13 04:09:54.000000000 +0000
@@ -1,6 +1,6 @@
 // * this is for making emacs happy: -*-Mode: C++;-*-
 /****************************************************************************
- * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -35,17 +35,17 @@
 #include "etip.h"
 #include "cursesw.h"
 
-MODULE_ID("$Id: cursespad.cc,v 1.7 2003/10/25 15:04:46 tom Exp $")
+MODULE_ID("$Id: cursespad.cc,v 1.9 2005/04/02 20:25:35 tom Exp $")
 
-NCursesPad::NCursesPad(int lines, int cols)
+NCursesPad::NCursesPad(int nlines, int ncols)
   : NCursesWindow(),
-    viewWin((NCursesWindow*)0),
-    viewSub((NCursesWindow*)0),
+    viewWin(static_cast<NCursesWindow*>(0)),
+    viewSub(static_cast<NCursesWindow*>(0)),
     h_gridsize(0), v_gridsize(0),
     min_row(0), min_col(0)
 {
-  w = ::newpad(lines,cols);
-  if ((WINDOW*)0==w) {
+  w = ::newpad(nlines, ncols);
+  if (static_cast<WINDOW*>(0) == w) {
     count--;
     err_handler("Cannot construct window");
   }
@@ -84,7 +84,7 @@
 {
   NCursesWindow* W = Win();
 
-  if ((NCursesWindow*)0 != W) {
+  if (static_cast<NCursesWindow*>(0) != W) {
     int Width  = W->width();
     int Height = W->height();
 
@@ -169,7 +169,7 @@
 int NCursesPad::refresh()
 {
   int res = noutrefresh();
-  if (res==OK && ((NCursesWindow*)0 != viewWin)) {
+  if (res==OK && (static_cast<NCursesWindow*>(0) != viewWin)) {
     res = (viewWin->refresh());
   }
   return(res);
@@ -179,7 +179,7 @@
 {
   int res = OK;
   NCursesWindow* W = Win();
-  if ((NCursesWindow*)0 != W) {
+  if (static_cast<NCursesWindow*>(0) != W) {
     res = copywin(*W,min_row,min_col,
 		  0,0,W->maxy(),W->maxx(),
 		  FALSE);
@@ -207,7 +207,7 @@
 
 void NCursesPad::setSubWindow(NCursesWindow& sub)
 {
-  if ((NCursesWindow*)0 == viewWin)
+  if (static_cast<NCursesWindow*>(0) == viewWin)
     err_handler("Pad has no viewport");
   if (!viewWin->isDescendant(sub))
     THROW(new NCursesException("NCursesFramePad", E_SYSTEM_ERROR));
@@ -217,9 +217,9 @@
 void NCursesFramedPad::OnOperation(int pad_req)
 {
   NCursesWindow* W = Win();
-  NCursesWindow* Win = getWindow();
+  NCursesWindow* W2 = getWindow();
 
-  if (((NCursesWindow*)0 != W) && ((NCursesWindow*)0 != Win)) {
+  if ((static_cast<NCursesWindow*>(0) != W) && (static_cast<NCursesWindow*>(0) != W2)) {
     int Width  = W->width();
     int Height = W->height();
     int i, row, col, h_len, v_len;
@@ -244,32 +244,32 @@
     if (row + v_len > Height)
       row = Height - v_len;
 
-    Win->vline(1,Width+1,Height);
-    Win->attron(A_REVERSE);
+    W2->vline(1,Width+1,Height);
+    W2->attron(A_REVERSE);
     if (v_len>=2) {
-      Win->addch(row+1,Width+1,ACS_UARROW);
+      W2->addch(row+1,Width+1,ACS_UARROW);
       for(i=2;i<v_len;i++)
-	Win->addch(row+i,Width+1,' ');
-      Win->addch(row+v_len,Width+1,ACS_DARROW);
+	W2->addch(row+i,Width+1,' ');
+      W2->addch(row+v_len,Width+1,ACS_DARROW);
     }
     else {
       for(i=1;i<=v_len;i++)
-	Win->addch(row+i,Width+1,' ');
+	W2->addch(row+i,Width+1,' ');
     }
-    Win->attroff(A_REVERSE);
+    W2->attroff(A_REVERSE);
 
-    Win->hline(Height+1,1,Width);
-    Win->attron(A_REVERSE);
+    W2->hline(Height+1,1,Width);
+    W2->attron(A_REVERSE);
     if (h_len >= 2) {
-      Win->addch(Height+1,col+1,ACS_LARROW);
+      W2->addch(Height+1,col+1,ACS_LARROW);
       for(i=2;i<h_len;i++)
-	Win->addch(Height+1,col+i,' ');
-      Win->addch(Height+1,col+h_len,ACS_RARROW);
+	W2->addch(Height+1,col+i,' ');
+      W2->addch(Height+1,col+h_len,ACS_RARROW);
     }
     else {
       for(i=1;i<=h_len;i++)
-	Win->addch(Height+1,col+i,' ');
+	W2->addch(Height+1,col+i,' ');
     }
-    Win->attroff(A_REVERSE);
+    W2->attroff(A_REVERSE);
   }
 }
diff -Naur ncurses-5.4.orig/c++/cursesw.cc ncurses-5.4/c++/cursesw.cc
--- ncurses-5.4.orig/c++/cursesw.cc	2003-10-25 15:02:46.000000000 +0000
+++ ncurses-5.4/c++/cursesw.cc	2005-05-13 04:09:54.000000000 +0000
@@ -26,7 +26,7 @@
 #include "internal.h"
 #include "cursesw.h"
 
-MODULE_ID("$Id: cursesw.cc,v 1.26 2003/10/25 15:02:46 tom Exp $")
+MODULE_ID("$Id: cursesw.cc,v 1.29 2005/04/02 20:28:50 tom Exp $")
 
 #define COLORS_NEED_INITIALIZATION  -1
 #define COLORS_NOT_INITIALIZED       0
@@ -150,7 +150,8 @@
 }
 
 void
-NCursesWindow::initialize() {
+NCursesWindow::initialize()
+{
   if (!b_initialized) {
     ::initscr();
     b_initialized = TRUE;
@@ -163,21 +164,24 @@
   }
 }
 
-NCursesWindow::NCursesWindow() {
+NCursesWindow::NCursesWindow()
+  : w(), alloced(), par(), subwins(), sib()
+{
   initialize();
 
-  w = (WINDOW *)0;
+  w = static_cast<WINDOW *>(0);
   init();
   alloced = FALSE;
   subwins = par = sib = 0;
   count++;
 }
 
-NCursesWindow::NCursesWindow(int lines, int cols, int begin_y, int begin_x)
+NCursesWindow::NCursesWindow(int nlines, int ncols, int begin_y, int begin_x)
+  : w(), alloced(), par(), subwins(), sib()
 {
     initialize();
 
-    w = ::newwin(lines, cols, begin_y, begin_x);
+    w = ::newwin(nlines, ncols, begin_y, begin_x);
     if (w == 0) {
 	err_handler("Cannot construct window");
     }
@@ -189,6 +193,7 @@
 }
 
 NCursesWindow::NCursesWindow(WINDOW* &window)
+  : w(), alloced(), par(), subwins(), sib()
 {
     initialize();
 
@@ -201,6 +206,7 @@
 
 NCursesWindow::NCursesWindow(NCursesWindow& win, int l, int c,
 			     int begin_y, int begin_x, char absrel)
+  : w(), alloced(), par(), subwins(), sib()
 {
     initialize();
     if (absrel == 'a') { // absolute origin
@@ -227,6 +233,7 @@
 
 NCursesWindow::NCursesWindow(NCursesWindow& win,
 				bool do_box NCURSES_PARAM_INIT(TRUE))
+  : w(), alloced(), par(), subwins(), sib()
 {
   initialize();
   w = :: derwin(win.w,win.height()-2,win.width()-2,1,1);
@@ -247,7 +254,8 @@
   }
 }
 
-NCursesWindow NCursesWindow::Clone() {
+NCursesWindow NCursesWindow::Clone()
+{
   WINDOW *d = ::dupwin(w);
   NCursesWindow W(d);
   W.subwins = subwins;
@@ -264,29 +272,32 @@
 
 extern "C" int _nc_ripoffline(int,int (*init)(WINDOW*,int));
 
-NCursesWindow::NCursesWindow(WINDOW *win, int cols) {
+NCursesWindow::NCursesWindow(WINDOW *win, int ncols)
+  : w(), alloced(), par(), subwins(), sib()
+{
   initialize();
   w = win;
-  assert((w->_maxx+1)==cols);
+  assert((w->_maxx+1)==ncols);
   alloced = FALSE;
   subwins = par = sib = 0;
 }
 
-int NCursesWindow::ripoff_init(WINDOW *w, int cols)
+int _nc_xx_ripoff_init(WINDOW *w, int ncols)
 {
   int res = ERR;
 
   RIPOFFINIT init = *prip++;
   if (init) {
-    NCursesWindow* W = new NCursesWindow(w,cols);
+    NCursesWindow* W = new NCursesWindow(w,ncols);
     res = init(*W);
   }
   return res;
 }
 
 int NCursesWindow::ripoffline(int ripoff_lines,
-			      int (*init)(NCursesWindow& win)) {
-  int code = ::_nc_ripoffline(ripoff_lines,ripoff_init);
+			      int (*init)(NCursesWindow& win))
+{
+  int code = ::_nc_ripoffline(ripoff_lines,_nc_xx_ripoff_init);
   if (code==OK && init && ripoff_lines) {
     R_INIT[r_init_idx++] = init;
   }
@@ -294,7 +305,8 @@
 }
 
 bool
-NCursesWindow::isDescendant(NCursesWindow& win) {
+NCursesWindow::isDescendant(NCursesWindow& win)
+{
   for (NCursesWindow* p = subwins; p != NULL; p = p->sib) {
     if (p==&win)
       return TRUE;
@@ -386,7 +398,7 @@
     short fore, back;
 
     if (colorInitialized==COLORS_ARE_REALLY_THERE) {
-      if (::pair_content((short)PAIR_NUMBER(w->_attrs), &fore, &back))
+      if (::pair_content(static_cast<short>(PAIR_NUMBER(w->_attrs)), &fore, &back))
 	err_handler("Can't get color pair");
     }
     else {
@@ -427,7 +439,7 @@
 NCursesWindow::setpalette(short fore, short back)
 {
   if (colorInitialized==COLORS_ARE_REALLY_THERE)
-    return setpalette(fore, back, (short)PAIR_NUMBER(w->_attrs));
+    return setpalette(fore, back, static_cast<short>(PAIR_NUMBER(w->_attrs)));
   else
     return OK;
 }
@@ -449,7 +461,8 @@
 #if HAVE_HAS_KEY
 extern "C" int _nc_has_mouse(void);
 
-bool NCursesWindow::has_mouse() const {
+bool NCursesWindow::has_mouse() const
+{
   return ((::has_key(KEY_MOUSE) || ::_nc_has_mouse())
 	  ? TRUE : FALSE);
 }
diff -Naur ncurses-5.4.orig/c++/cursesw.h ncurses-5.4/c++/cursesw.h
--- ncurses-5.4.orig/c++/cursesw.h	2004-02-08 00:11:54.000000000 +0000
+++ ncurses-5.4/c++/cursesw.h	2005-05-13 04:09:54.000000000 +0000
@@ -1,6 +1,6 @@
 // * This makes emacs happy -*-Mode: C++;-*-
 /****************************************************************************
- * Copyright (c) 1998-2001,2004 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -30,7 +30,7 @@
 #ifndef NCURSES_CURSESW_H_incl
 #define NCURSES_CURSESW_H_incl 1
 
-// $Id: cursesw.h,v 1.30 2004/02/08 00:11:54 tom Exp $
+// $Id: cursesw.h,v 1.35 2005/04/02 21:57:10 tom Exp $
 
 #include <etip.h>
 #include <stdarg.h>
@@ -690,9 +690,10 @@
  *
  * C++ class for windows.
  *
- *
  */
 
+extern "C" int     _nc_xx_ripoff_init(WINDOW *, int);
+
 class NCURSES_IMPEXP NCursesWindow
 {
   friend class NCursesMenu;
@@ -701,7 +702,7 @@
 private:
   static bool    b_initialized;
   static void    initialize();
-  static int     ripoff_init(WINDOW *, int);
+  friend int     _nc_xx_ripoff_init(WINDOW *, int);
 
   void           init();
 
@@ -712,10 +713,10 @@
 
   // This private constructor is only used during the initialization
   // of windows generated by ripoffline() calls.
-  NCursesWindow(WINDOW* win, int cols);
+  NCursesWindow(WINDOW* win, int ncols);
 
 protected:
-  void           err_handler(const char *) const THROWS(NCursesException);
+  virtual void   err_handler(const char *) const THROWS(NCursesException);
   // Signal an error with the given message text.
 
   static long count;        // count of all active windows:
@@ -741,14 +742,14 @@
 public:
   NCursesWindow(WINDOW* &window);  // useful only for stdscr
 
-  NCursesWindow(int lines,         // number of lines
-		int cols,          // number of columns
+  NCursesWindow(int nlines,        // number of lines
+		int ncols,         // number of columns
 		int begin_y,       // line origin
 		int begin_x);      // col origin
 
   NCursesWindow(NCursesWindow& par,// parent window
-		int lines,         // number of lines
-		int cols,          // number of columns
+		int nlines,        // number of lines
+		int ncols,         // number of columns
 		int begin_y,       // absolute or relative
 		int begin_x,       //   origins:
 		char absrel = 'a');// if `a', begin_y & begin_x are
@@ -760,6 +761,18 @@
   // is two lines and two columns smaller and begins at (1,1).
   // We may automatically request the box around it.
 
+  NCursesWindow& operator=(const NCursesWindow& rhs)
+  {
+    if (this != &rhs)
+      *this = rhs;
+    return *this;
+  }
+
+  NCursesWindow(const NCursesWindow& rhs)
+    : w(rhs.w), alloced(rhs.alloced), par(rhs.par), subwins(rhs.subwins), sib(rhs.sib)
+  {
+  }
+
   virtual ~NCursesWindow();
 
   NCursesWindow Clone();
@@ -979,10 +992,10 @@
   int            attron (chtype at) { return ::wattron (w, at); }
   // Switch on the window attributes;
 
-  int            attroff(chtype at) { return ::wattroff(w, (int) at); }
+  int            attroff(chtype at) { return ::wattroff(w, static_cast<int>(at)); }
   // Switch off the window attributes;
 
-  int            attrset(chtype at) { return ::wattrset(w, (int) at); }
+  int            attrset(chtype at) { return ::wattrset(w, static_cast<int>(at)); }
   // Set the window attributes;
 
   int            color_set(short color_pair_number, void* opts=NULL) {
@@ -1112,7 +1125,7 @@
   // Mark the whole window as unmodified.
 
   int            touchln(int s, int cnt, bool changed=TRUE) {
-    return ::wtouchln(w, s, cnt, (int)(changed?1:0)); }
+    return ::wtouchln(w, s, cnt, static_cast<int>(changed ? 1 : 0)); }
   // Mark cnt lines beginning from line s as changed or unchanged, depending
   // on the value of the changed flag.
 
@@ -1196,9 +1209,9 @@
   int            copywin(NCursesWindow& win,
 			 int sminrow, int smincol,
 			 int dminrow, int dmincol,
-			 int dmaxrow, int dmaxcol, bool overlay=TRUE) {
+			 int dmaxrow, int dmaxcol, bool overlaywin=TRUE) {
     return ::copywin(w, win.w, sminrow, smincol, dminrow, dmincol,
-		     dmaxrow, dmaxcol, (int)(overlay?1:0)); }
+		     dmaxrow, dmaxcol, static_cast<int>(overlaywin ? 1 : 0)); }
   // Overlay or overwrite the rectangle in win given by dminrow,dmincol,
   // dmaxrow,dmaxcol with the rectangle in this window beginning at
   // sminrow,smincol.
@@ -1228,26 +1241,28 @@
 // -------------------------------------------------------------------------
 // We leave this here for compatibility reasons.
 // -------------------------------------------------------------------------
-class NCURSES_IMPEXP NCursesColorWindow : public NCursesWindow {
+class NCURSES_IMPEXP NCursesColorWindow : public NCursesWindow
+{
 public:
   NCursesColorWindow(WINDOW* &window)   // useful only for stdscr
     : NCursesWindow(window) {
       useColors(); }
 
-  NCursesColorWindow(int lines,         // number of lines
-		     int cols,          // number of columns
+  NCursesColorWindow(int nlines,        // number of lines
+		     int ncols,         // number of columns
 		     int begin_y,       // line origin
 		     int begin_x)       // col origin
-    : NCursesWindow(lines, cols, begin_y, begin_x) {
+    : NCursesWindow(nlines, ncols, begin_y, begin_x) {
       useColors(); }
 
-  NCursesColorWindow(NCursesWindow& par,// parent window
-		     int lines,         // number of lines
-		     int cols,          // number of columns
+  NCursesColorWindow(NCursesWindow& parentWin,// parent window
+		     int nlines,        // number of lines
+		     int ncols,         // number of columns
 		     int begin_y,       // absolute or relative
 		     int begin_x,       //   origins:
 		     char absrel = 'a') // if `a', by & bx are
-    : NCursesWindow(par, lines, cols,   // absolute screen pos,
+    : NCursesWindow(parentWin,
+		    nlines, ncols,	// absolute screen pos,
 		    begin_y, begin_x,   // else if `r', they are
 		    absrel ) {          // relative to par origin
       useColors(); }
@@ -1272,7 +1287,8 @@
 // Pad Support. We allow an association of a pad with a "real" window
 // through which the pad may be viewed.
 // -------------------------------------------------------------------------
-class NCURSES_IMPEXP NCursesPad : public NCursesWindow {
+class NCURSES_IMPEXP NCursesPad : public NCursesWindow
+{
 private:
   NCursesWindow* viewWin;       // the "viewport" window
   NCursesWindow* viewSub;       // the "viewport" subwindow
@@ -1314,9 +1330,29 @@
   // the refresh() operation is done.
 
 public:
-  NCursesPad(int lines, int cols);
+  NCursesPad(int nlines, int ncols);
   // create a pad with the given size
 
+  NCursesPad& operator=(const NCursesPad& rhs)
+  {
+    if (this != &rhs) {
+      *this = rhs;
+      NCursesWindow::operator=(rhs);
+    }
+    return *this;
+  }
+
+  NCursesPad(const NCursesPad& rhs)
+    : NCursesWindow(rhs),
+      viewWin(rhs.viewWin),
+      viewSub(rhs.viewSub),
+      h_gridsize(rhs.h_gridsize),
+      v_gridsize(rhs.v_gridsize),
+      min_row(rhs.min_row),
+      min_col(rhs.min_col)
+  {
+  }
+
   virtual ~NCursesPad() {}
 
   int echochar(const chtype ch) { return ::pechochar(w, ch); }
@@ -1364,14 +1400,15 @@
 // A FramedPad is constructed always with a viewport window. This viewport
 // will be framed (by a box() command) and the interior of the box is the
 // viewport subwindow. On the frame we display scrollbar sliders.
-class NCURSES_IMPEXP NCursesFramedPad : public NCursesPad {
+class NCURSES_IMPEXP NCursesFramedPad : public NCursesPad
+{
 protected:
   virtual void OnOperation(int pad_req);
 
 public:
-  NCursesFramedPad(NCursesWindow& win, int lines, int cols,
+  NCursesFramedPad(NCursesWindow& win, int nlines, int ncols,
 		   int v_grid = 1, int h_grid = 1)
-    : NCursesPad(lines, cols) {
+    : NCursesPad(nlines, ncols) {
     NCursesPad::setWindow(win, v_grid, h_grid);
     NCursesPad::setSubWindow(*(new NCursesWindow(win)));
   }
diff -Naur ncurses-5.4.orig/c++/cursslk.cc ncurses-5.4/c++/cursslk.cc
--- ncurses-5.4.orig/c++/cursslk.cc	2003-10-25 15:04:46.000000000 +0000
+++ ncurses-5.4/c++/cursslk.cc	2005-05-13 04:09:54.000000000 +0000
@@ -1,6 +1,6 @@
 // * this is for making emacs happy: -*-Mode: C++;-*-
 /****************************************************************************
- * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -36,21 +36,25 @@
 #include "cursesapp.h"
 #include <string.h>
 
-MODULE_ID("$Id: cursslk.cc,v 1.11 2003/10/25 15:04:46 tom Exp $")
+MODULE_ID("$Id: cursslk.cc,v 1.14 2005/04/03 12:49:46 tom Exp $")
 
-void Soft_Label_Key_Set::Soft_Label_Key::operator=(char *text)  {
+Soft_Label_Key_Set::Soft_Label_Key&
+  Soft_Label_Key_Set::Soft_Label_Key::operator=(char *text)
+{
   delete[] label;
   label = new char[1 + ::strlen(text)];
   (::strcpy)(label,text);
+  return *this;
 }
 
 long Soft_Label_Key_Set::count      = 0L;
 int  Soft_Label_Key_Set::num_labels = 0;
 
-Soft_Label_Key_Set::Label_Layout 
+Soft_Label_Key_Set::Label_Layout
   Soft_Label_Key_Set::format = None;
 
-void Soft_Label_Key_Set::init() {
+void Soft_Label_Key_Set::init()
+{
   slk_array = new Soft_Label_Key[num_labels];
   for(int i=0; i < num_labels; i++) {
     slk_array[i].num = i+1;
@@ -58,18 +62,24 @@
   b_attrInit = FALSE;
 }
 
-Soft_Label_Key_Set::Soft_Label_Key_Set() {
+Soft_Label_Key_Set::Soft_Label_Key_Set()
+  : b_attrInit(FALSE),
+    slk_array(NULL)
+{
   if (format==None)
     Error("No default SLK layout");
   init();
 }
 
-Soft_Label_Key_Set::Soft_Label_Key_Set(Soft_Label_Key_Set::Label_Layout fmt) {
+Soft_Label_Key_Set::Soft_Label_Key_Set(Soft_Label_Key_Set::Label_Layout fmt)
+  : b_attrInit(FALSE),
+    slk_array(NULL)
+{
   if (fmt==None)
     Error("Invalid SLK Layout");
   if (count++==0) {
     format = fmt;
-    if (ERR == ::slk_init((int)fmt))
+    if (ERR == ::slk_init(static_cast<int>(fmt)))
       Error("slk_init");
     num_labels = (fmt>=PC_Style?12:8);
   }
@@ -103,7 +113,8 @@
   noutrefresh();
 }
 
-void Soft_Label_Key_Set::activate_labels(bool bf) {
+void Soft_Label_Key_Set::activate_labels(bool bf)
+{
   if (!b_attrInit) {
     NCursesApplication* A = NCursesApplication::getApplication();
     if (A) attrset(A->labels());
diff -Naur ncurses-5.4.orig/c++/cursslk.h ncurses-5.4/c++/cursslk.h
--- ncurses-5.4.orig/c++/cursslk.h	2003-10-25 15:04:46.000000000 +0000
+++ ncurses-5.4/c++/cursslk.h	2005-05-13 04:09:54.000000000 +0000
@@ -1,6 +1,6 @@
 // * this is for making emacs happy: -*-Mode: C++;-*-
 /****************************************************************************
- * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -31,7 +31,7 @@
  *   Author: Juergen Pfeifer, 1997                                          *
  ****************************************************************************/
 
-// $Id: cursslk.h,v 1.9 2003/10/25 15:04:46 tom Exp $
+// $Id: cursslk.h,v 1.12 2005/04/03 12:50:24 tom Exp $
 
 #ifndef NCURSES_CURSSLK_H_incl
 #define NCURSES_CURSSLK_H_incl
@@ -51,28 +51,45 @@
     Justification format;  // The Justification
     int num;               // The number of the Label
 
-    Soft_Label_Key() : label((char*)0),format(Left),num(-1) {
+    Soft_Label_Key() : label(NULL), format(Left), num(-1) {
     }
-    
+
     virtual ~Soft_Label_Key() {
       delete[] label;
     };
 
   public:
     // Set the text of the Label
-    void operator=(char *text);
-    
+    Soft_Label_Key& operator=(char *text);
+
     // Set the Justification of the Label
-    inline void operator=(Justification just) {
+    Soft_Label_Key& operator=(Justification just) {
       format = just;
+      return *this;
     }
-	 
+
     // Retrieve the text of the label
     inline char* operator()(void) const {
-      return label; 
+      return label;
+    }
+
+    Soft_Label_Key& operator=(const Soft_Label_Key& rhs)
+    {
+      if (this != &rhs) {
+        *this = rhs;
+      }
+      return *this;
+    }
+
+    Soft_Label_Key(const Soft_Label_Key& rhs)
+      : label(NULL),
+        format(rhs.format),
+        num(rhs.num)
+    {
+      *this = rhs.label;
     }
   };
-  
+
 public:
   typedef enum {
     None                = -1,
@@ -87,7 +104,7 @@
   static Label_Layout NCURSES_IMPEXP  format;     // Layout of the Key Sets
   static int  NCURSES_IMPEXP num_labels;          // Number Of Labels in Key Sets
   bool NCURSES_IMPEXP b_attrInit;                 // Are attributes initialized
-  
+
   Soft_Label_Key *slk_array;       // The array of SLK's
 
   // Init the Key Set
@@ -105,13 +122,13 @@
   }
 
   // Remove SLK's from screen
-  void clear() { 
+  void clear() {
     if (ERR==::slk_clear())
       Error("slk_clear");
-  }    
+  }
 
   // Restore them
-  void restore() { 
+  void restore() {
     if (ERR==::slk_restore())
       Error("slk_restore");
   }
@@ -128,29 +145,45 @@
   // with a layout by the constructor above. This layout will be reused.
   NCURSES_IMPEXP Soft_Label_Key_Set();
 
+  Soft_Label_Key_Set& operator=(const Soft_Label_Key_Set& rhs)
+  {
+    if (this != &rhs) {
+      *this = rhs;
+      init();		// allocate a new slk_array[]
+    }
+    return *this;
+  }
+
+  Soft_Label_Key_Set(const Soft_Label_Key_Set& rhs)
+    : b_attrInit(rhs.b_attrInit),
+      slk_array(NULL)
+  {
+    init();		// allocate a new slk_array[]
+  }
+
   virtual ~Soft_Label_Key_Set();
 
   // Get Label# i. Label counting starts with 1!
   NCURSES_IMPEXP Soft_Label_Key& operator[](int i);
 
   // Retrieve number of Labels
-  inline int labels() const { return num_labels; }          
+  inline int labels() const { return num_labels; }
 
   // Refresh the SLK portion of the screen
-  inline void refresh() { 
+  inline void refresh() {
     if (ERR==::slk_refresh())
       Error("slk_refresh");
   }
 
   // Mark the SLK portion of the screen for refresh, defer actual refresh
   // until next update call.
-  inline void noutrefresh() { 
+  inline void noutrefresh() {
     if (ERR==::slk_noutrefresh())
       Error("slk_noutrefresh");
   }
 
   // Mark the whole SLK portion of the screen as modified
-  inline void touch() { 
+  inline void touch() {
     if (ERR==::slk_touch())
       Error("slk_touch");
   }
diff -Naur ncurses-5.4.orig/c++/demo.cc ncurses-5.4/c++/demo.cc
--- ncurses-5.4.orig/c++/demo.cc	2004-01-15 00:21:27.000000000 +0000
+++ ncurses-5.4/c++/demo.cc	2005-05-13 04:09:59.000000000 +0000
@@ -6,9 +6,10 @@
  *   Demo code for NCursesMenu and NCursesForm written by
  *   Juergen Pfeifer
  *
- * $Id: demo.cc,v 1.24 2004/01/15 00:21:27 tom Exp $
+ * $Id: demo.cc,v 1.30 2005/05/07 18:53:14 Mike.Frysinger Exp $
  */
 
+#include "internal.h"
 #include "cursesapp.h"
 #include "cursesm.h"
 #include "cursesf.h"
@@ -141,10 +142,10 @@
 public:
   MyAction (const char* p_name,
             const T* p_UserData)
-    : NCursesUserItem<T>(p_name, (const char*)0, p_UserData)
-  {};
+    : NCursesUserItem<T>(p_name, static_cast<const char*>(0), p_UserData)
+  {}
 
-  ~MyAction() {}
+  virtual ~MyAction() {}
 
   bool action() {
     SillyDemo a;
@@ -153,6 +154,9 @@
   }
 };
 
+template class MyAction<UserData>;
+template class NCURSES_IMPEXP NCursesUserItem<UserData>;
+
 class QuitItem : public NCursesMenuItem
 {
 public:
@@ -171,7 +175,7 @@
 public:
   Label(const char* title,
         int row, int col)
-    : NCursesFormField(1,(int)::strlen(title),row,col) {
+    : NCursesFormField(1, static_cast<int>(::strlen(title)), row, col) {
       set_value(title);
       options_off(O_EDIT|O_ACTIVE);
   }
@@ -179,7 +183,8 @@
 //
 // -------------------------------------------------------------------------
 //
-class MyFieldType : public UserDefinedFieldType {
+class MyFieldType : public UserDefinedFieldType
+{
 private:
   int chk;
 protected:
@@ -207,7 +212,13 @@
   static const char *weekdays[];
 
 public:
-  TestForm() : NCursesForm(13,51,(lines()-15)/2,(cols()-53)/2) {
+  TestForm()
+    : NCursesForm(13, 51, (lines() - 15)/2, (cols() - 53)/2),
+      F(),
+      mft(),
+      ift(),
+      eft()
+  {
 
     F     = new NCursesFormField*[10];
     mft   = new MyFieldType('X');
@@ -239,6 +250,19 @@
     F[8]->options_off(O_STATIC);  // make field dynamic
   }
 
+  TestForm& operator=(const TestForm& rhs)
+  {
+    if (this != &rhs) {
+      *this = rhs;
+    }
+    return *this;
+  }
+
+  TestForm(const TestForm& rhs)
+    : NCursesForm(rhs), F(), mft(), ift(), eft()
+  {
+  }
+
   ~TestForm() {
     delete mft;
     delete ift;
@@ -248,7 +272,7 @@
 
 const char* TestForm::weekdays[] = {
     "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday",
-    "Friday", "Saturday", (const char *)0 };
+    "Friday", "Saturday", NULL };
 //
 // -------------------------------------------------------------------------
 //
@@ -297,7 +321,7 @@
           if (i==0 || j==0)
             FP.addch('+');
           else
-            FP.addch((chtype)('A' + (gridcount++ % 26)));
+            FP.addch(static_cast<chtype>('A' + (gridcount++ % 26)));
         }
         else if (i % GRIDSIZE == 0)
           FP.addch('-');
@@ -318,7 +342,8 @@
 //
 // -------------------------------------------------------------------------
 //
-class PassiveItem : public NCursesMenuItem {
+class PassiveItem : public NCursesMenuItem
+{
 public:
   PassiveItem(const char* text) : NCursesMenuItem(text) {
     options_off(O_SELECTABLE);
@@ -346,13 +371,13 @@
     ::echo();
 
     s->printw("Enter decimal integers.  The running total will be shown\n");
-    int value = -1;
+    int nvalue = -1;
     int result = 0;
-    while (value != 0) {
-      value = 0;
-      s->scanw("%d", &value);
-      if (value != 0) {
-        s->printw("%d: ", result += value);
+    while (nvalue != 0) {
+      nvalue = 0;
+      s->scanw("%d", &nvalue);
+      if (nvalue != 0) {
+        s->printw("%d: ", result += nvalue);
       }
       s->refresh();
     }
@@ -380,7 +405,8 @@
 
 public:
   MyMenu ()
-    : NCursesMenu (n_items+2, 8, (lines()-10)/2, (cols()-10)/2)
+    : NCursesMenu (n_items+2, 8, (lines()-10)/2, (cols()-10)/2),
+      P(), I(), u()
   {
     u = new UserData(1);
     I = new NCursesMenuItem*[1+n_items];
@@ -400,6 +426,19 @@
     P->show();
   }
 
+  MyMenu& operator=(const MyMenu& rhs)
+  {
+    if (this != &rhs) {
+      *this = rhs;
+    }
+    return *this;
+  }
+
+  MyMenu(const MyMenu& rhs)
+    : NCursesMenu(rhs), P(), I(), u()
+  {
+  }
+
   ~MyMenu()
   {
     P->hide();
@@ -445,7 +484,8 @@
 //
 // -------------------------------------------------------------------------
 //
-class TestApplication : public NCursesApplication {
+class TestApplication : public NCursesApplication
+{
 protected:
   int titlesize() const { return 1; }
   void title();
@@ -461,7 +501,8 @@
   int run();
 };
 
-void TestApplication::init_labels(Soft_Label_Key_Set& S) const {
+void TestApplication::init_labels(Soft_Label_Key_Set& S) const
+{
   for(int i=1; i <= S.labels(); i++) {
     char buf[5];
     ::sprintf(buf,"Key%02d",i);
@@ -470,17 +511,19 @@
   }
 }
 
-void TestApplication::title() {
-  const char * const title = "Simple C++ Binding Demo";
-  const int len = ::strlen(title);
+void TestApplication::title()
+{
+  const char * const titleText = "Simple C++ Binding Demo";
+  const int len = ::strlen(titleText);
 
   titleWindow->bkgd(screen_titles());
-  titleWindow->addstr(0,(titleWindow->cols()-len)/2,title);
+  titleWindow->addstr(0,(titleWindow->cols() - len)/2, titleText);
   titleWindow->noutrefresh();
 }
 
 
-int TestApplication::run() {
+int TestApplication::run()
+{
   MyMenu M;
   M();
   return 0;
diff -Naur ncurses-5.4.orig/c++/edit_cfg.sh ncurses-5.4/c++/edit_cfg.sh
--- ncurses-5.4.orig/c++/edit_cfg.sh	2003-12-20 13:14:25.000000000 +0000
+++ ncurses-5.4/c++/edit_cfg.sh	2005-05-13 04:09:58.000000000 +0000
@@ -1,7 +1,7 @@
 #!/bin/sh
-# $Id: edit_cfg.sh,v 1.13 2003/12/20 13:14:25 tom Exp $
+# $Id: edit_cfg.sh,v 1.14 2005/04/30 21:00:22 tom Exp $
 ##############################################################################
-# Copyright (c) 1998-2001,2003 Free Software Foundation, Inc.                #
+# Copyright (c) 1998-2003,2005 Free Software Foundation, Inc.                #
 #                                                                            #
 # Permission is hereby granted, free of charge, to any person obtaining a    #
 # copy of this software and associated documentation files (the "Software"), #
@@ -39,6 +39,7 @@
 echo "substituting autoconf'd values from $1 into $2"
 for name in \
 	CPP_HAS_PARAM_INIT \
+	CPP_HAS_STATIC_CAST \
 	ETIP_NEEDS_MATH_EXCEPTION \
 	ETIP_NEEDS_MATH_H \
 	HAVE_BUILTIN_H \
diff -Naur ncurses-5.4.orig/c++/etip.h.in ncurses-5.4/c++/etip.h.in
--- ncurses-5.4.orig/c++/etip.h.in	2003-10-25 15:05:58.000000000 +0000
+++ ncurses-5.4/c++/etip.h.in	2005-05-13 04:09:58.000000000 +0000
@@ -1,6 +1,6 @@
 // * This makes emacs happy -*-Mode: C++;-*-
 /****************************************************************************
- * Copyright (c) 1998,1999,2000,2001 Free Software Foundation, Inc.         *
+ * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -31,7 +31,7 @@
  *   Author: Juergen Pfeifer, 1997                                          *
  ****************************************************************************/
 
-// $Id: etip.h.in,v 1.25 2003/10/25 15:05:58 tom Exp $
+// $Id: etip.h.in,v 1.29 2005/04/30 21:19:11 tom Exp $
 
 #ifndef NCURSES_ETIP_H_incl
 #define NCURSES_ETIP_H_incl 1
@@ -73,6 +73,10 @@
 #define CPP_HAS_PARAM_INIT 0
 #endif
 
+#ifndef CPP_HAS_STATIC_CAST
+#define CPP_HAS_STATIC_CAST 0	// workaround for g++ 2.95.3
+#endif
+
 #ifndef USE_STRSTREAM_VSCAN
 #define USE_STRSTREAM_VSCAN 0
 #endif
@@ -135,6 +139,12 @@
 #define NCURSES_PARAM_INIT(value) /*nothing*/
 #endif
 
+#if CPP_HAS_STATIC_CAST
+#define STATIC_CAST(s) static_cast<s>
+#else
+#define STATIC_CAST(s) (s)
+#endif
+
 // Forward Declarations
 class NCURSES_IMPEXP NCursesPanel;
 class NCURSES_IMPEXP NCursesMenu;
@@ -154,9 +164,24 @@
     : message(msg), errorno (E_SYSTEM_ERROR)
     {};
 
+  NCursesException& operator=(const NCursesException& rhs)
+  {
+    errorno = rhs.errorno;
+    return *this;
+  }
+
+  NCursesException(const NCursesException& rhs)
+    : message(rhs.message), errorno(rhs.errorno)
+  {
+  }
+
   virtual const char *classname() const {
     return "NCursesWindow";
   }
+
+  virtual ~NCursesException()
+  {
+  }
 };
 
 class NCURSES_IMPEXP NCursesPanelException : public NCursesException
@@ -166,7 +191,7 @@
 
   NCursesPanelException (const char *msg, int err) :
     NCursesException (msg, err),
-    p ((NCursesPanel*)0)
+    p (static_cast<NCursesPanel*>(0))
     {};
 
   NCursesPanelException (const NCursesPanel* panel,
@@ -178,7 +203,7 @@
 
   NCursesPanelException (int err) :
     NCursesException ("panel library error", err),
-    p ((NCursesPanel*)0)
+    p (static_cast<NCursesPanel*>(0))
     {};
 
   NCursesPanelException (const NCursesPanel* panel,
@@ -187,10 +212,27 @@
     p (panel)
     {};
 
+  NCursesPanelException& operator=(const NCursesPanelException& rhs)
+  {
+    if (this != &rhs) {
+      NCursesException::operator=(rhs);
+      p = rhs.p;
+    }
+    return *this;
+  }
+
+  NCursesPanelException(const NCursesPanelException& rhs)
+    : NCursesException(rhs), p(rhs.p)
+  {
+  }
+
   virtual const char *classname() const {
     return "NCursesPanel";
   }
 
+  virtual ~NCursesPanelException()
+  {
+  }
 };
 
 class NCURSES_IMPEXP NCursesMenuException : public NCursesException
@@ -200,7 +242,7 @@
 
   NCursesMenuException (const char *msg, int err) :
     NCursesException (msg, err),
-    m ((NCursesMenu *)0)
+    m (static_cast<NCursesMenu *>(0))
     {};
 
   NCursesMenuException (const NCursesMenu* menu,
@@ -212,7 +254,7 @@
 
   NCursesMenuException (int err) :
     NCursesException ("menu library error", err),
-    m ((NCursesMenu *)0)
+    m (static_cast<NCursesMenu *>(0))
     {};
 
   NCursesMenuException (const NCursesMenu* menu,
@@ -221,10 +263,27 @@
     m (menu)
     {};
 
+  NCursesMenuException& operator=(const NCursesMenuException& rhs)
+  {
+    if (this != &rhs) {
+      NCursesException::operator=(rhs);
+      m = rhs.m;
+    }
+    return *this;
+  }
+
+  NCursesMenuException(const NCursesMenuException& rhs)
+    : NCursesException(rhs), m(rhs.m)
+  {
+  }
+
   virtual const char *classname() const {
     return "NCursesMenu";
   }
 
+  virtual ~NCursesMenuException()
+  {
+  }
 };
 
 class NCURSES_IMPEXP NCursesFormException : public NCursesException
@@ -234,7 +293,7 @@
 
   NCursesFormException (const char *msg, int err) :
     NCursesException (msg, err),
-    f ((NCursesForm*)0)
+    f (static_cast<NCursesForm*>(0))
     {};
 
   NCursesFormException (const NCursesForm* form,
@@ -246,7 +305,7 @@
 
   NCursesFormException (int err) :
     NCursesException ("form library error", err),
-    f ((NCursesForm*)0)
+    f (static_cast<NCursesForm*>(0))
     {};
 
   NCursesFormException (const NCursesForm* form,
@@ -255,10 +314,27 @@
     f (form)
     {};
 
+  NCursesFormException& operator=(const NCursesFormException& rhs)
+  {
+    if (this != &rhs) {
+      NCursesException::operator=(rhs);
+      f = rhs.f;
+    }
+    return *this;
+  }
+
+  NCursesFormException(const NCursesFormException& rhs)
+    : NCursesException(rhs), f(rhs.f)
+  {
+  }
+
   virtual const char *classname() const {
     return "NCursesForm";
   }
 
+  virtual ~NCursesFormException()
+  {
+  }
 };
 
 #if !((defined(__GNUG__) && defined(__EXCEPTIONS)) || defined(__SUNPRO_CC))
diff -Naur ncurses-5.4.orig/config.guess ncurses-5.4/config.guess
--- ncurses-5.4.orig/config.guess	2004-01-07 00:58:42.000000000 +0000
+++ ncurses-5.4/config.guess	2005-05-13 04:09:56.000000000 +0000
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
-timestamp='2004-01-05'
+timestamp='2005-03-24'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -53,7 +53,7 @@
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
@@ -197,15 +197,21 @@
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
 	echo "${machine}-${os}${release}"
 	exit 0 ;;
+    amd64:OpenBSD:*:*)
+	echo x86_64-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
     amiga:OpenBSD:*:*)
 	echo m68k-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
-    arc:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+    cats:OpenBSD:*:*)
+	echo arm-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
     hp300:OpenBSD:*:*)
 	echo m68k-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
+    luna88k:OpenBSD:*:*)
+    	echo m88k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
     mac68k:OpenBSD:*:*)
 	echo m68k-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
@@ -221,28 +227,33 @@
     mvmeppc:OpenBSD:*:*)
 	echo powerpc-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
-    pegasos:OpenBSD:*:*)
-	echo powerpc-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    pmax:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
     sgi:OpenBSD:*:*)
-	echo mipseb-unknown-openbsd${UNAME_RELEASE}
+	echo mips64-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
     sun3:OpenBSD:*:*)
 	echo m68k-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
-    wgrisc:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
     *:OpenBSD:*:*)
 	echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
+    *:ekkoBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+	exit 0 ;;
+    macppc:MirBSD:*:*)
+	echo powerppc-unknown-mirbsd${UNAME_RELEASE}
+	exit 0 ;;
+    *:MirBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+	exit 0 ;;
     alpha:OSF1:*:*)
-	if test $UNAME_RELEASE = "V4.0"; then
+	case $UNAME_RELEASE in
+	*4.0)
 		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
-	fi
+		;;
+	*5.*)
+	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+		;;
+	esac
 	# According to Compaq, /usr/sbin/psrinfo has been available on
 	# OSF/1 and Tru64 systems produced since 1995.  I hope that
 	# covers most systems running today.  This code pipes the CPU
@@ -280,14 +291,12 @@
 	    "EV7.9 (21364A)")
 		UNAME_MACHINE="alphaev79" ;;
 	esac
+	# A Pn.n version is a patched version.
 	# A Vn.n version is a released version.
 	# A Tn.n version is a released field test version.
 	# A Xn.n version is an unreleased experimental baselevel.
 	# 1.2 uses "1.2" for uname -r.
-	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-	exit 0 ;;
-    Alpha*:OpenVMS:*:*)
-	echo alpha-hp-vms
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
 	exit 0 ;;
     Alpha\ *:Windows_NT*:*)
 	# How do we know it's Interix rather than the generic POSIX subsystem?
@@ -310,8 +319,11 @@
     *:OS/390:*:*)
 	echo i370-ibm-openedition
 	exit 0 ;;
+    *:z/VM:*:*)
+	echo s390-ibm-zvmoe
+	exit 0 ;;
     *:OS400:*:*)
-	echo powerpc-ibm-os400
+        echo powerpc-ibm-os400
 	exit 0 ;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
 	echo arm-acorn-riscix${UNAME_RELEASE}
@@ -333,7 +345,7 @@
     DRS?6000:unix:4.0:6*)
 	echo sparc-icl-nx6
 	exit 0 ;;
-    DRS?6000:UNIX_SV:4.2*:7*)
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
 	case `/usr/bin/uname -p` in
 	    sparc) echo sparc-icl-nx7 && exit 0 ;;
 	esac ;;
@@ -405,6 +417,9 @@
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
         echo m68k-unknown-mint${UNAME_RELEASE}
         exit 0 ;;
+    m68k:machten:*:*)
+	echo m68k-apple-machten${UNAME_RELEASE}
+	exit 0 ;;
     powerpc:machten:*:*)
 	echo powerpc-apple-machten${UNAME_RELEASE}
 	exit 0 ;;
@@ -740,18 +755,18 @@
 	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 	exit 0 ;;
     *:UNICOS/mp:*:*)
-	echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 	exit 0 ;;
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
 	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-	exit 0 ;;
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+        exit 0 ;;
     5000:UNIX_System_V:4.*:*)
-	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
-	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
 	exit 0 ;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
 	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
@@ -763,21 +778,7 @@
 	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
 	exit 0 ;;
     *:FreeBSD:*:*)
-	# Determine whether the default compiler uses glibc.
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#include <features.h>
-	#if __GLIBC__ >= 2
-	LIBC=gnu
-	#else
-	LIBC=
-	#endif
-EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
-	# GNU/KFreeBSD systems have a "k" prefix to indicate we are using
-	# FreeBSD's kernel, but not the complete OS.
-	case ${LIBC} in gnu) kernel_only='k' ;; esac
-	echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
+	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
 	exit 0 ;;
     i*:CYGWIN*:*)
 	echo ${UNAME_MACHINE}-pc-cygwin
@@ -803,6 +804,9 @@
     i*:UWIN*:*)
 	echo ${UNAME_MACHINE}-pc-uwin
 	exit 0 ;;
+    amd64:CYGWIN*:*:*)
+	echo x86_64-unknown-cygwin
+	exit 0 ;;
     p*:CYGWIN*:*)
 	echo powerpcle-unknown-cygwin
 	exit 0 ;;
@@ -826,9 +830,18 @@
     cris:Linux:*:*)
 	echo cris-axis-linux-gnu
 	exit 0 ;;
+    crisv32:Linux:*:*)
+	echo crisv32-axis-linux-gnu
+	exit 0 ;;
+    frv:Linux:*:*)
+    	echo frv-unknown-linux-gnu
+	exit 0 ;;
     ia64:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit 0 ;;
+    m32r*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
     m68*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit 0 ;;
@@ -905,7 +918,7 @@
 	echo ${UNAME_MACHINE}-ibm-linux
 	exit 0 ;;
     sh64*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+    	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit 0 ;;
     sh*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
@@ -997,7 +1010,7 @@
     i*86:atheos:*:*)
 	echo ${UNAME_MACHINE}-unknown-atheos
 	exit 0 ;;
-    i*86:syllable:*:*)
+	i*86:syllable:*:*)
 	echo ${UNAME_MACHINE}-pc-syllable
 	exit 0 ;;
     i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
@@ -1069,9 +1082,9 @@
     M680?0:D-NIX:5.3:*)
 	echo m68k-diab-dnix
 	exit 0 ;;
-    M68*:*:R3V[567]*:*)
+    M68*:*:R3V[5678]*:*)
 	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
-    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
 	OS_REL=''
 	test -r /etc/.relid \
 	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@@ -1169,9 +1182,10 @@
 	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
 	exit 0 ;;
     *:Darwin:*:*)
-	case `uname -p` in
+	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+	case $UNAME_PROCESSOR in
 	    *86) UNAME_PROCESSOR=i686 ;;
-	    powerpc) UNAME_PROCESSOR=powerpc ;;
+	    unknown) UNAME_PROCESSOR=powerpc ;;
 	esac
 	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
 	exit 0 ;;
@@ -1186,6 +1200,9 @@
     *:QNX:*:4*)
 	echo i386-pc-qnx
 	exit 0 ;;
+    NSE-?:NONSTOP_KERNEL:*:*)
+	echo nse-tandem-nsk${UNAME_RELEASE}
+	exit 0 ;;
     NSR-?:NONSTOP_KERNEL:*:*)
 	echo nsr-tandem-nsk${UNAME_RELEASE}
 	exit 0 ;;
@@ -1228,10 +1245,20 @@
 	echo pdp10-unknown-its
 	exit 0 ;;
     SEI:*:*:SEIUX)
-	echo mips-sei-seiux${UNAME_RELEASE}
+        echo mips-sei-seiux${UNAME_RELEASE}
+	exit 0 ;;
+    *:DragonFly:*:*)
+	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
 	exit 0 ;;
-    *:DRAGONFLY:*:*)
-	echo ${UNAME_MACHINE}-unknown-dragonfly${UNAME_RELEASE}
+    *:*VMS:*:*)
+    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
+	case "${UNAME_MACHINE}" in
+	    A*) echo alpha-dec-vms && exit 0 ;;
+	    I*) echo ia64-dec-vms && exit 0 ;;
+	    V*) echo vax-dec-vms && exit 0 ;;
+	esac ;;
+    *:XENIX:*:SysV)
+	echo i386-pc-xenix
 	exit 0 ;;
 esac
 
@@ -1392,7 +1419,9 @@
 the operating system you are using. It is advised that you
 download the most up to date version of the config scripts from
 
-    ftp://ftp.gnu.org/pub/gnu/config/
+  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
+and
+  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
 
 If the version you run ($0) is already up to date, please
 send the following data and any information you think might be
diff -Naur ncurses-5.4.orig/config.sub ncurses-5.4/config.sub
--- ncurses-5.4.orig/config.sub	2004-01-07 01:00:46.000000000 +0000
+++ ncurses-5.4/config.sub	2005-05-13 04:09:56.000000000 +0000
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Configuration validation subroutine script.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
-timestamp='2004-01-05'
+timestamp='2005-02-10'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -70,7 +70,7 @@
 version="\
 GNU config.sub ($timestamp)
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
@@ -145,7 +145,7 @@
 	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
 	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
 	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-	-apple | -axis)
+	-apple | -axis | -knuth | -cray)
 		os=
 		basic_machine=$1
 		;;
@@ -237,7 +237,7 @@
 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
 	| i370 | i860 | i960 | ia64 \
 	| ip2k | iq2000 \
-	| m32r | m68000 | m68k | m88k | mcore \
+	| m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
 	| mips | mipsbe | mipseb | mipsel | mipsle \
 	| mips16 \
 	| mips64 | mips64el \
@@ -262,12 +262,12 @@
 	| pyramid \
 	| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
 	| sh64 | sh64le \
-	| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
+	| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
 	| strongarm \
 	| tahoe | thumb | tic4x | tic80 | tron \
 	| v850 | v850e \
 	| we32k \
-	| x86 | xscale | xstormy16 | xtensa \
+	| x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
 	| z8k)
 		basic_machine=$basic_machine-unknown
 		;;
@@ -283,8 +283,8 @@
 	# because (1) that's what they normally are, and
 	# (2) the word "unknown" tends to confuse beginning users.
 	i*86 | x86_64)
-		basic_machine=$basic_machine-pc
-		;;
+	  basic_machine=$basic_machine-pc
+	  ;;
 	# Object if more than one company name word.
 	*-*-*)
 		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
@@ -300,7 +300,7 @@
 	| avr-* \
 	| bs2000-* \
 	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
-	| clipper-* | cydra-* \
+	| clipper-* | craynv-* | cydra-* \
 	| d10v-* | d30v-* | dlx-* \
 	| elxsi-* \
 	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
@@ -308,9 +308,9 @@
 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
 	| i*86-* | i860-* | i960-* | ia64-* \
 	| ip2k-* | iq2000-* \
-	| m32r-* \
+	| m32r-* | m32rle-* \
 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-	| m88110-* | m88k-* | mcore-* \
+	| m88110-* | m88k-* | maxq-* | mcore-* \
 	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
 	| mips16-* \
 	| mips64-* | mips64el-* \
@@ -326,8 +326,9 @@
 	| mipsisa64sb1-* | mipsisa64sb1el-* \
 	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
 	| mipstx39-* | mipstx39el-* \
+	| mmix-* \
 	| msp430-* \
-	| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
+	| none-* | np1-* | ns16k-* | ns32k-* \
 	| orion-* \
 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
 	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
@@ -336,14 +337,14 @@
 	| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
 	| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
-	| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
 	| tahoe-* | thumb-* \
 	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
 	| tron-* \
 	| v850-* | v850e-* | vax-* \
 	| we32k-* \
-	| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
-	| xtensa-* \
+	| x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
+	| xstormy16-* | xtensa-* \
 	| ymp-* \
 	| z8k-*)
 		;;
@@ -363,6 +364,9 @@
 		basic_machine=a29k-amd
 		os=-udi
 		;;
+    	abacus)
+		basic_machine=abacus-unknown
+		;;
 	adobe68k)
 		basic_machine=m68010-adobe
 		os=-scout
@@ -442,12 +446,27 @@
 		basic_machine=j90-cray
 		os=-unicos
 		;;
+	craynv)
+		basic_machine=craynv-cray
+		os=-unicosmp
+		;;
+	cr16c)
+		basic_machine=cr16c-unknown
+		os=-elf
+		;;
 	crds | unos)
 		basic_machine=m68k-crds
 		;;
+	crisv32 | crisv32-* | etraxfs*)
+		basic_machine=crisv32-axis
+		;;
 	cris | cris-* | etrax*)
 		basic_machine=cris-axis
 		;;
+	crx)
+		basic_machine=crx-unknown
+		os=-elf
+		;;
 	da30 | da30-*)
 		basic_machine=m68k-da30
 		;;
@@ -470,6 +489,10 @@
 		basic_machine=m88k-motorola
 		os=-sysv3
 		;;
+	djgpp)
+		basic_machine=i586-pc
+		os=-msdosdjgpp
+		;;
 	dpx20 | dpx20-*)
 		basic_machine=rs6000-bull
 		os=-bosx
@@ -648,10 +671,6 @@
 	mips3*)
 		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
 		;;
-	mmix*)
-		basic_machine=mmix-knuth
-		os=-mmixware
-		;;
 	monitor)
 		basic_machine=m68k-rom68k
 		os=-coff
@@ -732,10 +751,6 @@
 	np1)
 		basic_machine=np1-gould
 		;;
-	nv1)
-		basic_machine=nv1-cray
-		os=-unicosmp
-		;;
 	nsr-tandem)
 		basic_machine=nsr-tandem
 		;;
@@ -1018,6 +1033,10 @@
 		basic_machine=hppa1.1-winbond
 		os=-proelf
 		;;
+	xbox)
+		basic_machine=i686-pc
+		os=-mingw32
+		;;
 	xps | xps100)
 		basic_machine=xps100-honeywell
 		;;
@@ -1048,6 +1067,9 @@
 	romp)
 		basic_machine=romp-ibm
 		;;
+	mmix)
+		basic_machine=mmix-knuth
+		;;
 	rs6000)
 		basic_machine=rs6000-ibm
 		;;
@@ -1070,7 +1092,7 @@
 	sh64)
 		basic_machine=sh64-unknown
 		;;
-	sparc | sparcv9 | sparcv9b)
+	sparc | sparcv8 | sparcv9 | sparcv9b)
 		basic_machine=sparc-sun
 		;;
 	cydra)
@@ -1114,8 +1136,8 @@
 if [ x"$os" != x"" ]
 then
 case $os in
-	# First match some system type aliases
-	# that might get confused with valid system types.
+        # First match some system type aliases
+        # that might get confused with valid system types.
 	# -solaris* is a basic system type, with this one exception.
 	-solaris1 | -solaris1.*)
 		os=`echo $os | sed -e 's|solaris1|sunos4|'`
@@ -1143,8 +1165,9 @@
 	      | -aos* \
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-	      | -hiux* | -386bsd* | -knetbsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \
-	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
+	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
 	      | -chorusos* | -chorusrdb* \
@@ -1194,7 +1217,7 @@
 	-opened*)
 		os=-openedition
 		;;
-	-os400*)
+        -os400*)
 		os=-os400
 		;;
 	-wince*)
@@ -1243,7 +1266,7 @@
 	-sinix*)
 		os=-sysv4
 		;;
-	-tpf*)
+        -tpf*)
 		os=-tpf
 		;;
 	-triton*)
@@ -1282,6 +1305,9 @@
 	-kaos*)
 		os=-kaos
 		;;
+	-zvmoe)
+		os=-zvmoe
+		;;
 	-none)
 		;;
 	*)
@@ -1313,9 +1339,9 @@
 	arm*-semi)
 		os=-aout
 		;;
-	c4x-* | tic4x-*)
-		os=-coff
-		;;
+    c4x-* | tic4x-*)
+        os=-coff
+        ;;
 	# This must come before the *-dec entry.
 	pdp10-*)
 		os=-tops20
@@ -1362,6 +1388,9 @@
 	*-ibm)
 		os=-aix
 		;;
+    	*-knuth)
+		os=-mmixware
+		;;
 	*-wec)
 		os=-proelf
 		;;
diff -Naur ncurses-5.4.orig/configure ncurses-5.4/configure
--- ncurses-5.4.orig/configure	2004-02-01 01:03:42.000000000 +0000
+++ ncurses-5.4/configure	2005-05-13 04:09:58.000000000 +0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 1.312 .
+# From configure.in Revision: 1.337 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by Autoconf 2.52.20030208.
 #
@@ -666,6 +666,7 @@
   --with-install-prefix   prefixes actual install-location ($DESTDIR)
 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
+  --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
   --with-build-cflags=XXX the build C compiler-flags
   --with-build-cppflags=XXX the build C preprocessor-flags
   --with-build-ldflags=XXX the build linker-flags
@@ -677,8 +678,8 @@
   --with-debug            generate debug-libraries (default)
   --with-profile          generate profile-libraries
   --with-termlib          generate separate terminfo library
-  --with-dbmalloc         test: use Conor Cahill's dbmalloc library
-  --with-dmalloc          test: use Gray Watson's dmalloc library
+  --with-dbmalloc         use Conor Cahill's dbmalloc library
+  --with-dmalloc          use Gray Watson's dmalloc library
   --with-gpm              use Alessandro Rubini's GPM library
   --with-sysmouse         use sysmouse (FreeBSD console)
   --enable-rpath          use rpath option when generating shared libraries
@@ -688,6 +689,7 @@
   --disable-database      do not use terminfo, only fallbacks/termcap
   --with-database=XXX     specify terminfo source to install
   --with-fallbacks=XXX    specify list of fallback terminal descriptions
+  --without-xterm-new     specify if xterm terminfo should be old version
   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
   --disable-big-core      assume machine has little memory
@@ -696,9 +698,15 @@
   --enable-getcap         fast termcap load, no xrefs to terminfo
   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
+  --disable-root-environ  limit environment when running as root
   --enable-symlinks       make tic use symbolic links not hard links
   --enable-broken_linker  compile with broken-linker support code
+  --enable-widec          compile with wide-char/UTF-8 code
+  --disable-lp64          allow chtype to be long (ignore _LP64)
+  --enable-largefile      compile-in large file support
+  --disable-largefile     omit support for large files
   --with-bool=TYPE        override fallback type of bool variable
+  --with-caps=alt         compile with alternate Caps file
   --with-ospeed=TYPE      override type of ospeed variable
   --enable-bsdpad         recognize BSD-style prefix padding
   --with-rcs-ids          compile-in RCS identifiers
@@ -718,16 +726,15 @@
 Development Code:
   --with-develop          enable all development options
   --enable-hard-tabs      compile with hard-tabs code
-  --disable-root-environ  limit environment when running as root
   --enable-xmc-glitch     compile with limited support for xmc
 Experimental Code:
   --disable-assumed-color do not assume anything about default-colors
   --disable-hashmap       compile without hashmap scrolling-optimization
   --enable-colorfgbg      compile with $COLORFGBG code
+  --enable-ext-colors     compile for experimental 256-color support
+  --enable-ext-mouse      compile for experimental mouse-encoding
   --enable-safe-sprintf   compile with experimental safe-sprintf code
   --disable-scroll-hints  compile without scroll-hints code
-  --enable-widec          compile with experimental wide-char/UTF-8 code
-  --with-caps=alt         compile with experimental alternate Caps file
 Testing/development Options:
   --enable-echo           build: display "compiling" commands (default)
   --enable-warnings       build: turn on GCC compiler warnings
@@ -936,7 +943,7 @@
 fi
 for ac_site_file in $CONFIG_SITE; do
   if test -r "$ac_site_file"; then
-    { echo "$as_me:939: loading site script $ac_site_file" >&5
+    { echo "$as_me:946: loading site script $ac_site_file" >&5
 echo "$as_me: loading site script $ac_site_file" >&6;}
     cat "$ac_site_file" >&5
     . "$ac_site_file"
@@ -947,7 +954,7 @@
   # Some versions of bash will fail to source /dev/null (special
   # files actually), so we avoid doing that.
   if test -f "$cache_file"; then
-    { echo "$as_me:950: loading cache $cache_file" >&5
+    { echo "$as_me:957: loading cache $cache_file" >&5
 echo "$as_me: loading cache $cache_file" >&6;}
     case $cache_file in
       [\\/]* | ?:[\\/]* ) . $cache_file;;
@@ -955,7 +962,7 @@
     esac
   fi
 else
-  { echo "$as_me:958: creating cache $cache_file" >&5
+  { echo "$as_me:965: creating cache $cache_file" >&5
 echo "$as_me: creating cache $cache_file" >&6;}
   >$cache_file
 fi
@@ -971,21 +978,21 @@
   eval ac_new_val="\$ac_env_${ac_var}_value"
   case $ac_old_set,$ac_new_set in
     set,)
-      { echo "$as_me:974: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+      { echo "$as_me:981: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
       ac_cache_corrupted=: ;;
     ,set)
-      { echo "$as_me:978: error: \`$ac_var' was not set in the previous run" >&5
+      { echo "$as_me:985: error: \`$ac_var' was not set in the previous run" >&5
 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
       ac_cache_corrupted=: ;;
     ,);;
     *)
       if test "x$ac_old_val" != "x$ac_new_val"; then
-        { echo "$as_me:984: error: \`$ac_var' has changed since the previous run:" >&5
+        { echo "$as_me:991: error: \`$ac_var' has changed since the previous run:" >&5
 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
-        { echo "$as_me:986:   former value:  $ac_old_val" >&5
+        { echo "$as_me:993:   former value:  $ac_old_val" >&5
 echo "$as_me:   former value:  $ac_old_val" >&2;}
-        { echo "$as_me:988:   current value: $ac_new_val" >&5
+        { echo "$as_me:995:   current value: $ac_new_val" >&5
 echo "$as_me:   current value: $ac_new_val" >&2;}
         ac_cache_corrupted=:
       fi;;
@@ -1004,9 +1011,9 @@
   fi
 done
 if $ac_cache_corrupted; then
-  { echo "$as_me:1007: error: changes in the environment can compromise the build" >&5
+  { echo "$as_me:1014: error: changes in the environment can compromise the build" >&5
 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
-  { { echo "$as_me:1009: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+  { { echo "$as_me:1016: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
    { (exit 1); exit 1; }; }
 fi
@@ -1026,10 +1033,10 @@
 echo "#! $SHELL" >conftest.sh
 echo  "exit 0"   >>conftest.sh
 chmod +x conftest.sh
-if { (echo "$as_me:1029: PATH=\".;.\"; conftest.sh") >&5
+if { (echo "$as_me:1036: PATH=\".;.\"; conftest.sh") >&5
   (PATH=".;."; conftest.sh) 2>&5
   ac_status=$?
-  echo "$as_me:1032: \$? = $ac_status" >&5
+  echo "$as_me:1039: \$? = $ac_status" >&5
   (exit $ac_status); }; then
   ac_path_separator=';'
 else
@@ -1046,7 +1053,7 @@
 cf_cv_abi_version=${NCURSES_MAJOR}
 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
 cf_cv_timestamp=`date`
-echo "$as_me:1049: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
+echo "$as_me:1056: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
 
 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
@@ -1054,7 +1061,7 @@
 # Check whether --with-rel-version or --without-rel-version was given.
 if test "${with_rel_version+set}" = set; then
   withval="$with_rel_version"
-  { echo "$as_me:1057: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
+  { echo "$as_me:1064: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
  cf_cv_rel_version=$withval
 fi;
@@ -1067,13 +1074,13 @@
   [0-9]*) #(vi
  	;;
   *)
-	{ { echo "$as_me:1070: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
+	{ { echo "$as_me:1077: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
    { (exit 1); exit 1; }; }
  	;;
   esac
 else
-  { { echo "$as_me:1076: error: Release major-version value is empty" >&5
+  { { echo "$as_me:1083: error: Release major-version value is empty" >&5
 echo "$as_me: error: Release major-version value is empty" >&2;}
    { (exit 1); exit 1; }; }
 fi
@@ -1083,13 +1090,13 @@
   [0-9]*) #(vi
  	;;
   *)
-	{ { echo "$as_me:1086: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
+	{ { echo "$as_me:1093: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
    { (exit 1); exit 1; }; }
  	;;
   esac
 else
-  { { echo "$as_me:1092: error: Release minor-version value is empty" >&5
+  { { echo "$as_me:1099: error: Release minor-version value is empty" >&5
 echo "$as_me: error: Release minor-version value is empty" >&2;}
    { (exit 1); exit 1; }; }
 fi
@@ -1099,7 +1106,7 @@
 # Check whether --with-abi-version or --without-abi-version was given.
 if test "${with_abi_version+set}" = set; then
   withval="$with_abi_version"
-  { echo "$as_me:1102: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
+  { echo "$as_me:1109: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
  cf_cv_abi_version=$withval
 fi;
@@ -1109,13 +1116,13 @@
   [0-9]*) #(vi
  	;;
   *)
-	{ { echo "$as_me:1112: error: ABI version is not a number: $cf_cv_abi_version" >&5
+	{ { echo "$as_me:1119: error: ABI version is not a number: $cf_cv_abi_version" >&5
 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
    { (exit 1); exit 1; }; }
  	;;
   esac
 else
-  { { echo "$as_me:1118: error: ABI version value is empty" >&5
+  { { echo "$as_me:1125: error: ABI version value is empty" >&5
 echo "$as_me: error: ABI version value is empty" >&2;}
    { (exit 1); exit 1; }; }
 fi
@@ -1137,7 +1144,7 @@
   fi
 done
 if test -z "$ac_aux_dir"; then
-  { { echo "$as_me:1140: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+  { { echo "$as_me:1147: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
    { (exit 1); exit 1; }; }
 fi
@@ -1147,11 +1154,11 @@
 
 # Make sure we can run config.sub.
 $ac_config_sub sun4 >/dev/null 2>&1 ||
-  { { echo "$as_me:1150: error: cannot run $ac_config_sub" >&5
+  { { echo "$as_me:1157: error: cannot run $ac_config_sub" >&5
 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
    { (exit 1); exit 1; }; }
 
-echo "$as_me:1154: checking build system type" >&5
+echo "$as_me:1161: checking build system type" >&5
 echo $ECHO_N "checking build system type... $ECHO_C" >&6
 if test "${ac_cv_build+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1160,23 +1167,23 @@
 test -z "$ac_cv_build_alias" &&
   ac_cv_build_alias=`$ac_config_guess`
 test -z "$ac_cv_build_alias" &&
-  { { echo "$as_me:1163: error: cannot guess build type; you must specify one" >&5
+  { { echo "$as_me:1170: error: cannot guess build type; you must specify one" >&5
 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
    { (exit 1); exit 1; }; }
 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
-  { { echo "$as_me:1167: error: $ac_config_sub $ac_cv_build_alias failed." >&5
+  { { echo "$as_me:1174: error: $ac_config_sub $ac_cv_build_alias failed." >&5
 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
    { (exit 1); exit 1; }; }
 
 fi
-echo "$as_me:1172: result: $ac_cv_build" >&5
+echo "$as_me:1179: result: $ac_cv_build" >&5
 echo "${ECHO_T}$ac_cv_build" >&6
 build=$ac_cv_build
 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 
-echo "$as_me:1179: checking host system type" >&5
+echo "$as_me:1186: checking host system type" >&5
 echo $ECHO_N "checking host system type... $ECHO_C" >&6
 if test "${ac_cv_host+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1185,20 +1192,20 @@
 test -z "$ac_cv_host_alias" &&
   ac_cv_host_alias=$ac_cv_build_alias
 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
-  { { echo "$as_me:1188: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+  { { echo "$as_me:1195: error: $ac_config_sub $ac_cv_host_alias failed" >&5
 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
    { (exit 1); exit 1; }; }
 
 fi
-echo "$as_me:1193: result: $ac_cv_host" >&5
+echo "$as_me:1200: result: $ac_cv_host" >&5
 echo "${ECHO_T}$ac_cv_host" >&6
 host=$ac_cv_host
 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 
-if test -f $srcdir/config.guess ; then
-	echo "$as_me:1201: checking target system type" >&5
+if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
+	echo "$as_me:1208: checking target system type" >&5
 echo $ECHO_N "checking target system type... $ECHO_C" >&6
 if test "${ac_cv_target+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1207,12 +1214,12 @@
 test "x$ac_cv_target_alias" = "x" &&
   ac_cv_target_alias=$ac_cv_host_alias
 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
-  { { echo "$as_me:1210: error: $ac_config_sub $ac_cv_target_alias failed" >&5
+  { { echo "$as_me:1217: error: $ac_config_sub $ac_cv_target_alias failed" >&5
 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
    { (exit 1); exit 1; }; }
 
 fi
-echo "$as_me:1215: result: $ac_cv_target" >&5
+echo "$as_me:1222: result: $ac_cv_target" >&5
 echo "${ECHO_T}$ac_cv_target" >&6
 target=$ac_cv_target
 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
@@ -1243,13 +1250,13 @@
 fi
 
 test -z "$system_name" && system_name="$cf_cv_system_name"
-test -n "$cf_cv_system_name" && echo "$as_me:1246: result: Configuring for $cf_cv_system_name" >&5
+test -n "$cf_cv_system_name" && echo "$as_me:1253: result: Configuring for $cf_cv_system_name" >&5
 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
 
 if test ".$system_name" != ".$cf_cv_system_name" ; then
-	echo "$as_me:1250: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
+	echo "$as_me:1257: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
-	{ { echo "$as_me:1252: error: \"Please remove config.cache and try again.\"" >&5
+	{ { echo "$as_me:1259: error: \"Please remove config.cache and try again.\"" >&5
 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
    { (exit 1); exit 1; }; }
 fi
@@ -1257,7 +1264,7 @@
 # Check whether --with-system-type or --without-system-type was given.
 if test "${with_system_type+set}" = set; then
   withval="$with_system_type"
-  { echo "$as_me:1260: WARNING: overriding system type to $withval" >&5
+  { echo "$as_me:1267: WARNING: overriding system type to $withval" >&5
 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
  cf_cv_system_name=$withval
 fi;
@@ -1267,7 +1274,7 @@
 
 ###	Default install-location
 
-echo "$as_me:1270: checking for prefix" >&5
+echo "$as_me:1277: checking for prefix" >&5
 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
 if test "x$prefix" = "xNONE" ; then
 	case "$cf_cv_system_name" in
@@ -1279,11 +1286,11 @@
 		;;
 	esac
 fi
-echo "$as_me:1282: result: $prefix" >&5
+echo "$as_me:1289: result: $prefix" >&5
 echo "${ECHO_T}$prefix" >&6
 
 if test "x$prefix" = "xNONE" ; then
-echo "$as_me:1286: checking for default include-directory" >&5
+echo "$as_me:1293: checking for default include-directory" >&5
 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
 test -n "$verbose" && echo 1>&6
 for cf_symbol in \
@@ -1306,7 +1313,7 @@
 	fi
 	test -n "$verbose"  && echo "	tested $cf_dir" 1>&6
 done
-echo "$as_me:1309: result: $includedir" >&5
+echo "$as_me:1316: result: $includedir" >&5
 echo "${ECHO_T}$includedir" >&6
 fi
 
@@ -1319,7 +1326,7 @@
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
 set dummy ${ac_tool_prefix}gcc; ac_word=$2
-echo "$as_me:1322: checking for $ac_word" >&5
+echo "$as_me:1329: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1334,7 +1341,7 @@
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_CC="${ac_tool_prefix}gcc"
-echo "$as_me:1337: found $ac_dir/$ac_word" >&5
+echo "$as_me:1344: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -1342,10 +1349,10 @@
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$as_me:1345: result: $CC" >&5
+  echo "$as_me:1352: result: $CC" >&5
 echo "${ECHO_T}$CC" >&6
 else
-  echo "$as_me:1348: result: no" >&5
+  echo "$as_me:1355: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -1354,7 +1361,7 @@
   ac_ct_CC=$CC
   # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
-echo "$as_me:1357: checking for $ac_word" >&5
+echo "$as_me:1364: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1369,7 +1376,7 @@
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_ac_ct_CC="gcc"
-echo "$as_me:1372: found $ac_dir/$ac_word" >&5
+echo "$as_me:1379: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -1377,10 +1384,10 @@
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
-  echo "$as_me:1380: result: $ac_ct_CC" >&5
+  echo "$as_me:1387: result: $ac_ct_CC" >&5
 echo "${ECHO_T}$ac_ct_CC" >&6
 else
-  echo "$as_me:1383: result: no" >&5
+  echo "$as_me:1390: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -1393,7 +1400,7 @@
   if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
 set dummy ${ac_tool_prefix}cc; ac_word=$2
-echo "$as_me:1396: checking for $ac_word" >&5
+echo "$as_me:1403: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1408,7 +1415,7 @@
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_CC="${ac_tool_prefix}cc"
-echo "$as_me:1411: found $ac_dir/$ac_word" >&5
+echo "$as_me:1418: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -1416,10 +1423,10 @@
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$as_me:1419: result: $CC" >&5
+  echo "$as_me:1426: result: $CC" >&5
 echo "${ECHO_T}$CC" >&6
 else
-  echo "$as_me:1422: result: no" >&5
+  echo "$as_me:1429: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -1428,7 +1435,7 @@
   ac_ct_CC=$CC
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
-echo "$as_me:1431: checking for $ac_word" >&5
+echo "$as_me:1438: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1443,7 +1450,7 @@
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_ac_ct_CC="cc"
-echo "$as_me:1446: found $ac_dir/$ac_word" >&5
+echo "$as_me:1453: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -1451,10 +1458,10 @@
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
-  echo "$as_me:1454: result: $ac_ct_CC" >&5
+  echo "$as_me:1461: result: $ac_ct_CC" >&5
 echo "${ECHO_T}$ac_ct_CC" >&6
 else
-  echo "$as_me:1457: result: no" >&5
+  echo "$as_me:1464: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -1467,7 +1474,7 @@
 if test -z "$CC"; then
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
-echo "$as_me:1470: checking for $ac_word" >&5
+echo "$as_me:1477: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1487,7 +1494,7 @@
   continue
 fi
 ac_cv_prog_CC="cc"
-echo "$as_me:1490: found $ac_dir/$ac_word" >&5
+echo "$as_me:1497: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -1509,10 +1516,10 @@
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$as_me:1512: result: $CC" >&5
+  echo "$as_me:1519: result: $CC" >&5
 echo "${ECHO_T}$CC" >&6
 else
-  echo "$as_me:1515: result: no" >&5
+  echo "$as_me:1522: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -1523,7 +1530,7 @@
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:1526: checking for $ac_word" >&5
+echo "$as_me:1533: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1538,7 +1545,7 @@
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
-echo "$as_me:1541: found $ac_dir/$ac_word" >&5
+echo "$as_me:1548: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -1546,10 +1553,10 @@
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$as_me:1549: result: $CC" >&5
+  echo "$as_me:1556: result: $CC" >&5
 echo "${ECHO_T}$CC" >&6
 else
-  echo "$as_me:1552: result: no" >&5
+  echo "$as_me:1559: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -1562,7 +1569,7 @@
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-echo "$as_me:1565: checking for $ac_word" >&5
+echo "$as_me:1572: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1577,7 +1584,7 @@
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_ac_ct_CC="$ac_prog"
-echo "$as_me:1580: found $ac_dir/$ac_word" >&5
+echo "$as_me:1587: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -1585,10 +1592,10 @@
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
-  echo "$as_me:1588: result: $ac_ct_CC" >&5
+  echo "$as_me:1595: result: $ac_ct_CC" >&5
 echo "${ECHO_T}$ac_ct_CC" >&6
 else
-  echo "$as_me:1591: result: no" >&5
+  echo "$as_me:1598: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -1600,32 +1607,32 @@
 
 fi
 
-test -z "$CC" && { { echo "$as_me:1603: error: no acceptable cc found in \$PATH" >&5
+test -z "$CC" && { { echo "$as_me:1610: error: no acceptable cc found in \$PATH" >&5
 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
    { (exit 1); exit 1; }; }
 
 # Provide some information about the compiler.
-echo "$as_me:1608:" \
+echo "$as_me:1615:" \
      "checking for C compiler version" >&5
 ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:1611: \"$ac_compiler --version </dev/null >&5\"") >&5
+{ (eval echo "$as_me:1618: \"$ac_compiler --version </dev/null >&5\"") >&5
   (eval $ac_compiler --version </dev/null >&5) 2>&5
   ac_status=$?
-  echo "$as_me:1614: \$? = $ac_status" >&5
+  echo "$as_me:1621: \$? = $ac_status" >&5
   (exit $ac_status); }
-{ (eval echo "$as_me:1616: \"$ac_compiler -v </dev/null >&5\"") >&5
+{ (eval echo "$as_me:1623: \"$ac_compiler -v </dev/null >&5\"") >&5
   (eval $ac_compiler -v </dev/null >&5) 2>&5
   ac_status=$?
-  echo "$as_me:1619: \$? = $ac_status" >&5
+  echo "$as_me:1626: \$? = $ac_status" >&5
   (exit $ac_status); }
-{ (eval echo "$as_me:1621: \"$ac_compiler -V </dev/null >&5\"") >&5
+{ (eval echo "$as_me:1628: \"$ac_compiler -V </dev/null >&5\"") >&5
   (eval $ac_compiler -V </dev/null >&5) 2>&5
   ac_status=$?
-  echo "$as_me:1624: \$? = $ac_status" >&5
+  echo "$as_me:1631: \$? = $ac_status" >&5
   (exit $ac_status); }
 
 cat >conftest.$ac_ext <<_ACEOF
-#line 1628 "configure"
+#line 1635 "configure"
 #include "confdefs.h"
 
 int
@@ -1641,13 +1648,13 @@
 # Try to create an executable without -o first, disregard a.out.
 # It will help us diagnose broken compilers, and finding out an intuition
 # of exeext.
-echo "$as_me:1644: checking for C compiler default output" >&5
+echo "$as_me:1651: checking for C compiler default output" >&5
 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-if { (eval echo "$as_me:1647: \"$ac_link_default\"") >&5
+if { (eval echo "$as_me:1654: \"$ac_link_default\"") >&5
   (eval $ac_link_default) 2>&5
   ac_status=$?
-  echo "$as_me:1650: \$? = $ac_status" >&5
+  echo "$as_me:1657: \$? = $ac_status" >&5
   (exit $ac_status); }; then
   # Find the output, starting from the most likely.  This scheme is
 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
@@ -1670,34 +1677,34 @@
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-{ { echo "$as_me:1673: error: C compiler cannot create executables" >&5
+{ { echo "$as_me:1680: error: C compiler cannot create executables" >&5
 echo "$as_me: error: C compiler cannot create executables" >&2;}
    { (exit 77); exit 77; }; }
 fi
 
 ac_exeext=$ac_cv_exeext
-echo "$as_me:1679: result: $ac_file" >&5
+echo "$as_me:1686: result: $ac_file" >&5
 echo "${ECHO_T}$ac_file" >&6
 
 # Check the compiler produces executables we can run.  If not, either
 # the compiler is broken, or we cross compile.
-echo "$as_me:1684: checking whether the C compiler works" >&5
+echo "$as_me:1691: checking whether the C compiler works" >&5
 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
 # If not cross compiling, check that we can run a simple program.
 if test "$cross_compiling" != yes; then
   if { ac_try='./$ac_file'
-  { (eval echo "$as_me:1690: \"$ac_try\"") >&5
+  { (eval echo "$as_me:1697: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:1693: \$? = $ac_status" >&5
+  echo "$as_me:1700: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
     cross_compiling=no
   else
     if test "$cross_compiling" = maybe; then
 	cross_compiling=yes
     else
-	{ { echo "$as_me:1700: error: cannot run C compiled programs.
+	{ { echo "$as_me:1707: error: cannot run C compiled programs.
 If you meant to cross compile, use \`--host'." >&5
 echo "$as_me: error: cannot run C compiled programs.
 If you meant to cross compile, use \`--host'." >&2;}
@@ -1705,24 +1712,24 @@
     fi
   fi
 fi
-echo "$as_me:1708: result: yes" >&5
+echo "$as_me:1715: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 
 rm -f a.out a.exe conftest$ac_cv_exeext
 ac_clean_files=$ac_clean_files_save
 # Check the compiler produces executables we can run.  If not, either
 # the compiler is broken, or we cross compile.
-echo "$as_me:1715: checking whether we are cross compiling" >&5
+echo "$as_me:1722: checking whether we are cross compiling" >&5
 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
-echo "$as_me:1717: result: $cross_compiling" >&5
+echo "$as_me:1724: result: $cross_compiling" >&5
 echo "${ECHO_T}$cross_compiling" >&6
 
-echo "$as_me:1720: checking for executable suffix" >&5
+echo "$as_me:1727: checking for executable suffix" >&5
 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
-if { (eval echo "$as_me:1722: \"$ac_link\"") >&5
+if { (eval echo "$as_me:1729: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:1725: \$? = $ac_status" >&5
+  echo "$as_me:1732: \$? = $ac_status" >&5
   (exit $ac_status); }; then
   # If both `conftest.exe' and `conftest' are `present' (well, observable)
 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
@@ -1738,25 +1745,25 @@
   esac
 done
 else
-  { { echo "$as_me:1741: error: cannot compute EXEEXT: cannot compile and link" >&5
+  { { echo "$as_me:1748: error: cannot compute EXEEXT: cannot compile and link" >&5
 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
    { (exit 1); exit 1; }; }
 fi
 
 rm -f conftest$ac_cv_exeext
-echo "$as_me:1747: result: $ac_cv_exeext" >&5
+echo "$as_me:1754: result: $ac_cv_exeext" >&5
 echo "${ECHO_T}$ac_cv_exeext" >&6
 
 rm -f conftest.$ac_ext
 EXEEXT=$ac_cv_exeext
 ac_exeext=$EXEEXT
-echo "$as_me:1753: checking for object suffix" >&5
+echo "$as_me:1760: checking for object suffix" >&5
 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
 if test "${ac_cv_objext+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 1759 "configure"
+#line 1766 "configure"
 #include "confdefs.h"
 
 int
@@ -1768,10 +1775,10 @@
 }
 _ACEOF
 rm -f conftest.o conftest.obj
-if { (eval echo "$as_me:1771: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1778: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:1774: \$? = $ac_status" >&5
+  echo "$as_me:1781: \$? = $ac_status" >&5
   (exit $ac_status); }; then
   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
   case $ac_file in
@@ -1783,24 +1790,24 @@
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-{ { echo "$as_me:1786: error: cannot compute OBJEXT: cannot compile" >&5
+{ { echo "$as_me:1793: error: cannot compute OBJEXT: cannot compile" >&5
 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
    { (exit 1); exit 1; }; }
 fi
 
 rm -f conftest.$ac_cv_objext conftest.$ac_ext
 fi
-echo "$as_me:1793: result: $ac_cv_objext" >&5
+echo "$as_me:1800: result: $ac_cv_objext" >&5
 echo "${ECHO_T}$ac_cv_objext" >&6
 OBJEXT=$ac_cv_objext
 ac_objext=$OBJEXT
-echo "$as_me:1797: checking whether we are using the GNU C compiler" >&5
+echo "$as_me:1804: checking whether we are using the GNU C compiler" >&5
 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
 if test "${ac_cv_c_compiler_gnu+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 1803 "configure"
+#line 1810 "configure"
 #include "confdefs.h"
 
 int
@@ -1815,16 +1822,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1818: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1825: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:1821: \$? = $ac_status" >&5
+  echo "$as_me:1828: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:1824: \"$ac_try\"") >&5
+  { (eval echo "$as_me:1831: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:1827: \$? = $ac_status" >&5
+  echo "$as_me:1834: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_compiler_gnu=yes
 else
@@ -1836,19 +1843,19 @@
 ac_cv_c_compiler_gnu=$ac_compiler_gnu
 
 fi
-echo "$as_me:1839: result: $ac_cv_c_compiler_gnu" >&5
+echo "$as_me:1846: result: $ac_cv_c_compiler_gnu" >&5
 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
 GCC=`test $ac_compiler_gnu = yes && echo yes`
 ac_test_CFLAGS=${CFLAGS+set}
 ac_save_CFLAGS=$CFLAGS
 CFLAGS="-g"
-echo "$as_me:1845: checking whether $CC accepts -g" >&5
+echo "$as_me:1852: checking whether $CC accepts -g" >&5
 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
 if test "${ac_cv_prog_cc_g+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 1851 "configure"
+#line 1858 "configure"
 #include "confdefs.h"
 
 int
@@ -1860,16 +1867,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1863: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1870: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:1866: \$? = $ac_status" >&5
+  echo "$as_me:1873: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:1869: \"$ac_try\"") >&5
+  { (eval echo "$as_me:1876: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:1872: \$? = $ac_status" >&5
+  echo "$as_me:1879: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_prog_cc_g=yes
 else
@@ -1879,7 +1886,7 @@
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:1882: result: $ac_cv_prog_cc_g" >&5
+echo "$as_me:1889: result: $ac_cv_prog_cc_g" >&5
 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
 if test "$ac_test_CFLAGS" = set; then
   CFLAGS=$ac_save_CFLAGS
@@ -1906,16 +1913,16 @@
 #endif
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1909: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1916: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:1912: \$? = $ac_status" >&5
+  echo "$as_me:1919: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:1915: \"$ac_try\"") >&5
+  { (eval echo "$as_me:1922: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:1918: \$? = $ac_status" >&5
+  echo "$as_me:1925: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   for ac_declaration in \
    ''\
@@ -1927,7 +1934,7 @@
    'void exit (int);'
 do
   cat >conftest.$ac_ext <<_ACEOF
-#line 1930 "configure"
+#line 1937 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 $ac_declaration
@@ -1940,16 +1947,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1943: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1950: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:1946: \$? = $ac_status" >&5
+  echo "$as_me:1953: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:1949: \"$ac_try\"") >&5
+  { (eval echo "$as_me:1956: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:1952: \$? = $ac_status" >&5
+  echo "$as_me:1959: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   :
 else
@@ -1959,7 +1966,7 @@
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
   cat >conftest.$ac_ext <<_ACEOF
-#line 1962 "configure"
+#line 1969 "configure"
 #include "confdefs.h"
 $ac_declaration
 int
@@ -1971,16 +1978,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1974: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1981: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:1977: \$? = $ac_status" >&5
+  echo "$as_me:1984: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:1980: \"$ac_try\"") >&5
+  { (eval echo "$as_me:1987: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:1983: \$? = $ac_status" >&5
+  echo "$as_me:1990: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   break
 else
@@ -2009,11 +2016,11 @@
 
 GCC_VERSION=none
 if test "$GCC" = yes ; then
-	echo "$as_me:2012: checking version of $CC" >&5
+	echo "$as_me:2019: checking version of $CC" >&5
 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
 	GCC_VERSION="`${CC} --version|sed -e '2,$d' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
 	test -z "$GCC_VERSION" && GCC_VERSION=unknown
-	echo "$as_me:2016: result: $GCC_VERSION" >&5
+	echo "$as_me:2023: result: $GCC_VERSION" >&5
 echo "${ECHO_T}$GCC_VERSION" >&6
 fi
 
@@ -2022,7 +2029,7 @@
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
-echo "$as_me:2025: checking how to run the C preprocessor" >&5
+echo "$as_me:2032: checking how to run the C preprocessor" >&5
 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
@@ -2043,18 +2050,18 @@
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp. "Syntax error" is here to catch this case.
   cat >conftest.$ac_ext <<_ACEOF
-#line 2046 "configure"
+#line 2053 "configure"
 #include "confdefs.h"
 #include <assert.h>
                      Syntax error
 _ACEOF
-if { (eval echo "$as_me:2051: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:2058: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:2057: \$? = $ac_status" >&5
+  echo "$as_me:2064: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -2077,17 +2084,17 @@
   # OK, works on sane cases.  Now check whether non-existent headers
   # can be detected and how.
   cat >conftest.$ac_ext <<_ACEOF
-#line 2080 "configure"
+#line 2087 "configure"
 #include "confdefs.h"
 #include <ac_nonexistent.h>
 _ACEOF
-if { (eval echo "$as_me:2084: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:2091: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:2090: \$? = $ac_status" >&5
+  echo "$as_me:2097: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -2124,7 +2131,7 @@
 else
   ac_cv_prog_CPP=$CPP
 fi
-echo "$as_me:2127: result: $CPP" >&5
+echo "$as_me:2134: result: $CPP" >&5
 echo "${ECHO_T}$CPP" >&6
 ac_preproc_ok=false
 for ac_c_preproc_warn_flag in '' yes
@@ -2134,18 +2141,18 @@
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp. "Syntax error" is here to catch this case.
   cat >conftest.$ac_ext <<_ACEOF
-#line 2137 "configure"
+#line 2144 "configure"
 #include "confdefs.h"
 #include <assert.h>
                      Syntax error
 _ACEOF
-if { (eval echo "$as_me:2142: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:2149: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:2148: \$? = $ac_status" >&5
+  echo "$as_me:2155: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -2168,17 +2175,17 @@
   # OK, works on sane cases.  Now check whether non-existent headers
   # can be detected and how.
   cat >conftest.$ac_ext <<_ACEOF
-#line 2171 "configure"
+#line 2178 "configure"
 #include "confdefs.h"
 #include <ac_nonexistent.h>
 _ACEOF
-if { (eval echo "$as_me:2175: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:2182: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:2181: \$? = $ac_status" >&5
+  echo "$as_me:2188: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -2206,7 +2213,7 @@
 if $ac_preproc_ok; then
   :
 else
-  { { echo "$as_me:2209: error: C preprocessor \"$CPP\" fails sanity check" >&5
+  { { echo "$as_me:2216: error: C preprocessor \"$CPP\" fails sanity check" >&5
 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
    { (exit 1); exit 1; }; }
 fi
@@ -2218,14 +2225,14 @@
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 if test $ac_cv_c_compiler_gnu = yes; then
-    echo "$as_me:2221: checking whether $CC needs -traditional" >&5
+    echo "$as_me:2228: checking whether $CC needs -traditional" >&5
 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
     ac_pattern="Autoconf.*'x'"
   cat >conftest.$ac_ext <<_ACEOF
-#line 2228 "configure"
+#line 2235 "configure"
 #include "confdefs.h"
 #include <sgtty.h>
 int Autoconf = TIOCGETP;
@@ -2240,7 +2247,7 @@
 
   if test $ac_cv_prog_gcc_traditional = no; then
     cat >conftest.$ac_ext <<_ACEOF
-#line 2243 "configure"
+#line 2250 "configure"
 #include "confdefs.h"
 #include <termio.h>
 int Autoconf = TCGETA;
@@ -2253,19 +2260,61 @@
 
   fi
 fi
-echo "$as_me:2256: result: $ac_cv_prog_gcc_traditional" >&5
+echo "$as_me:2263: result: $ac_cv_prog_gcc_traditional" >&5
 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
   if test $ac_cv_prog_gcc_traditional = yes; then
     CC="$CC -traditional"
   fi
 fi
 
-echo "$as_me:2263: checking for POSIXized ISC" >&5
+echo "$as_me:2270: checking whether $CC understands -c and -o together" >&5
+echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
+if test "${cf_cv_prog_CC_c_o+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cat > conftest.$ac_ext <<CF_EOF
+#include <stdio.h>
+int main()
+{
+	return 0;
+}
+CF_EOF
+# We do the test twice because some compilers refuse to overwrite an
+# existing .o file with -o, though they will create one.
+ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+if { (eval echo "$as_me:2286: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:2289: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+  test -f conftest2.$ac_objext && { (eval echo "$as_me:2291: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:2294: \$? = $ac_status" >&5
+  (exit $ac_status); };
+then
+  eval cf_cv_prog_CC_c_o=yes
+else
+  eval cf_cv_prog_CC_c_o=no
+fi
+rm -f conftest*
+
+fi
+if test $cf_cv_prog_CC_c_o = yes; then
+  echo "$as_me:2305: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me:2308: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+echo "$as_me:2312: checking for POSIXized ISC" >&5
 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
 if test -d /etc/conf/kconfig.d &&
    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
 then
-  echo "$as_me:2268: result: yes" >&5
+  echo "$as_me:2317: result: yes" >&5
 echo "${ECHO_T}yes" >&6
   ISC=yes # If later tests want to check for ISC.
 
@@ -2279,12 +2328,12 @@
     CC="$CC -Xp"
   fi
 else
-  echo "$as_me:2282: result: no" >&5
+  echo "$as_me:2331: result: no" >&5
 echo "${ECHO_T}no" >&6
   ISC=
 fi
 
-echo "$as_me:2287: checking for ${CC-cc} option to accept ANSI C" >&5
+echo "$as_me:2336: checking for ${CC-cc} option to accept ANSI C" >&5
 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
 if test "${cf_cv_ansi_cc+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2309,12 +2358,34 @@
 	-Xc
 do
 
+cf_fix_cppflags=no
 cf_new_cflags=
 cf_new_cppflags=
+cf_new_extra_cppflags=
+
 for cf_add_cflags in $cf_arg
 do
+case $cf_fix_cppflags in
+no)
 	case $cf_add_cflags in #(vi
 	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
+		case $cf_add_cflags in
+		-D*)
+			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+			&& test -z "${cf_tst_cflags}" \
+			&& cf_fix_cppflags=yes
+
+			if test $cf_fix_cppflags = yes ; then
+				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+				continue
+			elif test "${cf_tst_cflags}" = "\"'" ; then
+				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+				continue
+			fi
+			;;
+		esac
 		case "$CPPFLAGS" in
 		*$cf_add_cflags) #(vi
 			;;
@@ -2327,6 +2398,17 @@
 		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
 		;;
 	esac
+	;;
+yes)
+	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+
+	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+	&& test -z "${cf_tst_cflags}" \
+	&& cf_fix_cppflags=no
+	;;
+esac
 done
 
 if test -n "$cf_new_cflags" ; then
@@ -2339,8 +2421,13 @@
 	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
 fi
 
+if test -n "$cf_new_extra_cppflags" ; then
+
+	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+fi
+
 	cat >conftest.$ac_ext <<_ACEOF
-#line 2343 "configure"
+#line 2430 "configure"
 #include "confdefs.h"
 
 #ifndef CC_HAS_PROTOS
@@ -2361,16 +2448,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2364: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:2451: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:2367: \$? = $ac_status" >&5
+  echo "$as_me:2454: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:2370: \"$ac_try\"") >&5
+  { (eval echo "$as_me:2457: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:2373: \$? = $ac_status" >&5
+  echo "$as_me:2460: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_ansi_cc="$cf_arg"; break
 else
@@ -2383,18 +2470,40 @@
 CPPFLAGS="$cf_save_CPPFLAGS"
 
 fi
-echo "$as_me:2386: result: $cf_cv_ansi_cc" >&5
+echo "$as_me:2473: result: $cf_cv_ansi_cc" >&5
 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
 
 if test "$cf_cv_ansi_cc" != "no"; then
 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
 
+cf_fix_cppflags=no
 cf_new_cflags=
 cf_new_cppflags=
+cf_new_extra_cppflags=
+
 for cf_add_cflags in $cf_cv_ansi_cc
 do
+case $cf_fix_cppflags in
+no)
 	case $cf_add_cflags in #(vi
 	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
+		case $cf_add_cflags in
+		-D*)
+			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+			&& test -z "${cf_tst_cflags}" \
+			&& cf_fix_cppflags=yes
+
+			if test $cf_fix_cppflags = yes ; then
+				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+				continue
+			elif test "${cf_tst_cflags}" = "\"'" ; then
+				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+				continue
+			fi
+			;;
+		esac
 		case "$CPPFLAGS" in
 		*$cf_add_cflags) #(vi
 			;;
@@ -2407,6 +2516,17 @@
 		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
 		;;
 	esac
+	;;
+yes)
+	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+
+	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+	&& test -z "${cf_tst_cflags}" \
+	&& cf_fix_cppflags=no
+	;;
+esac
 done
 
 if test -n "$cf_new_cflags" ; then
@@ -2419,6 +2539,11 @@
 	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
 fi
 
+if test -n "$cf_new_extra_cppflags" ; then
+
+	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+fi
+
 else
 	cat >>confdefs.h <<\EOF
 #define CC_HAS_PROTOS 1
@@ -2428,7 +2553,7 @@
 fi
 
 if test "$cf_cv_ansi_cc" = "no"; then
-	{ { echo "$as_me:2431: error: Your compiler does not appear to recognize prototypes.
+	{ { echo "$as_me:2556: error: Your compiler does not appear to recognize prototypes.
 You have the following choices:
 	a. adjust your compiler options
 	b. get an up-to-date compiler
@@ -2468,7 +2593,7 @@
 *) LDPATH=$PATH:/sbin:/usr/sbin
   # Extract the first word of "ldconfig", so it can be a program name with args.
 set dummy ldconfig; ac_word=$2
-echo "$as_me:2471: checking for $ac_word" >&5
+echo "$as_me:2596: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_LDCONFIG+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2485,7 +2610,7 @@
   test -z "$ac_dir" && ac_dir=.
   if $as_executable_p "$ac_dir/$ac_word"; then
    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
-   echo "$as_me:2488: found $ac_dir/$ac_word" >&5
+   echo "$as_me:2613: found $ac_dir/$ac_word" >&5
    break
 fi
 done
@@ -2496,10 +2621,10 @@
 LDCONFIG=$ac_cv_path_LDCONFIG
 
 if test -n "$LDCONFIG"; then
-  echo "$as_me:2499: result: $LDCONFIG" >&5
+  echo "$as_me:2624: result: $LDCONFIG" >&5
 echo "${ECHO_T}$LDCONFIG" >&6
 else
-  echo "$as_me:2502: result: no" >&5
+  echo "$as_me:2627: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -2507,7 +2632,7 @@
 esac
 fi
 
-echo "$as_me:2510: checking if you want to ensure bool is consistent with C++" >&5
+echo "$as_me:2635: checking if you want to ensure bool is consistent with C++" >&5
 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
 
 # Check whether --with-cxx or --without-cxx was given.
@@ -2517,7 +2642,7 @@
 else
   cf_with_cxx=yes
 fi;
-echo "$as_me:2520: result: $cf_with_cxx" >&5
+echo "$as_me:2645: result: $cf_with_cxx" >&5
 echo "${ECHO_T}$cf_with_cxx" >&6
 if test "X$cf_with_cxx" = Xno ; then
 	CXX=""
@@ -2534,7 +2659,7 @@
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:2537: checking for $ac_word" >&5
+echo "$as_me:2662: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_CXX+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2549,7 +2674,7 @@
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
-echo "$as_me:2552: found $ac_dir/$ac_word" >&5
+echo "$as_me:2677: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -2557,10 +2682,10 @@
 fi
 CXX=$ac_cv_prog_CXX
 if test -n "$CXX"; then
-  echo "$as_me:2560: result: $CXX" >&5
+  echo "$as_me:2685: result: $CXX" >&5
 echo "${ECHO_T}$CXX" >&6
 else
-  echo "$as_me:2563: result: no" >&5
+  echo "$as_me:2688: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -2573,7 +2698,7 @@
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-echo "$as_me:2576: checking for $ac_word" >&5
+echo "$as_me:2701: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2588,7 +2713,7 @@
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_ac_ct_CXX="$ac_prog"
-echo "$as_me:2591: found $ac_dir/$ac_word" >&5
+echo "$as_me:2716: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -2596,10 +2721,10 @@
 fi
 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
 if test -n "$ac_ct_CXX"; then
-  echo "$as_me:2599: result: $ac_ct_CXX" >&5
+  echo "$as_me:2724: result: $ac_ct_CXX" >&5
 echo "${ECHO_T}$ac_ct_CXX" >&6
 else
-  echo "$as_me:2602: result: no" >&5
+  echo "$as_me:2727: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -2611,32 +2736,32 @@
 fi
 
 # Provide some information about the compiler.
-echo "$as_me:2614:" \
+echo "$as_me:2739:" \
      "checking for C++ compiler version" >&5
 ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:2617: \"$ac_compiler --version </dev/null >&5\"") >&5
+{ (eval echo "$as_me:2742: \"$ac_compiler --version </dev/null >&5\"") >&5
   (eval $ac_compiler --version </dev/null >&5) 2>&5
   ac_status=$?
-  echo "$as_me:2620: \$? = $ac_status" >&5
+  echo "$as_me:2745: \$? = $ac_status" >&5
   (exit $ac_status); }
-{ (eval echo "$as_me:2622: \"$ac_compiler -v </dev/null >&5\"") >&5
+{ (eval echo "$as_me:2747: \"$ac_compiler -v </dev/null >&5\"") >&5
   (eval $ac_compiler -v </dev/null >&5) 2>&5
   ac_status=$?
-  echo "$as_me:2625: \$? = $ac_status" >&5
+  echo "$as_me:2750: \$? = $ac_status" >&5
   (exit $ac_status); }
-{ (eval echo "$as_me:2627: \"$ac_compiler -V </dev/null >&5\"") >&5
+{ (eval echo "$as_me:2752: \"$ac_compiler -V </dev/null >&5\"") >&5
   (eval $ac_compiler -V </dev/null >&5) 2>&5
   ac_status=$?
-  echo "$as_me:2630: \$? = $ac_status" >&5
+  echo "$as_me:2755: \$? = $ac_status" >&5
   (exit $ac_status); }
 
-echo "$as_me:2633: checking whether we are using the GNU C++ compiler" >&5
+echo "$as_me:2758: checking whether we are using the GNU C++ compiler" >&5
 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 2639 "configure"
+#line 2764 "configure"
 #include "confdefs.h"
 
 int
@@ -2651,16 +2776,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2654: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:2779: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:2657: \$? = $ac_status" >&5
+  echo "$as_me:2782: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:2660: \"$ac_try\"") >&5
+  { (eval echo "$as_me:2785: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:2663: \$? = $ac_status" >&5
+  echo "$as_me:2788: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_compiler_gnu=yes
 else
@@ -2672,19 +2797,19 @@
 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
 
 fi
-echo "$as_me:2675: result: $ac_cv_cxx_compiler_gnu" >&5
+echo "$as_me:2800: result: $ac_cv_cxx_compiler_gnu" >&5
 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
 GXX=`test $ac_compiler_gnu = yes && echo yes`
 ac_test_CXXFLAGS=${CXXFLAGS+set}
 ac_save_CXXFLAGS=$CXXFLAGS
 CXXFLAGS="-g"
-echo "$as_me:2681: checking whether $CXX accepts -g" >&5
+echo "$as_me:2806: checking whether $CXX accepts -g" >&5
 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
 if test "${ac_cv_prog_cxx_g+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 2687 "configure"
+#line 2812 "configure"
 #include "confdefs.h"
 
 int
@@ -2696,16 +2821,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2699: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:2824: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:2702: \$? = $ac_status" >&5
+  echo "$as_me:2827: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:2705: \"$ac_try\"") >&5
+  { (eval echo "$as_me:2830: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:2708: \$? = $ac_status" >&5
+  echo "$as_me:2833: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_prog_cxx_g=yes
 else
@@ -2715,7 +2840,7 @@
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:2718: result: $ac_cv_prog_cxx_g" >&5
+echo "$as_me:2843: result: $ac_cv_prog_cxx_g" >&5
 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
 if test "$ac_test_CXXFLAGS" = set; then
   CXXFLAGS=$ac_save_CXXFLAGS
@@ -2742,7 +2867,7 @@
    'void exit (int);'
 do
   cat >conftest.$ac_ext <<_ACEOF
-#line 2745 "configure"
+#line 2870 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 $ac_declaration
@@ -2755,16 +2880,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2758: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:2883: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:2761: \$? = $ac_status" >&5
+  echo "$as_me:2886: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:2764: \"$ac_try\"") >&5
+  { (eval echo "$as_me:2889: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:2767: \$? = $ac_status" >&5
+  echo "$as_me:2892: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   :
 else
@@ -2774,7 +2899,7 @@
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
   cat >conftest.$ac_ext <<_ACEOF
-#line 2777 "configure"
+#line 2902 "configure"
 #include "confdefs.h"
 $ac_declaration
 int
@@ -2786,16 +2911,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2789: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:2914: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:2792: \$? = $ac_status" >&5
+  echo "$as_me:2917: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:2795: \"$ac_try\"") >&5
+  { (eval echo "$as_me:2920: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:2798: \$? = $ac_status" >&5
+  echo "$as_me:2923: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   break
 else
@@ -2821,7 +2946,7 @@
 	if test "$CXX" = "g++" ; then
 		# Extract the first word of "g++", so it can be a program name with args.
 set dummy g++; ac_word=$2
-echo "$as_me:2824: checking for $ac_word" >&5
+echo "$as_me:2949: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_CXX+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2838,7 +2963,7 @@
   test -z "$ac_dir" && ac_dir=.
   if $as_executable_p "$ac_dir/$ac_word"; then
    ac_cv_path_CXX="$ac_dir/$ac_word"
-   echo "$as_me:2841: found $ac_dir/$ac_word" >&5
+   echo "$as_me:2966: found $ac_dir/$ac_word" >&5
    break
 fi
 done
@@ -2849,16 +2974,16 @@
 CXX=$ac_cv_path_CXX
 
 if test -n "$CXX"; then
-  echo "$as_me:2852: result: $CXX" >&5
+  echo "$as_me:2977: result: $CXX" >&5
 echo "${ECHO_T}$CXX" >&6
 else
-  echo "$as_me:2855: result: no" >&5
+  echo "$as_me:2980: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
 	fi
 	if test "$CXX" = "g++" ; then
-		{ echo "$as_me:2861: WARNING: ignoring hardcoded g++" >&5
+		{ echo "$as_me:2986: WARNING: ignoring hardcoded g++" >&5
 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
 		cf_with_cxx=no; CXX=""; GXX="";
 	fi
@@ -2866,10 +2991,10 @@
 
 GXX_VERSION=none
 if test "$GXX" = yes; then
-	echo "$as_me:2869: checking version of g++" >&5
+	echo "$as_me:2994: checking version of g++" >&5
 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
 	GXX_VERSION="`${CXX-g++} --version|sed -e '2,$d'`"
-	echo "$as_me:2872: result: $GXX_VERSION" >&5
+	echo "$as_me:2997: result: $GXX_VERSION" >&5
 echo "${ECHO_T}$GXX_VERSION" >&6
 fi
 
@@ -2877,12 +3002,12 @@
 1*|2.[0-6]*)
 	GXX=""; CXX=""; ac_cv_cxx_compiler_gnu=no
 	cf_cxx_library=no
-	{ echo "$as_me:2880: WARNING: templates do not work" >&5
+	{ echo "$as_me:3005: WARNING: templates do not work" >&5
 echo "$as_me: WARNING: templates do not work" >&2;}
 	;;
 esac
 
-echo "$as_me:2885: checking if you want to build C++ binding and demo" >&5
+echo "$as_me:3010: checking if you want to build C++ binding and demo" >&5
 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
 
 # Check whether --with-cxx-binding or --without-cxx-binding was given.
@@ -2892,10 +3017,10 @@
 else
   cf_with_cxx_binding=$cf_with_cxx
 fi;
-echo "$as_me:2895: result: $cf_with_cxx_binding" >&5
+echo "$as_me:3020: result: $cf_with_cxx_binding" >&5
 echo "${ECHO_T}$cf_with_cxx_binding" >&6
 
-echo "$as_me:2898: checking if you want to build with Ada95" >&5
+echo "$as_me:3023: checking if you want to build with Ada95" >&5
 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
 
 # Check whether --with-ada or --without-ada was given.
@@ -2905,10 +3030,10 @@
 else
   cf_with_ada=yes
 fi;
-echo "$as_me:2908: result: $cf_with_ada" >&5
+echo "$as_me:3033: result: $cf_with_ada" >&5
 echo "${ECHO_T}$cf_with_ada" >&6
 
-echo "$as_me:2911: checking if you want to build programs such as tic" >&5
+echo "$as_me:3036: checking if you want to build programs such as tic" >&5
 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
 
 # Check whether --with-progs or --without-progs was given.
@@ -2918,10 +3043,10 @@
 else
   cf_with_progs=yes
 fi;
-echo "$as_me:2921: result: $cf_with_progs" >&5
+echo "$as_me:3046: result: $cf_with_progs" >&5
 echo "${ECHO_T}$cf_with_progs" >&6
 
-echo "$as_me:2924: checking if you wish to install curses.h" >&5
+echo "$as_me:3049: checking if you wish to install curses.h" >&5
 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
 
 # Check whether --with-curses-h or --without-curses-h was given.
@@ -2931,7 +3056,7 @@
 else
   with_curses_h=yes
 fi;
-echo "$as_me:2934: result: $with_curses_h" >&5
+echo "$as_me:3059: result: $with_curses_h" >&5
 echo "${ECHO_T}$with_curses_h" >&6
 
 modules_to_build="ncurses"
@@ -2957,7 +3082,7 @@
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-echo "$as_me:2960: checking for $ac_word" >&5
+echo "$as_me:3085: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_AWK+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2972,7 +3097,7 @@
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_AWK="$ac_prog"
-echo "$as_me:2975: found $ac_dir/$ac_word" >&5
+echo "$as_me:3100: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -2980,17 +3105,17 @@
 fi
 AWK=$ac_cv_prog_AWK
 if test -n "$AWK"; then
-  echo "$as_me:2983: result: $AWK" >&5
+  echo "$as_me:3108: result: $AWK" >&5
 echo "${ECHO_T}$AWK" >&6
 else
-  echo "$as_me:2986: result: no" >&5
+  echo "$as_me:3111: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
   test -n "$AWK" && break
 done
 
-echo "$as_me:2993: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "$as_me:3118: checking whether ${MAKE-make} sets \${MAKE}" >&5
 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
@@ -3010,11 +3135,11 @@
 rm -f conftest.make
 fi
 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$as_me:3013: result: yes" >&5
+  echo "$as_me:3138: result: yes" >&5
 echo "${ECHO_T}yes" >&6
   SET_MAKE=
 else
-  echo "$as_me:3017: result: no" >&5
+  echo "$as_me:3142: result: no" >&5
 echo "${ECHO_T}no" >&6
   SET_MAKE="MAKE=${MAKE-make}"
 fi
@@ -3031,7 +3156,7 @@
 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
-echo "$as_me:3034: checking for a BSD compatible install" >&5
+echo "$as_me:3159: checking for a BSD compatible install" >&5
 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
 if test -z "$INSTALL"; then
 if test "${ac_cv_path_install+set}" = set; then
@@ -3080,7 +3205,7 @@
     INSTALL=$ac_install_sh
   fi
 fi
-echo "$as_me:3083: result: $INSTALL" >&5
+echo "$as_me:3208: result: $INSTALL" >&5
 echo "${ECHO_T}$INSTALL" >&6
 
 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
@@ -3101,7 +3226,7 @@
   ;;
 esac
 
-echo "$as_me:3104: checking for long file names" >&5
+echo "$as_me:3229: checking for long file names" >&5
 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
 if test "${ac_cv_sys_long_file_names+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3140,7 +3265,7 @@
   rm -rf $ac_xdir 2>/dev/null
 done
 fi
-echo "$as_me:3143: result: $ac_cv_sys_long_file_names" >&5
+echo "$as_me:3268: result: $ac_cv_sys_long_file_names" >&5
 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
 if test $ac_cv_sys_long_file_names = yes; then
 
@@ -3150,7 +3275,7 @@
 
 fi
 
-echo "$as_me:3153: checking if filesystem supports mixed-case filenames" >&5
+echo "$as_me:3278: checking if filesystem supports mixed-case filenames" >&5
 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
 if test "${cf_cv_mixedcase+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3177,26 +3302,26 @@
 fi
 
 fi
-echo "$as_me:3180: result: $cf_cv_mixedcase" >&5
+echo "$as_me:3305: result: $cf_cv_mixedcase" >&5
 echo "${ECHO_T}$cf_cv_mixedcase" >&6
 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
 #define MIXEDCASE_FILENAMES 1
 EOF
 
-echo "$as_me:3186: checking whether ln -s works" >&5
+echo "$as_me:3311: checking whether ln -s works" >&5
 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
 LN_S=$as_ln_s
 if test "$LN_S" = "ln -s"; then
-  echo "$as_me:3190: result: yes" >&5
+  echo "$as_me:3315: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 else
-  echo "$as_me:3193: result: no, using $LN_S" >&5
+  echo "$as_me:3318: result: no, using $LN_S" >&5
 echo "${ECHO_T}no, using $LN_S" >&6
 fi
 
 # Extract the first word of "ctags", so it can be a program name with args.
 set dummy ctags; ac_word=$2
-echo "$as_me:3199: checking for $ac_word" >&5
+echo "$as_me:3324: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3211,7 +3336,7 @@
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_MAKE_LOWER_TAGS="yes"
-echo "$as_me:3214: found $ac_dir/$ac_word" >&5
+echo "$as_me:3339: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -3220,17 +3345,17 @@
 fi
 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
 if test -n "$MAKE_LOWER_TAGS"; then
-  echo "$as_me:3223: result: $MAKE_LOWER_TAGS" >&5
+  echo "$as_me:3348: result: $MAKE_LOWER_TAGS" >&5
 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
 else
-  echo "$as_me:3226: result: no" >&5
+  echo "$as_me:3351: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
 if test "$cf_cv_mixedcase" = yes ; then
 	# Extract the first word of "etags", so it can be a program name with args.
 set dummy etags; ac_word=$2
-echo "$as_me:3233: checking for $ac_word" >&5
+echo "$as_me:3358: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3245,7 +3370,7 @@
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_MAKE_UPPER_TAGS="yes"
-echo "$as_me:3248: found $ac_dir/$ac_word" >&5
+echo "$as_me:3373: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -3254,10 +3379,10 @@
 fi
 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
 if test -n "$MAKE_UPPER_TAGS"; then
-  echo "$as_me:3257: result: $MAKE_UPPER_TAGS" >&5
+  echo "$as_me:3382: result: $MAKE_UPPER_TAGS" >&5
 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
 else
-  echo "$as_me:3260: result: no" >&5
+  echo "$as_me:3385: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -3281,7 +3406,7 @@
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-echo "$as_me:3284: checking for $ac_word" >&5
+echo "$as_me:3409: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_LINT+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3296,7 +3421,7 @@
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_LINT="$ac_prog"
-echo "$as_me:3299: found $ac_dir/$ac_word" >&5
+echo "$as_me:3424: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -3304,10 +3429,10 @@
 fi
 LINT=$ac_cv_prog_LINT
 if test -n "$LINT"; then
-  echo "$as_me:3307: result: $LINT" >&5
+  echo "$as_me:3432: result: $LINT" >&5
 echo "${ECHO_T}$LINT" >&6
 else
-  echo "$as_me:3310: result: no" >&5
+  echo "$as_me:3435: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -3318,7 +3443,7 @@
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-echo "$as_me:3321: checking for $ac_word" >&5
+echo "$as_me:3446: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_MAN+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3333,7 +3458,7 @@
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_MAN="$ac_prog"
-echo "$as_me:3336: found $ac_dir/$ac_word" >&5
+echo "$as_me:3461: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -3341,10 +3466,10 @@
 fi
 MAN=$ac_cv_prog_MAN
 if test -n "$MAN"; then
-  echo "$as_me:3344: result: $MAN" >&5
+  echo "$as_me:3469: result: $MAN" >&5
 echo "${ECHO_T}$MAN" >&6
 else
-  echo "$as_me:3347: result: no" >&5
+  echo "$as_me:3472: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -3354,7 +3479,7 @@
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo "$as_me:3357: checking for $ac_word" >&5
+echo "$as_me:3482: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_RANLIB+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3369,7 +3494,7 @@
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
-echo "$as_me:3372: found $ac_dir/$ac_word" >&5
+echo "$as_me:3497: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -3377,10 +3502,10 @@
 fi
 RANLIB=$ac_cv_prog_RANLIB
 if test -n "$RANLIB"; then
-  echo "$as_me:3380: result: $RANLIB" >&5
+  echo "$as_me:3505: result: $RANLIB" >&5
 echo "${ECHO_T}$RANLIB" >&6
 else
-  echo "$as_me:3383: result: no" >&5
+  echo "$as_me:3508: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -3389,7 +3514,7 @@
   ac_ct_RANLIB=$RANLIB
   # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
-echo "$as_me:3392: checking for $ac_word" >&5
+echo "$as_me:3517: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3404,7 +3529,7 @@
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_ac_ct_RANLIB="ranlib"
-echo "$as_me:3407: found $ac_dir/$ac_word" >&5
+echo "$as_me:3532: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -3413,10 +3538,10 @@
 fi
 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
 if test -n "$ac_ct_RANLIB"; then
-  echo "$as_me:3416: result: $ac_ct_RANLIB" >&5
+  echo "$as_me:3541: result: $ac_ct_RANLIB" >&5
 echo "${ECHO_T}$ac_ct_RANLIB" >&6
 else
-  echo "$as_me:3419: result: no" >&5
+  echo "$as_me:3544: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -3428,7 +3553,7 @@
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ld; ac_word=$2
-echo "$as_me:3431: checking for $ac_word" >&5
+echo "$as_me:3556: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_LD+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3443,7 +3568,7 @@
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_LD="${ac_tool_prefix}ld"
-echo "$as_me:3446: found $ac_dir/$ac_word" >&5
+echo "$as_me:3571: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -3451,10 +3576,10 @@
 fi
 LD=$ac_cv_prog_LD
 if test -n "$LD"; then
-  echo "$as_me:3454: result: $LD" >&5
+  echo "$as_me:3579: result: $LD" >&5
 echo "${ECHO_T}$LD" >&6
 else
-  echo "$as_me:3457: result: no" >&5
+  echo "$as_me:3582: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -3463,7 +3588,7 @@
   ac_ct_LD=$LD
   # Extract the first word of "ld", so it can be a program name with args.
 set dummy ld; ac_word=$2
-echo "$as_me:3466: checking for $ac_word" >&5
+echo "$as_me:3591: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3478,7 +3603,7 @@
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_ac_ct_LD="ld"
-echo "$as_me:3481: found $ac_dir/$ac_word" >&5
+echo "$as_me:3606: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -3487,10 +3612,10 @@
 fi
 ac_ct_LD=$ac_cv_prog_ac_ct_LD
 if test -n "$ac_ct_LD"; then
-  echo "$as_me:3490: result: $ac_ct_LD" >&5
+  echo "$as_me:3615: result: $ac_ct_LD" >&5
 echo "${ECHO_T}$ac_ct_LD" >&6
 else
-  echo "$as_me:3493: result: no" >&5
+  echo "$as_me:3618: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -3502,7 +3627,7 @@
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo "$as_me:3505: checking for $ac_word" >&5
+echo "$as_me:3630: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_AR+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3517,7 +3642,7 @@
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_AR="${ac_tool_prefix}ar"
-echo "$as_me:3520: found $ac_dir/$ac_word" >&5
+echo "$as_me:3645: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -3525,10 +3650,10 @@
 fi
 AR=$ac_cv_prog_AR
 if test -n "$AR"; then
-  echo "$as_me:3528: result: $AR" >&5
+  echo "$as_me:3653: result: $AR" >&5
 echo "${ECHO_T}$AR" >&6
 else
-  echo "$as_me:3531: result: no" >&5
+  echo "$as_me:3656: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -3537,7 +3662,7 @@
   ac_ct_AR=$AR
   # Extract the first word of "ar", so it can be a program name with args.
 set dummy ar; ac_word=$2
-echo "$as_me:3540: checking for $ac_word" >&5
+echo "$as_me:3665: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3552,7 +3677,7 @@
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_ac_ct_AR="ar"
-echo "$as_me:3555: found $ac_dir/$ac_word" >&5
+echo "$as_me:3680: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -3561,10 +3686,10 @@
 fi
 ac_ct_AR=$ac_cv_prog_ac_ct_AR
 if test -n "$ac_ct_AR"; then
-  echo "$as_me:3564: result: $ac_ct_AR" >&5
+  echo "$as_me:3689: result: $ac_ct_AR" >&5
 echo "${ECHO_T}$ac_ct_AR" >&6
 else
-  echo "$as_me:3567: result: no" >&5
+  echo "$as_me:3692: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -3577,10 +3702,10 @@
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
-echo "$as_me:3580: checking for archiver options (symbol AR_OPTS)" >&5
+echo "$as_me:3705: checking for archiver options (symbol AR_OPTS)" >&5
 echo $ECHO_N "checking for archiver options (symbol AR_OPTS)... $ECHO_C" >&6
 test -z "$AR_OPTS" && AR_OPTS=rv
-echo "$as_me:3583: result: $AR_OPTS" >&5
+echo "$as_me:3708: result: $AR_OPTS" >&5
 echo "${ECHO_T}$AR_OPTS" >&6
 
 cf_cv_subst_AR_OPTS=$AR_OPTS
@@ -3588,7 +3713,7 @@
 
 AR_OPTS=${cf_cv_subst_AR_OPTS}
 
-echo "$as_me:3591: checking for makeflags variable" >&5
+echo "$as_me:3716: checking for makeflags variable" >&5
 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
 if test "${cf_cv_makeflags+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3621,10 +3746,10 @@
 	rm -f cf_makeflags.tmp
 
 fi
-echo "$as_me:3624: result: $cf_cv_makeflags" >&5
+echo "$as_me:3749: result: $cf_cv_makeflags" >&5
 echo "${ECHO_T}$cf_cv_makeflags" >&6
 
-echo "$as_me:3627: checking if you have specified an install-prefix" >&5
+echo "$as_me:3752: checking if you have specified an install-prefix" >&5
 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
 
 # Check whether --with-install-prefix or --without-install-prefix was given.
@@ -3637,7 +3762,7 @@
 		;;
 	esac
 fi;
-echo "$as_me:3640: result: $DESTDIR" >&5
+echo "$as_me:3765: result: $DESTDIR" >&5
 echo "${ECHO_T}$DESTDIR" >&6
 
 ###############################################################################
@@ -3645,13 +3770,17 @@
 # If we're cross-compiling, allow the user to override the tools and their
 # options.  The configure script is oriented toward identifying the host
 # compiler, etc., but we need a build compiler to generate parts of the source.
-: ${BUILD_CC:='$(CC)'}
-: ${BUILD_CFLAGS:='$(CFLAGS)'}
-: ${BUILD_CPPFLAGS:='$(CPPFLAGS)'}
-: ${BUILD_LDFLAGS:='$(LDFLAGS)'}
-: ${BUILD_LIBS:='$(LIBS)'}
-: ${BUILD_EXEEXT:='$x'}
+
 if test "$cross_compiling" = yes ; then
+	# defaults that we might want to override
+	: ${BUILD_CC:='$(CC)'}
+	: ${BUILD_CPP:='$(CC) -E'}
+	: ${BUILD_CFLAGS:=''}
+	: ${BUILD_CPPFLAGS:=''}
+	: ${BUILD_LDFLAGS:=''}
+	: ${BUILD_LIBS:=''}
+	: ${BUILD_EXEEXT:='$x'}
+	: ${BUILD_OBJEXT:='o'}
 
 # Check whether --with-build-cc or --without-build-cc was given.
 if test "${with_build_cc+set}" = set; then
@@ -3662,7 +3791,7 @@
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-echo "$as_me:3665: checking for $ac_word" >&5
+echo "$as_me:3794: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3677,7 +3806,7 @@
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_BUILD_CC="$ac_prog"
-echo "$as_me:3680: found $ac_dir/$ac_word" >&5
+echo "$as_me:3809: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -3685,10 +3814,10 @@
 fi
 BUILD_CC=$ac_cv_prog_BUILD_CC
 if test -n "$BUILD_CC"; then
-  echo "$as_me:3688: result: $BUILD_CC" >&5
+  echo "$as_me:3817: result: $BUILD_CC" >&5
 echo "${ECHO_T}$BUILD_CC" >&6
 else
-  echo "$as_me:3691: result: no" >&5
+  echo "$as_me:3820: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -3697,6 +3826,14 @@
 
 fi;
 
+# Check whether --with-build-cpp or --without-build-cpp was given.
+if test "${with_build_cpp+set}" = set; then
+  withval="$with_build_cpp"
+  BUILD_CPP="$withval"
+else
+  BUILD_CPP='$(CC) -E'
+fi;
+
 # Check whether --with-build-cflags or --without-build-cflags was given.
 if test "${with_build_cflags+set}" = set; then
   withval="$with_build_cflags"
@@ -3720,7 +3857,27 @@
   withval="$with_build_libs"
   BUILD_LIBS="$withval"
 fi;
+	# this assumes we're on Unix.
 	BUILD_EXEEXT=
+	BUILD_OBJEXT=o
+
+	if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '$(CC)' ) ; then
+		{ { echo "$as_me:3865: error: Cross-build requires two compilers.
+Use --with-build-cc to specify the native compiler." >&5
+echo "$as_me: error: Cross-build requires two compilers.
+Use --with-build-cc to specify the native compiler." >&2;}
+   { (exit 1); exit 1; }; }
+	fi
+
+else
+	: ${BUILD_CC:='$(CC)'}
+	: ${BUILD_CPP:='$(CPP)'}
+	: ${BUILD_CFLAGS:='$(CFLAGS)'}
+	: ${BUILD_CPPFLAGS:='$(CPPFLAGS)'}
+	: ${BUILD_LDFLAGS:='$(LDFLAGS)'}
+	: ${BUILD_LIBS:='$(LIBS)'}
+	: ${BUILD_EXEEXT:='$x'}
+	: ${BUILD_OBJEXT:='o'}
 fi
 
 ###############################################################################
@@ -3746,7 +3903,7 @@
 LIB_INSTALL=
 LIB_UNINSTALL=
 
-echo "$as_me:3749: checking if you want to build libraries with libtool" >&5
+echo "$as_me:3906: checking if you want to build libraries with libtool" >&5
 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
 
 # Check whether --with-libtool or --without-libtool was given.
@@ -3756,7 +3913,7 @@
 else
   with_libtool=no
 fi;
-echo "$as_me:3759: result: $with_libtool" >&5
+echo "$as_me:3916: result: $with_libtool" >&5
 echo "${ECHO_T}$with_libtool" >&6
 if test "$with_libtool" != "no"; then
 
@@ -3781,7 +3938,7 @@
   with_libtool=`echo $with_libtool | sed -e s%NONE%$ac_default_prefix%`
   ;;
 *)
-  { { echo "$as_me:3784: error: expected a pathname, not \"$with_libtool\"" >&5
+  { { echo "$as_me:3941: error: expected a pathname, not \"$with_libtool\"" >&5
 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
    { (exit 1); exit 1; }; }
   ;;
@@ -3791,7 +3948,7 @@
 	else
  		# Extract the first word of "libtool", so it can be a program name with args.
 set dummy libtool; ac_word=$2
-echo "$as_me:3794: checking for $ac_word" >&5
+echo "$as_me:3951: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_LIBTOOL+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3808,7 +3965,7 @@
   test -z "$ac_dir" && ac_dir=.
   if $as_executable_p "$ac_dir/$ac_word"; then
    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
-   echo "$as_me:3811: found $ac_dir/$ac_word" >&5
+   echo "$as_me:3968: found $ac_dir/$ac_word" >&5
    break
 fi
 done
@@ -3819,16 +3976,16 @@
 LIBTOOL=$ac_cv_path_LIBTOOL
 
 if test -n "$LIBTOOL"; then
-  echo "$as_me:3822: result: $LIBTOOL" >&5
+  echo "$as_me:3979: result: $LIBTOOL" >&5
 echo "${ECHO_T}$LIBTOOL" >&6
 else
-  echo "$as_me:3825: result: no" >&5
+  echo "$as_me:3982: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
  	fi
  	if test -z "$LIBTOOL" ; then
- 		{ { echo "$as_me:3831: error: Cannot find libtool" >&5
+ 		{ { echo "$as_me:3988: error: Cannot find libtool" >&5
 echo "$as_me: error: Cannot find libtool" >&2;}
    { (exit 1); exit 1; }; }
  	fi
@@ -3843,17 +4000,17 @@
 	LIB_PREP=:
 
 	# Show the version of libtool
-	echo "$as_me:3846: checking version of libtool" >&5
+	echo "$as_me:4003: checking version of libtool" >&5
 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
 
 	# Save the version in a cache variable - this is not entirely a good
 	# thing, but the version string from libtool is very ugly, and for
 	# bug reports it might be useful to have the original string.
 	cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
-	echo "$as_me:3853: result: $cf_cv_libtool_version" >&5
+	echo "$as_me:4010: result: $cf_cv_libtool_version" >&5
 echo "${ECHO_T}$cf_cv_libtool_version" >&6
 	if test -z "$cf_cv_libtool_version" ; then
-		{ { echo "$as_me:3856: error: This is not libtool" >&5
+		{ { echo "$as_me:4013: error: This is not libtool" >&5
 echo "$as_me: error: This is not libtool" >&2;}
    { (exit 1); exit 1; }; }
 	fi
@@ -3880,7 +4037,7 @@
 
 else
 
-echo "$as_me:3883: checking if you want to build shared libraries" >&5
+echo "$as_me:4040: checking if you want to build shared libraries" >&5
 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
 
 # Check whether --with-shared or --without-shared was given.
@@ -3890,11 +4047,11 @@
 else
   with_shared=no
 fi;
-echo "$as_me:3893: result: $with_shared" >&5
+echo "$as_me:4050: result: $with_shared" >&5
 echo "${ECHO_T}$with_shared" >&6
 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
 
-echo "$as_me:3897: checking if you want to build static libraries" >&5
+echo "$as_me:4054: checking if you want to build static libraries" >&5
 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
 
 # Check whether --with-normal or --without-normal was given.
@@ -3904,11 +4061,11 @@
 else
   with_normal=yes
 fi;
-echo "$as_me:3907: result: $with_normal" >&5
+echo "$as_me:4064: result: $with_normal" >&5
 echo "${ECHO_T}$with_normal" >&6
 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
 
-echo "$as_me:3911: checking if you want to build debug libraries" >&5
+echo "$as_me:4068: checking if you want to build debug libraries" >&5
 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
 
 # Check whether --with-debug or --without-debug was given.
@@ -3918,11 +4075,11 @@
 else
   with_debug=yes
 fi;
-echo "$as_me:3921: result: $with_debug" >&5
+echo "$as_me:4078: result: $with_debug" >&5
 echo "${ECHO_T}$with_debug" >&6
 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
 
-echo "$as_me:3925: checking if you want to build profiling libraries" >&5
+echo "$as_me:4082: checking if you want to build profiling libraries" >&5
 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
 
 # Check whether --with-profile or --without-profile was given.
@@ -3932,7 +4089,7 @@
 else
   with_profile=no
 fi;
-echo "$as_me:3935: result: $with_profile" >&5
+echo "$as_me:4092: result: $with_profile" >&5
 echo "${ECHO_T}$with_profile" >&6
 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
 
@@ -3940,19 +4097,19 @@
 
 ###############################################################################
 
-echo "$as_me:3943: checking for specified models" >&5
+echo "$as_me:4100: checking for specified models" >&5
 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
 test -z "$cf_list_models" && cf_list_models=normal
 test "$with_libtool" != "no" && cf_list_models=libtool
-echo "$as_me:3947: result: $cf_list_models" >&5
+echo "$as_me:4104: result: $cf_list_models" >&5
 echo "${ECHO_T}$cf_list_models" >&6
 
 ### Use the first model as the default, and save its suffix for use in building
 ### up test-applications.
-echo "$as_me:3952: checking for default model" >&5
+echo "$as_me:4109: checking for default model" >&5
 echo $ECHO_N "checking for default model... $ECHO_C" >&6
 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
-echo "$as_me:3955: result: $DFT_LWR_MODEL" >&5
+echo "$as_me:4112: result: $DFT_LWR_MODEL" >&5
 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
 
 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
@@ -3976,7 +4133,7 @@
 
 ###############################################################################
 
-echo "$as_me:3979: checking if you want to build a separate terminfo library" >&5
+echo "$as_me:4136: checking if you want to build a separate terminfo library" >&5
 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
 
 # Check whether --with-termlib or --without-termlib was given.
@@ -3986,12 +4143,12 @@
 else
   with_termlib=no
 fi;
-echo "$as_me:3989: result: $with_termlib" >&5
+echo "$as_me:4146: result: $with_termlib" >&5
 echo "${ECHO_T}$with_termlib" >&6
 
 ### Checks for special libraries, must be done up-front.
 
-echo "$as_me:3994: checking if you want to link with dbmalloc for testing" >&5
+echo "$as_me:4151: checking if you want to link with dbmalloc for testing" >&5
 echo $ECHO_N "checking if you want to link with dbmalloc for testing... $ECHO_C" >&6
 
 # Check whether --with-dbmalloc or --without-dbmalloc was given.
@@ -4001,11 +4158,49 @@
 else
   with_dbmalloc=no
 fi;
-echo "$as_me:4004: result: $with_dbmalloc" >&5
+echo "$as_me:4161: result: $with_dbmalloc" >&5
 echo "${ECHO_T}$with_dbmalloc" >&6
-if test $with_dbmalloc = yes ; then
+if test "$with_dbmalloc" = yes ; then
+	echo "$as_me:4164: checking for dbmalloc.h" >&5
+echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
+if test "${ac_cv_header_dbmalloc_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 4170 "configure"
+#include "confdefs.h"
+#include <dbmalloc.h>
+_ACEOF
+if { (eval echo "$as_me:4174: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:4180: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_cv_header_dbmalloc_h=yes
+else
+  echo "$as_me: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  ac_cv_header_dbmalloc_h=no
+fi
+rm -f conftest.err conftest.$ac_ext
+fi
+echo "$as_me:4199: result: $ac_cv_header_dbmalloc_h" >&5
+echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
+if test $ac_cv_header_dbmalloc_h = yes; then
 
-echo "$as_me:4008: checking for debug_malloc in -ldbmalloc" >&5
+echo "$as_me:4203: checking for debug_malloc in -ldbmalloc" >&5
 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4013,7 +4208,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-ldbmalloc  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 4016 "configure"
+#line 4211 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -4032,16 +4227,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4035: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4230: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:4038: \$? = $ac_status" >&5
+  echo "$as_me:4233: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:4041: \"$ac_try\"") >&5
+  { (eval echo "$as_me:4236: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:4044: \$? = $ac_status" >&5
+  echo "$as_me:4239: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_dbmalloc_debug_malloc=yes
 else
@@ -4052,7 +4247,7 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:4055: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
+echo "$as_me:4250: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
   cat >>confdefs.h <<EOF
@@ -4065,7 +4260,9 @@
 
 fi
 
-echo "$as_me:4068: checking if you want to link with dmalloc for testing" >&5
+fi
+
+echo "$as_me:4265: checking if you want to link with dmalloc for testing" >&5
 echo $ECHO_N "checking if you want to link with dmalloc for testing... $ECHO_C" >&6
 
 # Check whether --with-dmalloc or --without-dmalloc was given.
@@ -4075,11 +4272,49 @@
 else
   with_dmalloc=no
 fi;
-echo "$as_me:4078: result: $with_dmalloc" >&5
+echo "$as_me:4275: result: $with_dmalloc" >&5
 echo "${ECHO_T}$with_dmalloc" >&6
-if test $with_dmalloc = yes ; then
+if test "$with_dmalloc" = yes ; then
+	echo "$as_me:4278: checking for dmalloc.h" >&5
+echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
+if test "${ac_cv_header_dmalloc_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 4284 "configure"
+#include "confdefs.h"
+#include <dmalloc.h>
+_ACEOF
+if { (eval echo "$as_me:4288: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:4294: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_cv_header_dmalloc_h=yes
+else
+  echo "$as_me: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  ac_cv_header_dmalloc_h=no
+fi
+rm -f conftest.err conftest.$ac_ext
+fi
+echo "$as_me:4313: result: $ac_cv_header_dmalloc_h" >&5
+echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
+if test $ac_cv_header_dmalloc_h = yes; then
 
-echo "$as_me:4082: checking for dmalloc_debug in -ldmalloc" >&5
+echo "$as_me:4317: checking for dmalloc_debug in -ldmalloc" >&5
 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4087,7 +4322,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-ldmalloc  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 4090 "configure"
+#line 4325 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -4106,16 +4341,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4109: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4344: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:4112: \$? = $ac_status" >&5
+  echo "$as_me:4347: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:4115: \"$ac_try\"") >&5
+  { (eval echo "$as_me:4350: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:4118: \$? = $ac_status" >&5
+  echo "$as_me:4353: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_dmalloc_dmalloc_debug=yes
 else
@@ -4126,7 +4361,7 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:4129: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
+echo "$as_me:4364: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
   cat >>confdefs.h <<EOF
@@ -4139,21 +4374,23 @@
 
 fi
 
+fi
+
 SHLIB_LIST=""
-echo "$as_me:4143: checking if you want to link with the gpm mouse library" >&5
-echo $ECHO_N "checking if you want to link with the gpm mouse library... $ECHO_C" >&6
+echo "$as_me:4380: checking if you want to link with the GPM mouse library" >&5
+echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
 
 # Check whether --with-gpm or --without-gpm was given.
 if test "${with_gpm+set}" = set; then
   withval="$with_gpm"
   with_gpm=$withval
 else
-  with_gpm=no
+  with_gpm=maybe
 fi;
-echo "$as_me:4153: result: $with_gpm" >&5
+echo "$as_me:4390: result: $with_gpm" >&5
 echo "${ECHO_T}$with_gpm" >&6
-if test "$with_gpm" = yes ; then
-	echo "$as_me:4156: checking for Gpm_Open in -lgpm" >&5
+if test "$with_gpm" != no ; then
+	echo "$as_me:4393: checking for Gpm_Open in -lgpm" >&5
 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4161,7 +4398,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lgpm  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 4164 "configure"
+#line 4401 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -4180,16 +4417,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4183: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4420: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:4186: \$? = $ac_status" >&5
+  echo "$as_me:4423: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:4189: \"$ac_try\"") >&5
+  { (eval echo "$as_me:4426: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:4192: \$? = $ac_status" >&5
+  echo "$as_me:4429: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_gpm_Gpm_Open=yes
 else
@@ -4200,36 +4437,27 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:4203: result: $ac_cv_lib_gpm_Gpm_Open" >&5
+echo "$as_me:4440: result: $ac_cv_lib_gpm_Gpm_Open" >&5
 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
 
-		EXTRA_LIBS="-lgpm -lncurses $EXTRA_LIBS"
-		SHLIB_LIST="-lgpm $SHLIB_LIST"
-		cat >>confdefs.h <<\EOF
-#define HAVE_LIBGPM 1
-EOF
-
-for ac_header in gpm.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:4216: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+		echo "$as_me:4444: checking for gpm.h" >&5
+echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
+if test "${ac_cv_header_gpm_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 4222 "configure"
+#line 4450 "configure"
 #include "confdefs.h"
-#include <$ac_header>
+#include <gpm.h>
 _ACEOF
-if { (eval echo "$as_me:4226: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:4454: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:4232: \$? = $ac_status" >&5
+  echo "$as_me:4460: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -4240,118 +4468,376 @@
   ac_cpp_err=yes
 fi
 if test -z "$ac_cpp_err"; then
-  eval "$as_ac_Header=yes"
+  ac_cv_header_gpm_h=yes
 else
   echo "$as_me: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  eval "$as_ac_Header=no"
+  ac_cv_header_gpm_h=no
 fi
 rm -f conftest.err conftest.$ac_ext
 fi
-echo "$as_me:4251: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<EOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+echo "$as_me:4479: result: $ac_cv_header_gpm_h" >&5
+echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
+if test $ac_cv_header_gpm_h = yes; then
+
+			cat >>confdefs.h <<\EOF
+#define HAVE_GPM_H 1
 EOF
 
-fi
-done
+			with_gpm=yes
 
 else
-  { echo "$as_me:4262: WARNING: Cannot link with gpm library - read the FAQ" >&5
-echo "$as_me: WARNING: Cannot link with gpm library - read the FAQ" >&2;}
+
+			if test "$with_gpm" = yes ; then
+				{ { echo "$as_me:4492: error: Cannot find GPM header" >&5
+echo "$as_me: error: Cannot find GPM header" >&2;}
+   { (exit 1); exit 1; }; }
+			fi
+
 fi
 
+else
+
+		if test "$with_gpm" = yes ; then
+			{ { echo "$as_me:4502: error: Cannot link with GPM library" >&5
+echo "$as_me: error: Cannot link with GPM library" >&2;}
+   { (exit 1); exit 1; }; }
+		fi
+		with_gpm=no
+
 fi
 
-# not everyone has "test -c"
-if test -c /dev/sysmouse 2>/dev/null ; then
-echo "$as_me:4270: checking if you want to use sysmouse" >&5
-echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
+	if test "$with_gpm" = yes ; then
 
-# Check whether --with-sysmouse or --without-sysmouse was given.
-if test "${with_sysmouse+set}" = set; then
-  withval="$with_sysmouse"
-  cf_with_sysmouse=$withval
+cf_have_dlsym=no
+echo "$as_me:4513: checking for dlsym" >&5
+echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
+if test "${ac_cv_func_dlsym+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cf_with_sysmouse=maybe
-fi;
-	if test "$cf_with_sysmouse" != no ; then
-	cat >conftest.$ac_ext <<_ACEOF
-#line 4282 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 4519 "configure"
 #include "confdefs.h"
-
-#include <osreldate.h>
-#if (__FreeBSD_version >= 400017)
-#include <sys/consio.h>
-#include <sys/fbio.h>
-#else
-#include <machine/console.h>
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char dlsym (); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
 #endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlsym ();
+char (*f) ();
 
 int
 main ()
 {
-
-	struct mouse_info the_mouse;
-	ioctl(0, CONS_MOUSECTL, &the_mouse);
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_dlsym) || defined (__stub___dlsym)
+choke me
+#else
+f = dlsym;
+#endif
 
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4305: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:4550: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:4308: \$? = $ac_status" >&5
+  echo "$as_me:4553: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:4311: \"$ac_try\"") >&5
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:4556: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:4314: \$? = $ac_status" >&5
+  echo "$as_me:4559: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  cf_with_sysmouse=yes
+  ac_cv_func_dlsym=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-cf_with_sysmouse=no
+ac_cv_func_dlsym=no
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-	fi
-echo "$as_me:4324: result: $cf_with_sysmouse" >&5
-echo "${ECHO_T}$cf_with_sysmouse" >&6
-test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
-#define USE_SYSMOUSE 1
-EOF
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:4569: result: $ac_cv_func_dlsym" >&5
+echo "${ECHO_T}$ac_cv_func_dlsym" >&6
+if test $ac_cv_func_dlsym = yes; then
+  cf_have_dlsym=yes
+else
+
+cf_have_libdl=no
+echo "$as_me:4576: checking for dlsym in -ldl" >&5
+echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlsym+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 4584 "configure"
+#include "confdefs.h"
 
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlsym ();
+int
+main ()
+{
+dlsym ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:4603: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:4606: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:4609: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:4612: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dl_dlsym=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_dl_dlsym=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
+echo "$as_me:4623: result: $ac_cv_lib_dl_dlsym" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
+if test $ac_cv_lib_dl_dlsym = yes; then
 
-if test X"$CC_G_OPT" = X"" ; then
-	CC_G_OPT='-g'
-	test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
+	cf_have_dlsym=yes
+	cf_have_libdl=yes
 fi
 
-if test X"$CXX_G_OPT" = X"" ; then
-	CXX_G_OPT='-g'
-	test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
 fi
 
-echo "$as_me:4342: checking for default loader flags" >&5
-echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
-case $DFT_LWR_MODEL in
-libtool) LD_MODEL=''   ;;
-normal)  LD_MODEL=''   ;;
-debug)   LD_MODEL=$CC_G_OPT ;;
-profile) LD_MODEL='-pg';;
-shared)  LD_MODEL=''   ;;
-esac
-echo "$as_me:4351: result: $LD_MODEL" >&5
+if test "$cf_have_dlsym" = yes ; then
+	test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
+
+	echo "$as_me:4636: checking whether able to link to dl*() functions" >&5
+echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
+	cat >conftest.$ac_ext <<_ACEOF
+#line 4639 "configure"
+#include "confdefs.h"
+#include <dlfcn.h>
+int
+main ()
+{
+
+		void *obj;
+		if ((obj = dlopen("filename", 0)) != 0) {
+			if (dlsym(obj, "symbolname") == 0) {
+			dlclose(obj);
+			}
+		}
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:4657: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:4660: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:4663: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:4666: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+		cat >>confdefs.h <<\EOF
+#define HAVE_LIBDL 1
+EOF
+
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+
+		{ { echo "$as_me:4677: error: Cannot link test program for libdl" >&5
+echo "$as_me: error: Cannot link test program for libdl" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+	echo "$as_me:4682: result: ok" >&5
+echo "${ECHO_T}ok" >&6
+else
+	{ { echo "$as_me:4685: error: Cannot find dlsym function" >&5
+echo "$as_me: error: Cannot find dlsym function" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+		SHLIB_LIST="-ldl $SHLIB_LIST"
+		cat >>confdefs.h <<\EOF
+#define HAVE_LIBGPM 1
+EOF
+
+		echo "$as_me:4695: checking for Gpm_Wgetch in -lgpm" >&5
+echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
+if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgpm  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 4703 "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char Gpm_Wgetch ();
+int
+main ()
+{
+Gpm_Wgetch ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:4722: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:4725: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:4728: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:4731: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_gpm_Gpm_Wgetch=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_gpm_Gpm_Wgetch=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:4742: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
+echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
+if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
+
+			{ echo "$as_me:4746: WARNING: GPM library is already linked with curses - read the FAQ" >&5
+echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
+
+fi
+
+	fi
+fi
+
+# not everyone has "test -c"
+if test -c /dev/sysmouse 2>/dev/null ; then
+echo "$as_me:4756: checking if you want to use sysmouse" >&5
+echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
+
+# Check whether --with-sysmouse or --without-sysmouse was given.
+if test "${with_sysmouse+set}" = set; then
+  withval="$with_sysmouse"
+  cf_with_sysmouse=$withval
+else
+  cf_with_sysmouse=maybe
+fi;
+	if test "$cf_with_sysmouse" != no ; then
+	cat >conftest.$ac_ext <<_ACEOF
+#line 4768 "configure"
+#include "confdefs.h"
+
+#include <osreldate.h>
+#if (__FreeBSD_version >= 400017)
+#include <sys/consio.h>
+#include <sys/fbio.h>
+#else
+#include <machine/console.h>
+#endif
+
+int
+main ()
+{
+
+	struct mouse_info the_mouse;
+	ioctl(0, CONS_MOUSECTL, &the_mouse);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:4791: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:4794: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:4797: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:4800: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cf_with_sysmouse=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_with_sysmouse=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+	fi
+echo "$as_me:4810: result: $cf_with_sysmouse" >&5
+echo "${ECHO_T}$cf_with_sysmouse" >&6
+test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
+#define USE_SYSMOUSE 1
+EOF
+
+fi
+
+if test X"$CC_G_OPT" = X"" ; then
+	CC_G_OPT='-g'
+	test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
+fi
+
+if test X"$CXX_G_OPT" = X"" ; then
+	CXX_G_OPT='-g'
+	test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
+fi
+
+echo "$as_me:4828: checking for default loader flags" >&5
+echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
+case $DFT_LWR_MODEL in
+libtool) LD_MODEL=''   ;;
+normal)  LD_MODEL=''   ;;
+debug)   LD_MODEL=$CC_G_OPT ;;
+profile) LD_MODEL='-pg';;
+shared)  LD_MODEL=''   ;;
+esac
+echo "$as_me:4837: result: $LD_MODEL" >&5
 echo "${ECHO_T}$LD_MODEL" >&6
 
-echo "$as_me:4354: checking if rpath option should be used" >&5
+echo "$as_me:4840: checking if rpath option should be used" >&5
 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
 
 # Check whether --enable-rpath or --disable-rpath was given.
@@ -4361,7 +4847,7 @@
 else
   cf_cv_ld_rpath=no
 fi;
-echo "$as_me:4364: result: $cf_cv_ld_rpath" >&5
+echo "$as_me:4850: result: $cf_cv_ld_rpath" >&5
 echo "${ECHO_T}$cf_cv_ld_rpath" >&6
 
 	LOCAL_LDFLAGS=
@@ -4371,7 +4857,7 @@
 
 	cf_cv_do_symlinks=no
 
-	echo "$as_me:4374: checking if release/abi version should be used for shared libs" >&5
+	echo "$as_me:4860: checking if release/abi version should be used for shared libs" >&5
 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
 
 # Check whether --with-shlib-version or --without-shlib-version was given.
@@ -4386,7 +4872,7 @@
 		cf_cv_shlib_version=$withval
 		;;
 	*)
-		{ { echo "$as_me:4389: error: option value must be one of: rel, abi, auto or no" >&5
+		{ { echo "$as_me:4875: error: option value must be one of: rel, abi, auto or no" >&5
 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
    { (exit 1); exit 1; }; }
 		;;
@@ -4395,7 +4881,7 @@
 else
   cf_cv_shlib_version=auto
 fi;
-	echo "$as_me:4398: result: $cf_cv_shlib_version" >&5
+	echo "$as_me:4884: result: $cf_cv_shlib_version" >&5
 echo "${ECHO_T}$cf_cv_shlib_version" >&6
 
 	cf_cv_rm_so_locs=no
@@ -4404,14 +4890,14 @@
 	CC_SHARED_OPTS=
 	if test "$GCC" = yes
 	then
-		echo "$as_me:4407: checking which $CC option to use" >&5
+		echo "$as_me:4893: checking which $CC option to use" >&5
 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
 		cf_save_CFLAGS="$CFLAGS"
 		for CC_SHARED_OPTS in -fPIC -fpic ''
 		do
 			CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
 			cat >conftest.$ac_ext <<_ACEOF
-#line 4414 "configure"
+#line 4900 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int
@@ -4423,16 +4909,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4426: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:4912: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:4429: \$? = $ac_status" >&5
+  echo "$as_me:4915: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:4432: \"$ac_try\"") >&5
+  { (eval echo "$as_me:4918: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:4435: \$? = $ac_status" >&5
+  echo "$as_me:4921: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   break
 else
@@ -4441,7 +4927,7 @@
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 		done
-		echo "$as_me:4444: result: $CC_SHARED_OPTS" >&5
+		echo "$as_me:4930: result: $CC_SHARED_OPTS" >&5
 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
 		CFLAGS="$cf_save_CFLAGS"
 	fi
@@ -4480,8 +4966,13 @@
 		;;
 	irix*)
 		if test "$cf_cv_ld_rpath" = yes ; then
-			cf_ld_rpath_opt="-Wl,-rpath,"
-			EXTRA_LDFLAGS="-Wl,-rpath,\$(libdir) $EXTRA_LDFLAGS"
+			if test "$GCC" = yes; then
+				cf_ld_rpath_opt="-Wl,-rpath,"
+				EXTRA_LDFLAGS="-Wl,-rpath,\$(libdir) $EXTRA_LDFLAGS"
+			else
+				cf_ld_rpath_opt="-rpath "
+				EXTRA_LDFLAGS="-rpath \$(libdir) $EXTRA_LDFLAGS"
+			fi
 		fi
 		# tested with IRIX 5.2 and 'cc'.
 		if test "$GCC" != yes; then
@@ -4625,7 +5116,7 @@
 			test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
 			;;
 		*)
-			{ echo "$as_me:4628: WARNING: ignored --with-shlib-version" >&5
+			{ echo "$as_me:5119: WARNING: ignored --with-shlib-version" >&5
 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
 			;;
 		esac
@@ -4633,12 +5124,12 @@
 	esac
 
 	if test -n "$cf_ld_rpath_opt" ; then
-		echo "$as_me:4636: checking if we need a space after rpath option" >&5
+		echo "$as_me:5127: checking if we need a space after rpath option" >&5
 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
 		cf_save_LIBS="$LIBS"
 		LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"
 		cat >conftest.$ac_ext <<_ACEOF
-#line 4641 "configure"
+#line 5132 "configure"
 #include "confdefs.h"
 
 int
@@ -4650,16 +5141,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4653: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5144: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:4656: \$? = $ac_status" >&5
+  echo "$as_me:5147: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:4659: \"$ac_try\"") >&5
+  { (eval echo "$as_me:5150: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:4662: \$? = $ac_status" >&5
+  echo "$as_me:5153: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_rpath_space=no
 else
@@ -4669,7 +5160,7 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 		LIBS="$cf_save_LIBS"
-		echo "$as_me:4672: result: $cf_rpath_space" >&5
+		echo "$as_me:5163: result: $cf_rpath_space" >&5
 echo "${ECHO_T}$cf_rpath_space" >&6
 		test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
 		MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\$(libdir)"
@@ -4678,7 +5169,7 @@
 if test "$CC_SHARED_OPTS" = "unknown"; then
 	for model in $cf_list_models; do
 		if test "$model" = "shared"; then
-			{ { echo "$as_me:4681: error: Shared libraries are not supported in this version" >&5
+			{ { echo "$as_me:5172: error: Shared libraries are not supported in this version" >&5
 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
    { (exit 1); exit 1; }; }
 		fi
@@ -4688,7 +5179,7 @@
 ###############################################################################
 
 ###	use option --disable-overwrite to leave out the link to -lcurses
-echo "$as_me:4691: checking if you wish to install ncurses overwriting curses" >&5
+echo "$as_me:5182: checking if you wish to install ncurses overwriting curses" >&5
 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
 
 # Check whether --enable-overwrite or --disable-overwrite was given.
@@ -4698,10 +5189,10 @@
 else
   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
 fi;
-echo "$as_me:4701: result: $with_overwrite" >&5
+echo "$as_me:5192: result: $with_overwrite" >&5
 echo "${ECHO_T}$with_overwrite" >&6
 
-echo "$as_me:4704: checking if external terminfo-database is used" >&5
+echo "$as_me:5195: checking if external terminfo-database is used" >&5
 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
 
 # Check whether --enable-database or --disable-database was given.
@@ -4711,7 +5202,7 @@
 else
   use_database=yes
 fi;
-echo "$as_me:4714: result: $use_database" >&5
+echo "$as_me:5205: result: $use_database" >&5
 echo "${ECHO_T}$use_database" >&6
 
 case $host_os in #(vi
@@ -4733,7 +5224,7 @@
 #define USE_DATABASE 1
 EOF
 
-	echo "$as_me:4736: checking which terminfo source-file will be installed" >&5
+	echo "$as_me:5227: checking which terminfo source-file will be installed" >&5
 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
 
 # Check whether --enable-database or --disable-database was given.
@@ -4741,11 +5232,11 @@
   enableval="$enable_database"
   TERMINFO_SRC=$withval
 fi;
-	echo "$as_me:4744: result: $TERMINFO_SRC" >&5
+	echo "$as_me:5235: result: $TERMINFO_SRC" >&5
 echo "${ECHO_T}$TERMINFO_SRC" >&6
 fi
 
-echo "$as_me:4748: checking for list of fallback descriptions" >&5
+echo "$as_me:5239: checking for list of fallback descriptions" >&5
 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
 
 # Check whether --with-fallbacks or --without-fallbacks was given.
@@ -4755,17 +5246,35 @@
 else
   with_fallback=
 fi;
-echo "$as_me:4758: result: $with_fallback" >&5
+echo "$as_me:5249: result: $with_fallback" >&5
 echo "${ECHO_T}$with_fallback" >&6
 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
 
+echo "$as_me:5253: checking if you want modern xterm or antique" >&5
+echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
+
+# Check whether --with-xterm-new or --without-xterm-new was given.
+if test "${with_xterm_new+set}" = set; then
+  withval="$with_xterm_new"
+  with_xterm_new=$withval
+else
+  with_xterm_new=yes
+fi;
+case $with_xterm_new in
+no)	with_xterm_new=xterm-old;;
+*)	with_xterm_new=xterm-new;;
+esac
+echo "$as_me:5267: result: $with_xterm_new" >&5
+echo "${ECHO_T}$with_xterm_new" >&6
+WHICH_XTERM=$with_xterm_new
+
 MAKE_TERMINFO=
 if test "$use_database" = no ; then
 	TERMINFO="${datadir}/terminfo"
 	MAKE_TERMINFO="#"
 else
 
-echo "$as_me:4768: checking for list of terminfo directories" >&5
+echo "$as_me:5277: checking for list of terminfo directories" >&5
 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
 
 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
@@ -4799,7 +5308,7 @@
   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$ac_default_prefix%`
   ;;
 *)
-  { { echo "$as_me:4802: error: expected a pathname, not \"$cf_src_path\"" >&5
+  { { echo "$as_me:5311: error: expected a pathname, not \"$cf_src_path\"" >&5
 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
    { (exit 1); exit 1; }; }
   ;;
@@ -4812,13 +5321,13 @@
 
 eval 'TERMINFO_DIRS="$cf_dst_path"'
 
-echo "$as_me:4815: result: $TERMINFO_DIRS" >&5
+echo "$as_me:5324: result: $TERMINFO_DIRS" >&5
 echo "${ECHO_T}$TERMINFO_DIRS" >&6
 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
 #define TERMINFO_DIRS "$TERMINFO_DIRS"
 EOF
 
-echo "$as_me:4821: checking for default terminfo directory" >&5
+echo "$as_me:5330: checking for default terminfo directory" >&5
 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
 
 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
@@ -4847,7 +5356,7 @@
   withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
   ;;
 *)
-  { { echo "$as_me:4850: error: expected a pathname, not \"$withval\"" >&5
+  { { echo "$as_me:5359: error: expected a pathname, not \"$withval\"" >&5
 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
    { (exit 1); exit 1; }; }
   ;;
@@ -4855,7 +5364,7 @@
 
 eval TERMINFO="$withval"
 
-echo "$as_me:4858: result: $TERMINFO" >&5
+echo "$as_me:5367: result: $TERMINFO" >&5
 echo "${ECHO_T}$TERMINFO" >&6
 cat >>confdefs.h <<EOF
 #define TERMINFO "$TERMINFO"
@@ -4865,7 +5374,7 @@
 
 ###	use option --disable-big-core to make tic run on small machines
 ###	We need 4Mb, check if we can allocate 50% more than that.
-echo "$as_me:4868: checking if big-core option selected" >&5
+echo "$as_me:5377: checking if big-core option selected" >&5
 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
 
 # Check whether --enable-big-core or --disable-big-core was given.
@@ -4877,7 +5386,7 @@
   with_big_core=no
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 4880 "configure"
+#line 5389 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -4891,15 +5400,15 @@
 }
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:4894: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5403: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:4897: \$? = $ac_status" >&5
+  echo "$as_me:5406: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:4899: \"$ac_try\"") >&5
+  { (eval echo "$as_me:5408: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:4902: \$? = $ac_status" >&5
+  echo "$as_me:5411: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   with_big_core=yes
 else
@@ -4911,14 +5420,14 @@
 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 fi;
-echo "$as_me:4914: result: $with_big_core" >&5
+echo "$as_me:5423: result: $with_big_core" >&5
 echo "${ECHO_T}$with_big_core" >&6
 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
 #define HAVE_BIG_CORE 1
 EOF
 
 ###	use option --enable-termcap to compile in the termcap fallback support
-echo "$as_me:4921: checking if you want termcap-fallback support" >&5
+echo "$as_me:5430: checking if you want termcap-fallback support" >&5
 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
 
 # Check whether --enable-termcap or --disable-termcap was given.
@@ -4928,13 +5437,13 @@
 else
   with_termcap=no
 fi;
-echo "$as_me:4931: result: $with_termcap" >&5
+echo "$as_me:5440: result: $with_termcap" >&5
 echo "${ECHO_T}$with_termcap" >&6
 
 if test "$with_termcap" != "yes" ; then
 	if test "$use_database" = no ; then
 		if test -z "$with_fallback" ; then
-			{ { echo "$as_me:4937: error: You have disabled the database w/o specifying fallbacks" >&5
+			{ { echo "$as_me:5446: error: You have disabled the database w/o specifying fallbacks" >&5
 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
    { (exit 1); exit 1; }; }
 		fi
@@ -4949,7 +5458,7 @@
 #define USE_TERMCAP 1
 EOF
 
-echo "$as_me:4952: checking for list of termcap files" >&5
+echo "$as_me:5461: checking for list of termcap files" >&5
 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
 
 # Check whether --with-termpath or --without-termpath was given.
@@ -4983,7 +5492,7 @@
   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$ac_default_prefix%`
   ;;
 *)
-  { { echo "$as_me:4986: error: expected a pathname, not \"$cf_src_path\"" >&5
+  { { echo "$as_me:5495: error: expected a pathname, not \"$cf_src_path\"" >&5
 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
    { (exit 1); exit 1; }; }
   ;;
@@ -4996,14 +5505,14 @@
 
 eval 'TERMPATH="$cf_dst_path"'
 
-echo "$as_me:4999: result: $TERMPATH" >&5
+echo "$as_me:5508: result: $TERMPATH" >&5
 echo "${ECHO_T}$TERMPATH" >&6
 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
 #define TERMPATH "$TERMPATH"
 EOF
 
 ###	use option --enable-getcap to use a hacked getcap for reading termcaps
-echo "$as_me:5006: checking if fast termcap-loader is needed" >&5
+echo "$as_me:5515: checking if fast termcap-loader is needed" >&5
 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
 
 # Check whether --enable-getcap or --disable-getcap was given.
@@ -5013,13 +5522,13 @@
 else
   with_getcap=no
 fi;
-echo "$as_me:5016: result: $with_getcap" >&5
+echo "$as_me:5525: result: $with_getcap" >&5
 echo "${ECHO_T}$with_getcap" >&6
 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
 #define USE_GETCAP 1
 EOF
 
-echo "$as_me:5022: checking if translated termcaps will be cached in ~/.terminfo" >&5
+echo "$as_me:5531: checking if translated termcaps will be cached in ~/.terminfo" >&5
 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
 
 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
@@ -5029,7 +5538,7 @@
 else
   with_getcap_cache=no
 fi;
-echo "$as_me:5032: result: $with_getcap_cache" >&5
+echo "$as_me:5541: result: $with_getcap_cache" >&5
 echo "${ECHO_T}$with_getcap_cache" >&6
 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
 #define USE_GETCAP_CACHE 1
@@ -5038,7 +5547,7 @@
 fi
 
 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
-echo "$as_me:5041: checking if ~/.terminfo is wanted" >&5
+echo "$as_me:5550: checking if ~/.terminfo is wanted" >&5
 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
 
 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
@@ -5048,10 +5557,28 @@
 else
   with_home_terminfo=yes
 fi;
+echo "$as_me:5560: result: $with_home_terminfo" >&5
+echo "${ECHO_T}$with_home_terminfo" >&6
 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
 #define USE_HOME_TERMINFO 1
 EOF
 
+echo "$as_me:5566: checking if you want to use restrict environment when running as root" >&5
+echo $ECHO_N "checking if you want to use restrict environment when running as root... $ECHO_C" >&6
+
+# Check whether --enable-root-environ or --disable-root-environ was given.
+if test "${enable_root_environ+set}" = set; then
+  enableval="$enable_root_environ"
+  with_root_environ=$enableval
+else
+  with_root_environ=yes
+fi;
+echo "$as_me:5576: result: $with_root_environ" >&5
+echo "${ECHO_T}$with_root_environ" >&6
+test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
+#define USE_ROOT_ENVIRON 1
+EOF
+
 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
 ###   to reduce storage requirements for the terminfo database.
 
@@ -5060,13 +5587,13 @@
 	unlink
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:5063: checking for $ac_func" >&5
+echo "$as_me:5590: checking for $ac_func" >&5
 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
 if eval "test \"\${$as_ac_var+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 5069 "configure"
+#line 5596 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func (); below.  */
@@ -5097,16 +5624,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5100: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5627: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:5103: \$? = $ac_status" >&5
+  echo "$as_me:5630: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:5106: \"$ac_try\"") >&5
+  { (eval echo "$as_me:5633: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:5109: \$? = $ac_status" >&5
+  echo "$as_me:5636: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   eval "$as_ac_var=yes"
 else
@@ -5116,7 +5643,7 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:5119: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:5646: result: `eval echo '${'$as_ac_var'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
 if test `eval echo '${'$as_ac_var'}'` = yes; then
   cat >>confdefs.h <<EOF
@@ -5133,13 +5660,13 @@
 		symlink
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:5136: checking for $ac_func" >&5
+echo "$as_me:5663: checking for $ac_func" >&5
 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
 if eval "test \"\${$as_ac_var+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 5142 "configure"
+#line 5669 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func (); below.  */
@@ -5170,16 +5697,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5173: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5700: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:5176: \$? = $ac_status" >&5
+  echo "$as_me:5703: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:5179: \"$ac_try\"") >&5
+  { (eval echo "$as_me:5706: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:5182: \$? = $ac_status" >&5
+  echo "$as_me:5709: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   eval "$as_ac_var=yes"
 else
@@ -5189,7 +5716,7 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:5192: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:5719: result: `eval echo '${'$as_ac_var'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
 if test `eval echo '${'$as_ac_var'}'` = yes; then
   cat >>confdefs.h <<EOF
@@ -5200,7 +5727,7 @@
 done
 
 else
-	echo "$as_me:5203: checking if link/symlink functions work" >&5
+	echo "$as_me:5730: checking if link/symlink functions work" >&5
 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
 if test "${cf_cv_link_funcs+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -5213,7 +5740,7 @@
 			eval 'ac_cv_func_'$cf_func'=error'
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 5216 "configure"
+#line 5743 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -5243,15 +5770,15 @@
 
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:5246: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5773: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:5249: \$? = $ac_status" >&5
+  echo "$as_me:5776: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:5251: \"$ac_try\"") >&5
+  { (eval echo "$as_me:5778: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:5254: \$? = $ac_status" >&5
+  echo "$as_me:5781: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
 			cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
@@ -5269,7 +5796,7 @@
 		test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
 
 fi
-echo "$as_me:5272: result: $cf_cv_link_funcs" >&5
+echo "$as_me:5799: result: $cf_cv_link_funcs" >&5
 echo "${ECHO_T}$cf_cv_link_funcs" >&6
 	test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
 #define HAVE_LINK 1
@@ -5285,27 +5812,27 @@
 with_symlinks=no
 
 if test "$ac_cv_func_link" != yes ; then
-    echo "$as_me:5288: checking if tic should use symbolic links" >&5
+    echo "$as_me:5815: checking if tic should use symbolic links" >&5
 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
     if test "$ac_cv_func_symlink" = yes ; then
     	with_symlinks=yes
     else
     	with_symlinks=no
     fi
-    echo "$as_me:5295: result: $with_symlinks" >&5
+    echo "$as_me:5822: result: $with_symlinks" >&5
 echo "${ECHO_T}$with_symlinks" >&6
 elif test "$ac_cv_func_symlink" != yes ; then
-    echo "$as_me:5298: checking if tic should use hard links" >&5
+    echo "$as_me:5825: checking if tic should use hard links" >&5
 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
     if test "$ac_cv_func_link" = yes ; then
     	with_links=yes
     else
     	with_links=no
     fi
-    echo "$as_me:5305: result: $with_links" >&5
+    echo "$as_me:5832: result: $with_links" >&5
 echo "${ECHO_T}$with_links" >&6
 else
-    echo "$as_me:5308: checking if tic should use symbolic links" >&5
+    echo "$as_me:5835: checking if tic should use symbolic links" >&5
 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
 
 # Check whether --enable-symlinks or --disable-symlinks was given.
@@ -5315,7 +5842,7 @@
 else
   with_symlinks=no
 fi;
-    echo "$as_me:5318: result: $with_symlinks" >&5
+    echo "$as_me:5845: result: $with_symlinks" >&5
 echo "${ECHO_T}$with_symlinks" >&6
 fi
 
@@ -5328,7 +5855,7 @@
 EOF
 
 ###   use option --enable-broken-linker to force on use of broken-linker support
-echo "$as_me:5331: checking if you want broken-linker support code" >&5
+echo "$as_me:5858: checking if you want broken-linker support code" >&5
 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
 
 # Check whether --enable-broken_linker or --disable-broken_linker was given.
@@ -5338,7 +5865,7 @@
 else
   with_broken_linker=${BROKEN_LINKER-no}
 fi;
-echo "$as_me:5341: result: $with_broken_linker" >&5
+echo "$as_me:5868: result: $with_broken_linker" >&5
 echo "${ECHO_T}$with_broken_linker" >&6
 
 BROKEN_LINKER=0
@@ -5362,1774 +5889,2356 @@
 	esac
 fi
 
-###   use option --with-bool to override bool's type
-echo "$as_me:5366: checking for type of bool" >&5
-echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
+###   use option --enable-widec to turn on use of wide-character support
+NCURSES_CH_T=chtype
+NCURSES_LIBUTF8=0
 
-# Check whether --with-bool or --without-bool was given.
-if test "${with_bool+set}" = set; then
-  withval="$with_bool"
-  NCURSES_BOOL="$withval"
-else
-  NCURSES_BOOL=auto
-fi;
-echo "$as_me:5376: result: $NCURSES_BOOL" >&5
-echo "${ECHO_T}$NCURSES_BOOL" >&6
+NEED_WCHAR_H=0
+NCURSES_MBSTATE_T=0
+NCURSES_WCHAR_T=0
+NCURSES_WINT_T=0
 
-###   use option --with-ospeed to override ospeed's type
-echo "$as_me:5380: checking for type of ospeed" >&5
-echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
+# Check to define _XOPEN_SOURCE "automatically"
 
-# Check whether --with-ospeed or --without-ospeed was given.
-if test "${with_ospeed+set}" = set; then
-  withval="$with_ospeed"
-  NCURSES_OSPEED="$withval"
-else
-  NCURSES_OSPEED=short
-fi;
-echo "$as_me:5390: result: $NCURSES_OSPEED" >&5
-echo "${ECHO_T}$NCURSES_OSPEED" >&6
+INTEL_COMPILER=no
 
-###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
-echo "$as_me:5394: checking if tputs should process BSD-style prefix padding" >&5
-echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
+if test "$GCC" = yes ; then
+	case $host_os in
+	linux*|gnu*)
+		echo "$as_me:5908: checking if this is really Intel compiler" >&5
+echo $ECHO_N "checking if this is really Intel compiler... $ECHO_C" >&6
+		cf_save_CFLAGS="$CFLAGS"
+		CFLAGS="$CFLAGS -no-gcc"
+		cat >conftest.$ac_ext <<_ACEOF
+#line 5913 "configure"
+#include "confdefs.h"
 
-# Check whether --enable-bsdpad or --disable-bsdpad was given.
-if test "${enable_bsdpad+set}" = set; then
-  enableval="$enable_bsdpad"
-  with_bsdpad=$enableval
-else
-  with_bsdpad=no
-fi;
-echo "$as_me:5404: result: $with_bsdpad" >&5
-echo "${ECHO_T}$with_bsdpad" >&6
-test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
-#define BSD_TPUTS 1
-EOF
+int
+main ()
+{
 
-### Enable compiling-in rcs id's
-echo "$as_me:5411: checking if RCS identifiers should be compiled-in" >&5
-echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
+#ifdef __INTEL_COMPILER
+#else
+make an error
+#endif
 
-# Check whether --with-rcs-ids or --without-rcs-ids was given.
-if test "${with_rcs_ids+set}" = set; then
-  withval="$with_rcs_ids"
-  with_rcs_ids=$withval
-else
-  with_rcs_ids=no
-fi;
-echo "$as_me:5421: result: $with_rcs_ids" >&5
-echo "${ECHO_T}$with_rcs_ids" >&6
-test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
-#define USE_RCS_IDS 1
-EOF
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:5930: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:5933: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:5936: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:5939: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  INTEL_COMPILER=yes
+cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
 
-###############################################################################
-
-echo "$as_me:5429: checking format of man-pages" >&5
-echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
-
-# Check whether --with-manpage-format or --without-manpage-format was given.
-if test "${with_manpage_format+set}" = set; then
-  withval="$with_manpage_format"
-  MANPAGE_FORMAT=$withval
 else
-  MANPAGE_FORMAT=unknown
-fi;
-
-test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
-MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
-
-cf_unknown=
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+		CFLAGS="$cf_save_CFLAGS"
+		echo "$as_me:5950: result: $INTEL_COMPILER" >&5
+echo "${ECHO_T}$INTEL_COMPILER" >&6
+		;;
+	esac
+fi
 
-case $MANPAGE_FORMAT in
-unknown)
-  if test -z "$MANPATH" ; then
-    MANPATH="/usr/man:/usr/share/man"
-  fi
+cf_XOPEN_SOURCE=500
+cf_POSIX_C_SOURCE=199506L
 
-  # look for the 'date' man-page (it's most likely to be installed!)
-  MANPAGE_FORMAT=
-  cf_preform=no
-  cf_catonly=yes
-  cf_example=date
+case $host_os in #(vi
+aix[45]*) #(vi
+	CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
+	;;
+darwin*) #(vi
+	# setting _XOPEN_SOURCE breaks things on Darwin
+	;;
+freebsd*) #(vi
+	# 5.x headers associate
+	#	_XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
+	#	_XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
+	cf_POSIX_C_SOURCE=200112L
+	cf_XOPEN_SOURCE=600
+	CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
+	;;
+hpux*) #(vi
+	CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
+	;;
+irix[56].*) #(vi
+	CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
+	;;
+linux*|gnu*) #(vi
 
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
-  for cf_dir in $MANPATH; do
-    test -z "$cf_dir" && cf_dir=/usr/man
-    for cf_name in $cf_dir/man*/$cf_example.[01]* $cf_dir/cat*/$cf_example.[01]* $cf_dir/man*/$cf_example $cf_dir/cat*/$cf_example
-    do
-      cf_test=`echo $cf_name | sed -e 's/*//'`
-      if test "x$cf_test" = "x$cf_name" ; then
+if test "$INTEL_COMPILER" = no ; then
+echo "$as_me:5983: checking if we must define _GNU_SOURCE" >&5
+echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
+if test "${cf_cv_gnu_source+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
 
-	case "$cf_name" in
-	*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
-	*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
-	*.0)	MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
-	*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
-	esac
+cat >conftest.$ac_ext <<_ACEOF
+#line 5990 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int
+main ()
+{
 
-	case "$cf_name" in
-	$cf_dir/man*)
-	  cf_catonly=no
-	  ;;
-	$cf_dir/cat*)
-	  cf_preform=yes
-	  ;;
-	esac
-	break
-      fi
+#ifndef _XOPEN_SOURCE
+make an error
+#endif
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6005: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:6008: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:6011: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6014: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cf_cv_gnu_source=no
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_save="$CPPFLAGS"
+	 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
+	 cat >conftest.$ac_ext <<_ACEOF
+#line 6023 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int
+main ()
+{
 
-      # if we found a match in either man* or cat*, stop looking
-      if test -n "$MANPAGE_FORMAT" ; then
-	cf_found=no
-	test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
-	test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
-	case "$cf_name" in
-	$cf_dir/cat*)
-	  cf_found=yes
-	  ;;
-	esac
-	test $cf_found=yes && break
-      fi
-    done
-    # only check the first directory in $MANPATH where we find manpages
-    if test -n "$MANPAGE_FORMAT" ; then
-       break
-    fi
-  done
-  # if we did not find the example, just assume it is normal
-  test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
-  IFS="$ac_save_ifs"
-  ;;
-*)
-  for cf_option in $MANPAGE_FORMAT; do
-     case $cf_option in #(vi
-     gzip|compress|BSDI|normal|formatted|catonly)
-       ;;
-     *)
-       cf_unknown="$cf_unknown $cf_option"
-       ;;
-     esac
-  done
-  ;;
-esac
+#ifdef _XOPEN_SOURCE
+make an error
+#endif
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6038: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:6041: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:6044: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6047: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cf_cv_gnu_source=no
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_gnu_source=yes
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+	CPPFLAGS="$cf_save"
 
-echo "$as_me:5518: result: $MANPAGE_FORMAT" >&5
-echo "${ECHO_T}$MANPAGE_FORMAT" >&6
-if test -n "$cf_unknown" ; then
-  { echo "$as_me:5521: WARNING: Unexpected manpage-format $cf_unknown" >&5
-echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
 fi
+rm -f conftest.$ac_objext conftest.$ac_ext
 
-echo "$as_me:5525: checking for manpage renaming" >&5
-echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
+fi
+echo "$as_me:6062: result: $cf_cv_gnu_source" >&5
+echo "${ECHO_T}$cf_cv_gnu_source" >&6
+test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
+fi
 
-# Check whether --with-manpage-renames or --without-manpage-renames was given.
-if test "${with_manpage_renames+set}" = set; then
-  withval="$with_manpage_renames"
-  MANPAGE_RENAMES=$withval
+	;;
+mirbsd*) #(vi
+	# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
+	;;
+netbsd*) #(vi
+	# setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
+	;;
+openbsd*) #(vi
+	# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
+	;;
+osf[45]*) #(vi
+	CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
+	;;
+sco*) #(vi
+	# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
+	;;
+solaris*) #(vi
+	CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
+	;;
+*)
+	echo "$as_me:6087: checking if we should define _XOPEN_SOURCE" >&5
+echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
+if test "${cf_cv_xopen_source+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  MANPAGE_RENAMES=yes
-fi;
-
-case ".$MANPAGE_RENAMES" in #(vi
-.no) #(vi
-  ;;
-.|.yes)
-  # Debian 'man' program?
-  if test -f /etc/debian_version ; then
-    MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
-  else
-    MANPAGE_RENAMES=no
-  fi
-  ;;
-esac
 
-if test "$MANPAGE_RENAMES" != no ; then
-  if test -f $srcdir/man/$MANPAGE_RENAMES ; then
-    MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
-  elif test ! -f $MANPAGE_RENAMES ; then
-    { { echo "$as_me:5553: error: not a filename: $MANPAGE_RENAMES" >&5
-echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
+	cat >conftest.$ac_ext <<_ACEOF
+#line 6094 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int
+main ()
+{
 
-  test ! -d man && mkdir man
+#ifndef _XOPEN_SOURCE
+make an error
+#endif
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6109: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:6112: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:6115: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6118: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cf_cv_xopen_source=no
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_save="$CPPFLAGS"
+	 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
+	 cat >conftest.$ac_ext <<_ACEOF
+#line 6127 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int
+main ()
+{
 
-  # Construct a sed-script to perform renaming within man-pages
-  if test -n "$MANPAGE_RENAMES" ; then
-    test ! -d man && mkdir man
-    sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >man/edit_man.sed
-  fi
+#ifdef _XOPEN_SOURCE
+make an error
+#endif
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6142: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:6145: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:6148: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6151: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cf_cv_xopen_source=no
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_xopen_source=$cf_XOPEN_SOURCE
 fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+	CPPFLAGS="$cf_save"
 
-echo "$as_me:5567: result: $MANPAGE_RENAMES" >&5
-echo "${ECHO_T}$MANPAGE_RENAMES" >&6
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
 
-echo "$as_me:5570: checking if manpage aliases will be installed" >&5
-echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
+fi
+echo "$as_me:6166: result: $cf_cv_xopen_source" >&5
+echo "${ECHO_T}$cf_cv_xopen_source" >&6
+test "$cf_cv_xopen_source" != no && CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE -D_XOPEN_SOURCE=$cf_cv_xopen_source"
 
-# Check whether --with-manpage-aliases or --without-manpage-aliases was given.
-if test "${with_manpage_aliases+set}" = set; then
-  withval="$with_manpage_aliases"
-  MANPAGE_ALIASES=$withval
+cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
+echo "$as_me:6171: checking if we should define _POSIX_C_SOURCE" >&5
+echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
+if test "${cf_cv_posix_c_source+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  MANPAGE_ALIASES=yes
-fi;
 
-echo "$as_me:5581: result: $MANPAGE_ALIASES" >&5
-echo "${ECHO_T}$MANPAGE_ALIASES" >&6
+echo "(line 6177) testing if the symbol is already defined go no further ..." 1>&5
 
-if test "$LN_S" = "ln -s"; then
-	cf_use_symlinks=yes
-else
-	cf_use_symlinks=no
-fi
-
-MANPAGE_SYMLINKS=no
-if test "$MANPAGE_ALIASES" = yes ; then
-echo "$as_me:5592: checking if manpage symlinks should be used" >&5
-echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
+	cat >conftest.$ac_ext <<_ACEOF
+#line 6180 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int
+main ()
+{
 
-# Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
-if test "${with_manpage_symlinks+set}" = set; then
-  withval="$with_manpage_symlinks"
-  MANPAGE_SYMLINKS=$withval
+#ifndef _POSIX_C_SOURCE
+make an error
+#endif
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6195: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:6198: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:6201: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6204: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cf_cv_posix_c_source=no
 else
-  MANPAGE_SYMLINKS=$cf_use_symlinks
-fi;
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_want_posix_source=no
+	 case .$cf_POSIX_C_SOURCE in
+	 .[12]??*)
+		cf_cv_posix_c_source="-U_POSIX_C_SOURCE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
+		;;
+	 .2)
+		cf_cv_posix_c_source="-U_POSIX_C_SOURCE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
+		cf_want_posix_source=yes
+		;;
+	 .*)
+		cf_want_posix_source=yes
+		;;
+	 esac
+	 if test "$cf_want_posix_source" = yes ; then
+		cat >conftest.$ac_ext <<_ACEOF
+#line 6225 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int
+main ()
+{
 
-if test "$$cf_use_symlinks" = no; then
-if test "$MANPAGE_SYMLINKS" = yes ; then
-	{ echo "$as_me:5605: WARNING: cannot make symlinks" >&5
-echo "$as_me: WARNING: cannot make symlinks" >&2;}
-	MANPAGE_SYMLINKS=no
-fi
+#ifdef _POSIX_SOURCE
+make an error
+#endif
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6240: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:6243: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:6246: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6249: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_posix_c_source="$cf_cv_posix_c_source -U_POSIX_SOURCE -D_POSIX_SOURCE"
 fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+	 fi
 
-echo "$as_me:5611: result: $MANPAGE_SYMLINKS" >&5
-echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
-fi
+echo "(line 6260) testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
 
-echo "$as_me:5615: checking for manpage tbl" >&5
-echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
+	 cf_save="$CPPFLAGS"
+	 CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
 
-# Check whether --with-manpage-tbl or --without-manpage-tbl was given.
-if test "${with_manpage_tbl+set}" = set; then
-  withval="$with_manpage_tbl"
-  MANPAGE_TBL=$withval
+echo "(line 6265) testing if the second compile does not leave our definition intact error ..." 1>&5
+
+	 cat >conftest.$ac_ext <<_ACEOF
+#line 6268 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int
+main ()
+{
+
+#ifndef _POSIX_C_SOURCE
+make an error
+#endif
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6283: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:6286: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:6289: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6292: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
 else
-  MANPAGE_TBL=no
-fi;
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_posix_c_source=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+	CPPFLAGS="$cf_save"
 
-echo "$as_me:5626: result: $MANPAGE_TBL" >&5
-echo "${ECHO_T}$MANPAGE_TBL" >&6
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
 
-  if test "$prefix" = "NONE" ; then
-     cf_prefix="$ac_default_prefix"
-  else
-     cf_prefix="$prefix"
-  fi
+fi
+echo "$as_me:6307: result: $cf_cv_posix_c_source" >&5
+echo "${ECHO_T}$cf_cv_posix_c_source" >&6
+test "$cf_cv_posix_c_source" != no && CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
 
-  case "$MANPAGE_FORMAT" in # (vi
-  *catonly*) # (vi
-    cf_format=yes
-    cf_inboth=no
-    ;;
-  *formatted*) # (vi
-    cf_format=yes
-    cf_inboth=yes
-    ;;
-  *)
-    cf_format=no
-    cf_inboth=no
-    ;;
-  esac
+	;;
+esac
 
-test ! -d man && mkdir man
+# Checks for CODESET support.
 
-cf_so_strip=
-cf_compress=
-case "$MANPAGE_FORMAT" in #(vi
-*compress*) #(vi
-	cf_so_strip="Z"
-	cf_compress=compress
-  ;;
-*gzip*) #(vi
-	cf_so_strip="gz"
-	cf_compress=gzip
-  ;;
-esac
+  echo "$as_me:6316: checking for nl_langinfo and CODESET" >&5
+echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
+if test "${am_cv_langinfo_codeset+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 6322 "configure"
+#include "confdefs.h"
+#include <langinfo.h>
+int
+main ()
+{
+char* cs = nl_langinfo(CODESET);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:6334: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:6337: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:6340: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6343: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  am_cv_langinfo_codeset=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+am_cv_langinfo_codeset=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 
-cf_edit_man=man/edit_man.sh
+fi
+echo "$as_me:6354: result: $am_cv_langinfo_codeset" >&5
+echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
+  if test $am_cv_langinfo_codeset = yes; then
 
-cat >$cf_edit_man <<CF_EOF
-#! /bin/sh
-# this script is generated by the configure-script CF_MAN_PAGES macro.
-prefix="$cf_prefix"
-datadir="$datadir"
-NCURSES_OSPEED="$NCURSES_OSPEED"
-TERMINFO="$TERMINFO"
-MKDIRS="sh `cd $srcdir && pwd`/mkinstalldirs"
-INSTALL="$INSTALL"
-INSTALL_DATA="$INSTALL_DATA"
-transform="$program_transform_name"
+cat >>confdefs.h <<\EOF
+#define HAVE_LANGINFO_CODESET 1
+EOF
 
-TMP=\${TMPDIR-/tmp}/man\$\$
-trap "rm -f \$TMP" 0 1 2 5 15
+  fi
 
-form=\$1
-shift || exit 1
+# use these variables to work around a defect in gcc's fixincludes.
+NCURSES_OK_WCHAR_T=
+NCURSES_OK_WINT_T=
 
-verb=\$1
-shift || exit 1
+echo "$as_me:6368: checking if you want wide-character code" >&5
+echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
 
-mandir=\$1
-shift || exit 1
+# Check whether --enable-widec or --disable-widec was given.
+if test "${enable_widec+set}" = set; then
+  enableval="$enable_widec"
+  with_widec=$enableval
+else
+  with_widec=no
+fi;
+echo "$as_me:6378: result: $with_widec" >&5
+echo "${ECHO_T}$with_widec" >&6
+if test "$with_widec" = yes ; then
+	LIB_SUFFIX="w${LIB_SUFFIX}"
+	cat >>confdefs.h <<\EOF
+#define USE_WIDEC_SUPPORT 1
+EOF
 
-srcdir=\$1
-shift || exit 1
+echo "$as_me:6386: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
+echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line 6389 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
 
-if test "\$form" = normal ; then
-	if test "$cf_format" = yes ; then
-	if test "$cf_inboth" = no ; then
-		sh \$0 format \$verb \$mandir \$srcdir \$*
-		exit $?
-	fi
-	fi
-	cf_subdir=\$mandir/man
-	cf_tables=$MANPAGE_TBL
+int
+main ()
+{
+
+#ifndef _XOPEN_SOURCE_EXTENDED
+make an error
+#endif
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6405: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:6408: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:6411: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6414: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cf_result=no
 else
-	cf_subdir=\$mandir/cat
-	cf_tables=yes
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_result=yes
 fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:6423: result: $cf_result" >&5
+echo "${ECHO_T}$cf_result" >&6
 
-# process the list of source-files
-for i in \$* ; do
-case \$i in #(vi
-*.orig|*.rej) ;; #(vi
-*.[0-9]*)
-	section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
-	if test \$verb = installing ; then
-	if test ! -d \$cf_subdir\${section} ; then
-		\$MKDIRS \$cf_subdir\$section
-	fi
-	fi
-	aliases=
-	source=\`basename \$i\`
-	inalias=\$source
-	test ! -f \$inalias && inalias="\$srcdir/\$inalias"
-	if test ! -f \$inalias ; then
-		echo .. skipped \$source
-		continue
-	fi
-CF_EOF
+if test "$cf_result" = yes ; then
+	CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
+elif test "x" != "x" ; then
+	echo "$as_me:6429: checking checking for compatible value versus " >&5
+echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
+	cat >conftest.$ac_ext <<_ACEOF
+#line 6432 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
 
-if test "$MANPAGE_ALIASES" != no ; then
-cat >>$cf_edit_man <<CF_EOF
-	aliases=\`sed -f \$srcdir/manlinks.sed \$inalias | sort -u\`
-CF_EOF
-fi
+int
+main ()
+{
 
-if test "$MANPAGE_RENAMES" = no ; then
-cat >>$cf_edit_man <<CF_EOF
-	# perform program transformations for section 1 man pages
-	if test \$section = 1 ; then
-		target=\$cf_subdir\${section}/\`echo \$source|sed "\${transform}"\`
-	else
-		target=\$cf_subdir\${section}/\$source
-	fi
-CF_EOF
+#if _XOPEN_SOURCE_EXTENDED- < 0
+make an error
+#endif
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6448: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:6451: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:6454: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6457: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cf_result=yes
 else
-cat >>$cf_edit_man <<CF_EOF
-	target=\`grep "^\$source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
-	if test -z "\$target" ; then
-		echo '? missing rename for '\$source
-		target="\$source"
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_result=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+	echo "$as_me:6466: result: $cf_result" >&5
+echo "${ECHO_T}$cf_result" >&6
+	if test "$cf_result" = no ; then
+		# perhaps we can override it - try...
+		CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
 	fi
-	target="\$cf_subdir\${section}/\${target}"
-CF_EOF
 fi
 
-	# replace variables in man page
-
-	for cf_name in  captoinfo clear infocmp infotocap tic toe tput
-	do
-cat >>$cf_edit_man <<CF_EOF
-	prog_$cf_name=\`echo $cf_name|sed "\${transform}"\`
-CF_EOF
-	done
+	# with_overwrite=no
+	NCURSES_CH_T=cchar_t
 
-cat >>$cf_edit_man <<CF_EOF
-	sed	-e "s,@DATADIR@,\$datadir," \\
-		-e "s,@TERMINFO@,\$TERMINFO," \\
-		-e "s,@NCURSES_OSPEED@,\$NCURSES_OSPEED," \\
-CF_EOF
+for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:6480: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 6486 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+char (*f) ();
 
-	for cf_name in  captoinfo clear infocmp infotocap tic toe tput
-	do
-		cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
-cat >>$cf_edit_man <<CF_EOF
-		-e "s,@$cf_NAME@,\$prog_$cf_name," \\
-CF_EOF
-	done
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+f = $ac_func;
+#endif
 
-if test -f $MANPAGE_RENAMES ; then
-cat >>$cf_edit_man <<CF_EOF
-		< \$i | sed -f $srcdir/edit_man.sed >\$TMP
-CF_EOF
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:6517: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:6520: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:6523: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6526: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
 else
-cat >>$cf_edit_man <<CF_EOF
-		< \$i >\$TMP
-CF_EOF
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
 fi
-
-cat >>$cf_edit_man <<CF_EOF
-if test \$cf_tables = yes ; then
-	tbl \$TMP >\$TMP.out
-	mv \$TMP.out \$TMP
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-CF_EOF
+echo "$as_me:6536: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+EOF
 
-if test $with_curses_h != yes ; then
-cat >>$cf_edit_man <<CF_EOF
-	sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
-	mv \$TMP.out \$TMP
-CF_EOF
 fi
+done
 
-cat >>$cf_edit_man <<CF_EOF
-	if test \$form = format ; then
-		nroff -man \$TMP >\$TMP.out
-		mv \$TMP.out \$TMP
-	fi
-CF_EOF
+	if test "$ac_cv_func_putwc" != yes ; then
 
-if test -n "$cf_compress" ; then
-cat >>$cf_edit_man <<CF_EOF
-	if test \$verb = installing ; then
-	if ( $cf_compress -f \$TMP )
-	then
-		mv \$TMP.$cf_so_strip \$TMP
-	fi
-	fi
-	target="\$target.$cf_so_strip"
-CF_EOF
-fi
+echo "$as_me:6548: checking for putwc in libutf8" >&5
+echo $ECHO_N "checking for putwc in libutf8... $ECHO_C" >&6
+if test "${cf_cv_libutf8+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
 
-case "$MANPAGE_FORMAT" in #(vi
-*BSDI*)
-cat >>$cf_edit_man <<CF_EOF
-	if test \$form = format ; then
-		# BSDI installs only .0 suffixes in the cat directories
-		target="\`echo \$target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
-	fi
-CF_EOF
-  ;;
-esac
+	cf_save_LIBS="$LIBS"
+	LIBS="-lutf8 $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 6557 "configure"
+#include "confdefs.h"
 
-cat >>$cf_edit_man <<CF_EOF
-	suffix=\`basename \$target | sed -e 's%^[^.]*%%'\`
-	if test \$verb = installing ; then
-		echo \$verb \$target
-		\$INSTALL_DATA \$TMP \$target
-		test -n "\$aliases" && (
-			cd \$cf_subdir\${section} && (
-				source=\`echo \$target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
-				test -n "$cf_so_strip" && source=\`echo \$source |sed -e 's%\.$cf_so_strip\$%%'\`
-				target=\`basename \$target\`
-				for cf_alias in \$aliases
-				do
-					if test \$section = 1 ; then
-						cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
-					fi
+#include <libutf8.h>
+int
+main ()
+{
+putwc(0,0);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:6570: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:6573: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:6576: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6579: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cf_cv_libutf8=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_libutf8=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+	LIBS="$cf_save_LIBS"
 
-					if test "$MANPAGE_SYMLINKS" = yes ; then
-						if test -f \$cf_alias\${suffix} ; then
-							if ( cmp -s \$target \$cf_alias\${suffix} )
-							then
-								continue
-							fi
-						fi
-						echo .. \$verb alias \$cf_alias\${suffix}
-						rm -f \$cf_alias\${suffix}
-						$LN_S \$target \$cf_alias\${suffix}
-					elif test "\$target" != "\$cf_alias\${suffix}" ; then
-						echo ".so \$source" >\$TMP
-CF_EOF
-if test -n "$cf_compress" ; then
-cat >>$cf_edit_man <<CF_EOF
-						if test -n "$cf_so_strip" ; then
-							$cf_compress -f \$TMP
-							mv \$TMP.$cf_so_strip \$TMP
-						fi
-CF_EOF
 fi
-cat >>$cf_edit_man <<CF_EOF
-						echo .. \$verb alias \$cf_alias\${suffix}
-						rm -f \$cf_alias\${suffix}
-						\$INSTALL_DATA \$TMP \$cf_alias\${suffix}
-					fi
-				done
-			)
-		)
-	elif test \$verb = removing ; then
-		echo \$verb \$target
-		rm -f \$target
-		test -n "\$aliases" && (
-			cd \$cf_subdir\${section} && (
-				for cf_alias in \$aliases
-				do
-					if test \$section = 1 ; then
-						cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
-					fi
+echo "$as_me:6591: result: $cf_cv_libutf8" >&5
+echo "${ECHO_T}$cf_cv_libutf8" >&6
 
-					echo .. \$verb alias \$cf_alias\${suffix}
-					rm -f \$cf_alias\${suffix}
-				done
-			)
-		)
-	else
-#		echo ".hy 0"
-		cat \$TMP
-	fi
-	;;
-esac
-done
+if test "$cf_cv_libutf8" = yes ; then
+	cat >>confdefs.h <<\EOF
+#define HAVE_LIBUTF8_H 1
+EOF
 
-if test $cf_inboth = yes ; then
-if test \$form != format ; then
-	sh \$0 format \$verb \$mandir \$srcdir \$*
-fi
+	LIBS="-lutf8 $LIBS"
 fi
 
-exit 0
-CF_EOF
-chmod 755 $cf_edit_man
+		if test "$cf_cv_libutf8" = yes ; then
+			NCURSES_LIBUTF8=1
+		fi
+	fi
 
-###############################################################################
+# This is needed on Tru64 5.0 to declare mbstate_t
+echo "$as_me:6608: checking if we must include wchar.h to declare mbstate_t" >&5
+echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
+if test "${cf_cv_mbstate_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
 
-### Note that some functions (such as const) are normally disabled anyway.
-echo "$as_me:5914: checking if you want to build with function extensions" >&5
-echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line 6615 "configure"
+#include "confdefs.h"
 
-# Check whether --enable-ext-funcs or --disable-ext-funcs was given.
-if test "${enable_ext_funcs+set}" = set; then
-  enableval="$enable_ext_funcs"
-  with_ext_funcs=$enableval
+#include <stdlib.h>
+#include <stdarg.h>
+#include <stdio.h>
+#ifdef HAVE_LIBUTF8_H
+#include <libutf8.h>
+#endif
+int
+main ()
+{
+mbstate_t state
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6633: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:6636: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:6639: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6642: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cf_cv_mbstate_t=no
 else
-  with_ext_funcs=yes
-fi;
-echo "$as_me:5924: result: $with_ext_funcs" >&5
-echo "${ECHO_T}$with_ext_funcs" >&6
-if test "$with_ext_funcs" = yes ; then
-	NCURSES_EXT_FUNCS=1
-	cat >>confdefs.h <<\EOF
-#define HAVE_CURSES_VERSION 1
-EOF
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cat >conftest.$ac_ext <<_ACEOF
+#line 6649 "configure"
+#include "confdefs.h"
+
+#include <stdlib.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <wchar.h>
+#ifdef HAVE_LIBUTF8_H
+#include <libutf8.h>
+#endif
+int
+main ()
+{
+mbstate_t value
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6668: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:6671: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:6674: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6677: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cf_cv_mbstate_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_mbstate_t=unknown
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:6689: result: $cf_cv_mbstate_t" >&5
+echo "${ECHO_T}$cf_cv_mbstate_t" >&6
 
+if test "$cf_cv_mbstate_t" = yes ; then
 	cat >>confdefs.h <<\EOF
-#define HAVE_HAS_KEY 1
+#define NEED_WCHAR_H 1
 EOF
 
-	cat >>confdefs.h <<\EOF
-#define HAVE_RESIZETERM 1
-EOF
+	NEED_WCHAR_H=1
+fi
 
-	cat >>confdefs.h <<\EOF
-#define HAVE_RESIZE_TERM 1
-EOF
+# if we do not find mbstate_t in either place, use substitution to provide a fallback.
+if test "$cf_cv_mbstate_t" = unknown ; then
+	NCURSES_MBSTATE_T=1
+fi
 
-	cat >>confdefs.h <<\EOF
-#define HAVE_USE_DEFAULT_COLORS 1
-EOF
+# This is needed on Tru64 5.0 to declare wchar_t
+echo "$as_me:6706: checking if we must include wchar.h to declare wchar_t" >&5
+echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
+if test "${cf_cv_wchar_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
 
-	cat >>confdefs.h <<\EOF
-#define HAVE_WRESIZE 1
-EOF
+cat >conftest.$ac_ext <<_ACEOF
+#line 6713 "configure"
+#include "confdefs.h"
 
-	cat >>confdefs.h <<\EOF
-#define NCURSES_EXT_FUNCS 1
-EOF
+#include <stdlib.h>
+#include <stdarg.h>
+#include <stdio.h>
+#ifdef HAVE_LIBUTF8_H
+#include <libutf8.h>
+#endif
+int
+main ()
+{
+wchar_t state
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6731: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:6734: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:6737: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6740: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cf_cv_wchar_t=no
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cat >conftest.$ac_ext <<_ACEOF
+#line 6747 "configure"
+#include "confdefs.h"
 
+#include <stdlib.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <wchar.h>
+#ifdef HAVE_LIBUTF8_H
+#include <libutf8.h>
+#endif
+int
+main ()
+{
+wchar_t value
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6766: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:6769: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:6772: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6775: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cf_cv_wchar_t=yes
 else
-	NCURSES_EXT_FUNCS=0
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_wchar_t=unknown
 fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:6787: result: $cf_cv_wchar_t" >&5
+echo "${ECHO_T}$cf_cv_wchar_t" >&6
 
-###   use option --enable-const to turn on use of const beyond that in XSI.
-echo "$as_me:5961: checking for extended use of const keyword" >&5
-echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
+if test "$cf_cv_wchar_t" = yes ; then
+	cat >>confdefs.h <<\EOF
+#define NEED_WCHAR_H 1
+EOF
 
-# Check whether --enable-const or --disable-const was given.
-if test "${enable_const+set}" = set; then
-  enableval="$enable_const"
-  with_ext_const=$enableval
-else
-  with_ext_const=no
-fi;
-echo "$as_me:5971: result: $with_ext_const" >&5
-echo "${ECHO_T}$with_ext_const" >&6
-NCURSES_CONST='/*nothing*/'
-if test "$with_ext_const" = yes ; then
-	NCURSES_CONST=const
+	NEED_WCHAR_H=1
 fi
 
-echo "$as_me:5978: checking if you want \$NCURSES_NO_PADDING code" >&5
-echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
+# if we do not find wchar_t in either place, use substitution to provide a fallback.
+if test "$cf_cv_wchar_t" = unknown ; then
+	NCURSES_WCHAR_T=1
+fi
 
-# Check whether --enable-no-padding or --disable-no-padding was given.
-if test "${enable_no_padding+set}" = set; then
-  enableval="$enable_no_padding"
-  with_no_padding=$enableval
+# if we find wchar_t in either place, use substitution to provide a fallback.
+if test "$cf_cv_wchar_t" != unknown ; then
+	NCURSES_OK_WCHAR_T=1
+fi
+
+# This is needed on Tru64 5.0 to declare wint_t
+echo "$as_me:6809: checking if we must include wchar.h to declare wint_t" >&5
+echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
+if test "${cf_cv_wint_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  with_no_padding=$with_ext_funcs
-fi;
-echo "$as_me:5988: result: $with_no_padding" >&5
-echo "${ECHO_T}$with_no_padding" >&6
-test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
-#define NCURSES_NO_PADDING 1
-EOF
 
-###   use option --enable-sigwinch to turn on use of SIGWINCH logic
-echo "$as_me:5995: checking if you want SIGWINCH handler" >&5
-echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line 6816 "configure"
+#include "confdefs.h"
 
-# Check whether --enable-sigwinch or --disable-sigwinch was given.
-if test "${enable_sigwinch+set}" = set; then
-  enableval="$enable_sigwinch"
-  with_sigwinch=$enableval
+#include <stdlib.h>
+#include <stdarg.h>
+#include <stdio.h>
+#ifdef HAVE_LIBUTF8_H
+#include <libutf8.h>
+#endif
+int
+main ()
+{
+wint_t state
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6834: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:6837: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:6840: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6843: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cf_cv_wint_t=no
 else
-  with_sigwinch=$with_ext_funcs
-fi;
-echo "$as_me:6005: result: $with_sigwinch" >&5
-echo "${ECHO_T}$with_sigwinch" >&6
-test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
-#define USE_SIGWINCH 1
-EOF
-
-###   use option --enable-tcap-names to allow user to define new capabilities
-echo "$as_me:6012: checking if you want user-definable terminal capabilities like termcap" >&5
-echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cat >conftest.$ac_ext <<_ACEOF
+#line 6850 "configure"
+#include "confdefs.h"
 
-# Check whether --enable-tcap-names or --disable-tcap-names was given.
-if test "${enable_tcap_names+set}" = set; then
-  enableval="$enable_tcap_names"
-  with_tcap_names=$enableval
+#include <stdlib.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <wchar.h>
+#ifdef HAVE_LIBUTF8_H
+#include <libutf8.h>
+#endif
+int
+main ()
+{
+wint_t value
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6869: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:6872: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:6875: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6878: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cf_cv_wint_t=yes
 else
-  with_tcap_names=$with_ext_funcs
-fi;
-echo "$as_me:6022: result: $with_tcap_names" >&5
-echo "${ECHO_T}$with_tcap_names" >&6
-NCURSES_XNAMES=0
-test "$with_tcap_names" = yes && NCURSES_XNAMES=1
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_wint_t=unknown
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:6890: result: $cf_cv_wint_t" >&5
+echo "${ECHO_T}$cf_cv_wint_t" >&6
 
-###############################################################################
-# These options are relatively safe to experiment with.
+if test "$cf_cv_wint_t" = yes ; then
+	cat >>confdefs.h <<\EOF
+#define NEED_WCHAR_H 1
+EOF
 
-echo "$as_me:6030: checking if you want all development code" >&5
-echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
+	NEED_WCHAR_H=1
+fi
 
-# Check whether --with-develop or --without-develop was given.
-if test "${with_develop+set}" = set; then
-  withval="$with_develop"
-  with_develop=$withval
-else
-  with_develop=no
-fi;
-echo "$as_me:6040: result: $with_develop" >&5
-echo "${ECHO_T}$with_develop" >&6
+# if we do not find wint_t in either place, use substitution to provide a fallback.
+if test "$cf_cv_wint_t" = unknown ; then
+	NCURSES_WINT_T=1
+fi
 
-###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
-echo "$as_me:6044: checking if you want hard-tabs code" >&5
-echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
+# if we find wint_t in either place, use substitution to provide a fallback.
+if test "$cf_cv_wint_t" != unknown ; then
+	NCURSES_OK_WINT_T=1
+fi
 
-# Check whether --enable-hard-tabs or --disable-hard-tabs was given.
-if test "${enable_hard_tabs+set}" = set; then
-  enableval="$enable_hard_tabs"
-  with_hardtabs=$enableval
-else
-  with_hardtabs=$with_develop
-fi;
-echo "$as_me:6054: result: $with_hardtabs" >&5
-echo "${ECHO_T}$with_hardtabs" >&6
-test "$with_hardtabs" = yes && cat >>confdefs.h <<\EOF
-#define USE_HARD_TABS 1
+	if test "$NCURSES_MBSTATE_T" != 0; then
+		cat >>confdefs.h <<\EOF
+#define NEED_MBSTATE_T_DEF 1
 EOF
 
-echo "$as_me:6060: checking if you want to use restrict environment when running as root" >&5
-echo $ECHO_N "checking if you want to use restrict environment when running as root... $ECHO_C" >&6
+	fi
+fi
 
-# Check whether --enable-root-environ or --disable-root-environ was given.
-if test "${enable_root_environ+set}" = set; then
-  enableval="$enable_root_environ"
-  with_root_environ=$enableval
+###   use option --disable-lp64 to allow long chtype
+echo "$as_me:6920: checking if defining _LP64 overrides chtype definition" >&5
+echo $ECHO_N "checking if defining _LP64 overrides chtype definition... $ECHO_C" >&6
+
+# Check whether --enable-lp64 or --disable-lp64 was given.
+if test "${enable_lp64+set}" = set; then
+  enableval="$enable_lp64"
+  with_lp64=$enableval
 else
-  with_root_environ=yes
+  with_lp64=yes
 fi;
-echo "$as_me:6070: result: $with_root_environ" >&5
-echo "${ECHO_T}$with_root_environ" >&6
-test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
-#define USE_ROOT_ENVIRON 1
-EOF
+echo "$as_me:6930: result: $with_lp64" >&5
+echo "${ECHO_T}$with_lp64" >&6
+if test "$with_lp64" = yes ; then
+	cf_cv_enable_lp64=1
+else
+	cf_cv_enable_lp64=0
+fi
 
-###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
-echo "$as_me:6077: checking if you want limited support for xmc" >&5
-echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
+echo "$as_me:6938: checking if largefile support is wanted" >&5
+echo $ECHO_N "checking if largefile support is wanted... $ECHO_C" >&6
 
-# Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
-if test "${enable_xmc_glitch+set}" = set; then
-  enableval="$enable_xmc_glitch"
-  with_xmc_glitch=$enableval
+# Check whether --enable-largefile or --disable-largefile was given.
+if test "${enable_largefile+set}" = set; then
+  enableval="$enable_largefile"
+  with_largefile=$enableval
 else
-  with_xmc_glitch=$with_develop
+  with_largefile=yes
 fi;
-echo "$as_me:6087: result: $with_xmc_glitch" >&5
-echo "${ECHO_T}$with_xmc_glitch" >&6
-test "$with_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
-#define USE_XMC_SUPPORT 1
-EOF
+echo "$as_me:6948: result: $with_largefile" >&5
+echo "${ECHO_T}$with_largefile" >&6
+if test "$with_largefile" = yes ; then
+	echo "$as_me:6951: checking for _LARGEFILE_SOURCE value needed for large files" >&5
+echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
+if test "${ac_cv_sys_largefile_source+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  while :; do
+  ac_cv_sys_largefile_source=no
+  cat >conftest.$ac_ext <<_ACEOF
+#line 6959 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+int
+main ()
+{
+return !fseeko;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6971: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:6974: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:6977: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6980: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+#line 6989 "configure"
+#include "confdefs.h"
+#define _LARGEFILE_SOURCE 1
+#include <stdio.h>
+int
+main ()
+{
+return !fseeko;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:7002: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:7005: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:7008: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:7011: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_sys_largefile_source=1; break
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+  break
+done
+fi
+echo "$as_me:7022: result: $ac_cv_sys_largefile_source" >&5
+echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
+if test "$ac_cv_sys_largefile_source" != no; then
 
-###############################################################################
-# These are just experimental, probably should not be in a package:
+cat >>confdefs.h <<EOF
+#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
+EOF
 
-echo "$as_me:6096: checking if you do not want to assume colors are white-on-black" >&5
-echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
+fi
+rm -f conftest*
 
-# Check whether --enable-assumed-color or --disable-assumed-color was given.
-if test "${enable_assumed_color+set}" = set; then
-  enableval="$enable_assumed_color"
-  with_assumed_color=$enableval
+# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
+# in glibc 2.1.3, but that breaks too many other things.
+# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
+echo "$as_me:7036: checking for fseeko" >&5
+echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
+if test "${ac_cv_func_fseeko+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  with_assumed_color=yes
-fi;
-echo "$as_me:6106: result: $with_assumed_color" >&5
-echo "${ECHO_T}$with_assumed_color" >&6
-test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
-#define USE_ASSUMED_COLOR 1
+  cat >conftest.$ac_ext <<_ACEOF
+#line 7042 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+int
+main ()
+{
+return fseeko && fseeko (stdin, 0, 0);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:7054: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:7057: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:7060: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:7063: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_fseeko=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_fseeko=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:7073: result: $ac_cv_func_fseeko" >&5
+echo "${ECHO_T}$ac_cv_func_fseeko" >&6
+if test $ac_cv_func_fseeko = yes; then
+
+cat >>confdefs.h <<\EOF
+#define HAVE_FSEEKO 1
 EOF
 
-###   use option --enable-hashmap to turn on use of hashmap scrolling logic
-echo "$as_me:6113: checking if you want hashmap scrolling-optimization code" >&5
-echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
+fi
 
-# Check whether --enable-hashmap or --disable-hashmap was given.
-if test "${enable_hashmap+set}" = set; then
-  enableval="$enable_hashmap"
-  with_hashmap=$enableval
-else
-  with_hashmap=yes
-fi;
-echo "$as_me:6123: result: $with_hashmap" >&5
-echo "${ECHO_T}$with_hashmap" >&6
-test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
-#define USE_HASHMAP 1
-EOF
+# Check whether --enable-largefile or --disable-largefile was given.
+if test "${enable_largefile+set}" = set; then
+  enableval="$enable_largefile"
 
-###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
-echo "$as_me:6130: checking if you want colorfgbg code" >&5
-echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
+fi;
+if test "$enable_largefile" != no; then
 
-# Check whether --enable-colorfgbg or --disable-colorfgbg was given.
-if test "${enable_colorfgbg+set}" = set; then
-  enableval="$enable_colorfgbg"
-  with_colorfgbg=$enableval
+  echo "$as_me:7090: checking for special C compiler options needed for large files" >&5
+echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
+if test "${ac_cv_sys_largefile_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  with_colorfgbg=no
-fi;
-echo "$as_me:6140: result: $with_colorfgbg" >&5
-echo "${ECHO_T}$with_colorfgbg" >&6
-test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
-#define USE_COLORFGBG 1
-EOF
+  ac_cv_sys_largefile_CC=no
+     if test "$GCC" != yes; then
+       ac_save_CC=$CC
+       while :; do
+     	 # IRIX 6.2 and later do not support large files by default,
+     	 # so use the C compiler's -n32 option if that helps.
+         cat >conftest.$ac_ext <<_ACEOF
+#line 7102 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+		       && LARGE_OFF_T % 2147483647 == 1)
+		      ? 1 : -1];
+int
+main ()
+{
 
-echo "$as_me:6146: checking if you want experimental safe-sprintf code" >&5
-echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
+  ;
+  return 0;
+}
+_ACEOF
+     	 rm -f conftest.$ac_objext
+if { (eval echo "$as_me:7122: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:7125: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:7128: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:7131: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext
+     	 CC="$CC -n32"
+     	 rm -f conftest.$ac_objext
+if { (eval echo "$as_me:7141: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:7144: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:7147: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:7150: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_sys_largefile_CC=' -n32'; break
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext
+         break
+       done
+       CC=$ac_save_CC
+       rm -f conftest.$ac_ext
+    fi
+fi
+echo "$as_me:7164: result: $ac_cv_sys_largefile_CC" >&5
+echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
+  if test "$ac_cv_sys_largefile_CC" != no; then
+    CC=$CC$ac_cv_sys_largefile_CC
+  fi
 
-# Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
-if test "${enable_safe_sprintf+set}" = set; then
-  enableval="$enable_safe_sprintf"
-  with_safe_sprintf=$enableval
+  echo "$as_me:7170: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
+if test "${ac_cv_sys_file_offset_bits+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  with_safe_sprintf=no
-fi;
-echo "$as_me:6156: result: $with_safe_sprintf" >&5
-echo "${ECHO_T}$with_safe_sprintf" >&6
-test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
-#define USE_SAFE_SPRINTF 1
-EOF
+  while :; do
+  ac_cv_sys_file_offset_bits=no
+  cat >conftest.$ac_ext <<_ACEOF
+#line 7178 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+		       && LARGE_OFF_T % 2147483647 == 1)
+		      ? 1 : -1];
+int
+main ()
+{
 
-###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
-# when hashmap is used scroll hints are useless
-if test "$with_hashmap" = no ; then
-echo "$as_me:6165: checking if you want to experiment without scrolling-hints code" >&5
-echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:7198: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:7201: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:7204: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:7207: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+#line 7216 "configure"
+#include "confdefs.h"
+#define _FILE_OFFSET_BITS 64
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+		       && LARGE_OFF_T % 2147483647 == 1)
+		      ? 1 : -1];
+int
+main ()
+{
 
-# Check whether --enable-scroll-hints or --disable-scroll-hints was given.
-if test "${enable_scroll_hints+set}" = set; then
-  enableval="$enable_scroll_hints"
-  with_scroll_hints=$enableval
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:7237: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:7240: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:7243: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:7246: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_sys_file_offset_bits=64; break
 else
-  with_scroll_hints=yes
-fi;
-echo "$as_me:6175: result: $with_scroll_hints" >&5
-echo "${ECHO_T}$with_scroll_hints" >&6
-test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
-#define USE_SCROLL_HINTS 1
-EOF
-
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
 fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+  break
+done
+fi
+echo "$as_me:7257: result: $ac_cv_sys_file_offset_bits" >&5
+echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
+if test "$ac_cv_sys_file_offset_bits" != no; then
 
-###   use option --enable-widec to turn on use of wide-character support
-NCURSES_CH_T=chtype
-NCURSES_LIBUTF8=0
-
-NEED_WCHAR_H=0
-NCURSES_MBSTATE_T=0
-NCURSES_WCHAR_T=0
-NCURSES_WINT_T=0
-
-# Check to define _XOPEN_SOURCE "automatically"
-
-case $host_os in #(vi
-freebsd*) #(vi
-	CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600"
-	;;
-hpux*) #(vi
-	CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
-	;;
-irix6.*) #(vi
-	CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
-	;;
-linux*) #(vi
+cat >>confdefs.h <<EOF
+#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
+EOF
 
-echo "$as_me:6206: checking if we must define _GNU_SOURCE" >&5
-echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
-if test "${cf_cv_gnu_source+set}" = set; then
+fi
+rm -f conftest*
+  echo "$as_me:7267: checking for _LARGE_FILES value needed for large files" >&5
+echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
+if test "${ac_cv_sys_large_files+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-
-cat >conftest.$ac_ext <<_ACEOF
-#line 6213 "configure"
+  while :; do
+  ac_cv_sys_large_files=no
+  cat >conftest.$ac_ext <<_ACEOF
+#line 7275 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+		       && LARGE_OFF_T % 2147483647 == 1)
+		      ? 1 : -1];
 int
 main ()
 {
 
-#ifndef _XOPEN_SOURCE
-make an error
-#endif
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6228: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7295: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:6231: \$? = $ac_status" >&5
+  echo "$as_me:7298: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:6234: \"$ac_try\"") >&5
+  { (eval echo "$as_me:7301: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6237: \$? = $ac_status" >&5
+  echo "$as_me:7304: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  cf_cv_gnu_source=no
+  break
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-cf_save="$CPPFLAGS"
-	 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
-	 cat >conftest.$ac_ext <<_ACEOF
-#line 6246 "configure"
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+#line 7313 "configure"
 #include "confdefs.h"
+#define _LARGE_FILES 1
 #include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+		       && LARGE_OFF_T % 2147483647 == 1)
+		      ? 1 : -1];
 int
 main ()
 {
 
-#ifdef _XOPEN_SOURCE
-make an error
-#endif
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6261: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7334: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:6264: \$? = $ac_status" >&5
+  echo "$as_me:7337: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:6267: \"$ac_try\"") >&5
+  { (eval echo "$as_me:7340: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6270: \$? = $ac_status" >&5
+  echo "$as_me:7343: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  cf_cv_gnu_source=no
+  ac_cv_sys_large_files=1; break
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-cf_cv_gnu_source=yes
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
-	CPPFLAGS="$cf_save"
+  break
+done
+fi
+echo "$as_me:7354: result: $ac_cv_sys_large_files" >&5
+echo "${ECHO_T}$ac_cv_sys_large_files" >&6
+if test "$ac_cv_sys_large_files" != no; then
+
+cat >>confdefs.h <<EOF
+#define _LARGE_FILES $ac_cv_sys_large_files
+EOF
 
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest*
+fi
 
 fi
-echo "$as_me:6285: result: $cf_cv_gnu_source" >&5
-echo "${ECHO_T}$cf_cv_gnu_source" >&6
-test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
 
-	;;
-mirbsd*) #(vi
-	# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
-	;;
-netbsd*) #(vi
-	# setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
-	;;
-openbsd*) #(vi
-	# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
-	;;
-osf[45]*) #(vi
-	CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
-	;;
-sco*) #(vi
-	# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
-	;;
-solaris*) #(vi
-	CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
-	;;
+###   use option --with-bool to override bool's type
+echo "$as_me:7369: checking for type of bool" >&5
+echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
+
+# Check whether --with-bool or --without-bool was given.
+if test "${with_bool+set}" = set; then
+  withval="$with_bool"
+  NCURSES_BOOL="$withval"
+else
+  NCURSES_BOOL=auto
+fi;
+echo "$as_me:7379: result: $NCURSES_BOOL" >&5
+echo "${ECHO_T}$NCURSES_BOOL" >&6
+
+echo "$as_me:7382: checking for alternate terminal capabilities file" >&5
+echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
+
+# Check whether --with-caps or --without-caps was given.
+if test "${with_caps+set}" = set; then
+  withval="$with_caps"
+  TERMINFO_CAPS=Caps.$withval
+else
+  TERMINFO_CAPS=Caps
+fi;
+test -f ${srcdir}/include/${TERMINFO_CAPS} || TERMINFO_CAPS=Caps
+echo "$as_me:7393: result: $TERMINFO_CAPS" >&5
+echo "${ECHO_T}$TERMINFO_CAPS" >&6
+
+###   use option --with-ospeed to override ospeed's type
+echo "$as_me:7397: checking for type of ospeed" >&5
+echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
+
+# Check whether --with-ospeed or --without-ospeed was given.
+if test "${with_ospeed+set}" = set; then
+  withval="$with_ospeed"
+  NCURSES_OSPEED="$withval"
+else
+  NCURSES_OSPEED=short
+fi;
+echo "$as_me:7407: result: $NCURSES_OSPEED" >&5
+echo "${ECHO_T}$NCURSES_OSPEED" >&6
+
+###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
+echo "$as_me:7411: checking if tputs should process BSD-style prefix padding" >&5
+echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
+
+# Check whether --enable-bsdpad or --disable-bsdpad was given.
+if test "${enable_bsdpad+set}" = set; then
+  enableval="$enable_bsdpad"
+  with_bsdpad=$enableval
+else
+  with_bsdpad=no
+fi;
+echo "$as_me:7421: result: $with_bsdpad" >&5
+echo "${ECHO_T}$with_bsdpad" >&6
+test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
+#define BSD_TPUTS 1
+EOF
+
+### Enable compiling-in rcs id's
+echo "$as_me:7428: checking if RCS identifiers should be compiled-in" >&5
+echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
+
+# Check whether --with-rcs-ids or --without-rcs-ids was given.
+if test "${with_rcs_ids+set}" = set; then
+  withval="$with_rcs_ids"
+  with_rcs_ids=$withval
+else
+  with_rcs_ids=no
+fi;
+echo "$as_me:7438: result: $with_rcs_ids" >&5
+echo "${ECHO_T}$with_rcs_ids" >&6
+test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
+#define USE_RCS_IDS 1
+EOF
+
+###############################################################################
+
+echo "$as_me:7446: checking format of man-pages" >&5
+echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
+
+# Check whether --with-manpage-format or --without-manpage-format was given.
+if test "${with_manpage_format+set}" = set; then
+  withval="$with_manpage_format"
+  MANPAGE_FORMAT=$withval
+else
+  MANPAGE_FORMAT=unknown
+fi;
+
+test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
+MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
+
+cf_unknown=
+
+case $MANPAGE_FORMAT in
+unknown)
+  if test -z "$MANPATH" ; then
+    MANPATH="/usr/man:/usr/share/man"
+  fi
+
+  # look for the 'date' man-page (it's most likely to be installed!)
+  MANPAGE_FORMAT=
+  cf_preform=no
+  cf_catonly=yes
+  cf_example=date
+
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
+  for cf_dir in $MANPATH; do
+    test -z "$cf_dir" && cf_dir=/usr/man
+    for cf_name in $cf_dir/man*/$cf_example.[01]* $cf_dir/cat*/$cf_example.[01]* $cf_dir/man*/$cf_example $cf_dir/cat*/$cf_example
+    do
+      cf_test=`echo $cf_name | sed -e 's/*//'`
+      if test "x$cf_test" = "x$cf_name" ; then
+
+	case "$cf_name" in
+	*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
+	*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
+	*.0)	MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
+	*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
+	esac
+
+	case "$cf_name" in
+	$cf_dir/man*)
+	  cf_catonly=no
+	  ;;
+	$cf_dir/cat*)
+	  cf_preform=yes
+	  ;;
+	esac
+	break
+      fi
+
+      # if we found a match in either man* or cat*, stop looking
+      if test -n "$MANPAGE_FORMAT" ; then
+	cf_found=no
+	test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
+	test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
+	case "$cf_name" in
+	$cf_dir/cat*)
+	  cf_found=yes
+	  ;;
+	esac
+	test $cf_found=yes && break
+      fi
+    done
+    # only check the first directory in $MANPATH where we find manpages
+    if test -n "$MANPAGE_FORMAT" ; then
+       break
+    fi
+  done
+  # if we did not find the example, just assume it is normal
+  test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
+  IFS="$ac_save_ifs"
+  ;;
 *)
-	echo "$as_me:6309: checking if we should define _XOPEN_SOURCE" >&5
-echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
-if test "${cf_cv_xopen_source+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  for cf_option in $MANPAGE_FORMAT; do
+     case $cf_option in #(vi
+     gzip|compress|BSDI|normal|formatted|catonly)
+       ;;
+     *)
+       cf_unknown="$cf_unknown $cf_option"
+       ;;
+     esac
+  done
+  ;;
+esac
+
+echo "$as_me:7535: result: $MANPAGE_FORMAT" >&5
+echo "${ECHO_T}$MANPAGE_FORMAT" >&6
+if test -n "$cf_unknown" ; then
+  { echo "$as_me:7538: WARNING: Unexpected manpage-format $cf_unknown" >&5
+echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
+fi
+
+echo "$as_me:7542: checking for manpage renaming" >&5
+echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
+
+# Check whether --with-manpage-renames or --without-manpage-renames was given.
+if test "${with_manpage_renames+set}" = set; then
+  withval="$with_manpage_renames"
+  MANPAGE_RENAMES=$withval
 else
+  MANPAGE_RENAMES=yes
+fi;
 
-	cat >conftest.$ac_ext <<_ACEOF
-#line 6316 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-int
-main ()
-{
+case ".$MANPAGE_RENAMES" in #(vi
+.no) #(vi
+  ;;
+.|.yes)
+  # Debian 'man' program?
+  if test -f /etc/debian_version ; then
+    MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
+  else
+    MANPAGE_RENAMES=no
+  fi
+  ;;
+esac
 
-#ifndef _XOPEN_SOURCE
-make an error
-#endif
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6331: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:6334: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:6337: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:6340: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  cf_cv_xopen_source=no
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cf_save="$CPPFLAGS"
-	 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500"
-	 cat >conftest.$ac_ext <<_ACEOF
-#line 6349 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-int
-main ()
-{
+if test "$MANPAGE_RENAMES" != no ; then
+  if test -f $srcdir/man/$MANPAGE_RENAMES ; then
+    MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
+  elif test ! -f $MANPAGE_RENAMES ; then
+    { { echo "$as_me:7570: error: not a filename: $MANPAGE_RENAMES" >&5
+echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
 
-#ifdef _XOPEN_SOURCE
-make an error
-#endif
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6364: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:6367: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:6370: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:6373: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  cf_cv_xopen_source=no
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cf_cv_xopen_source=yes
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-	CPPFLAGS="$cf_save"
+  test ! -d man && mkdir man
 
+  # Construct a sed-script to perform renaming within man-pages
+  if test -n "$MANPAGE_RENAMES" ; then
+    test ! -d man && mkdir man
+    sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >man/edit_man.sed
+  fi
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
 
-fi
-echo "$as_me:6388: result: $cf_cv_xopen_source" >&5
-echo "${ECHO_T}$cf_cv_xopen_source" >&6
-test "$cf_cv_xopen_source" = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500"
+echo "$as_me:7584: result: $MANPAGE_RENAMES" >&5
+echo "${ECHO_T}$MANPAGE_RENAMES" >&6
 
-	# FreeBSD 5.x headers demand this...
-	echo "$as_me:6393: checking if we should define _POSIX_C_SOURCE" >&5
-echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
-if test "${cf_cv_xopen_source+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo "$as_me:7587: checking if manpage aliases will be installed" >&5
+echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
+
+# Check whether --with-manpage-aliases or --without-manpage-aliases was given.
+if test "${with_manpage_aliases+set}" = set; then
+  withval="$with_manpage_aliases"
+  MANPAGE_ALIASES=$withval
 else
+  MANPAGE_ALIASES=yes
+fi;
 
-	cat >conftest.$ac_ext <<_ACEOF
-#line 6400 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-int
-main ()
-{
+echo "$as_me:7598: result: $MANPAGE_ALIASES" >&5
+echo "${ECHO_T}$MANPAGE_ALIASES" >&6
 
-#ifndef _POSIX_C_SOURCE
-make an error
-#endif
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6415: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:6418: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:6421: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:6424: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  cf_cv_xopen_source=no
+if test "$LN_S" = "ln -s"; then
+	cf_use_symlinks=yes
 else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cf_save="$CPPFLAGS"
-	 CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE"
-	 cat >conftest.$ac_ext <<_ACEOF
-#line 6433 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-int
-main ()
-{
+	cf_use_symlinks=no
+fi
 
-#ifdef _POSIX_C_SOURCE
-make an error
-#endif
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6448: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:6451: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:6454: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:6457: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  cf_cv_xopen_source=no
+MANPAGE_SYMLINKS=no
+if test "$MANPAGE_ALIASES" = yes ; then
+echo "$as_me:7609: checking if manpage symlinks should be used" >&5
+echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
+
+# Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
+if test "${with_manpage_symlinks+set}" = set; then
+  withval="$with_manpage_symlinks"
+  MANPAGE_SYMLINKS=$withval
 else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cf_cv_xopen_source=yes
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-	CPPFLAGS="$cf_save"
+  MANPAGE_SYMLINKS=$cf_use_symlinks
+fi;
 
+if test "$$cf_use_symlinks" = no; then
+if test "$MANPAGE_SYMLINKS" = yes ; then
+	{ echo "$as_me:7622: WARNING: cannot make symlinks" >&5
+echo "$as_me: WARNING: cannot make symlinks" >&2;}
+	MANPAGE_SYMLINKS=no
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-
 fi
-echo "$as_me:6472: result: $cf_cv_xopen_source" >&5
-echo "${ECHO_T}$cf_cv_xopen_source" >&6
-test "$cf_cv_xopen_source" = yes && CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE"
-	;;
-esac
 
-# use these variables to work around a defect in gcc's fixincludes.
-NCURSES_OK_WCHAR_T=
-NCURSES_OK_WINT_T=
+echo "$as_me:7628: result: $MANPAGE_SYMLINKS" >&5
+echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
+fi
 
-echo "$as_me:6482: checking if you want experimental wide-character code" >&5
-echo $ECHO_N "checking if you want experimental wide-character code... $ECHO_C" >&6
+echo "$as_me:7632: checking for manpage tbl" >&5
+echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
 
-# Check whether --enable-widec or --disable-widec was given.
-if test "${enable_widec+set}" = set; then
-  enableval="$enable_widec"
-  with_widec=$enableval
+# Check whether --with-manpage-tbl or --without-manpage-tbl was given.
+if test "${with_manpage_tbl+set}" = set; then
+  withval="$with_manpage_tbl"
+  MANPAGE_TBL=$withval
 else
-  with_widec=no
+  MANPAGE_TBL=no
 fi;
-echo "$as_me:6492: result: $with_widec" >&5
-echo "${ECHO_T}$with_widec" >&6
-if test "$with_widec" = yes ; then
-	LIB_SUFFIX="w${LIB_SUFFIX}"
-	cat >>confdefs.h <<\EOF
-#define USE_WIDEC_SUPPORT 1
-EOF
 
-echo "$as_me:6500: checking if we must define _XOPEN_SOURCE" >&5
-echo $ECHO_N "checking if we must define _XOPEN_SOURCE... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line 6503 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
+echo "$as_me:7643: result: $MANPAGE_TBL" >&5
+echo "${ECHO_T}$MANPAGE_TBL" >&6
 
-int
-main ()
-{
+  if test "$prefix" = "NONE" ; then
+     cf_prefix="$ac_default_prefix"
+  else
+     cf_prefix="$prefix"
+  fi
 
-#ifndef _XOPEN_SOURCE
-make an error
-#endif
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6519: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:6522: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:6525: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:6528: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  cf_result=no
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cf_result=yes
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:6537: result: $cf_result" >&5
-echo "${ECHO_T}$cf_result" >&6
+  case "$MANPAGE_FORMAT" in # (vi
+  *catonly*) # (vi
+    cf_format=yes
+    cf_inboth=no
+    ;;
+  *formatted*) # (vi
+    cf_format=yes
+    cf_inboth=yes
+    ;;
+  *)
+    cf_format=no
+    cf_inboth=no
+    ;;
+  esac
+
+test ! -d man && mkdir man
+
+cf_so_strip=
+cf_compress=
+case "$MANPAGE_FORMAT" in #(vi
+*compress*) #(vi
+	cf_so_strip="Z"
+	cf_compress=compress
+  ;;
+*gzip*) #(vi
+	cf_so_strip="gz"
+	cf_compress=gzip
+  ;;
+esac
 
-if test "$cf_result" = yes ; then
-	CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500"
-elif test "x500" != "x" ; then
-	echo "$as_me:6543: checking checking for compatible value versus 500" >&5
-echo $ECHO_N "checking checking for compatible value versus 500... $ECHO_C" >&6
-	cat >conftest.$ac_ext <<_ACEOF
-#line 6546 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
+cf_edit_man=man/edit_man.sh
 
-int
-main ()
-{
+cat >$cf_edit_man <<CF_EOF
+#! /bin/sh
+# this script is generated by the configure-script CF_MAN_PAGES macro.
+prefix="$cf_prefix"
+datadir="$datadir"
+NCURSES_OSPEED="$NCURSES_OSPEED"
+TERMINFO="$TERMINFO"
+MKDIRS="sh `cd $srcdir && pwd`/mkinstalldirs"
+INSTALL="$INSTALL"
+INSTALL_DATA="$INSTALL_DATA"
+transform="$program_transform_name"
 
-#if _XOPEN_SOURCE-500 < 0
-make an error
-#endif
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6562: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:6565: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:6568: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:6571: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  cf_result=yes
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cf_result=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-	echo "$as_me:6580: result: $cf_result" >&5
-echo "${ECHO_T}$cf_result" >&6
-	if test "$cf_result" = no ; then
-		# perhaps we can override it - try...
-		CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500"
-	fi
-fi
+TMP=\${TMPDIR-/tmp}/man\$\$
+trap "rm -f \$TMP" 0 1 2 5 15
 
-echo "$as_me:6588: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
-echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line 6591 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
+form=\$1
+shift || exit 1
 
-int
-main ()
-{
+verb=\$1
+shift || exit 1
 
-#ifndef _XOPEN_SOURCE_EXTENDED
-make an error
-#endif
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6607: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:6610: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:6613: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:6616: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  cf_result=no
+mandir=\$1
+shift || exit 1
+
+srcdir=\$1
+shift || exit 1
+
+if test "\$form" = normal ; then
+	if test "$cf_format" = yes ; then
+	if test "$cf_inboth" = no ; then
+		sh \$0 format \$verb \$mandir \$srcdir \$*
+		exit $?
+	fi
+	fi
+	cf_subdir=\$mandir/man
+	cf_tables=$MANPAGE_TBL
 else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cf_result=yes
+	cf_subdir=\$mandir/cat
+	cf_tables=yes
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:6625: result: $cf_result" >&5
-echo "${ECHO_T}$cf_result" >&6
 
-if test "$cf_result" = yes ; then
-	CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
-elif test "x" != "x" ; then
-	echo "$as_me:6631: checking checking for compatible value versus " >&5
-echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
-	cat >conftest.$ac_ext <<_ACEOF
-#line 6634 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
+# process the list of source-files
+for i in \$* ; do
+case \$i in #(vi
+*.orig|*.rej) ;; #(vi
+*.[0-9]*)
+	section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
+	if test \$verb = installing ; then
+	if test ! -d \$cf_subdir\${section} ; then
+		\$MKDIRS \$cf_subdir\$section
+	fi
+	fi
+	aliases=
+	source=\`basename \$i\`
+	inalias=\$source
+	test ! -f \$inalias && inalias="\$srcdir/\$inalias"
+	if test ! -f \$inalias ; then
+		echo .. skipped \$source
+		continue
+	fi
+CF_EOF
 
-int
-main ()
-{
+if test "$MANPAGE_ALIASES" != no ; then
+cat >>$cf_edit_man <<CF_EOF
+	aliases=\`sed -f \$srcdir/manlinks.sed \$inalias | sort -u\`
+CF_EOF
+fi
 
-#if _XOPEN_SOURCE_EXTENDED- < 0
-make an error
-#endif
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6650: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:6653: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:6656: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:6659: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  cf_result=yes
+if test "$MANPAGE_RENAMES" = no ; then
+cat >>$cf_edit_man <<CF_EOF
+	# perform program transformations for section 1 man pages
+	if test \$section = 1 ; then
+		target=\$cf_subdir\${section}/\`echo \$source|sed "\${transform}"\`
+	else
+		target=\$cf_subdir\${section}/\$source
+	fi
+CF_EOF
 else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cf_result=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-	echo "$as_me:6668: result: $cf_result" >&5
-echo "${ECHO_T}$cf_result" >&6
-	if test "$cf_result" = no ; then
-		# perhaps we can override it - try...
-		CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
+cat >>$cf_edit_man <<CF_EOF
+	target=\`grep "^\$source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
+	if test -z "\$target" ; then
+		echo '? missing rename for '\$source
+		target="\$source"
 	fi
+	target="\$cf_subdir\${section}/\${target}"
+CF_EOF
 fi
 
-	# with_overwrite=no
-	NCURSES_CH_T=cchar_t
+	# replace variables in man page
 
-for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:6682: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line 6688 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char $ac_func ();
-char (*f) ();
+	for cf_name in  captoinfo clear infocmp infotocap tic toe tput
+	do
+cat >>$cf_edit_man <<CF_EOF
+	prog_$cf_name=\`echo $cf_name|sed "\${transform}"\`
+CF_EOF
+	done
 
-int
-main ()
-{
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-f = $ac_func;
-#endif
+cat >>$cf_edit_man <<CF_EOF
+	sed	-e "s,@DATADIR@,\$datadir," \\
+		-e "s,@TERMINFO@,\$TERMINFO," \\
+		-e "s,@NCURSES_OSPEED@,\$NCURSES_OSPEED," \\
+CF_EOF
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6719: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:6722: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:6725: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:6728: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "$as_ac_var=yes"
+	for cf_name in  captoinfo clear infocmp infotocap tic toe tput
+	do
+		cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
+cat >>$cf_edit_man <<CF_EOF
+		-e "s,@$cf_NAME@,\$prog_$cf_name," \\
+CF_EOF
+	done
+
+if test -f $MANPAGE_RENAMES ; then
+cat >>$cf_edit_man <<CF_EOF
+		< \$i | sed -f $srcdir/edit_man.sed >\$TMP
+CF_EOF
 else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-eval "$as_ac_var=no"
+cat >>$cf_edit_man <<CF_EOF
+		< \$i >\$TMP
+CF_EOF
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+cat >>$cf_edit_man <<CF_EOF
+if test \$cf_tables = yes ; then
+	tbl \$TMP >\$TMP.out
+	mv \$TMP.out \$TMP
 fi
-echo "$as_me:6738: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<EOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-EOF
+CF_EOF
 
+if test $with_curses_h != yes ; then
+cat >>$cf_edit_man <<CF_EOF
+	sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
+	mv \$TMP.out \$TMP
+CF_EOF
 fi
-done
 
-	if test "$ac_cv_func_putwc" != yes ; then
+cat >>$cf_edit_man <<CF_EOF
+	if test \$form = format ; then
+		nroff -man \$TMP >\$TMP.out
+		mv \$TMP.out \$TMP
+	fi
+CF_EOF
 
-echo "$as_me:6750: checking for putwc in libutf8" >&5
-echo $ECHO_N "checking for putwc in libutf8... $ECHO_C" >&6
-if test "${cf_cv_libutf8+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+if test -n "$cf_compress" ; then
+cat >>$cf_edit_man <<CF_EOF
+	if test \$verb = installing ; then
+	if ( $cf_compress -f \$TMP )
+	then
+		mv \$TMP.$cf_so_strip \$TMP
+	fi
+	fi
+	target="\$target.$cf_so_strip"
+CF_EOF
+fi
 
-	cf_save_LIBS="$LIBS"
-	LIBS="-lutf8 $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line 6759 "configure"
-#include "confdefs.h"
+case "$MANPAGE_FORMAT" in #(vi
+*BSDI*)
+cat >>$cf_edit_man <<CF_EOF
+	if test \$form = format ; then
+		# BSDI installs only .0 suffixes in the cat directories
+		target="\`echo \$target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
+	fi
+CF_EOF
+  ;;
+esac
 
-#include <libutf8.h>
-int
-main ()
-{
-putwc(0,0);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6772: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:6775: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:6778: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:6781: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  cf_cv_libutf8=yes
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cf_cv_libutf8=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-	LIBS="$cf_save_LIBS"
+cat >>$cf_edit_man <<CF_EOF
+	suffix=\`basename \$target | sed -e 's%^[^.]*%%'\`
+	if test \$verb = installing ; then
+		echo \$verb \$target
+		\$INSTALL_DATA \$TMP \$target
+		test -n "\$aliases" && (
+			cd \$cf_subdir\${section} && (
+				source=\`echo \$target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
+				test -n "$cf_so_strip" && source=\`echo \$source |sed -e 's%\.$cf_so_strip\$%%'\`
+				target=\`basename \$target\`
+				for cf_alias in \$aliases
+				do
+					if test \$section = 1 ; then
+						cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
+					fi
 
+					if test "$MANPAGE_SYMLINKS" = yes ; then
+						if test -f \$cf_alias\${suffix} ; then
+							if ( cmp -s \$target \$cf_alias\${suffix} )
+							then
+								continue
+							fi
+						fi
+						echo .. \$verb alias \$cf_alias\${suffix}
+						rm -f \$cf_alias\${suffix}
+						$LN_S \$target \$cf_alias\${suffix}
+					elif test "\$target" != "\$cf_alias\${suffix}" ; then
+						echo ".so \$source" >\$TMP
+CF_EOF
+if test -n "$cf_compress" ; then
+cat >>$cf_edit_man <<CF_EOF
+						if test -n "$cf_so_strip" ; then
+							$cf_compress -f \$TMP
+							mv \$TMP.$cf_so_strip \$TMP
+						fi
+CF_EOF
 fi
-echo "$as_me:6793: result: $cf_cv_libutf8" >&5
-echo "${ECHO_T}$cf_cv_libutf8" >&6
+cat >>$cf_edit_man <<CF_EOF
+						echo .. \$verb alias \$cf_alias\${suffix}
+						rm -f \$cf_alias\${suffix}
+						\$INSTALL_DATA \$TMP \$cf_alias\${suffix}
+					fi
+				done
+			)
+		)
+	elif test \$verb = removing ; then
+		echo \$verb \$target
+		rm -f \$target
+		test -n "\$aliases" && (
+			cd \$cf_subdir\${section} && (
+				for cf_alias in \$aliases
+				do
+					if test \$section = 1 ; then
+						cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
+					fi
 
-if test "$cf_cv_libutf8" = yes ; then
-	cat >>confdefs.h <<\EOF
-#define HAVE_LIBUTF8_H 1
-EOF
+					echo .. \$verb alias \$cf_alias\${suffix}
+					rm -f \$cf_alias\${suffix}
+				done
+			)
+		)
+	else
+#		echo ".hy 0"
+		cat \$TMP
+	fi
+	;;
+esac
+done
 
-	LIBS="-lutf8 $LIBS"
+if test $cf_inboth = yes ; then
+if test \$form != format ; then
+	sh \$0 format \$verb \$mandir \$srcdir \$*
+fi
 fi
 
-		if test "$cf_cv_libutf8" = yes ; then
-			NCURSES_LIBUTF8=1
-		fi
-	fi
+exit 0
+CF_EOF
+chmod 755 $cf_edit_man
 
-# This is needed on Tru64 5.0 to declare mbstate_t
-echo "$as_me:6810: checking if we must include wchar.h to declare mbstate_t" >&5
-echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
-if test "${cf_cv_mbstate_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+###############################################################################
 
-cat >conftest.$ac_ext <<_ACEOF
-#line 6817 "configure"
-#include "confdefs.h"
+### Note that some functions (such as const) are normally disabled anyway.
+echo "$as_me:7931: checking if you want to build with function extensions" >&5
+echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
 
-#include <stdlib.h>
-#include <stdarg.h>
-#include <stdio.h>
-#ifdef HAVE_LIBUTF8_H
-#include <libutf8.h>
-#endif
-int
-main ()
-{
-mbstate_t state
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6835: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:6838: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:6841: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:6844: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  cf_cv_mbstate_t=no
+# Check whether --enable-ext-funcs or --disable-ext-funcs was given.
+if test "${enable_ext_funcs+set}" = set; then
+  enableval="$enable_ext_funcs"
+  with_ext_funcs=$enableval
 else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cat >conftest.$ac_ext <<_ACEOF
-#line 6851 "configure"
-#include "confdefs.h"
+  with_ext_funcs=yes
+fi;
+echo "$as_me:7941: result: $with_ext_funcs" >&5
+echo "${ECHO_T}$with_ext_funcs" >&6
+if test "$with_ext_funcs" = yes ; then
+	NCURSES_EXT_FUNCS=1
+	cat >>confdefs.h <<\EOF
+#define HAVE_CURSES_VERSION 1
+EOF
 
-#include <stdlib.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <wchar.h>
-#ifdef HAVE_LIBUTF8_H
-#include <libutf8.h>
-#endif
-int
-main ()
-{
-mbstate_t value
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6870: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:6873: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:6876: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:6879: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  cf_cv_mbstate_t=yes
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cf_cv_mbstate_t=unknown
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:6891: result: $cf_cv_mbstate_t" >&5
-echo "${ECHO_T}$cf_cv_mbstate_t" >&6
+	cat >>confdefs.h <<\EOF
+#define HAVE_HAS_KEY 1
+EOF
+
+	cat >>confdefs.h <<\EOF
+#define HAVE_RESIZETERM 1
+EOF
+
+	cat >>confdefs.h <<\EOF
+#define HAVE_RESIZE_TERM 1
+EOF
 
-if test "$cf_cv_mbstate_t" = yes ; then
 	cat >>confdefs.h <<\EOF
-#define NEED_WCHAR_H 1
+#define HAVE_USE_DEFAULT_COLORS 1
 EOF
 
-	NEED_WCHAR_H=1
+	cat >>confdefs.h <<\EOF
+#define HAVE_WRESIZE 1
+EOF
+
+	cat >>confdefs.h <<\EOF
+#define NCURSES_EXT_FUNCS 1
+EOF
+
+else
+	NCURSES_EXT_FUNCS=0
 fi
 
-# if we do not find mbstate_t in either place, use substitution to provide a fallback.
-if test "$cf_cv_mbstate_t" = unknown ; then
-	NCURSES_MBSTATE_T=1
+###   use option --enable-const to turn on use of const beyond that in XSI.
+echo "$as_me:7978: checking for extended use of const keyword" >&5
+echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
+
+# Check whether --enable-const or --disable-const was given.
+if test "${enable_const+set}" = set; then
+  enableval="$enable_const"
+  with_ext_const=$enableval
+else
+  with_ext_const=no
+fi;
+echo "$as_me:7988: result: $with_ext_const" >&5
+echo "${ECHO_T}$with_ext_const" >&6
+NCURSES_CONST='/*nothing*/'
+if test "$with_ext_const" = yes ; then
+	NCURSES_CONST=const
 fi
 
-# This is needed on Tru64 5.0 to declare wchar_t
-echo "$as_me:6908: checking if we must include wchar.h to declare wchar_t" >&5
-echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
-if test "${cf_cv_wchar_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo "$as_me:7995: checking if you want \$NCURSES_NO_PADDING code" >&5
+echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
+
+# Check whether --enable-no-padding or --disable-no-padding was given.
+if test "${enable_no_padding+set}" = set; then
+  enableval="$enable_no_padding"
+  with_no_padding=$enableval
 else
+  with_no_padding=$with_ext_funcs
+fi;
+echo "$as_me:8005: result: $with_no_padding" >&5
+echo "${ECHO_T}$with_no_padding" >&6
+test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
+#define NCURSES_NO_PADDING 1
+EOF
 
-cat >conftest.$ac_ext <<_ACEOF
-#line 6915 "configure"
-#include "confdefs.h"
+###   use option --enable-sigwinch to turn on use of SIGWINCH logic
+echo "$as_me:8012: checking if you want SIGWINCH handler" >&5
+echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
 
-#include <stdlib.h>
-#include <stdarg.h>
-#include <stdio.h>
-#ifdef HAVE_LIBUTF8_H
-#include <libutf8.h>
-#endif
-int
-main ()
-{
-wchar_t state
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6933: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:6936: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:6939: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:6942: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  cf_cv_wchar_t=no
+# Check whether --enable-sigwinch or --disable-sigwinch was given.
+if test "${enable_sigwinch+set}" = set; then
+  enableval="$enable_sigwinch"
+  with_sigwinch=$enableval
 else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cat >conftest.$ac_ext <<_ACEOF
-#line 6949 "configure"
-#include "confdefs.h"
+  with_sigwinch=$with_ext_funcs
+fi;
+echo "$as_me:8022: result: $with_sigwinch" >&5
+echo "${ECHO_T}$with_sigwinch" >&6
+test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
+#define USE_SIGWINCH 1
+EOF
 
-#include <stdlib.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <wchar.h>
-#ifdef HAVE_LIBUTF8_H
-#include <libutf8.h>
-#endif
-int
-main ()
-{
-wchar_t value
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6968: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:6971: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:6974: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:6977: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  cf_cv_wchar_t=yes
+###   use option --enable-tcap-names to allow user to define new capabilities
+echo "$as_me:8029: checking if you want user-definable terminal capabilities like termcap" >&5
+echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
+
+# Check whether --enable-tcap-names or --disable-tcap-names was given.
+if test "${enable_tcap_names+set}" = set; then
+  enableval="$enable_tcap_names"
+  with_tcap_names=$enableval
 else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cf_cv_wchar_t=unknown
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:6989: result: $cf_cv_wchar_t" >&5
-echo "${ECHO_T}$cf_cv_wchar_t" >&6
+  with_tcap_names=$with_ext_funcs
+fi;
+echo "$as_me:8039: result: $with_tcap_names" >&5
+echo "${ECHO_T}$with_tcap_names" >&6
+NCURSES_XNAMES=0
+test "$with_tcap_names" = yes && NCURSES_XNAMES=1
 
-if test "$cf_cv_wchar_t" = yes ; then
-	cat >>confdefs.h <<\EOF
-#define NEED_WCHAR_H 1
-EOF
+###############################################################################
+# These options are relatively safe to experiment with.
 
-	NEED_WCHAR_H=1
-fi
+echo "$as_me:8047: checking if you want all development code" >&5
+echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
 
-# if we do not find wchar_t in either place, use substitution to provide a fallback.
-if test "$cf_cv_wchar_t" = unknown ; then
-	NCURSES_WCHAR_T=1
-fi
+# Check whether --with-develop or --without-develop was given.
+if test "${with_develop+set}" = set; then
+  withval="$with_develop"
+  with_develop=$withval
+else
+  with_develop=no
+fi;
+echo "$as_me:8057: result: $with_develop" >&5
+echo "${ECHO_T}$with_develop" >&6
 
-# if we find wchar_t in either place, use substitution to provide a fallback.
-if test "$cf_cv_wchar_t" != unknown ; then
-	NCURSES_OK_WCHAR_T=1
-fi
+###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
+echo "$as_me:8061: checking if you want hard-tabs code" >&5
+echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
 
-# This is needed on Tru64 5.0 to declare wint_t
-echo "$as_me:7011: checking if we must include wchar.h to declare wint_t" >&5
-echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
-if test "${cf_cv_wint_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+# Check whether --enable-hard-tabs or --disable-hard-tabs was given.
+if test "${enable_hard_tabs+set}" = set; then
+  enableval="$enable_hard_tabs"
+  with_hardtabs=$enableval
 else
+  with_hardtabs=$with_develop
+fi;
+echo "$as_me:8071: result: $with_hardtabs" >&5
+echo "${ECHO_T}$with_hardtabs" >&6
+test "$with_hardtabs" = yes && cat >>confdefs.h <<\EOF
+#define USE_HARD_TABS 1
+EOF
 
-cat >conftest.$ac_ext <<_ACEOF
-#line 7018 "configure"
-#include "confdefs.h"
+###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
+echo "$as_me:8078: checking if you want limited support for xmc" >&5
+echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
 
-#include <stdlib.h>
-#include <stdarg.h>
-#include <stdio.h>
-#ifdef HAVE_LIBUTF8_H
-#include <libutf8.h>
-#endif
-int
-main ()
-{
-wint_t state
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:7036: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:7039: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:7042: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:7045: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  cf_cv_wint_t=no
+# Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
+if test "${enable_xmc_glitch+set}" = set; then
+  enableval="$enable_xmc_glitch"
+  with_xmc_glitch=$enableval
 else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cat >conftest.$ac_ext <<_ACEOF
-#line 7052 "configure"
-#include "confdefs.h"
+  with_xmc_glitch=$with_develop
+fi;
+echo "$as_me:8088: result: $with_xmc_glitch" >&5
+echo "${ECHO_T}$with_xmc_glitch" >&6
+test "$with_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
+#define USE_XMC_SUPPORT 1
+EOF
 
-#include <stdlib.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <wchar.h>
-#ifdef HAVE_LIBUTF8_H
-#include <libutf8.h>
-#endif
-int
-main ()
-{
-wint_t value
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:7071: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:7074: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:7077: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:7080: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  cf_cv_wint_t=yes
+###############################################################################
+# These are just experimental, probably should not be in a package:
+
+echo "$as_me:8097: checking if you do not want to assume colors are white-on-black" >&5
+echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
+
+# Check whether --enable-assumed-color or --disable-assumed-color was given.
+if test "${enable_assumed_color+set}" = set; then
+  enableval="$enable_assumed_color"
+  with_assumed_color=$enableval
+else
+  with_assumed_color=yes
+fi;
+echo "$as_me:8107: result: $with_assumed_color" >&5
+echo "${ECHO_T}$with_assumed_color" >&6
+test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
+#define USE_ASSUMED_COLOR 1
+EOF
+
+###   use option --enable-hashmap to turn on use of hashmap scrolling logic
+echo "$as_me:8114: checking if you want hashmap scrolling-optimization code" >&5
+echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
+
+# Check whether --enable-hashmap or --disable-hashmap was given.
+if test "${enable_hashmap+set}" = set; then
+  enableval="$enable_hashmap"
+  with_hashmap=$enableval
 else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cf_cv_wint_t=unknown
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:7092: result: $cf_cv_wint_t" >&5
-echo "${ECHO_T}$cf_cv_wint_t" >&6
+  with_hashmap=yes
+fi;
+echo "$as_me:8124: result: $with_hashmap" >&5
+echo "${ECHO_T}$with_hashmap" >&6
+test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
+#define USE_HASHMAP 1
+EOF
 
-if test "$cf_cv_wint_t" = yes ; then
+###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
+echo "$as_me:8131: checking if you want colorfgbg code" >&5
+echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
+
+# Check whether --enable-colorfgbg or --disable-colorfgbg was given.
+if test "${enable_colorfgbg+set}" = set; then
+  enableval="$enable_colorfgbg"
+  with_colorfgbg=$enableval
+else
+  with_colorfgbg=no
+fi;
+echo "$as_me:8141: result: $with_colorfgbg" >&5
+echo "${ECHO_T}$with_colorfgbg" >&6
+test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
+#define USE_COLORFGBG 1
+EOF
+
+###   use option --enable-ext-colors to turn on use of colors beyond 16.
+echo "$as_me:8148: checking if you want to use experimental extended colors" >&5
+echo $ECHO_N "checking if you want to use experimental extended colors... $ECHO_C" >&6
+
+# Check whether --enable-ext-colors or --disable-ext-colors was given.
+if test "${enable_ext_colors+set}" = set; then
+  enableval="$enable_ext_colors"
+  with_ext_colors=$enableval
+else
+  with_ext_colors=no
+fi;
+echo "$as_me:8158: result: $with_ext_colors" >&5
+echo "${ECHO_T}$with_ext_colors" >&6
+NCURSES_EXT_COLORS=0
+if test "$with_ext_colors" = yes ; then
+	if test "$with_widec" != yes ; then
+		{ echo "$as_me:8163: WARNING: This option applies only to wide-character library" >&5
+echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
+	else
+		# cannot be ABI 5 since it changes sizeof(cchar_t)
+		case $cf_cv_rel_version in
+		5.*)
+			cf_cv_rel_version=6.0
+			cf_cv_abi_version=6
+			{ echo "$as_me:8171: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
+echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
+			;;
+		esac
+	fi
+	NCURSES_EXT_COLORS=1
 	cat >>confdefs.h <<\EOF
-#define NEED_WCHAR_H 1
+#define NCURSES_EXT_COLORS 1
 EOF
 
-	NEED_WCHAR_H=1
 fi
 
-# if we do not find wint_t in either place, use substitution to provide a fallback.
-if test "$cf_cv_wint_t" = unknown ; then
-	NCURSES_WINT_T=1
-fi
+###   use option --enable-ext-mouse to modify coding to support 5-button mice
+echo "$as_me:8184: checking if you want to use experimental extended mouse encoding" >&5
+echo $ECHO_N "checking if you want to use experimental extended mouse encoding... $ECHO_C" >&6
 
-# if we find wint_t in either place, use substitution to provide a fallback.
-if test "$cf_cv_wint_t" != unknown ; then
-	NCURSES_OK_WINT_T=1
+# Check whether --enable-ext-mouse or --disable-ext-mouse was given.
+if test "${enable_ext_mouse+set}" = set; then
+  enableval="$enable_ext_mouse"
+  with_ext_mouse=$enableval
+else
+  with_ext_mouse=no
+fi;
+echo "$as_me:8194: result: $with_ext_mouse" >&5
+echo "${ECHO_T}$with_ext_mouse" >&6
+NCURSES_MOUSE_VERSION=1
+if test "$with_ext_mouse" = yes ; then
+	NCURSES_MOUSE_VERSION=2
 fi
 
-fi
+echo "$as_me:8201: checking if you want experimental safe-sprintf code" >&5
+echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
+
+# Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
+if test "${enable_safe_sprintf+set}" = set; then
+  enableval="$enable_safe_sprintf"
+  with_safe_sprintf=$enableval
+else
+  with_safe_sprintf=no
+fi;
+echo "$as_me:8211: result: $with_safe_sprintf" >&5
+echo "${ECHO_T}$with_safe_sprintf" >&6
+test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
+#define USE_SAFE_SPRINTF 1
+EOF
 
-echo "$as_me:7115: checking for terminal capabilities file" >&5
-echo $ECHO_N "checking for terminal capabilities file... $ECHO_C" >&6
+###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
+# when hashmap is used scroll hints are useless
+if test "$with_hashmap" = no ; then
+echo "$as_me:8220: checking if you want to experiment without scrolling-hints code" >&5
+echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
 
-# Check whether --with-caps or --without-caps was given.
-if test "${with_caps+set}" = set; then
-  withval="$with_caps"
-  TERMINFO_CAPS=Caps.$withval
+# Check whether --enable-scroll-hints or --disable-scroll-hints was given.
+if test "${enable_scroll_hints+set}" = set; then
+  enableval="$enable_scroll_hints"
+  with_scroll_hints=$enableval
 else
-  TERMINFO_CAPS=Caps
+  with_scroll_hints=yes
 fi;
-test -f ${srcdir}/include/${TERMINFO_CAPS} || TERMINFO_CAPS=Caps
-echo "$as_me:7126: result: $TERMINFO_CAPS" >&5
-echo "${ECHO_T}$TERMINFO_CAPS" >&6
+echo "$as_me:8230: result: $with_scroll_hints" >&5
+echo "${ECHO_T}$with_scroll_hints" >&6
+test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
+#define USE_SCROLL_HINTS 1
+EOF
+
+fi
 
 ###############################################################################
 
 ###	use option --disable-echo to suppress full display compiling commands
-echo "$as_me:7132: checking if you want to display full commands during build" >&5
+echo "$as_me:8241: checking if you want to display full commands during build" >&5
 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
 
 # Check whether --enable-echo or --disable-echo was given.
@@ -7145,11 +8254,11 @@
 	ECHO_LINK='@ echo linking $@ ... ;'
 	test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
 fi
-echo "$as_me:7148: result: $with_echo" >&5
+echo "$as_me:8257: result: $with_echo" >&5
 echo "${ECHO_T}$with_echo" >&6
 
 ###	use option --enable-warnings to turn on all gcc warnings
-echo "$as_me:7152: checking if you want to see compiler warnings" >&5
+echo "$as_me:8261: checking if you want to see compiler warnings" >&5
 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
 
 # Check whether --enable-warnings or --disable-warnings was given.
@@ -7157,19 +8266,37 @@
   enableval="$enable_warnings"
   with_warnings=$enableval
 fi;
-echo "$as_me:7160: result: $with_warnings" >&5
+echo "$as_me:8269: result: $with_warnings" >&5
 echo "${ECHO_T}$with_warnings" >&6
 
 if test -n "$with_warnings"; then
  	ADAFLAGS="$ADAFLAGS -gnatg"
 
-if test "$GCC" = yes
+if test "$INTEL_COMPILER" = yes
+then
+# The "-wdXXX" options suppress warnings:
+# remark #1419: external declaration in primary source file
+# remark #193: zero used for undefined preprocessing identifier
+# remark #593: variable "curs_sb_left_arrow" was set but never used
+# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
+# remark #869: parameter "tw" was never referenced
+# remark #981: operands are evaluated in unspecified order
+# warning #269: invalid format string conversion
+	EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall \
+ -wd1419 \
+ -wd193 \
+ -wd279 \
+ -wd593 \
+ -wd810 \
+ -wd869 \
+ -wd981"
+elif test "$GCC" = yes
 then
 	cat > conftest.$ac_ext <<EOF
-#line 7169 "configure"
+#line 8296 "configure"
 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
 EOF
-	{ echo "$as_me:7172: checking for $CC warning options..." >&5
+	{ echo "$as_me:8299: checking for $CC warning options..." >&5
 echo "$as_me: checking for $CC warning options..." >&6;}
 	cf_save_CFLAGS="$CFLAGS"
 	EXTRA_CFLAGS="-W -Wall"
@@ -7189,12 +8316,12 @@
 		Wundef $cf_warn_CONST
 	do
 		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
-		if { (eval echo "$as_me:7192: \"$ac_compile\"") >&5
+		if { (eval echo "$as_me:8319: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:7195: \$? = $ac_status" >&5
+  echo "$as_me:8322: \$? = $ac_status" >&5
   (exit $ac_status); }; then
-			test -n "$verbose" && echo "$as_me:7197: result: ... -$cf_opt" >&5
+			test -n "$verbose" && echo "$as_me:8324: result: ... -$cf_opt" >&5
 echo "${ECHO_T}... -$cf_opt" >&6
 			case $cf_opt in #(vi
 			Wcast-qual) #(vi
@@ -7216,6 +8343,84 @@
 	CFLAGS="$cf_save_CFLAGS"
 fi
 
+	if test "$cf_with_cxx" = yes ; then
+
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+if test "$INTEL_COMPILER" = yes
+then
+# The "-wdXXX" options suppress warnings:
+# remark #1419: external declaration in primary source file
+# remark #193: zero used for undefined preprocessing identifier
+# remark #593: variable "curs_sb_left_arrow" was set but never used
+# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
+# remark #869: parameter "tw" was never referenced
+# remark #981: operands are evaluated in unspecified order
+# warning #269: invalid format string conversion
+	EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wall \
+ -wd1419 \
+ -wd193 \
+ -wd279 \
+ -wd593 \
+ -wd810 \
+ -wd869 \
+ -wd981"
+elif test "$GXX" = yes
+then
+	cat > conftest.$ac_ext <<EOF
+#line 8375 "configure"
+int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
+EOF
+	{ echo "$as_me:8378: checking for $CXX warning options..." >&5
+echo "$as_me: checking for $CXX warning options..." >&6;}
+	cf_save_CXXFLAGS="$CXXFLAGS"
+	EXTRA_CXXFLAGS="-W -Wall"
+	cf_warn_CONST=""
+	test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
+	for cf_opt in \
+		Wabi \
+		fabi-version=0 \
+		Woverloaded-virtual \
+		Wsign-promo \
+		Wsynth \
+		Wold-style-cast \
+		Weffc++ \
+		Wcast-align \
+		Wcast-qual \
+		Wmissing-prototypes \
+		Wpointer-arith \
+		Wshadow \
+		Wstrict-prototypes \
+		Wundef $cf_warn_CONST Wno-unused
+	do
+		CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
+		if { (eval echo "$as_me:8401: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:8404: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+			test -n "$verbose" && echo "$as_me:8406: result: ... -$cf_opt" >&5
+echo "${ECHO_T}... -$cf_opt" >&6
+			EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
+		else
+			test -n "$verbose" && echo "$as_me:8410: result: ... no -$cf_opt" >&5
+echo "${ECHO_T}... no -$cf_opt" >&6
+		fi
+	done
+	rm -f conftest*
+	CXXFLAGS="$cf_save_CXXFLAGS"
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+	fi
 fi
 
 if test "$GCC" = yes
@@ -7236,10 +8441,10 @@
 EOF
 if test "$GCC" = yes
 then
-	{ echo "$as_me:7239: checking for $CC __attribute__ directives..." >&5
+	{ echo "$as_me:8444: checking for $CC __attribute__ directives..." >&5
 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
 cat > conftest.$ac_ext <<EOF
-#line 7242 "configure"
+#line 8447 "configure"
 #include "confdefs.h"
 #include "conftest.h"
 #include "conftest.i"
@@ -7277,12 +8482,12 @@
 EOF
 			;;
 		esac
-		if { (eval echo "$as_me:7280: \"$ac_compile\"") >&5
+		if { (eval echo "$as_me:8485: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:7283: \$? = $ac_status" >&5
+  echo "$as_me:8488: \$? = $ac_status" >&5
   (exit $ac_status); }; then
-			test -n "$verbose" && echo "$as_me:7285: result: ... $cf_attribute" >&5
+			test -n "$verbose" && echo "$as_me:8490: result: ... $cf_attribute" >&5
 echo "${ECHO_T}... $cf_attribute" >&6
 			cat conftest.h >>confdefs.h
 		fi
@@ -7294,7 +8499,7 @@
 fi
 
 ###	use option --enable-assertions to turn on generation of assertion code
-echo "$as_me:7297: checking if you want to enable runtime assertions" >&5
+echo "$as_me:8502: checking if you want to enable runtime assertions" >&5
 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
 
 # Check whether --enable-assertions or --disable-assertions was given.
@@ -7304,7 +8509,7 @@
 else
   with_assertions=no
 fi;
-echo "$as_me:7307: result: $with_assertions" >&5
+echo "$as_me:8512: result: $with_assertions" >&5
 echo "${ECHO_T}$with_assertions" >&6
 if test -n "$GCC"
 then
@@ -7365,7 +8570,7 @@
 	;;
 esac
 
-echo "$as_me:7368: checking whether to add trace feature to all models" >&5
+echo "$as_me:8573: checking whether to add trace feature to all models" >&5
 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
 
 # Check whether --with-trace or --without-trace was given.
@@ -7375,19 +8580,41 @@
 else
   cf_with_trace=$cf_all_traces
 fi;
-echo "$as_me:7378: result: $with_trace" >&5
+echo "$as_me:8583: result: $with_trace" >&5
 echo "${ECHO_T}$with_trace" >&6
 
 if test "$cf_with_trace" = yes ; then
 	LIB_TRACING=all
 	ADA_TRACE=TRUE
 
+cf_fix_cppflags=no
 cf_new_cflags=
 cf_new_cppflags=
+cf_new_extra_cppflags=
+
 for cf_add_cflags in -DTRACE
 do
+case $cf_fix_cppflags in
+no)
 	case $cf_add_cflags in #(vi
 	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
+		case $cf_add_cflags in
+		-D*)
+			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+			&& test -z "${cf_tst_cflags}" \
+			&& cf_fix_cppflags=yes
+
+			if test $cf_fix_cppflags = yes ; then
+				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+				continue
+			elif test "${cf_tst_cflags}" = "\"'" ; then
+				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+				continue
+			fi
+			;;
+		esac
 		case "$CPPFLAGS" in
 		*$cf_add_cflags) #(vi
 			;;
@@ -7400,6 +8627,17 @@
 		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
 		;;
 	esac
+	;;
+yes)
+	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+
+	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+	&& test -z "${cf_tst_cflags}" \
+	&& cf_fix_cppflags=no
+	;;
+esac
 done
 
 if test -n "$cf_new_cflags" ; then
@@ -7412,19 +8650,24 @@
 	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
 fi
 
+if test -n "$cf_new_extra_cppflags" ; then
+
+	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+fi
+
 else
 	LIB_TRACING=DEBUG
 	ADA_TRACE=FALSE
 fi
 
 ###	Checks for libraries.
-echo "$as_me:7421: checking for gettimeofday" >&5
+echo "$as_me:8664: checking for gettimeofday" >&5
 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
 if test "${ac_cv_func_gettimeofday+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 7427 "configure"
+#line 8670 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gettimeofday (); below.  */
@@ -7455,16 +8698,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7458: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8701: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:7461: \$? = $ac_status" >&5
+  echo "$as_me:8704: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:7464: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8707: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7467: \$? = $ac_status" >&5
+  echo "$as_me:8710: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_func_gettimeofday=yes
 else
@@ -7474,7 +8717,7 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:7477: result: $ac_cv_func_gettimeofday" >&5
+echo "$as_me:8720: result: $ac_cv_func_gettimeofday" >&5
 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
 if test $ac_cv_func_gettimeofday = yes; then
   cat >>confdefs.h <<\EOF
@@ -7483,7 +8726,7 @@
 
 else
 
-echo "$as_me:7486: checking for gettimeofday in -lbsd" >&5
+echo "$as_me:8729: checking for gettimeofday in -lbsd" >&5
 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7491,7 +8734,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lbsd  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 7494 "configure"
+#line 8737 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -7510,16 +8753,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7513: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8756: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:7516: \$? = $ac_status" >&5
+  echo "$as_me:8759: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:7519: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8762: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7522: \$? = $ac_status" >&5
+  echo "$as_me:8765: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_bsd_gettimeofday=yes
 else
@@ -7530,7 +8773,7 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:7533: result: $ac_cv_lib_bsd_gettimeofday" >&5
+echo "$as_me:8776: result: $ac_cv_lib_bsd_gettimeofday" >&5
 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
 if test $ac_cv_lib_bsd_gettimeofday = yes; then
   cat >>confdefs.h <<\EOF
@@ -7542,14 +8785,14 @@
 
 fi
 
-echo "$as_me:7545: checking if -lm needed for math functions" >&5
+echo "$as_me:8788: checking if -lm needed for math functions" >&5
 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
 if test "${cf_cv_need_libm+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 7552 "configure"
+#line 8795 "configure"
 #include "confdefs.h"
 
 	#include <stdio.h>
@@ -7564,16 +8807,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7567: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8810: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:7570: \$? = $ac_status" >&5
+  echo "$as_me:8813: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:7573: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8816: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7576: \$? = $ac_status" >&5
+  echo "$as_me:8819: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_need_libm=no
 else
@@ -7583,7 +8826,7 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:7586: result: $cf_cv_need_libm" >&5
+echo "$as_me:8829: result: $cf_cv_need_libm" >&5
 echo "${ECHO_T}$cf_cv_need_libm" >&6
 if test "$cf_cv_need_libm" = yes
 then
@@ -7591,13 +8834,13 @@
 fi
 
 ###	Checks for header files.
-echo "$as_me:7594: checking for ANSI C header files" >&5
+echo "$as_me:8837: checking for ANSI C header files" >&5
 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
 if test "${ac_cv_header_stdc+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 7600 "configure"
+#line 8843 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -7605,13 +8848,13 @@
 #include <float.h>
 
 _ACEOF
-if { (eval echo "$as_me:7608: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:8851: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:7614: \$? = $ac_status" >&5
+  echo "$as_me:8857: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -7633,7 +8876,7 @@
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
   cat >conftest.$ac_ext <<_ACEOF
-#line 7636 "configure"
+#line 8879 "configure"
 #include "confdefs.h"
 #include <string.h>
 
@@ -7651,7 +8894,7 @@
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
   cat >conftest.$ac_ext <<_ACEOF
-#line 7654 "configure"
+#line 8897 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 
@@ -7672,7 +8915,7 @@
   :
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 7675 "configure"
+#line 8918 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #if ((' ' & 0x0FF) == 0x020)
@@ -7698,15 +8941,15 @@
 }
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:7701: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8944: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:7704: \$? = $ac_status" >&5
+  echo "$as_me:8947: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:7706: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8949: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7709: \$? = $ac_status" >&5
+  echo "$as_me:8952: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   :
 else
@@ -7719,7 +8962,7 @@
 fi
 fi
 fi
-echo "$as_me:7722: result: $ac_cv_header_stdc" >&5
+echo "$as_me:8965: result: $ac_cv_header_stdc" >&5
 echo "${ECHO_T}$ac_cv_header_stdc" >&6
 if test $ac_cv_header_stdc = yes; then
 
@@ -7732,13 +8975,13 @@
 ac_header_dirent=no
 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
-echo "$as_me:7735: checking for $ac_hdr that defines DIR" >&5
+echo "$as_me:8978: checking for $ac_hdr that defines DIR" >&5
 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
 if eval "test \"\${$as_ac_Header+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 7741 "configure"
+#line 8984 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_hdr>
@@ -7753,16 +8996,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:7756: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8999: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:7759: \$? = $ac_status" >&5
+  echo "$as_me:9002: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:7762: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9005: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7765: \$? = $ac_status" >&5
+  echo "$as_me:9008: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   eval "$as_ac_Header=yes"
 else
@@ -7772,7 +9015,7 @@
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:7775: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:9018: result: `eval echo '${'$as_ac_Header'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 if test `eval echo '${'$as_ac_Header'}'` = yes; then
   cat >>confdefs.h <<EOF
@@ -7785,7 +9028,7 @@
 done
 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
 if test $ac_header_dirent = dirent.h; then
-  echo "$as_me:7788: checking for opendir in -ldir" >&5
+  echo "$as_me:9031: checking for opendir in -ldir" >&5
 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
 if test "${ac_cv_lib_dir_opendir+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7793,7 +9036,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-ldir  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 7796 "configure"
+#line 9039 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -7812,16 +9055,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7815: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9058: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:7818: \$? = $ac_status" >&5
+  echo "$as_me:9061: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:7821: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9064: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7824: \$? = $ac_status" >&5
+  echo "$as_me:9067: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_dir_opendir=yes
 else
@@ -7832,14 +9075,14 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:7835: result: $ac_cv_lib_dir_opendir" >&5
+echo "$as_me:9078: result: $ac_cv_lib_dir_opendir" >&5
 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
 if test $ac_cv_lib_dir_opendir = yes; then
   LIBS="$LIBS -ldir"
 fi
 
 else
-  echo "$as_me:7842: checking for opendir in -lx" >&5
+  echo "$as_me:9085: checking for opendir in -lx" >&5
 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
 if test "${ac_cv_lib_x_opendir+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7847,7 +9090,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lx  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 7850 "configure"
+#line 9093 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -7866,16 +9109,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7869: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9112: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:7872: \$? = $ac_status" >&5
+  echo "$as_me:9115: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:7875: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9118: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7878: \$? = $ac_status" >&5
+  echo "$as_me:9121: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_x_opendir=yes
 else
@@ -7886,7 +9129,7 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:7889: result: $ac_cv_lib_x_opendir" >&5
+echo "$as_me:9132: result: $ac_cv_lib_x_opendir" >&5
 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
 if test $ac_cv_lib_x_opendir = yes; then
   LIBS="$LIBS -lx"
@@ -7894,13 +9137,13 @@
 
 fi
 
-echo "$as_me:7897: checking whether time.h and sys/time.h may both be included" >&5
+echo "$as_me:9140: checking whether time.h and sys/time.h may both be included" >&5
 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
 if test "${ac_cv_header_time+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 7903 "configure"
+#line 9146 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -7916,16 +9159,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:7919: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9162: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:7922: \$? = $ac_status" >&5
+  echo "$as_me:9165: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:7925: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9168: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7928: \$? = $ac_status" >&5
+  echo "$as_me:9171: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_header_time=yes
 else
@@ -7935,7 +9178,7 @@
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:7938: result: $ac_cv_header_time" >&5
+echo "$as_me:9181: result: $ac_cv_header_time" >&5
 echo "${ECHO_T}$ac_cv_header_time" >&6
 if test $ac_cv_header_time = yes; then
 
@@ -7945,14 +9188,14 @@
 
 fi
 
-echo "$as_me:7948: checking for regular-expression headers" >&5
+echo "$as_me:9191: checking for regular-expression headers" >&5
 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
 if test "${cf_cv_regex+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 cat >conftest.$ac_ext <<_ACEOF
-#line 7955 "configure"
+#line 9198 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <regex.h>
@@ -7970,16 +9213,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7973: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9216: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:7976: \$? = $ac_status" >&5
+  echo "$as_me:9219: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:7979: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9222: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7982: \$? = $ac_status" >&5
+  echo "$as_me:9225: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_regex="regex.h"
 else
@@ -7987,7 +9230,7 @@
 cat conftest.$ac_ext >&5
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 7990 "configure"
+#line 9233 "configure"
 #include "confdefs.h"
 #include <regexp.h>
 int
@@ -8002,16 +9245,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8005: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9248: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:8008: \$? = $ac_status" >&5
+  echo "$as_me:9251: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:8011: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9254: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8014: \$? = $ac_status" >&5
+  echo "$as_me:9257: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_regex="regexp.h"
 else
@@ -8021,7 +9264,7 @@
 		cf_save_LIBS="$LIBS"
 		LIBS="-lgen $LIBS"
 		cat >conftest.$ac_ext <<_ACEOF
-#line 8024 "configure"
+#line 9267 "configure"
 #include "confdefs.h"
 #include <regexpr.h>
 int
@@ -8036,16 +9279,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8039: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9282: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:8042: \$? = $ac_status" >&5
+  echo "$as_me:9285: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:8045: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9288: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8048: \$? = $ac_status" >&5
+  echo "$as_me:9291: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_regex="regexpr.h"
 else
@@ -8061,7 +9304,7 @@
 
 fi
 
-echo "$as_me:8064: result: $cf_cv_regex" >&5
+echo "$as_me:9307: result: $cf_cv_regex" >&5
 echo "${ECHO_T}$cf_cv_regex" >&6
 case $cf_cv_regex in
 	regex.h)   cat >>confdefs.h <<\EOF
@@ -8097,23 +9340,23 @@
 wctype.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:8100: checking for $ac_header" >&5
+echo "$as_me:9343: checking for $ac_header" >&5
 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
 if eval "test \"\${$as_ac_Header+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 8106 "configure"
+#line 9349 "configure"
 #include "confdefs.h"
 #include <$ac_header>
 _ACEOF
-if { (eval echo "$as_me:8110: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:9353: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:8116: \$? = $ac_status" >&5
+  echo "$as_me:9359: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -8132,7 +9375,7 @@
 fi
 rm -f conftest.err conftest.$ac_ext
 fi
-echo "$as_me:8135: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:9378: result: `eval echo '${'$as_ac_Header'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 if test `eval echo '${'$as_ac_Header'}'` = yes; then
   cat >>confdefs.h <<EOF
@@ -8146,7 +9389,7 @@
 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
 if test "$ISC" = yes ; then
 
-echo "$as_me:8149: checking for main in -lcposix" >&5
+echo "$as_me:9392: checking for main in -lcposix" >&5
 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
 if test "${ac_cv_lib_cposix_main+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -8154,7 +9397,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lcposix  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 8157 "configure"
+#line 9400 "configure"
 #include "confdefs.h"
 
 int
@@ -8166,16 +9409,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8169: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9412: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:8172: \$? = $ac_status" >&5
+  echo "$as_me:9415: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:8175: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9418: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8178: \$? = $ac_status" >&5
+  echo "$as_me:9421: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_cposix_main=yes
 else
@@ -8186,7 +9429,7 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:8189: result: $ac_cv_lib_cposix_main" >&5
+echo "$as_me:9432: result: $ac_cv_lib_cposix_main" >&5
 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
 if test $ac_cv_lib_cposix_main = yes; then
   cat >>confdefs.h <<EOF
@@ -8197,7 +9440,7 @@
 
 fi
 
-	echo "$as_me:8200: checking for bzero in -linet" >&5
+	echo "$as_me:9443: checking for bzero in -linet" >&5
 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
 if test "${ac_cv_lib_inet_bzero+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -8205,7 +9448,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-linet  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 8208 "configure"
+#line 9451 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -8224,16 +9467,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8227: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9470: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:8230: \$? = $ac_status" >&5
+  echo "$as_me:9473: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:8233: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9476: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8236: \$? = $ac_status" >&5
+  echo "$as_me:9479: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_inet_bzero=yes
 else
@@ -8244,21 +9487,21 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:8247: result: $ac_cv_lib_inet_bzero" >&5
+echo "$as_me:9490: result: $ac_cv_lib_inet_bzero" >&5
 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
 if test $ac_cv_lib_inet_bzero = yes; then
   LIBS="$LIBS -linet"
 fi
 fi
 
-echo "$as_me:8254: checking if sys/time.h works with sys/select.h" >&5
+echo "$as_me:9497: checking if sys/time.h works with sys/select.h" >&5
 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
 if test "${cf_cv_sys_time_select+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 cat >conftest.$ac_ext <<_ACEOF
-#line 8261 "configure"
+#line 9504 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -8278,16 +9521,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8281: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9524: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:8284: \$? = $ac_status" >&5
+  echo "$as_me:9527: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:8287: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9530: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8290: \$? = $ac_status" >&5
+  echo "$as_me:9533: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_sys_time_select=yes
 else
@@ -8299,7 +9542,7 @@
 
 fi
 
-echo "$as_me:8302: result: $cf_cv_sys_time_select" >&5
+echo "$as_me:9545: result: $cf_cv_sys_time_select" >&5
 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
 #define HAVE_SYS_TIME_SELECT 1
@@ -8312,7 +9555,7 @@
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-echo "$as_me:8315: checking for $CC option to accept ANSI C" >&5
+echo "$as_me:9558: checking for $CC option to accept ANSI C" >&5
 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
 if test "${ac_cv_prog_cc_stdc+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -8320,7 +9563,7 @@
   ac_cv_prog_cc_stdc=no
 ac_save_CC=$CC
 cat >conftest.$ac_ext <<_ACEOF
-#line 8323 "configure"
+#line 9566 "configure"
 #include "confdefs.h"
 #include <stdarg.h>
 #include <stdio.h>
@@ -8369,16 +9612,16 @@
 do
   CC="$ac_save_CC $ac_arg"
   rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8372: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9615: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:8375: \$? = $ac_status" >&5
+  echo "$as_me:9618: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:8378: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9621: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8381: \$? = $ac_status" >&5
+  echo "$as_me:9624: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_prog_cc_stdc=$ac_arg
 break
@@ -8395,21 +9638,21 @@
 
 case "x$ac_cv_prog_cc_stdc" in
   x|xno)
-    echo "$as_me:8398: result: none needed" >&5
+    echo "$as_me:9641: result: none needed" >&5
 echo "${ECHO_T}none needed" >&6 ;;
   *)
-    echo "$as_me:8401: result: $ac_cv_prog_cc_stdc" >&5
+    echo "$as_me:9644: result: $ac_cv_prog_cc_stdc" >&5
 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
     CC="$CC $ac_cv_prog_cc_stdc" ;;
 esac
 
-echo "$as_me:8406: checking for an ANSI C-conforming const" >&5
+echo "$as_me:9649: checking for an ANSI C-conforming const" >&5
 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
 if test "${ac_cv_c_const+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 8412 "configure"
+#line 9655 "configure"
 #include "confdefs.h"
 
 int
@@ -8467,16 +9710,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8470: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9713: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:8473: \$? = $ac_status" >&5
+  echo "$as_me:9716: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:8476: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9719: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8479: \$? = $ac_status" >&5
+  echo "$as_me:9722: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_c_const=yes
 else
@@ -8486,7 +9729,7 @@
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:8489: result: $ac_cv_c_const" >&5
+echo "$as_me:9732: result: $ac_cv_c_const" >&5
 echo "${ECHO_T}$ac_cv_c_const" >&6
 if test $ac_cv_c_const = no; then
 
@@ -8496,7 +9739,7 @@
 
 fi
 
-echo "$as_me:8499: checking for inline" >&5
+echo "$as_me:9742: checking for inline" >&5
 echo $ECHO_N "checking for inline... $ECHO_C" >&6
 if test "${ac_cv_c_inline+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -8504,7 +9747,7 @@
   ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
   cat >conftest.$ac_ext <<_ACEOF
-#line 8507 "configure"
+#line 9750 "configure"
 #include "confdefs.h"
 #ifndef __cplusplus
 static $ac_kw int static_foo () {return 0; }
@@ -8513,16 +9756,16 @@
 
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8516: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9759: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:8519: \$? = $ac_status" >&5
+  echo "$as_me:9762: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:8522: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9765: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8525: \$? = $ac_status" >&5
+  echo "$as_me:9768: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_c_inline=$ac_kw; break
 else
@@ -8533,7 +9776,7 @@
 done
 
 fi
-echo "$as_me:8536: result: $ac_cv_c_inline" >&5
+echo "$as_me:9779: result: $ac_cv_c_inline" >&5
 echo "${ECHO_T}$ac_cv_c_inline" >&6
 case $ac_cv_c_inline in
   inline | yes) ;;
@@ -8552,14 +9795,14 @@
 #define CC_HAS_INLINE_FUNCS 1
 EOF
 
-echo "$as_me:8555: checking if unsigned literals are legal" >&5
+echo "$as_me:9798: checking if unsigned literals are legal" >&5
 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
 if test "${cf_cv_unsigned_literals+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 8562 "configure"
+#line 9805 "configure"
 #include "confdefs.h"
 
 int
@@ -8571,16 +9814,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8574: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9817: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:8577: \$? = $ac_status" >&5
+  echo "$as_me:9820: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:8580: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9823: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8583: \$? = $ac_status" >&5
+  echo "$as_me:9826: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_unsigned_literals=yes
 else
@@ -8592,10 +9835,10 @@
 
 fi
 
-echo "$as_me:8595: result: $cf_cv_unsigned_literals" >&5
+echo "$as_me:9838: result: $cf_cv_unsigned_literals" >&5
 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
 
-echo "$as_me:8598: checking for type of chtype" >&5
+echo "$as_me:9841: checking for type of chtype" >&5
 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
 if test "${cf_cv_typeof_chtype+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -8605,7 +9848,7 @@
   cf_cv_typeof_chtype=long
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 8608 "configure"
+#line 9851 "configure"
 #include "confdefs.h"
 
 #ifdef USE_WIDEC_SUPPORT
@@ -8652,15 +9895,15 @@
 
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:8655: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9898: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:8658: \$? = $ac_status" >&5
+  echo "$as_me:9901: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:8660: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9903: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8663: \$? = $ac_status" >&5
+  echo "$as_me:9906: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_typeof_chtype=`cat cf_test.out`
 else
@@ -8675,7 +9918,7 @@
 
 fi
 
-echo "$as_me:8678: result: $cf_cv_typeof_chtype" >&5
+echo "$as_me:9921: result: $cf_cv_typeof_chtype" >&5
 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
 
 cat >>confdefs.h <<EOF
@@ -8688,14 +9931,14 @@
 
 ###	Checks for external-data
 
-echo "$as_me:8691: checking if external errno is declared" >&5
+echo "$as_me:9934: checking if external errno is declared" >&5
 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
 if test "${cf_cv_dcl_errno+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
     cat >conftest.$ac_ext <<_ACEOF
-#line 8698 "configure"
+#line 9941 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_STDLIB_H
@@ -8713,16 +9956,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8716: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9959: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:8719: \$? = $ac_status" >&5
+  echo "$as_me:9962: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:8722: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9965: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8725: \$? = $ac_status" >&5
+  echo "$as_me:9968: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_dcl_errno=yes
 else
@@ -8733,7 +9976,7 @@
 rm -f conftest.$ac_objext conftest.$ac_ext
 
 fi
-echo "$as_me:8736: result: $cf_cv_dcl_errno" >&5
+echo "$as_me:9979: result: $cf_cv_dcl_errno" >&5
 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
 
 if test "$cf_cv_dcl_errno" = no ; then
@@ -8748,14 +9991,14 @@
 
 # It's possible (for near-UNIX clones) that the data doesn't exist
 
-echo "$as_me:8751: checking if external errno exists" >&5
+echo "$as_me:9994: checking if external errno exists" >&5
 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
 if test "${cf_cv_have_errno+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
     cat >conftest.$ac_ext <<_ACEOF
-#line 8758 "configure"
+#line 10001 "configure"
 #include "confdefs.h"
 
 #undef errno
@@ -8770,16 +10013,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8773: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10016: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:8776: \$? = $ac_status" >&5
+  echo "$as_me:10019: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:8779: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10022: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8782: \$? = $ac_status" >&5
+  echo "$as_me:10025: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_have_errno=yes
 else
@@ -8790,7 +10033,7 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 
 fi
-echo "$as_me:8793: result: $cf_cv_have_errno" >&5
+echo "$as_me:10036: result: $cf_cv_have_errno" >&5
 echo "${ECHO_T}$cf_cv_have_errno" >&6
 
 if test "$cf_cv_have_errno" = yes ; then
@@ -8803,7 +10046,7 @@
 
 fi
 
-echo "$as_me:8806: checking if data-only library module links" >&5
+echo "$as_me:10049: checking if data-only library module links" >&5
 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
 if test "${cf_cv_link_dataonly+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -8811,20 +10054,20 @@
 
 	rm -f conftest.a
 	cat >conftest.$ac_ext <<EOF
-#line 8814 "configure"
+#line 10057 "configure"
 int	testdata[3] = { 123, 456, 789 };
 EOF
-	if { (eval echo "$as_me:8817: \"$ac_compile\"") >&5
+	if { (eval echo "$as_me:10060: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:8820: \$? = $ac_status" >&5
+  echo "$as_me:10063: \$? = $ac_status" >&5
   (exit $ac_status); } ; then
 		mv conftest.o data.o && \
 		( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null
 	fi
 	rm -f conftest.$ac_ext data.o
 	cat >conftest.$ac_ext <<EOF
-#line 8827 "configure"
+#line 10070 "configure"
 int	testfunc()
 {
 #if defined(NeXT)
@@ -8837,10 +10080,10 @@
 #endif
 }
 EOF
-	if { (eval echo "$as_me:8840: \"$ac_compile\"") >&5
+	if { (eval echo "$as_me:10083: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:8843: \$? = $ac_status" >&5
+  echo "$as_me:10086: \$? = $ac_status" >&5
   (exit $ac_status); }; then
 		mv conftest.o func.o && \
 		( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null
@@ -8853,7 +10096,7 @@
   cf_cv_link_dataonly=unknown
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 8856 "configure"
+#line 10099 "configure"
 #include "confdefs.h"
 
 	int main()
@@ -8864,15 +10107,15 @@
 
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:8867: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10110: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:8870: \$? = $ac_status" >&5
+  echo "$as_me:10113: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:8872: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10115: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8875: \$? = $ac_status" >&5
+  echo "$as_me:10118: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_link_dataonly=yes
 else
@@ -8887,7 +10130,7 @@
 
 fi
 
-echo "$as_me:8890: result: $cf_cv_link_dataonly" >&5
+echo "$as_me:10133: result: $cf_cv_link_dataonly" >&5
 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
 
 if test "$cf_cv_link_dataonly" = no ; then
@@ -8906,7 +10149,6 @@
 geteuid \
 getttynam \
 issetugid \
-memccpy \
 nanosleep \
 poll \
 remove \
@@ -8924,13 +10166,13 @@
 
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:8927: checking for $ac_func" >&5
+echo "$as_me:10169: checking for $ac_func" >&5
 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
 if eval "test \"\${$as_ac_var+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 8933 "configure"
+#line 10175 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func (); below.  */
@@ -8961,16 +10203,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8964: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10206: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:8967: \$? = $ac_status" >&5
+  echo "$as_me:10209: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:8970: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10212: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8973: \$? = $ac_status" >&5
+  echo "$as_me:10215: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   eval "$as_ac_var=yes"
 else
@@ -8980,7 +10222,7 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:8983: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:10225: result: `eval echo '${'$as_ac_var'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
 if test `eval echo '${'$as_ac_var'}'` = yes; then
   cat >>confdefs.h <<EOF
@@ -8992,14 +10234,14 @@
 
 if test "$with_getcap" = "yes" ; then
 
-echo "$as_me:8995: checking for terminal-capability database functions" >&5
+echo "$as_me:10237: checking for terminal-capability database functions" >&5
 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
 if test "${cf_cv_cgetent+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 cat >conftest.$ac_ext <<_ACEOF
-#line 9002 "configure"
+#line 10244 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -9019,16 +10261,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9022: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10264: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:9025: \$? = $ac_status" >&5
+  echo "$as_me:10267: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:9028: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10270: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9031: \$? = $ac_status" >&5
+  echo "$as_me:10273: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_cgetent=yes
 else
@@ -9040,7 +10282,7 @@
 
 fi
 
-echo "$as_me:9043: result: $cf_cv_cgetent" >&5
+echo "$as_me:10285: result: $cf_cv_cgetent" >&5
 echo "${ECHO_T}$cf_cv_cgetent" >&6
 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
 #define HAVE_BSD_CGETENT 1
@@ -9048,14 +10290,14 @@
 
 fi
 
-echo "$as_me:9051: checking for isascii" >&5
+echo "$as_me:10293: checking for isascii" >&5
 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
 if test "${cf_cv_have_isascii+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 9058 "configure"
+#line 10300 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 int
@@ -9067,16 +10309,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9070: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10312: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:9073: \$? = $ac_status" >&5
+  echo "$as_me:10315: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:9076: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10318: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9079: \$? = $ac_status" >&5
+  echo "$as_me:10321: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_have_isascii=yes
 else
@@ -9087,17 +10329,17 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 
 fi
-echo "$as_me:9090: result: $cf_cv_have_isascii" >&5
+echo "$as_me:10332: result: $cf_cv_have_isascii" >&5
 echo "${ECHO_T}$cf_cv_have_isascii" >&6
 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
 #define HAVE_ISASCII 1
 EOF
 
 if test "$ac_cv_func_sigaction" = yes; then
-echo "$as_me:9097: checking whether sigaction needs _POSIX_SOURCE" >&5
+echo "$as_me:10339: checking whether sigaction needs _POSIX_SOURCE" >&5
 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
 cat >conftest.$ac_ext <<_ACEOF
-#line 9100 "configure"
+#line 10342 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -9111,16 +10353,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9114: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:10356: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:9117: \$? = $ac_status" >&5
+  echo "$as_me:10359: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:9120: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10362: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9123: \$? = $ac_status" >&5
+  echo "$as_me:10365: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   sigact_bad=no
 else
@@ -9128,7 +10370,7 @@
 cat conftest.$ac_ext >&5
 
 cat >conftest.$ac_ext <<_ACEOF
-#line 9131 "configure"
+#line 10373 "configure"
 #include "confdefs.h"
 
 #define _POSIX_SOURCE
@@ -9143,16 +10385,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9146: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:10388: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:9149: \$? = $ac_status" >&5
+  echo "$as_me:10391: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:9152: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10394: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9155: \$? = $ac_status" >&5
+  echo "$as_me:10397: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   sigact_bad=yes
 	 cat >>confdefs.h <<\EOF
@@ -9167,7 +10409,7 @@
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:9170: result: $sigact_bad" >&5
+echo "$as_me:10412: result: $sigact_bad" >&5
 echo "${ECHO_T}$sigact_bad" >&6
 fi
 
@@ -9178,23 +10420,23 @@
 
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:9181: checking for $ac_header" >&5
+echo "$as_me:10423: checking for $ac_header" >&5
 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
 if eval "test \"\${$as_ac_Header+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 9187 "configure"
+#line 10429 "configure"
 #include "confdefs.h"
 #include <$ac_header>
 _ACEOF
-if { (eval echo "$as_me:9191: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:10433: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:9197: \$? = $ac_status" >&5
+  echo "$as_me:10439: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -9213,7 +10455,7 @@
 fi
 rm -f conftest.err conftest.$ac_ext
 fi
-echo "$as_me:9216: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:10458: result: `eval echo '${'$as_ac_Header'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 if test `eval echo '${'$as_ac_Header'}'` = yes; then
   cat >>confdefs.h <<EOF
@@ -9228,23 +10470,23 @@
 for ac_header in sys/termio.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:9231: checking for $ac_header" >&5
+echo "$as_me:10473: checking for $ac_header" >&5
 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
 if eval "test \"\${$as_ac_Header+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 9237 "configure"
+#line 10479 "configure"
 #include "confdefs.h"
 #include <$ac_header>
 _ACEOF
-if { (eval echo "$as_me:9241: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:10483: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:9247: \$? = $ac_status" >&5
+  echo "$as_me:10489: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -9263,7 +10505,7 @@
 fi
 rm -f conftest.err conftest.$ac_ext
 fi
-echo "$as_me:9266: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:10508: result: `eval echo '${'$as_ac_Header'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 if test `eval echo '${'$as_ac_Header'}'` = yes; then
   cat >>confdefs.h <<EOF
@@ -9281,10 +10523,10 @@
 	*)	termios_bad=maybe ;;
 	esac
 	if test "$termios_bad" = maybe ; then
-	echo "$as_me:9284: checking whether termios.h needs _POSIX_SOURCE" >&5
+	echo "$as_me:10526: checking whether termios.h needs _POSIX_SOURCE" >&5
 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
 	cat >conftest.$ac_ext <<_ACEOF
-#line 9287 "configure"
+#line 10529 "configure"
 #include "confdefs.h"
 #include <termios.h>
 int
@@ -9296,16 +10538,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9299: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:10541: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:9302: \$? = $ac_status" >&5
+  echo "$as_me:10544: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:9305: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10547: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9308: \$? = $ac_status" >&5
+  echo "$as_me:10550: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   termios_bad=no
 else
@@ -9313,7 +10555,7 @@
 cat conftest.$ac_ext >&5
 
 		cat >conftest.$ac_ext <<_ACEOF
-#line 9316 "configure"
+#line 10558 "configure"
 #include "confdefs.h"
 
 #define _POSIX_SOURCE
@@ -9327,16 +10569,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9330: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:10572: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:9333: \$? = $ac_status" >&5
+  echo "$as_me:10575: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:9336: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10578: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9339: \$? = $ac_status" >&5
+  echo "$as_me:10581: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   termios_bad=unknown
 else
@@ -9351,19 +10593,19 @@
 
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
-	echo "$as_me:9354: result: $termios_bad" >&5
+	echo "$as_me:10596: result: $termios_bad" >&5
 echo "${ECHO_T}$termios_bad" >&6
 	fi
 fi
 
-echo "$as_me:9359: checking for tcgetattr" >&5
+echo "$as_me:10601: checking for tcgetattr" >&5
 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
 if test "${cf_cv_have_tcgetattr+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 cat >conftest.$ac_ext <<_ACEOF
-#line 9366 "configure"
+#line 10608 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -9391,16 +10633,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9394: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10636: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:9397: \$? = $ac_status" >&5
+  echo "$as_me:10639: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:9400: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10642: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9403: \$? = $ac_status" >&5
+  echo "$as_me:10645: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_have_tcgetattr=yes
 else
@@ -9410,20 +10652,20 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:9413: result: $cf_cv_have_tcgetattr" >&5
+echo "$as_me:10655: result: $cf_cv_have_tcgetattr" >&5
 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
 #define HAVE_TCGETATTR 1
 EOF
 
-echo "$as_me:9419: checking for vsscanf function or workaround" >&5
+echo "$as_me:10661: checking for vsscanf function or workaround" >&5
 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
 if test "${cf_cv_func_vsscanf+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 cat >conftest.$ac_ext <<_ACEOF
-#line 9426 "configure"
+#line 10668 "configure"
 #include "confdefs.h"
 
 #include <stdarg.h>
@@ -9439,16 +10681,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9442: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10684: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:9445: \$? = $ac_status" >&5
+  echo "$as_me:10687: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:9448: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10690: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9451: \$? = $ac_status" >&5
+  echo "$as_me:10693: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_func_vsscanf=vsscanf
 else
@@ -9456,7 +10698,7 @@
 cat conftest.$ac_ext >&5
 
 cat >conftest.$ac_ext <<_ACEOF
-#line 9459 "configure"
+#line 10701 "configure"
 #include "confdefs.h"
 
 #include <stdarg.h>
@@ -9478,16 +10720,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9481: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10723: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:9484: \$? = $ac_status" >&5
+  echo "$as_me:10726: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:9487: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10729: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9490: \$? = $ac_status" >&5
+  echo "$as_me:10732: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_func_vsscanf=vfscanf
 else
@@ -9495,7 +10737,7 @@
 cat conftest.$ac_ext >&5
 
 cat >conftest.$ac_ext <<_ACEOF
-#line 9498 "configure"
+#line 10740 "configure"
 #include "confdefs.h"
 
 #include <stdarg.h>
@@ -9517,16 +10759,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9520: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10762: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:9523: \$? = $ac_status" >&5
+  echo "$as_me:10765: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:9526: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10768: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9529: \$? = $ac_status" >&5
+  echo "$as_me:10771: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_func_vsscanf=_doscan
 else
@@ -9541,7 +10783,7 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:9544: result: $cf_cv_func_vsscanf" >&5
+echo "$as_me:10786: result: $cf_cv_func_vsscanf" >&5
 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
 
 case $cf_cv_func_vsscanf in #(vi
@@ -9559,7 +10801,7 @@
 ;;
 esac
 
-echo "$as_me:9562: checking for working mkstemp" >&5
+echo "$as_me:10804: checking for working mkstemp" >&5
 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
 if test "${cf_cv_func_mkstemp+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9567,13 +10809,13 @@
 
 rm -f conftest*
 if test "$cross_compiling" = yes; then
-  echo "$as_me:9570: checking for mkstemp" >&5
+  echo "$as_me:10812: checking for mkstemp" >&5
 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
 if test "${ac_cv_func_mkstemp+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 9576 "configure"
+#line 10818 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char mkstemp (); below.  */
@@ -9604,16 +10846,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9607: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10849: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:9610: \$? = $ac_status" >&5
+  echo "$as_me:10852: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:9613: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10855: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9616: \$? = $ac_status" >&5
+  echo "$as_me:10858: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_func_mkstemp=yes
 else
@@ -9623,12 +10865,12 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:9626: result: $ac_cv_func_mkstemp" >&5
+echo "$as_me:10868: result: $ac_cv_func_mkstemp" >&5
 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
 
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 9631 "configure"
+#line 10873 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -9666,15 +10908,15 @@
 
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:9669: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10911: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:9672: \$? = $ac_status" >&5
+  echo "$as_me:10914: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:9674: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10916: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9677: \$? = $ac_status" >&5
+  echo "$as_me:10919: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_func_mkstemp=yes
 
@@ -9689,7 +10931,7 @@
 fi
 
 fi
-echo "$as_me:9692: result: $cf_cv_func_mkstemp" >&5
+echo "$as_me:10934: result: $cf_cv_func_mkstemp" >&5
 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
 if test "$cf_cv_func_mkstemp" = yes ; then
 	cat >>confdefs.h <<\EOF
@@ -9706,21 +10948,21 @@
 fi
 
 if test "$cross_compiling" = yes ; then
-	{ echo "$as_me:9709: WARNING: cross compiling: assume setvbuf params not reversed" >&5
+	{ echo "$as_me:10951: WARNING: cross compiling: assume setvbuf params not reversed" >&5
 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
 else
-	echo "$as_me:9712: checking whether setvbuf arguments are reversed" >&5
+	echo "$as_me:10954: checking whether setvbuf arguments are reversed" >&5
 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test "$cross_compiling" = yes; then
-  { { echo "$as_me:9718: error: cannot run test program while cross compiling" >&5
+  { { echo "$as_me:10960: error: cannot run test program while cross compiling" >&5
 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
    { (exit 1); exit 1; }; }
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 9723 "configure"
+#line 10965 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 /* If setvbuf has the reversed format, exit 0. */
@@ -9737,15 +10979,15 @@
 }
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:9740: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10982: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:9743: \$? = $ac_status" >&5
+  echo "$as_me:10985: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:9745: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10987: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9748: \$? = $ac_status" >&5
+  echo "$as_me:10990: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_func_setvbuf_reversed=yes
 else
@@ -9758,7 +11000,7 @@
 fi
 rm -f core core.* *.core
 fi
-echo "$as_me:9761: result: $ac_cv_func_setvbuf_reversed" >&5
+echo "$as_me:11003: result: $ac_cv_func_setvbuf_reversed" >&5
 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
 if test $ac_cv_func_setvbuf_reversed = yes; then
 
@@ -9769,13 +11011,13 @@
 fi
 
 fi
-echo "$as_me:9772: checking return type of signal handlers" >&5
+echo "$as_me:11014: checking return type of signal handlers" >&5
 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
 if test "${ac_cv_type_signal+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 9778 "configure"
+#line 11020 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -9797,16 +11039,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9800: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:11042: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:9803: \$? = $ac_status" >&5
+  echo "$as_me:11045: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:9806: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11048: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9809: \$? = $ac_status" >&5
+  echo "$as_me:11051: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_type_signal=void
 else
@@ -9816,21 +11058,21 @@
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:9819: result: $ac_cv_type_signal" >&5
+echo "$as_me:11061: result: $ac_cv_type_signal" >&5
 echo "${ECHO_T}$ac_cv_type_signal" >&6
 
 cat >>confdefs.h <<EOF
 #define RETSIGTYPE $ac_cv_type_signal
 EOF
 
-echo "$as_me:9826: checking for type sigaction_t" >&5
+echo "$as_me:11068: checking for type sigaction_t" >&5
 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
 if test "${cf_cv_type_sigaction+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 9833 "configure"
+#line 11075 "configure"
 #include "confdefs.h"
 
 #include <signal.h>
@@ -9843,16 +11085,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9846: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:11088: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:9849: \$? = $ac_status" >&5
+  echo "$as_me:11091: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:9852: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11094: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9855: \$? = $ac_status" >&5
+  echo "$as_me:11097: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_type_sigaction=yes
 else
@@ -9863,13 +11105,13 @@
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
 
-echo "$as_me:9866: result: $cf_cv_type_sigaction" >&5
+echo "$as_me:11108: result: $cf_cv_type_sigaction" >&5
 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
 #define HAVE_TYPE_SIGACTION 1
 EOF
 
-echo "$as_me:9872: checking declaration of size-change" >&5
+echo "$as_me:11114: checking declaration of size-change" >&5
 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
 if test "${cf_cv_sizechange+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9884,7 +11126,7 @@
     CPPFLAGS="$cf_save_CPPFLAGS"
     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
     cat >conftest.$ac_ext <<_ACEOF
-#line 9887 "configure"
+#line 11129 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #ifdef HAVE_TERMIOS_H
@@ -9928,16 +11170,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9931: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:11173: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:9934: \$? = $ac_status" >&5
+  echo "$as_me:11176: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:9937: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11179: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9940: \$? = $ac_status" >&5
+  echo "$as_me:11182: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_sizechange=yes
 else
@@ -9956,7 +11198,7 @@
 done
 
 fi
-echo "$as_me:9959: result: $cf_cv_sizechange" >&5
+echo "$as_me:11201: result: $cf_cv_sizechange" >&5
 echo "${ECHO_T}$cf_cv_sizechange" >&6
 if test "$cf_cv_sizechange" != no ; then
 	cat >>confdefs.h <<\EOF
@@ -9973,13 +11215,13 @@
 	esac
 fi
 
-echo "$as_me:9976: checking for memmove" >&5
+echo "$as_me:11218: checking for memmove" >&5
 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
 if test "${ac_cv_func_memmove+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 9982 "configure"
+#line 11224 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char memmove (); below.  */
@@ -10010,16 +11252,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10013: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11255: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:10016: \$? = $ac_status" >&5
+  echo "$as_me:11258: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:10019: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11261: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10022: \$? = $ac_status" >&5
+  echo "$as_me:11264: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_func_memmove=yes
 else
@@ -10029,19 +11271,19 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:10032: result: $ac_cv_func_memmove" >&5
+echo "$as_me:11274: result: $ac_cv_func_memmove" >&5
 echo "${ECHO_T}$ac_cv_func_memmove" >&6
 if test $ac_cv_func_memmove = yes; then
   :
 else
 
-echo "$as_me:10038: checking for bcopy" >&5
+echo "$as_me:11280: checking for bcopy" >&5
 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
 if test "${ac_cv_func_bcopy+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 10044 "configure"
+#line 11286 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char bcopy (); below.  */
@@ -10072,16 +11314,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10075: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11317: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:10078: \$? = $ac_status" >&5
+  echo "$as_me:11320: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:10081: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11323: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10084: \$? = $ac_status" >&5
+  echo "$as_me:11326: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_func_bcopy=yes
 else
@@ -10091,11 +11333,11 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:10094: result: $ac_cv_func_bcopy" >&5
+echo "$as_me:11336: result: $ac_cv_func_bcopy" >&5
 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
 if test $ac_cv_func_bcopy = yes; then
 
-	echo "$as_me:10098: checking if bcopy does overlapping moves" >&5
+	echo "$as_me:11340: checking if bcopy does overlapping moves" >&5
 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
 if test "${cf_cv_good_bcopy+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10105,7 +11347,7 @@
   cf_cv_good_bcopy=unknown
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 10108 "configure"
+#line 11350 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -10119,15 +11361,15 @@
 
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:10122: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11364: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:10125: \$? = $ac_status" >&5
+  echo "$as_me:11367: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:10127: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11369: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10130: \$? = $ac_status" >&5
+  echo "$as_me:11372: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_good_bcopy=yes
 else
@@ -10140,7 +11382,7 @@
 fi
 
 fi
-echo "$as_me:10143: result: $cf_cv_good_bcopy" >&5
+echo "$as_me:11385: result: $cf_cv_good_bcopy" >&5
 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
 
 else
@@ -10161,7 +11403,7 @@
 
 fi
 
-echo "$as_me:10164: checking if poll really works" >&5
+echo "$as_me:11406: checking if poll really works" >&5
 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
 if test "${cf_cv_working_poll+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10171,7 +11413,7 @@
   cf_cv_working_poll=unknown
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 10174 "configure"
+#line 11416 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -10192,15 +11434,15 @@
 }
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:10195: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11437: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:10198: \$? = $ac_status" >&5
+  echo "$as_me:11440: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:10200: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11442: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10203: \$? = $ac_status" >&5
+  echo "$as_me:11445: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_working_poll=yes
 else
@@ -10212,7 +11454,7 @@
 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 fi
-echo "$as_me:10215: result: $cf_cv_working_poll" >&5
+echo "$as_me:11457: result: $cf_cv_working_poll" >&5
 echo "${ECHO_T}$cf_cv_working_poll" >&6
 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
 #define HAVE_WORKING_POLL 1
@@ -10225,7 +11467,7 @@
 
 # Just in case, check if the C compiler has a bool type.
 
-echo "$as_me:10228: checking if we should include stdbool.h" >&5
+echo "$as_me:11470: checking if we should include stdbool.h" >&5
 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
 
 if test "${cf_cv_header_stdbool_h+set}" = set; then
@@ -10233,7 +11475,7 @@
 else
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 10236 "configure"
+#line 11478 "configure"
 #include "confdefs.h"
 
 int
@@ -10245,23 +11487,23 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10248: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:11490: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:10251: \$? = $ac_status" >&5
+  echo "$as_me:11493: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:10254: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11496: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10257: \$? = $ac_status" >&5
+  echo "$as_me:11499: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_header_stdbool_h=0
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
 cat >conftest.$ac_ext <<_ACEOF
-#line 10264 "configure"
+#line 11506 "configure"
 #include "confdefs.h"
 
 #ifndef __BEOS__
@@ -10277,16 +11519,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10280: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:11522: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:10283: \$? = $ac_status" >&5
+  echo "$as_me:11525: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:10286: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11528: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10289: \$? = $ac_status" >&5
+  echo "$as_me:11531: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_header_stdbool_h=1
 else
@@ -10300,13 +11542,13 @@
 fi
 
 if test "$cf_cv_header_stdbool_h" = 1
-then	echo "$as_me:10303: result: yes" >&5
+then	echo "$as_me:11545: result: yes" >&5
 echo "${ECHO_T}yes" >&6
-else	echo "$as_me:10305: result: no" >&5
+else	echo "$as_me:11547: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
-echo "$as_me:10309: checking for builtin bool type" >&5
+echo "$as_me:11551: checking for builtin bool type" >&5
 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
 
 if test "${cf_cv_cc_bool_type+set}" = set; then
@@ -10314,7 +11556,7 @@
 else
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 10317 "configure"
+#line 11559 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -10329,16 +11571,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10332: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:11574: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:10335: \$? = $ac_status" >&5
+  echo "$as_me:11577: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:10338: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11580: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10341: \$? = $ac_status" >&5
+  echo "$as_me:11583: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_cc_bool_type=1
 else
@@ -10351,9 +11593,9 @@
 fi
 
 if test "$cf_cv_cc_bool_type" = 1
-then	echo "$as_me:10354: result: yes" >&5
+then	echo "$as_me:11596: result: yes" >&5
 echo "${ECHO_T}yes" >&6
-else	echo "$as_me:10356: result: no" >&5
+else	echo "$as_me:11598: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -10374,7 +11616,7 @@
 	cf_stdcpp_libname=stdc++
 	;;
 esac
-echo "$as_me:10377: checking for library $cf_stdcpp_libname" >&5
+echo "$as_me:11619: checking for library $cf_stdcpp_libname" >&5
 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
 if test "${cf_cv_libstdcpp+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10383,7 +11625,7 @@
 	cf_save="$LIBS"
 	LIBS="$LIBS -l$cf_stdcpp_libname"
 cat >conftest.$ac_ext <<_ACEOF
-#line 10386 "configure"
+#line 11628 "configure"
 #include "confdefs.h"
 
 #include <strstream.h>
@@ -10399,16 +11641,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10402: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11644: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:10405: \$? = $ac_status" >&5
+  echo "$as_me:11647: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:10408: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11650: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10411: \$? = $ac_status" >&5
+  echo "$as_me:11653: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_libstdcpp=yes
 else
@@ -10420,11 +11662,53 @@
 	LIBS="$cf_save"
 
 fi
-echo "$as_me:10423: result: $cf_cv_libstdcpp" >&5
+echo "$as_me:11665: result: $cf_cv_libstdcpp" >&5
 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
 fi
 
+	echo "$as_me:11670: checking whether $CXX understands -c and -o together" >&5
+echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
+if test "${cf_cv_prog_CXX_c_o+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cat > conftest.$ac_ext <<CF_EOF
+#include <stdio.h>
+int main()
+{
+	return 0;
+}
+CF_EOF
+# We do the test twice because some compilers refuse to overwrite an
+# existing .o file with -o, though they will create one.
+ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+if { (eval echo "$as_me:11686: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:11689: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+  test -f conftest2.$ac_objext && { (eval echo "$as_me:11691: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:11694: \$? = $ac_status" >&5
+  (exit $ac_status); };
+then
+  eval cf_cv_prog_CXX_c_o=yes
+else
+  eval cf_cv_prog_CXX_c_o=no
+fi
+rm -f conftest*
+
+fi
+if test $cf_cv_prog_CXX_c_o = yes; then
+  echo "$as_me:11705: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me:11708: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
 	case $GXX_VERSION in
 	1*|2.0-6*)
 		cf_cxx_library=yes
@@ -10441,12 +11725,12 @@
 	;;
 esac
 if test "$GXX" = yes; then
-	echo "$as_me:10444: checking for lib$cf_gpp_libname" >&5
+	echo "$as_me:11728: checking for lib$cf_gpp_libname" >&5
 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
 	cf_save="$LIBS"
 	LIBS="$LIBS -l$cf_gpp_libname"
 	cat >conftest.$ac_ext <<_ACEOF
-#line 10449 "configure"
+#line 11733 "configure"
 #include "confdefs.h"
 
 #include <$cf_gpp_libname/builtin.h>
@@ -10460,16 +11744,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10463: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11747: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:10466: \$? = $ac_status" >&5
+  echo "$as_me:11750: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:10469: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11753: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10472: \$? = $ac_status" >&5
+  echo "$as_me:11756: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cxx_library=yes
 	 CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
@@ -10488,7 +11772,7 @@
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
 cat >conftest.$ac_ext <<_ACEOF
-#line 10491 "configure"
+#line 11775 "configure"
 #include "confdefs.h"
 
 #include <builtin.h>
@@ -10502,16 +11786,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10505: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11789: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:10508: \$? = $ac_status" >&5
+  echo "$as_me:11792: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:10511: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11795: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10514: \$? = $ac_status" >&5
+  echo "$as_me:11798: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cxx_library=yes
 	 CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
@@ -10528,7 +11812,7 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 	LIBS="$cf_save"
-	echo "$as_me:10531: result: $cf_cxx_library" >&5
+	echo "$as_me:11815: result: $cf_cxx_library" >&5
 echo "${ECHO_T}$cf_cxx_library" >&6
 fi
 
@@ -10538,12 +11822,20 @@
 		;;
 	esac
 
+	case "$GCC_VERSION" in
+	2.95.*)
+		;;
+	*)
+		CPPFLAGS="$CPPFLAGS -DCPP_HAS_STATIC_CAST"
+		;;
+	esac
+
 	ac_ext=cc
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-echo "$as_me:10546: checking how to run the C++ preprocessor" >&5
+echo "$as_me:11838: checking how to run the C++ preprocessor" >&5
 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
 if test -z "$CXXCPP"; then
   if test "${ac_cv_prog_CXXCPP+set}" = set; then
@@ -10560,18 +11852,18 @@
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp. "Syntax error" is here to catch this case.
   cat >conftest.$ac_ext <<_ACEOF
-#line 10563 "configure"
+#line 11855 "configure"
 #include "confdefs.h"
 #include <assert.h>
                      Syntax error
 _ACEOF
-if { (eval echo "$as_me:10568: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:11860: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:10574: \$? = $ac_status" >&5
+  echo "$as_me:11866: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_cxx_preproc_warn_flag
@@ -10594,17 +11886,17 @@
   # OK, works on sane cases.  Now check whether non-existent headers
   # can be detected and how.
   cat >conftest.$ac_ext <<_ACEOF
-#line 10597 "configure"
+#line 11889 "configure"
 #include "confdefs.h"
 #include <ac_nonexistent.h>
 _ACEOF
-if { (eval echo "$as_me:10601: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:11893: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:10607: \$? = $ac_status" >&5
+  echo "$as_me:11899: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_cxx_preproc_warn_flag
@@ -10641,7 +11933,7 @@
 else
   ac_cv_prog_CXXCPP=$CXXCPP
 fi
-echo "$as_me:10644: result: $CXXCPP" >&5
+echo "$as_me:11936: result: $CXXCPP" >&5
 echo "${ECHO_T}$CXXCPP" >&6
 ac_preproc_ok=false
 for ac_cxx_preproc_warn_flag in '' yes
@@ -10651,18 +11943,18 @@
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp. "Syntax error" is here to catch this case.
   cat >conftest.$ac_ext <<_ACEOF
-#line 10654 "configure"
+#line 11946 "configure"
 #include "confdefs.h"
 #include <assert.h>
                      Syntax error
 _ACEOF
-if { (eval echo "$as_me:10659: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:11951: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:10665: \$? = $ac_status" >&5
+  echo "$as_me:11957: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_cxx_preproc_warn_flag
@@ -10685,17 +11977,17 @@
   # OK, works on sane cases.  Now check whether non-existent headers
   # can be detected and how.
   cat >conftest.$ac_ext <<_ACEOF
-#line 10688 "configure"
+#line 11980 "configure"
 #include "confdefs.h"
 #include <ac_nonexistent.h>
 _ACEOF
-if { (eval echo "$as_me:10692: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:11984: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:10698: \$? = $ac_status" >&5
+  echo "$as_me:11990: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_cxx_preproc_warn_flag
@@ -10723,7 +12015,7 @@
 if $ac_preproc_ok; then
   :
 else
-  { { echo "$as_me:10726: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
+  { { echo "$as_me:12018: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
    { (exit 1); exit 1; }; }
 fi
@@ -10737,23 +12029,23 @@
 for ac_header in typeinfo
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:10740: checking for $ac_header" >&5
+echo "$as_me:12032: checking for $ac_header" >&5
 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
 if eval "test \"\${$as_ac_Header+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 10746 "configure"
+#line 12038 "configure"
 #include "confdefs.h"
 #include <$ac_header>
 _ACEOF
-if { (eval echo "$as_me:10750: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:12042: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:10756: \$? = $ac_status" >&5
+  echo "$as_me:12048: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_cxx_preproc_warn_flag
@@ -10772,7 +12064,7 @@
 fi
 rm -f conftest.err conftest.$ac_ext
 fi
-echo "$as_me:10775: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:12067: result: `eval echo '${'$as_ac_Header'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 if test `eval echo '${'$as_ac_Header'}'` = yes; then
   cat >>confdefs.h <<EOF
@@ -10782,7 +12074,7 @@
 fi
 done
 
-echo "$as_me:10785: checking if we should include stdbool.h" >&5
+echo "$as_me:12077: checking if we should include stdbool.h" >&5
 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
 
 if test "${cf_cv_header_stdbool_h+set}" = set; then
@@ -10790,7 +12082,7 @@
 else
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 10793 "configure"
+#line 12085 "configure"
 #include "confdefs.h"
 
 int
@@ -10802,23 +12094,23 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10805: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:12097: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:10808: \$? = $ac_status" >&5
+  echo "$as_me:12100: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:10811: \"$ac_try\"") >&5
+  { (eval echo "$as_me:12103: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10814: \$? = $ac_status" >&5
+  echo "$as_me:12106: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_header_stdbool_h=0
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
 cat >conftest.$ac_ext <<_ACEOF
-#line 10821 "configure"
+#line 12113 "configure"
 #include "confdefs.h"
 
 #ifndef __BEOS__
@@ -10834,16 +12126,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10837: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:12129: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:10840: \$? = $ac_status" >&5
+  echo "$as_me:12132: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:10843: \"$ac_try\"") >&5
+  { (eval echo "$as_me:12135: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10846: \$? = $ac_status" >&5
+  echo "$as_me:12138: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_header_stdbool_h=1
 else
@@ -10857,13 +12149,13 @@
 fi
 
 if test "$cf_cv_header_stdbool_h" = 1
-then	echo "$as_me:10860: result: yes" >&5
+then	echo "$as_me:12152: result: yes" >&5
 echo "${ECHO_T}yes" >&6
-else	echo "$as_me:10862: result: no" >&5
+else	echo "$as_me:12154: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
-echo "$as_me:10866: checking for builtin bool type" >&5
+echo "$as_me:12158: checking for builtin bool type" >&5
 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
 
 if test "${cf_cv_builtin_bool+set}" = set; then
@@ -10871,7 +12163,7 @@
 else
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 10874 "configure"
+#line 12166 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -10886,16 +12178,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10889: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:12181: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:10892: \$? = $ac_status" >&5
+  echo "$as_me:12184: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:10895: \"$ac_try\"") >&5
+  { (eval echo "$as_me:12187: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10898: \$? = $ac_status" >&5
+  echo "$as_me:12190: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_builtin_bool=1
 else
@@ -10908,13 +12200,13 @@
 fi
 
 if test "$cf_cv_builtin_bool" = 1
-then	echo "$as_me:10911: result: yes" >&5
+then	echo "$as_me:12203: result: yes" >&5
 echo "${ECHO_T}yes" >&6
-else	echo "$as_me:10913: result: no" >&5
+else	echo "$as_me:12205: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
-echo "$as_me:10917: checking for size of bool" >&5
+echo "$as_me:12209: checking for size of bool" >&5
 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
 if test "${cf_cv_type_of_bool+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10925,7 +12217,7 @@
   cf_cv_type_of_bool=unknown
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 10928 "configure"
+#line 12220 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -10967,15 +12259,15 @@
 
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:10970: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12262: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:10973: \$? = $ac_status" >&5
+  echo "$as_me:12265: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:10975: \"$ac_try\"") >&5
+  { (eval echo "$as_me:12267: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10978: \$? = $ac_status" >&5
+  echo "$as_me:12270: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_type_of_bool=`cat cf_test.out`
 		 if test -z "$cf_cv_type_of_bool"; then
@@ -10993,18 +12285,18 @@
 fi
 
 	rm -f cf_test.out
-echo "$as_me:10996: result: $cf_cv_type_of_bool" >&5
+echo "$as_me:12288: result: $cf_cv_type_of_bool" >&5
 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
 if test "$cf_cv_type_of_bool" = unknown ; then
 	case .$NCURSES_BOOL in #(vi
 	.auto|.) NCURSES_BOOL=unsigned;;
 	esac
-	{ echo "$as_me:11002: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
+	{ echo "$as_me:12294: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
 	cf_cv_type_of_bool=$NCURSES_BOOL
 fi
 
-echo "$as_me:11007: checking for special defines needed for etip.h" >&5
+echo "$as_me:12299: checking for special defines needed for etip.h" >&5
 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
 cf_save_CXXFLAGS="$CXXFLAGS"
 cf_result="none"
@@ -11016,7 +12308,7 @@
 	test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
 	test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
 cat >conftest.$ac_ext <<_ACEOF
-#line 11019 "configure"
+#line 12311 "configure"
 #include "confdefs.h"
 
 #include <etip.h.in>
@@ -11030,16 +12322,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11033: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:12325: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:11036: \$? = $ac_status" >&5
+  echo "$as_me:12328: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:11039: \"$ac_try\"") >&5
+  { (eval echo "$as_me:12331: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:11042: \$? = $ac_status" >&5
+  echo "$as_me:12334: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
 	test -n "$cf_math" && cat >>confdefs.h <<EOF
@@ -11060,12 +12352,12 @@
 rm -f conftest.$ac_objext conftest.$ac_ext
 done
 done
-echo "$as_me:11063: result: $cf_result" >&5
+echo "$as_me:12355: result: $cf_result" >&5
 echo "${ECHO_T}$cf_result" >&6
 CXXFLAGS="$cf_save_CXXFLAGS"
 
 if test -n "$CXX"; then
-echo "$as_me:11068: checking if $CXX accepts parameter initialization" >&5
+echo "$as_me:12360: checking if $CXX accepts parameter initialization" >&5
 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
 if test "${cf_cv_cpp_param_init+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -11081,7 +12373,7 @@
   cf_cv_cpp_param_init=unknown
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 11084 "configure"
+#line 12376 "configure"
 #include "confdefs.h"
 
 class TEST {
@@ -11100,15 +12392,15 @@
 
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:11103: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12395: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:11106: \$? = $ac_status" >&5
+  echo "$as_me:12398: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:11108: \"$ac_try\"") >&5
+  { (eval echo "$as_me:12400: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:11111: \$? = $ac_status" >&5
+  echo "$as_me:12403: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_cpp_param_init=yes
 else
@@ -11126,7 +12418,7 @@
 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
 fi
-echo "$as_me:11129: result: $cf_cv_cpp_param_init" >&5
+echo "$as_me:12421: result: $cf_cv_cpp_param_init" >&5
 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
 fi
 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
@@ -11144,23 +12436,23 @@
 for ac_header in strstream.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:11147: checking for $ac_header" >&5
+echo "$as_me:12439: checking for $ac_header" >&5
 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
 if eval "test \"\${$as_ac_Header+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 11153 "configure"
+#line 12445 "configure"
 #include "confdefs.h"
 #include <$ac_header>
 _ACEOF
-if { (eval echo "$as_me:11157: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:12449: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:11163: \$? = $ac_status" >&5
+  echo "$as_me:12455: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_cxx_preproc_warn_flag
@@ -11179,7 +12471,7 @@
 fi
 rm -f conftest.err conftest.$ac_ext
 fi
-echo "$as_me:11182: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:12474: result: `eval echo '${'$as_ac_Header'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 if test `eval echo '${'$as_ac_Header'}'` = yes; then
   cat >>confdefs.h <<EOF
@@ -11189,7 +12481,7 @@
 fi
 done
 
-echo "$as_me:11192: checking if $CXX supports vscan function" >&5
+echo "$as_me:12484: checking if $CXX supports vscan function" >&5
 echo $ECHO_N "checking if $CXX supports vscan function... $ECHO_C" >&6
 if test "${cf_cv_cpp_vscan_func+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -11203,7 +12495,7 @@
 	strstream_cast)	cf_vscan_defs=USE_STRSTREAM_VSCAN_CAST ;;
 	esac
 	cat >conftest.$ac_ext <<_ACEOF
-#line 11206 "configure"
+#line 12498 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -11248,16 +12540,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11251: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12543: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:11254: \$? = $ac_status" >&5
+  echo "$as_me:12546: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:11257: \"$ac_try\"") >&5
+  { (eval echo "$as_me:12549: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:11260: \$? = $ac_status" >&5
+  echo "$as_me:12552: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_cpp_vscan_func=$cf_vscan_func; break
 else
@@ -11270,7 +12562,7 @@
 	done
 
 fi
-echo "$as_me:11273: result: $cf_cv_cpp_vscan_func" >&5
+echo "$as_me:12565: result: $cf_cv_cpp_vscan_func" >&5
 echo "${ECHO_T}$cf_cv_cpp_vscan_func" >&6
 
 ac_ext=cc
@@ -11352,7 +12644,7 @@
 	else
 		if test "$cf_cv_header_stdbool_h" = 1 ; then
 
-echo "$as_me:11355: checking for size of bool" >&5
+echo "$as_me:12647: checking for size of bool" >&5
 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
 if test "${cf_cv_type_of_bool+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -11363,7 +12655,7 @@
   cf_cv_type_of_bool=unknown
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 11366 "configure"
+#line 12658 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -11405,15 +12697,15 @@
 
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:11408: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12700: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:11411: \$? = $ac_status" >&5
+  echo "$as_me:12703: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:11413: \"$ac_try\"") >&5
+  { (eval echo "$as_me:12705: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:11416: \$? = $ac_status" >&5
+  echo "$as_me:12708: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_type_of_bool=`cat cf_test.out`
 		 if test -z "$cf_cv_type_of_bool"; then
@@ -11431,25 +12723,25 @@
 fi
 
 	rm -f cf_test.out
-echo "$as_me:11434: result: $cf_cv_type_of_bool" >&5
+echo "$as_me:12726: result: $cf_cv_type_of_bool" >&5
 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
 if test "$cf_cv_type_of_bool" = unknown ; then
 	case .$NCURSES_BOOL in #(vi
 	.auto|.) NCURSES_BOOL=unsigned;;
 	esac
-	{ echo "$as_me:11440: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
+	{ echo "$as_me:12732: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
 	cf_cv_type_of_bool=$NCURSES_BOOL
 fi
 
 		else
-			echo "$as_me:11446: checking for fallback type of bool" >&5
+			echo "$as_me:12738: checking for fallback type of bool" >&5
 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
 			case "$host_cpu" in #(vi
 			i?86)	cf_cv_type_of_bool=char	;; #(vi
 			*)	cf_cv_type_of_bool=int	;;
 			esac
-			echo "$as_me:11452: result: $cf_cv_type_of_bool" >&5
+			echo "$as_me:12744: result: $cf_cv_type_of_bool" >&5
 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
 		fi
 	fi
@@ -11478,7 +12770,7 @@
 cf_ada_make=gnatmake
 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
 set dummy $cf_ada_make; ac_word=$2
-echo "$as_me:11481: checking for $ac_word" >&5
+echo "$as_me:12773: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_gnat_exists+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -11493,7 +12785,7 @@
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_gnat_exists="yes"
-echo "$as_me:11496: found $ac_dir/$ac_word" >&5
+echo "$as_me:12788: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -11502,10 +12794,10 @@
 fi
 gnat_exists=$ac_cv_prog_gnat_exists
 if test -n "$gnat_exists"; then
-  echo "$as_me:11505: result: $gnat_exists" >&5
+  echo "$as_me:12797: result: $gnat_exists" >&5
 echo "${ECHO_T}$gnat_exists" >&6
 else
-  echo "$as_me:11508: result: no" >&5
+  echo "$as_me:12800: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -11513,11 +12805,11 @@
    cf_ada_make=
 else
 
-echo "$as_me:11516: checking for gnat version" >&5
+echo "$as_me:12808: checking for gnat version" >&5
 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
-echo "$as_me:11520: result: $cf_gnat_version" >&5
+echo "$as_me:12812: result: $cf_gnat_version" >&5
 echo "${ECHO_T}$cf_gnat_version" >&6
 
 case $cf_gnat_version in
@@ -11540,7 +12832,7 @@
 
    # Extract the first word of "m4", so it can be a program name with args.
 set dummy m4; ac_word=$2
-echo "$as_me:11543: checking for $ac_word" >&5
+echo "$as_me:12835: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_M4_exists+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -11555,7 +12847,7 @@
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_M4_exists="yes"
-echo "$as_me:11558: found $ac_dir/$ac_word" >&5
+echo "$as_me:12850: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -11564,10 +12856,10 @@
 fi
 M4_exists=$ac_cv_prog_M4_exists
 if test -n "$M4_exists"; then
-  echo "$as_me:11567: result: $M4_exists" >&5
+  echo "$as_me:12859: result: $M4_exists" >&5
 echo "${ECHO_T}$M4_exists" >&6
 else
-  echo "$as_me:11570: result: no" >&5
+  echo "$as_me:12862: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -11576,7 +12868,7 @@
       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
    fi
    if test "$cf_cv_prog_gnat_correct" = yes; then
-      echo "$as_me:11579: checking if GNAT works" >&5
+      echo "$as_me:12871: checking if GNAT works" >&5
 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
 
 rm -f conftest*
@@ -11593,7 +12885,7 @@
    GNAT.OS_Lib.OS_Exit (0);
 end conftest;
 CF_EOF
-if ( $cf_ada_make conftest 1>&5 2>&1 ) ; then
+if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
    if ( ./conftest 1>&5 2>&1 ) ; then
       cf_cv_prog_gnat_correct=yes
    else
@@ -11604,13 +12896,50 @@
 fi
 rm -f conftest*
 
-      echo "$as_me:11607: result: $cf_cv_prog_gnat_correct" >&5
+      echo "$as_me:12899: result: $cf_cv_prog_gnat_correct" >&5
 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
    fi
 fi
 if test	"$cf_cv_prog_gnat_correct" = yes; then
    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
 
+   echo "$as_me:12906: checking if GNAT pragma Unreferenced works" >&5
+echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
+
+rm -f conftest*
+cat >>conftest.ads <<CF_EOF
+procedure conftest;
+CF_EOF
+cat >>conftest.adb <<CF_EOF
+with Text_IO;
+with GNAT.OS_Lib;
+procedure conftest is
+   test : Integer;
+   pragma Unreferenced (test);
+begin
+   test := 1;
+   Text_IO.Put ("Hello World");
+   Text_IO.New_Line;
+   GNAT.OS_Lib.OS_Exit (0);
+end conftest;
+CF_EOF
+if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
+      cf_cv_pragma_unreferenced=yes
+else
+   cf_cv_pragma_unreferenced=no
+fi
+rm -f conftest*
+
+   echo "$as_me:12933: result: $cf_cv_pragma_unreferenced" >&5
+echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
+
+   # if the pragma is supported, use it (needed in the Trace code).
+   if test $cf_cv_pragma_unreferenced = yes ; then
+      PRAGMA_UNREF=TRUE
+   else
+      PRAGMA_UNREF=FALSE
+   fi
+
 # Check whether --with-ada-compiler or --without-ada-compiler was given.
 if test "${with_ada_compiler+set}" = set; then
   withval="$with_ada_compiler"
@@ -11647,7 +12976,7 @@
   withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
   ;;
 *)
-  { { echo "$as_me:11650: error: expected a pathname, not \"$withval\"" >&5
+  { { echo "$as_me:12979: error: expected a pathname, not \"$withval\"" >&5
 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
    { (exit 1); exit 1; }; }
   ;;
@@ -11681,7 +13010,7 @@
   withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
   ;;
 *)
-  { { echo "$as_me:11684: error: expected a pathname, not \"$withval\"" >&5
+  { { echo "$as_me:13013: error: expected a pathname, not \"$withval\"" >&5
 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
    { (exit 1); exit 1; }; }
   ;;
@@ -11694,9 +13023,9 @@
 
 ### Construct the library-subsets, if any, from this set of keywords:
 ### none, base, ext_funcs, ext_tinfo, termlib, widechar (see CF_LIB_RULES).
-echo "$as_me:11697: checking for library subsets" >&5
+echo "$as_me:13026: checking for library subsets" >&5
 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
-if test "$with_termlib" = yes ; then
+if test "$with_termlib" != no ; then
 	LIB_SUBSETS="termlib"
 	test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
 	LIB_SUBSETS="${LIB_SUBSETS} "
@@ -11707,7 +13036,7 @@
 LIB_SUBSETS="${LIB_SUBSETS}base"
 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
-echo "$as_me:11710: result: $LIB_SUBSETS" >&5
+echo "$as_me:13039: result: $LIB_SUBSETS" >&5
 echo "${ECHO_T}$LIB_SUBSETS" >&6
 
 ### Construct the list of include-directories to be generated
@@ -11745,7 +13074,7 @@
 fi
 
 ### Build up pieces for makefile rules
-echo "$as_me:11748: checking default library suffix" >&5
+echo "$as_me:13077: checking default library suffix" >&5
 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
 
 	case $DFT_LWR_MODEL in
@@ -11756,10 +13085,10 @@
 	shared)  DFT_ARG_SUFFIX=''   ;;
 	esac
 	test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
-echo "$as_me:11759: result: $DFT_ARG_SUFFIX" >&5
+echo "$as_me:13088: result: $DFT_ARG_SUFFIX" >&5
 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
 
-echo "$as_me:11762: checking default library-dependency suffix" >&5
+echo "$as_me:13091: checking default library-dependency suffix" >&5
 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
 
 	case $DFT_LWR_MODEL in
@@ -11788,10 +13117,10 @@
 		;;
 	esac
 fi
-echo "$as_me:11791: result: $DFT_DEP_SUFFIX" >&5
+echo "$as_me:13120: result: $DFT_DEP_SUFFIX" >&5
 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
 
-echo "$as_me:11794: checking default object directory" >&5
+echo "$as_me:13123: checking default object directory" >&5
 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
 
 	case $DFT_LWR_MODEL in
@@ -11807,12 +13136,12 @@
 			DFT_OBJ_SUBDIR='obj_s' ;;
 		esac
 	esac
-echo "$as_me:11810: result: $DFT_OBJ_SUBDIR" >&5
+echo "$as_me:13139: result: $DFT_OBJ_SUBDIR" >&5
 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
 
 # libtool thinks it can make c++ shared libraries (perhaps only g++)
 if test "$cf_with_cxx" = yes ; then
-echo "$as_me:11815: checking c++ library-dependency suffix" >&5
+echo "$as_me:13144: checking c++ library-dependency suffix" >&5
 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
 if test "$with_libtool" != "no"; then
 	CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
@@ -11838,22 +13167,47 @@
 	esac
 	test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
 fi
-echo "$as_me:11841: result: $CXX_LIB_SUFFIX" >&5
+echo "$as_me:13170: result: $CXX_LIB_SUFFIX" >&5
 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
 
 fi
 
+### Set up low-level terminfo dependencies for makefiles.
 TINFO_LIST="$SHLIB_LIST"
-if test "$with_libtool" = no ; then
-	test "$with_termlib" = yes && SHLIB_LIST="$SHLIB_LIST -ltinfo${LIB_SUFFIX}"
+if test "$with_termlib" != no ; then
+
+	if test "$with_termlib" != yes ; then
+		TINFO_NAME=$with_termlib
+		TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
+		TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
+		TINFO_LIB_SUFFIX="${with_termlib}"
+	else
+		TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
+		TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
+		TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
+	fi
+
+	TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
+	if test "$DFT_LWR_MODEL" = "libtool"; then
+		TEST_ARGS="${TEST_DEPS}"
+	else
+		TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
+		TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
+		SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
+	fi
+else
+	TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
 fi
 
-echo "$as_me:11851: checking where we will install curses.h" >&5
+# needed for Ada95
+TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
+
+echo "$as_me:13205: checking where we will install curses.h" >&5
 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
 test "$with_overwrite" = no && \
 test "x$includedir" = 'x${prefix}/include' && \
 	includedir='$(prefix)/include/ncurses'${LIB_SUFFIX}
-echo "$as_me:11856: result: $includedir" >&5
+echo "$as_me:13210: result: $includedir" >&5
 echo "${ECHO_T}$includedir" >&6
 
 ### Resolve a conflict between normal and wide-curses by forcing applications
@@ -11861,24 +13215,11 @@
 if test "$with_overwrite" != no ; then
 if test "$NCURSES_LIBUTF8" = 1 ; then
 	NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
-	{ echo "$as_me:11864: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
+	{ echo "$as_me:13218: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
 fi
 fi
 
-### Set up low-level terminfo dependencies for makefiles.  Note that we
-### could override this.
-if test "$with_termlib" = yes ; then
-	TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_NAME}${DFT_DEP_SUFFIX}"
-	if test "$DFT_LWR_MODEL" = "libtool"; then
-		TEST_ARGS="${TEST_DEPS}"
-	else
-		TEST_ARGS="-l${TINFO_NAME}${DFT_ARG_SUFFIX}"
-	fi
-fi
-PROG_DEPS="$TEST_DEPS"
-PROG_ARGS="$TEST_ARGS"
-
 ### predefined stuff for the test programs
 cat >>confdefs.h <<\EOF
 #define HAVE_SLK_COLOR 1
@@ -11887,7 +13228,7 @@
 ### Construct the list of subdirectories for which we'll customize makefiles
 ### with the appropriate compile-rules.
 
-echo "$as_me:11890: checking for src modules" >&5
+echo "$as_me:13231: checking for src modules" >&5
 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
 
 # dependencies and linker-arguments for test-programs
@@ -11898,9 +13239,6 @@
 	TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
 fi
 
-# dependencies and linker-arguments for utility-programs
-test "$with_termlib" != yes && PROG_ARGS="$TEST_ARGS"
-
 cf_cv_src_modules=
 for cf_dir in $modules_to_build
 do
@@ -11947,12 +13285,10 @@
 		fi
 	fi
 done
-echo "$as_me:11950: result: $cf_cv_src_modules" >&5
+echo "$as_me:13288: result: $cf_cv_src_modules" >&5
 echo "${ECHO_T}$cf_cv_src_modules" >&6
 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
 
-PROG_ARGS="-L${LIB_DIR} $PROG_ARGS"
-
 SRC_SUBDIRS="man include"
 for cf_dir in $cf_cv_src_modules
 do
@@ -12021,12 +13357,34 @@
 
 ### Now that we're done running tests, add the compiler-warnings, if any
 
+cf_fix_cppflags=no
 cf_new_cflags=
 cf_new_cppflags=
+cf_new_extra_cppflags=
+
 for cf_add_cflags in $EXTRA_CFLAGS
 do
+case $cf_fix_cppflags in
+no)
 	case $cf_add_cflags in #(vi
 	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
+		case $cf_add_cflags in
+		-D*)
+			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+			&& test -z "${cf_tst_cflags}" \
+			&& cf_fix_cppflags=yes
+
+			if test $cf_fix_cppflags = yes ; then
+				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+				continue
+			elif test "${cf_tst_cflags}" = "\"'" ; then
+				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+				continue
+			fi
+			;;
+		esac
 		case "$CPPFLAGS" in
 		*$cf_add_cflags) #(vi
 			;;
@@ -12039,6 +13397,17 @@
 		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
 		;;
 	esac
+	;;
+yes)
+	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+
+	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+	&& test -z "${cf_tst_cflags}" \
+	&& cf_fix_cppflags=no
+	;;
+esac
 done
 
 if test -n "$cf_new_cflags" ; then
@@ -12051,6 +13420,11 @@
 	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
 fi
 
+if test -n "$cf_new_extra_cppflags" ; then
+
+	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+fi
+
 ################################################################################
 test "$use_database" = yes && SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
 ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/termcap.h include/unctrl.h $SUB_MAKEFILES Makefile"
@@ -12134,7 +13508,7 @@
 : ${CONFIG_STATUS=./config.status}
 ac_clean_files_save=$ac_clean_files
 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:12137: creating $CONFIG_STATUS" >&5
+{ echo "$as_me:13511: creating $CONFIG_STATUS" >&5
 echo "$as_me: creating $CONFIG_STATUS" >&6;}
 cat >$CONFIG_STATUS <<_ACEOF
 #! $SHELL
@@ -12310,7 +13684,7 @@
     echo "$ac_cs_version"; exit 0 ;;
   --he | --h)
     # Conflict between --help and --header
-    { { echo "$as_me:12313: error: ambiguous option: $1
+    { { echo "$as_me:13687: error: ambiguous option: $1
 Try \`$0 --help' for more information." >&5
 echo "$as_me: error: ambiguous option: $1
 Try \`$0 --help' for more information." >&2;}
@@ -12329,7 +13703,7 @@
     ac_need_defaults=false;;
 
   # This is an error.
-  -*) { { echo "$as_me:12332: error: unrecognized option: $1
+  -*) { { echo "$as_me:13706: error: unrecognized option: $1
 Try \`$0 --help' for more information." >&5
 echo "$as_me: error: unrecognized option: $1
 Try \`$0 --help' for more information." >&2;}
@@ -12369,6 +13743,7 @@
 
 AWK="$AWK"
 CF_LIST_MODELS="$cf_list_models"
+DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
 DFT_LWR_MODEL="$DFT_LWR_MODEL"
 LDCONFIG="$LDCONFIG"
 LIB_NAME="$LIB_NAME"
@@ -12379,12 +13754,17 @@
 NCURSES_OSPEED="$NCURSES_OSPEED"
 SRC_SUBDIRS="$SRC_SUBDIRS"
 TERMINFO="$TERMINFO"
+TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
+TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
 TINFO_NAME="$TINFO_NAME"
 WITH_CURSES_H="$with_curses_h"
 WITH_ECHO="$with_echo"
 WITH_OVERWRITE="$with_overwrite"
 cf_cv_abi_version="$cf_cv_abi_version"
 cf_cv_do_symlinks="$cf_cv_do_symlinks"
+cf_cv_enable_lp64="$cf_cv_enable_lp64"
+cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
+cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
 cf_cv_rel_version="$cf_cv_rel_version"
 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
 cf_cv_shlib_version="$cf_cv_shlib_version"
@@ -12409,7 +13789,7 @@
   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
-  *) { { echo "$as_me:12412: error: invalid argument: $ac_config_target" >&5
+  *) { { echo "$as_me:13792: error: invalid argument: $ac_config_target" >&5
 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
    { (exit 1); exit 1; }; };;
   esac
@@ -12519,6 +13899,7 @@
 s,@EXEEXT@,$EXEEXT,;t t
 s,@OBJEXT@,$OBJEXT,;t t
 s,@CPP@,$CPP,;t t
+s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
 s,@PROG_EXT@,$PROG_EXT,;t t
 s,@LDCONFIG@,$LDCONFIG,;t t
 s,@CXX@,$CXX,;t t
@@ -12545,11 +13926,13 @@
 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
 s,@DESTDIR@,$DESTDIR,;t t
 s,@BUILD_CC@,$BUILD_CC,;t t
+s,@BUILD_CPP@,$BUILD_CPP,;t t
 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
+s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
 s,@cf_list_models@,$cf_list_models,;t t
 s,@LIBTOOL@,$LIBTOOL,;t t
 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
@@ -12582,17 +13965,12 @@
 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
 s,@PATHSEP@,$PATHSEP,;t t
 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
+s,@WHICH_XTERM@,$WHICH_XTERM,;t t
 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
 s,@TERMINFO@,$TERMINFO,;t t
 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
 s,@TERMPATH@,$TERMPATH,;t t
 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
-s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
-s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
-s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
-s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
-s,@NCURSES_CONST@,$NCURSES_CONST,;t t
-s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
@@ -12601,9 +13979,19 @@
 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
+s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
+s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
+s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
+s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
+s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
+s,@NCURSES_CONST@,$NCURSES_CONST,;t t
+s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
+s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
+s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
 s,@ECHO_LINK@,$ECHO_LINK,;t t
 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
+s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
 s,@ADA_TRACE@,$ADA_TRACE,;t t
 s,@MATH_LIB@,$MATH_LIB,;t t
 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
@@ -12623,6 +14011,7 @@
 s,@ADAFLAGS@,$ADAFLAGS,;t t
 s,@cf_compile_generics@,$cf_compile_generics,;t t
 s,@cf_generic_objects@,$cf_generic_objects,;t t
+s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
@@ -12630,12 +14019,15 @@
 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
-s,@EXTRA_LIBS@,$EXTRA_LIBS,;t t
+s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
+s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
+s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
+s,@TINFO_ARGS@,$TINFO_ARGS,;t t
+s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
 s,@TINFO_LIST@,$TINFO_LIST,;t t
 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
 s,@TEST_DEPS@,$TEST_DEPS,;t t
 s,@TEST_ARGS@,$TEST_ARGS,;t t
-s,@PROG_ARGS@,$PROG_ARGS,;t t
 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
 CEOF
@@ -12752,7 +14144,7 @@
   esac
 
   if test x"$ac_file" != x-; then
-    { echo "$as_me:12755: creating $ac_file" >&5
+    { echo "$as_me:14147: creating $ac_file" >&5
 echo "$as_me: creating $ac_file" >&6;}
     rm -f "$ac_file"
   fi
@@ -12770,7 +14162,7 @@
       -) echo $tmp/stdin ;;
       [\\/$]*)
          # Absolute (can't be DOS-style, as IFS=:)
-         test -f "$f" || { { echo "$as_me:12773: error: cannot find input file: $f" >&5
+         test -f "$f" || { { echo "$as_me:14165: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          echo $f;;
@@ -12783,7 +14175,7 @@
            echo $srcdir/$f
          else
            # /dev/null tree
-           { { echo "$as_me:12786: error: cannot find input file: $f" >&5
+           { { echo "$as_me:14178: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          fi;;
@@ -12849,7 +14241,7 @@
   * )   ac_file_in=$ac_file.in ;;
   esac
 
-  test x"$ac_file" != x- && { echo "$as_me:12852: creating $ac_file" >&5
+  test x"$ac_file" != x- && { echo "$as_me:14244: creating $ac_file" >&5
 echo "$as_me: creating $ac_file" >&6;}
 
   # First look for the input files in the build tree, otherwise in the
@@ -12860,7 +14252,7 @@
       -) echo $tmp/stdin ;;
       [\\/$]*)
          # Absolute (can't be DOS-style, as IFS=:)
-         test -f "$f" || { { echo "$as_me:12863: error: cannot find input file: $f" >&5
+         test -f "$f" || { { echo "$as_me:14255: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          echo $f;;
@@ -12873,7 +14265,7 @@
            echo $srcdir/$f
          else
            # /dev/null tree
-           { { echo "$as_me:12876: error: cannot find input file: $f" >&5
+           { { echo "$as_me:14268: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          fi;;
@@ -12931,7 +14323,7 @@
   rm -f $tmp/in
   if test x"$ac_file" != x-; then
     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
-      { echo "$as_me:12934: $ac_file is unchanged" >&5
+      { echo "$as_me:14326: $ac_file is unchanged" >&5
 echo "$as_me: $ac_file is unchanged" >&6;}
     else
       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
@@ -13026,13 +14418,33 @@
 				case "$cf_cv_shlib_version" in #(vi
 				rel) #(vi
 					case "$cf_cv_system_name" in #(vi
-					darwin*) cf_suffix='.$(REL_VERSION)'"$cf_suffix" ;; #(vi
+					darwin*)
+					case .${LIB_SUFFIX} in
+					.w*)
+						cf_suffix=`echo $cf_suffix | sed 's/^w//'`
+						cf_suffix=w'.$(REL_VERSION)'"$cf_suffix"
+						;;
+					*)
+						cf_suffix='.$(REL_VERSION)'"$cf_suffix"
+						;;
+					esac
+					;; #(vi
 					*) cf_suffix="$cf_suffix"'.$(REL_VERSION)' ;;
 					esac
 					;;
 				abi)
 					case "$cf_cv_system_name" in #(vi
-					darwin*) cf_suffix='.$(ABI_VERSION)'"$cf_suffix" ;; #(vi
+					darwin*)
+					case .${LIB_SUFFIX} in
+					.w*)
+						cf_suffix=`echo $cf_suffix | sed 's/^w//'`
+						cf_suffix=w'.$(ABI_VERSION)'"$cf_suffix"
+						;;
+					*)
+						cf_suffix='.$(ABI_VERSION)'"$cf_suffix"
+						;;
+					esac
+					;; #(vi
 					*) cf_suffix="$cf_suffix"'.$(ABI_VERSION)' ;;
 					esac
 					;;
@@ -13055,7 +14467,7 @@
 			cf_subsets="$LIB_SUBSETS"
 			cf_termlib=`echo "$cf_subsets" |sed -e 's/ .*$//'`
 			if test "$cf_termlib" != "$cf_subsets" ; then
-				cf_item=`echo $LIBS_TO_MAKE |sed -e s%$LIB_NAME%$TINFO_NAME%g`
+				cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
 				LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
 			fi
 		else
@@ -13115,6 +14527,22 @@
 		esac
 	esac
 
+			# Test for case where we build libtinfo with a different name.
+			cf_libname=$cf_dir
+			if test $cf_dir = ncurses ; then
+				case $cf_subset in
+				*base*)
+					;;
+				termlib*)
+					cf_libname=$TINFO_LIB_SUFFIX
+					if test -n "${DFT_ARG_SUFFIX}" ; then
+						# undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
+						cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
+					fi
+				;;
+				esac
+			fi
+
 			# These dependencies really are for development, not
 			# builds, but they are useful in porting, too.
 			cf_depend="../include/ncurses_cfg.h"
@@ -13130,8 +14558,22 @@
 				cf_depend="$cf_depend $cf_reldir/curses.priv.h"
 			fi
 
+ 			cf_dir_suffix=
+ 			old_cf_suffix="$cf_suffix"
+ 			if test "$cf_cv_shlib_version_infix" = yes ; then
+			if test -n "$LIB_SUFFIX" ; then
+				case $LIB_SUFFIX in
+				w*)
+					cf_libname=`echo $cf_libname | sed 's/w$//'`
+					cf_suffix=`echo $cf_suffix | sed 's/^w//'`
+					cf_dir_suffix=w
+					;;
+				esac
+			fi
+ 			fi
+
 			$AWK -f $srcdir/mk-1st.awk \
-				name=$cf_dir \
+				name=${cf_libname}${cf_dir_suffix} \
 				traces=$LIB_TRACING \
 				MODEL=$CF_ITEM \
 				model=$cf_subdir \
@@ -13147,6 +14589,9 @@
 				depend="$cf_depend" \
 				host="$host" \
 				$srcdir/$cf_dir/modules >>$cf_dir/Makefile
+
+			cf_suffix="$old_cf_suffix"
+
 			for cf_subdir2 in $cf_subdirs lib
 			do
 				test $cf_subdir = $cf_subdir2 && break
@@ -13160,6 +14605,8 @@
 				subset=$cf_subset \
 				srcdir=$srcdir \
 				echo=$WITH_ECHO \
+				crenames=$cf_cv_prog_CC_c_o \
+				cxxrenames=$cf_cv_prog_CXX_c_o \
 				$srcdir/$cf_dir/modules >>$cf_dir/Makefile
 			cf_subdirs="$cf_subdirs $cf_subdir"
 			done
diff -Naur ncurses-5.4.orig/configure.in ncurses-5.4/configure.in
--- ncurses-5.4.orig/configure.in	2004-01-24 19:29:13.000000000 +0000
+++ ncurses-5.4/configure.in	2005-05-13 04:09:58.000000000 +0000
@@ -1,5 +1,5 @@
 dnl***************************************************************************
-dnl Copyright (c) 1998-2003,2004 Free Software Foundation, Inc.              *
+dnl Copyright (c) 1998-2004,2005 Free Software Foundation, Inc.              *
 dnl                                                                          *
 dnl Permission is hereby granted, free of charge, to any person obtaining a  *
 dnl copy of this software and associated documentation files (the            *
@@ -28,14 +28,14 @@
 dnl
 dnl Author: Thomas E. Dickey 1995-on
 dnl
-dnl $Id: configure.in,v 1.312 2004/01/24 19:29:13 tom Exp $
+dnl $Id: configure.in,v 1.337 2005/04/30 21:21:59 tom Exp $
 dnl Process this file with autoconf to produce a configure script.
 dnl
 dnl See http://invisible-island.net/autoconf/ for additional information.
 dnl
 dnl ---------------------------------------------------------------------------
 AC_PREREQ(2.13.20020210)
-AC_REVISION($Revision: 1.312 $)
+AC_REVISION($Revision: 1.337 $)
 AC_INIT(ncurses/base/lib_initscr.c)
 AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
 
@@ -62,6 +62,7 @@
 
 AC_PROG_CPP
 AC_PROG_GCC_TRADITIONAL
+CF_PROG_CC_C_O(CC)
 AC_ISC_POSIX
 CF_ANSI_CC_REQD
 CF_PROG_EXT
@@ -180,37 +181,7 @@
 # If we're cross-compiling, allow the user to override the tools and their
 # options.  The configure script is oriented toward identifying the host
 # compiler, etc., but we need a build compiler to generate parts of the source.
-: ${BUILD_CC:='$(CC)'}
-: ${BUILD_CFLAGS:='$(CFLAGS)'}
-: ${BUILD_CPPFLAGS:='$(CPPFLAGS)'}
-: ${BUILD_LDFLAGS:='$(LDFLAGS)'}
-: ${BUILD_LIBS:='$(LIBS)'}
-: ${BUILD_EXEEXT:='$x'}
-if test "$cross_compiling" = yes ; then
-	AC_ARG_WITH(build-cc,
-		[  --with-build-cc=XXX     the build C compiler ($BUILD_CC)],
-		[BUILD_CC="$withval"],
-		[AC_CHECK_PROGS(BUILD_CC, $CC gcc cc)])
-	AC_ARG_WITH(build-cflags,
-		[  --with-build-cflags=XXX the build C compiler-flags],
-		[BUILD_CFLAGS="$withval"])
-	AC_ARG_WITH(build-cppflags,
-		[  --with-build-cppflags=XXX the build C preprocessor-flags],
-		[BUILD_CPPFLAGS="$withval"])
-	AC_ARG_WITH(build-ldflags,
-		[  --with-build-ldflags=XXX the build linker-flags],
-		[BUILD_LDFLAGS="$withval"])
-	AC_ARG_WITH(build-libs,
-		[  --with-build-libs=XXX   the build libraries],
-		[BUILD_LIBS="$withval"])
-	BUILD_EXEEXT=
-fi
-AC_SUBST(BUILD_CC)
-AC_SUBST(BUILD_CFLAGS)
-AC_SUBST(BUILD_CPPFLAGS)
-AC_SUBST(BUILD_LDFLAGS)
-AC_SUBST(BUILD_LIBS)
-AC_SUBST(BUILD_EXEEXT)
+CF_BUILD_CC
 
 ###############################################################################
 CF_HELP_MESSAGE(Options to Specify the Libraries Built/Used:)
@@ -310,19 +281,36 @@
 CF_WITH_DMALLOC
 
 SHLIB_LIST=""
-AC_MSG_CHECKING(if you want to link with the gpm mouse library)
+AC_MSG_CHECKING(if you want to link with the GPM mouse library)
 AC_ARG_WITH(gpm,
 	[  --with-gpm              use Alessandro Rubini's GPM library],
 	[with_gpm=$withval],
-	[with_gpm=no])
+	[with_gpm=maybe])
 AC_MSG_RESULT($with_gpm)
-if test "$with_gpm" = yes ; then
+if test "$with_gpm" != no ; then
 	AC_CHECK_LIB(gpm,Gpm_Open,[
-		EXTRA_LIBS="-lgpm -lncurses $EXTRA_LIBS"
-		SHLIB_LIST="-lgpm $SHLIB_LIST"
+		AC_CHECK_HEADER(gpm.h,[
+			AC_DEFINE(HAVE_GPM_H)
+			with_gpm=yes
+		],[
+			if test "$with_gpm" = yes ; then
+				AC_ERROR(Cannot find GPM header)
+			fi
+		])
+	],[
+		if test "$with_gpm" = yes ; then
+			AC_ERROR(Cannot link with GPM library)
+		fi
+		with_gpm=no
+	])
+	if test "$with_gpm" = yes ; then
+		CF_FUNC_DLSYM
+		SHLIB_LIST="-ldl $SHLIB_LIST"
 		AC_DEFINE(HAVE_LIBGPM)
-		AC_CHECK_HEADERS(gpm.h)
-	],AC_MSG_WARN(Cannot link with gpm library - read the FAQ))
+		AC_CHECK_LIB(gpm,Gpm_Wgetch,[
+			AC_MSG_WARN(GPM library is already linked with curses - read the FAQ)
+		])
+	fi
 fi
 
 CF_WITH_SYSMOUSE
@@ -415,6 +403,19 @@
 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
 AC_SUBST(FALLBACK_LIST)
 
+AC_MSG_CHECKING(if you want modern xterm or antique)
+AC_ARG_WITH(xterm-new,
+	[  --without-xterm-new     specify if xterm terminfo should be old version],
+	[with_xterm_new=$withval],
+	[with_xterm_new=yes])
+case $with_xterm_new in
+no)	with_xterm_new=xterm-old;;
+*)	with_xterm_new=xterm-new;;
+esac
+AC_MSG_RESULT($with_xterm_new)
+WHICH_XTERM=$with_xterm_new
+AC_SUBST(WHICH_XTERM)
+
 MAKE_TERMINFO=
 if test "$use_database" = no ; then
 	TERMINFO="${datadir}/terminfo"
@@ -517,8 +518,17 @@
 	[  --disable-home-terminfo drop ~/.terminfo from terminfo search-path],
 	[with_home_terminfo=$enableval],
 	[with_home_terminfo=yes])
+AC_MSG_RESULT($with_home_terminfo)
 test "$with_home_terminfo" = "yes" && AC_DEFINE(USE_HOME_TERMINFO)
 
+AC_MSG_CHECKING(if you want to use restrict environment when running as root)
+AC_ARG_ENABLE(root-environ,
+	[  --disable-root-environ  limit environment when running as root],
+	[with_root_environ=$enableval],
+	[with_root_environ=yes])
+AC_MSG_RESULT($with_root_environ)
+test "$with_root_environ" = yes && AC_DEFINE(USE_ROOT_ENVIRON)
+
 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
 ###   to reduce storage requirements for the terminfo database.
 CF_LINK_FUNCS
@@ -577,6 +587,90 @@
 fi
 AC_SUBST(BROKEN_LINKER)
 
+###   use option --enable-widec to turn on use of wide-character support
+NCURSES_CH_T=chtype
+NCURSES_LIBUTF8=0
+
+NEED_WCHAR_H=0
+NCURSES_MBSTATE_T=0
+NCURSES_WCHAR_T=0
+NCURSES_WINT_T=0
+
+# Check to define _XOPEN_SOURCE "automatically"
+CF_XOPEN_SOURCE
+
+# Checks for CODESET support.
+AM_LANGINFO_CODESET
+
+# use these variables to work around a defect in gcc's fixincludes.
+NCURSES_OK_WCHAR_T=
+NCURSES_OK_WINT_T=
+
+AC_MSG_CHECKING(if you want wide-character code)
+AC_ARG_ENABLE(widec,
+	[  --enable-widec          compile with wide-char/UTF-8 code],
+	[with_widec=$enableval],
+	[with_widec=no])
+AC_MSG_RESULT($with_widec)
+if test "$with_widec" = yes ; then
+	LIB_SUFFIX="w${LIB_SUFFIX}"
+	AC_DEFINE(USE_WIDEC_SUPPORT)
+	CF_PREDEFINE(_XOPEN_SOURCE_EXTENDED)
+	# with_overwrite=no
+	NCURSES_CH_T=cchar_t
+	AC_CHECK_FUNCS(putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc)
+	if test "$ac_cv_func_putwc" != yes ; then
+		CF_LIBUTF8
+		if test "$cf_cv_libutf8" = yes ; then
+			NCURSES_LIBUTF8=1
+		fi
+	fi
+	CF_WCHAR_TYPE(mbstate_t, NCURSES_MBSTATE_T)
+	CF_WCHAR_TYPE(wchar_t,   NCURSES_WCHAR_T,   NCURSES_OK_WCHAR_T)
+	CF_WCHAR_TYPE(wint_t,    NCURSES_WINT_T,    NCURSES_OK_WINT_T)
+
+	if test "$NCURSES_MBSTATE_T" != 0; then
+		AC_DEFINE(NEED_MBSTATE_T_DEF)
+	fi
+fi
+AC_SUBST(NCURSES_CH_T)
+AC_SUBST(NCURSES_LIBUTF8)
+
+AC_SUBST(NEED_WCHAR_H)
+AC_SUBST(NCURSES_MBSTATE_T)
+AC_SUBST(NCURSES_WCHAR_T)
+AC_SUBST(NCURSES_WINT_T)
+
+AC_SUBST(NCURSES_OK_WCHAR_T)
+AC_SUBST(NCURSES_OK_WINT_T)
+
+###   use option --disable-lp64 to allow long chtype
+AC_MSG_CHECKING(if defining _LP64 overrides chtype definition)
+AC_ARG_ENABLE(lp64,
+	[  --disable-lp64          allow chtype to be long (ignore _LP64)],
+	[with_lp64=$enableval],
+	[with_lp64=yes])
+AC_MSG_RESULT($with_lp64)
+if test "$with_lp64" = yes ; then
+	cf_cv_enable_lp64=1
+else
+	cf_cv_enable_lp64=0
+fi
+AC_SUBST(cf_cv_enable_lp64)
+
+ifdef([AC_FUNC_FSEEKO],[
+AC_MSG_CHECKING(if largefile support is wanted)
+AC_ARG_ENABLE(largefile,
+	[  --enable-largefile      compile-in large file support],
+	[with_largefile=$enableval],
+	[with_largefile=yes])
+AC_MSG_RESULT($with_largefile)
+if test "$with_largefile" = yes ; then
+	AC_FUNC_FSEEKO
+	AC_SYS_LARGEFILE
+fi
+])
+
 ###   use option --with-bool to override bool's type
 AC_MSG_CHECKING(for type of bool)
 AC_ARG_WITH(bool,
@@ -586,6 +680,15 @@
 AC_MSG_RESULT($NCURSES_BOOL)
 AC_SUBST(NCURSES_BOOL)
 
+AC_MSG_CHECKING(for alternate terminal capabilities file)
+AC_ARG_WITH(caps,
+	[  --with-caps=alt         compile with alternate Caps file],
+	[TERMINFO_CAPS=Caps.$withval],
+	[TERMINFO_CAPS=Caps])
+test -f ${srcdir}/include/${TERMINFO_CAPS} || TERMINFO_CAPS=Caps
+AC_MSG_RESULT($TERMINFO_CAPS)
+AC_SUBST(TERMINFO_CAPS)
+
 ###   use option --with-ospeed to override ospeed's type
 AC_MSG_CHECKING(for type of ospeed)
 AC_ARG_WITH(ospeed,
@@ -700,14 +803,6 @@
 AC_MSG_RESULT($with_hardtabs)
 test "$with_hardtabs" = yes && AC_DEFINE(USE_HARD_TABS)
 
-AC_MSG_CHECKING(if you want to use restrict environment when running as root)
-AC_ARG_ENABLE(root-environ,
-	[  --disable-root-environ  limit environment when running as root],
-	[with_root_environ=$enableval],
-	[with_root_environ=yes])
-AC_MSG_RESULT($with_root_environ)
-test "$with_root_environ" = yes && AC_DEFINE(USE_ROOT_ENVIRON)
-
 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
 AC_MSG_CHECKING(if you want limited support for xmc)
 AC_ARG_ENABLE(xmc-glitch,
@@ -747,6 +842,45 @@
 AC_MSG_RESULT($with_colorfgbg)
 test "$with_colorfgbg" = yes && AC_DEFINE(USE_COLORFGBG)
 
+###   use option --enable-ext-colors to turn on use of colors beyond 16.
+AC_MSG_CHECKING(if you want to use experimental extended colors)
+AC_ARG_ENABLE(ext-colors,
+	[  --enable-ext-colors     compile for experimental 256-color support],
+	[with_ext_colors=$enableval],
+	[with_ext_colors=no])
+AC_MSG_RESULT($with_ext_colors)
+NCURSES_EXT_COLORS=0
+if test "$with_ext_colors" = yes ; then
+	if test "$with_widec" != yes ; then
+		AC_MSG_WARN(This option applies only to wide-character library)
+	else
+		# cannot be ABI 5 since it changes sizeof(cchar_t)
+		case $cf_cv_rel_version in
+		5.*)
+			cf_cv_rel_version=6.0
+			cf_cv_abi_version=6
+			AC_MSG_WARN(Overriding ABI version to $cf_cv_abi_version)
+			;;
+		esac
+	fi
+	NCURSES_EXT_COLORS=1
+	AC_DEFINE(NCURSES_EXT_COLORS)
+fi
+AC_SUBST(NCURSES_EXT_COLORS)
+
+###   use option --enable-ext-mouse to modify coding to support 5-button mice
+AC_MSG_CHECKING(if you want to use experimental extended mouse encoding)
+AC_ARG_ENABLE(ext-mouse,
+	[  --enable-ext-mouse      compile for experimental mouse-encoding],
+	[with_ext_mouse=$enableval],
+	[with_ext_mouse=no])
+AC_MSG_RESULT($with_ext_mouse)
+NCURSES_MOUSE_VERSION=1
+if test "$with_ext_mouse" = yes ; then
+	NCURSES_MOUSE_VERSION=2
+fi
+AC_SUBST(NCURSES_MOUSE_VERSION)
+
 AC_MSG_CHECKING(if you want experimental safe-sprintf code)
 AC_ARG_ENABLE(safe-sprintf,
 	[  --enable-safe-sprintf   compile with experimental safe-sprintf code],
@@ -767,66 +901,6 @@
 test "$with_scroll_hints" = yes && AC_DEFINE(USE_SCROLL_HINTS)
 fi
 
-###   use option --enable-widec to turn on use of wide-character support
-NCURSES_CH_T=chtype
-NCURSES_LIBUTF8=0
-
-NEED_WCHAR_H=0
-NCURSES_MBSTATE_T=0
-NCURSES_WCHAR_T=0
-NCURSES_WINT_T=0
-
-# Check to define _XOPEN_SOURCE "automatically"
-CF_XOPEN_SOURCE
-
-# use these variables to work around a defect in gcc's fixincludes.
-NCURSES_OK_WCHAR_T=
-NCURSES_OK_WINT_T=
-
-AC_MSG_CHECKING(if you want experimental wide-character code)
-AC_ARG_ENABLE(widec,
-	[  --enable-widec          compile with experimental wide-char/UTF-8 code],
-	[with_widec=$enableval],
-	[with_widec=no])
-AC_MSG_RESULT($with_widec)
-if test "$with_widec" = yes ; then
-	LIB_SUFFIX="w${LIB_SUFFIX}"
-	AC_DEFINE(USE_WIDEC_SUPPORT)
-	CF_PREDEFINE(_XOPEN_SOURCE,500)
-	CF_PREDEFINE(_XOPEN_SOURCE_EXTENDED)
-	# with_overwrite=no
-	NCURSES_CH_T=cchar_t
-	AC_CHECK_FUNCS(putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc)
-	if test "$ac_cv_func_putwc" != yes ; then
-		CF_LIBUTF8
-		if test "$cf_cv_libutf8" = yes ; then
-			NCURSES_LIBUTF8=1
-		fi
-	fi
-	CF_WCHAR_TYPE(mbstate_t, NCURSES_MBSTATE_T)
-	CF_WCHAR_TYPE(wchar_t,   NCURSES_WCHAR_T,   NCURSES_OK_WCHAR_T)
-	CF_WCHAR_TYPE(wint_t,    NCURSES_WINT_T,    NCURSES_OK_WINT_T)
-fi
-AC_SUBST(NCURSES_CH_T)
-AC_SUBST(NCURSES_LIBUTF8)
-
-AC_SUBST(NEED_WCHAR_H)
-AC_SUBST(NCURSES_MBSTATE_T)
-AC_SUBST(NCURSES_WCHAR_T)
-AC_SUBST(NCURSES_WINT_T)
-
-AC_SUBST(NCURSES_OK_WCHAR_T)
-AC_SUBST(NCURSES_OK_WINT_T)
-
-AC_MSG_CHECKING(for terminal capabilities file)
-AC_ARG_WITH(caps,
-	[  --with-caps=alt         compile with experimental alternate Caps file],
-	[TERMINFO_CAPS=Caps.$withval],
-	[TERMINFO_CAPS=Caps])
-test -f ${srcdir}/include/${TERMINFO_CAPS} || TERMINFO_CAPS=Caps
-AC_MSG_RESULT($TERMINFO_CAPS)
-AC_SUBST(TERMINFO_CAPS)
-
 ###############################################################################
 CF_HELP_MESSAGE(Testing/development Options:)
 
@@ -855,6 +929,9 @@
 if test -n "$with_warnings"; then
  	ADAFLAGS="$ADAFLAGS -gnatg"
 	CF_GCC_WARNINGS
+	if test "$cf_with_cxx" = yes ; then
+		CF_GXX_WARNINGS(Wno-unused)
+	fi
 fi
 CF_GCC_ATTRIBUTES
 
@@ -983,7 +1060,6 @@
 geteuid \
 getttynam \
 issetugid \
-memccpy \
 nanosleep \
 poll \
 remove \
@@ -1042,6 +1118,7 @@
 if test -n "$CXX" ; then
 	AC_LANG_CPLUSPLUS
 	CF_STDCPP_LIBRARY
+	CF_PROG_CC_C_O(CXX)
 
 	case $GXX_VERSION in
 	1*|2.[0-6]*)
@@ -1055,6 +1132,14 @@
 		;;
 	esac
 
+	case "$GCC_VERSION" in
+	2.95.*)
+		;;
+	*)
+		CPPFLAGS="$CPPFLAGS -DCPP_HAS_STATIC_CAST"
+		;;
+	esac
+
 	AC_CHECK_HEADERS(typeinfo)
 
 	CF_BOOL_DECL
@@ -1168,6 +1253,28 @@
 if test	"$cf_cv_prog_gnat_correct" = yes; then
    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
 
+   AC_MSG_CHECKING(if GNAT pragma Unreferenced works)
+   CF_GNAT_TRY_LINK([procedure conftest;],
+[with Text_IO;
+with GNAT.OS_Lib;
+procedure conftest is
+   test : Integer;
+   pragma Unreferenced (test);
+begin
+   test := 1;
+   Text_IO.Put ("Hello World");
+   Text_IO.New_Line;
+   GNAT.OS_Lib.OS_Exit (0);
+end conftest;],[cf_cv_pragma_unreferenced=yes],[cf_cv_pragma_unreferenced=no])
+   AC_MSG_RESULT($cf_cv_pragma_unreferenced)
+
+   # if the pragma is supported, use it (needed in the Trace code).
+   if test $cf_cv_pragma_unreferenced = yes ; then
+      PRAGMA_UNREF=TRUE
+   else
+      PRAGMA_UNREF=FALSE
+   fi
+
    AC_ARG_WITH(ada-compiler,
 	[  --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)],
 	[cf_ada_compiler=$withval],
@@ -1181,6 +1288,7 @@
    AC_SUBST(ADAFLAGS)
    AC_SUBST(cf_compile_generics)
    AC_SUBST(cf_generic_objects)
+   AC_SUBST(PRAGMA_UNREF)
 
    CF_WITH_PATH(ada-include,
        [  --with-ada-include=DIR  Ada includes are in DIR],
@@ -1202,7 +1310,7 @@
 ### Construct the library-subsets, if any, from this set of keywords:
 ### none, base, ext_funcs, ext_tinfo, termlib, widechar (see CF_LIB_RULES).
 AC_MSG_CHECKING(for library subsets)
-if test "$with_termlib" = yes ; then
+if test "$with_termlib" != no ; then
 	LIB_SUBSETS="termlib"
 	test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
 	LIB_SUBSETS="${LIB_SUBSETS} "
@@ -1254,10 +1362,40 @@
 AC_SUBST(CXX_LIB_SUFFIX)
 fi
 
+### Set up low-level terminfo dependencies for makefiles.
 TINFO_LIST="$SHLIB_LIST"
-if test "$with_libtool" = no ; then
-	test "$with_termlib" = yes && SHLIB_LIST="$SHLIB_LIST -ltinfo${LIB_SUFFIX}"
+if test "$with_termlib" != no ; then
+
+	if test "$with_termlib" != yes ; then
+		TINFO_NAME=$with_termlib
+		TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
+		TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
+		TINFO_LIB_SUFFIX="${with_termlib}"
+	else
+		TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
+		TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
+		TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
+	fi
+
+	TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
+	if test "$DFT_LWR_MODEL" = "libtool"; then
+		TEST_ARGS="${TEST_DEPS}"
+	else
+		TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
+		TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
+		SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
+	fi
+else
+	TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
 fi
+AC_SUBST(TINFO_ARG_SUFFIX)
+AC_SUBST(TINFO_DEP_SUFFIX)
+AC_SUBST(TINFO_LIB_SUFFIX)
+AC_SUBST(TINFO_ARGS)
+
+# needed for Ada95
+TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
+AC_SUBST(TINFO_ARGS2)
 
 AC_MSG_CHECKING(where we will install curses.h)
 test "$with_overwrite" = no && \
@@ -1274,23 +1412,9 @@
 fi
 fi
 
-AC_SUBST(EXTRA_LIBS)
 AC_SUBST(TINFO_LIST)
 AC_SUBST(SHLIB_LIST)
 
-### Set up low-level terminfo dependencies for makefiles.  Note that we
-### could override this.
-if test "$with_termlib" = yes ; then
-	TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_NAME}${DFT_DEP_SUFFIX}"
-	if test "$DFT_LWR_MODEL" = "libtool"; then
-		TEST_ARGS="${TEST_DEPS}"
-	else
-		TEST_ARGS="-l${TINFO_NAME}${DFT_ARG_SUFFIX}"
-	fi
-fi
-PROG_DEPS="$TEST_DEPS"
-PROG_ARGS="$TEST_ARGS"
-
 ### predefined stuff for the test programs
 AC_DEFINE(HAVE_SLK_COLOR)
 
@@ -1323,6 +1447,7 @@
 
 AWK="$AWK"
 CF_LIST_MODELS="$cf_list_models"
+DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
 DFT_LWR_MODEL="$DFT_LWR_MODEL"
 LDCONFIG="$LDCONFIG"
 LIB_NAME="$LIB_NAME"
@@ -1333,12 +1458,17 @@
 NCURSES_OSPEED="$NCURSES_OSPEED"
 SRC_SUBDIRS="$SRC_SUBDIRS"
 TERMINFO="$TERMINFO"
+TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
+TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
 TINFO_NAME="$TINFO_NAME"
 WITH_CURSES_H="$with_curses_h"
 WITH_ECHO="$with_echo"
 WITH_OVERWRITE="$with_overwrite"
 cf_cv_abi_version="$cf_cv_abi_version"
 cf_cv_do_symlinks="$cf_cv_do_symlinks"
+cf_cv_enable_lp64="$cf_cv_enable_lp64"
+cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
+cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
 cf_cv_rel_version="$cf_cv_rel_version"
 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
 cf_cv_shlib_version="$cf_cv_shlib_version"
diff -Naur ncurses-5.4.orig/dist.mk ncurses-5.4/dist.mk
--- ncurses-5.4.orig/dist.mk	2004-02-08 20:56:43.000000000 +0000
+++ ncurses-5.4/dist.mk	2005-05-13 04:09:59.000000000 +0000
@@ -1,4 +1,4 @@
-# $Id: dist.mk,v 1.402 2004/02/08 20:56:43 tom Exp $
+# $Id: dist.mk,v 1.471 2005/05/07 23:27:02 tom Exp $
 # Makefile for creating ncurses distributions.
 #
 # This only needs to be used directly as a makefile by developers, but
@@ -10,7 +10,7 @@
 # These define the major/minor/patch versions of ncurses.
 NCURSES_MAJOR = 5
 NCURSES_MINOR = 4
-NCURSES_PATCH = 20040208
+NCURSES_PATCH = 20050507
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
@@ -51,7 +51,15 @@
 doc/hackguide.doc: doc/html/hackguide.html
 	$(DUMP2) doc/html/hackguide.html > $@
 
-MANPROG	= tbl | nroff -man
+# This is the original command:
+#	MANPROG	= tbl | nroff -man
+#
+# This happens to work for groff 1.18.1 on Debian.  At some point groff's
+# maintainer changed the line-length (we do not want/need that here).
+#
+# The distributed html files are formatted using
+#	configure --without-manpage-renames
+MANPROG	= tbl | nroff -mandoc -rLL=65n -rLT=71n -Tascii
 
 manhtml: MANIFEST
 	@rm -f doc/html/man/*.html
diff -Naur ncurses-5.4.orig/doc/html/man/captoinfo.1m.html ncurses-5.4/doc/html/man/captoinfo.1m.html
--- ncurses-5.4.orig/doc/html/man/captoinfo.1m.html	2003-10-25 17:39:44.000000000 +0000
+++ ncurses-5.4/doc/html/man/captoinfo.1m.html	2005-05-13 04:09:59.000000000 +0000
@@ -2,7 +2,7 @@
 <!-- 
   * t
   ****************************************************************************
-  * Copyright (c) 1998-2000,2003 Free Software Foundation, Inc.              *
+  * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc.              *
   *                                                                          *
   * Permission is hereby granted, free of charge, to any person obtaining a  *
   * copy of this software and associated documentation files (the            *
@@ -28,7 +28,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: captoinfo.1m,v 1.17 2003/05/11 00:32:53 tom Exp @
+  * @Id: captoinfo.1m,v 1.18 2004/07/05 13:16:08 tom Exp @
 -->
 <HTML>
 <HEAD>
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG>                                       <STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG>
+<STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG>                                             <STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG>
 
 
 
@@ -100,6 +100,7 @@
        has not mistakenly translated  a  completely  unknown  and
        random capability and/or syntax error.
 
+
        Nonstd   Std    From           Terminfo
         name    name                 capability
        -----------------------------------------------
@@ -115,8 +116,8 @@
        GE       ae     XENIX   exit_alt_charset_mode
        GS       as     XENIX   enter_alt_charset_mode
        HM       kh     XENIX   key_home
-       LD       kL     XENIX   key_dl
 
+       LD       kL     XENIX   key_dl
        PD       kN     XENIX   key_npage
        PN       po     XENIX   prtr_off
        PS       pf     XENIX   prtr_on
@@ -137,6 +138,7 @@
        bilities for forms drawing, designed to take advantage  of
        the IBM PC high-half graphics.  They were as follows:
 
+
        Cap          Graphic
        -----------------------------
        G2    upper left
@@ -172,6 +174,7 @@
        minfo but incompatible with the SVr4 format. The following
        AIX extensions are automatically translated:
 
+
         IBM    XSI
        -------------
        ksel    kslt
@@ -179,6 +182,7 @@
        font0   s0ds
        font1   s1ds
        font2   s2ds
+
        font3   s3ds
 
        Additionally, the AIX <STRONG>box1</STRONG> capability  will  be  automati-
@@ -211,7 +215,7 @@
 
 
 
-                                                    <STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG>
+                                                          <STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/clear.1.html ncurses-5.4/doc/html/man/clear.1.html
--- ncurses-5.4.orig/doc/html/man/clear.1.html	2003-10-25 17:39:44.000000000 +0000
+++ ncurses-5.4/doc/html/man/clear.1.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="clear.1.html">clear(1)</A></STRONG>                                                 <STRONG><A HREF="clear.1.html">clear(1)</A></STRONG>
+<STRONG><A HREF="clear.1.html">clear(1)</A></STRONG>                                                       <STRONG><A HREF="clear.1.html">clear(1)</A></STRONG>
 
 
 
@@ -68,7 +68,7 @@
 
 
 
-                                                         <STRONG><A HREF="clear.1.html">clear(1)</A></STRONG>
+                                                               <STRONG><A HREF="clear.1.html">clear(1)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_add_wch.3x.html ncurses-5.4/doc/html/man/curs_add_wch.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_add_wch.3x.html	2003-10-25 17:39:44.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_add_wch.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_add_wch.3x.html">curs_add_wch(3x)</A></STRONG>                                 <STRONG><A HREF="curs_add_wch.3x.html">curs_add_wch(3x)</A></STRONG>
+<STRONG><A HREF="curs_add_wch.3x.html">curs_add_wch(3x)</A></STRONG>                                       <STRONG><A HREF="curs_add_wch.3x.html">curs_add_wch(3x)</A></STRONG>
 
 
 
@@ -130,7 +130,7 @@
 
 
 
-                                                 <STRONG><A HREF="curs_add_wch.3x.html">curs_add_wch(3x)</A></STRONG>
+                                                       <STRONG><A HREF="curs_add_wch.3x.html">curs_add_wch(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_add_wchstr.3x.html ncurses-5.4/doc/html/man/curs_add_wchstr.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_add_wchstr.3x.html	2004-01-11 01:46:14.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_add_wchstr.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
 <!-- 
   ****************************************************************************
-  * Copyright (c) 2002,2003 Free Software Foundation, Inc.                   *
+  * Copyright (c) 2002-2004,2005 Free Software Foundation, Inc.              *
   *                                                                          *
   * Permission is hereby granted, free of charge, to any person obtaining a  *
   * copy of this software and associated documentation files (the            *
@@ -27,7 +27,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: curs_add_wchstr.3x,v 1.2 2003/12/27 18:53:41 tom Exp @
+  * @Id: curs_add_wchstr.3x,v 1.6 2005/01/02 01:28:49 tom Exp @
 -->
 <HTML>
 <HEAD>
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_add_wchstr.3x.html">curs_add_wchstr(3x)</A></STRONG>                           <STRONG><A HREF="curs_add_wchstr.3x.html">curs_add_wchstr(3x)</A></STRONG>
+<STRONG><A HREF="curs_add_wchstr.3x.html">curs_add_wchstr(3x)</A></STRONG>                                 <STRONG><A HREF="curs_add_wchstr.3x.html">curs_add_wchstr(3x)</A></STRONG>
 
 
 
@@ -83,7 +83,7 @@
        riage  return characters), they do not advance the current
        cursor position, they do not expand other control  charac-
        ters  to  ^-escapes,  and  they  truncate the string if it
-       crosses the right margin, rather then wrapping  it  around
+       crosses the right margin, rather than wrapping  it  around
        to the new line.
 
        These  routines  end  successfully  on encountering a null
@@ -112,11 +112,11 @@
 
 </PRE>
 <H2>SEE ALSO</H2><PRE>
-       <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_addchstr.3x.html">curs_addchstr(3x)</A></STRONG> <STRONG><A HREF="curs_addwstr.3x.html">curs_addwstr(3x)</A></STRONG>
+       <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_addchstr.3x.html">curs_addchstr(3x)</A></STRONG>, <STRONG><A HREF="curs_addwstr.3x.html">curs_addwstr(3x)</A></STRONG>
 
 
 
-                                              <STRONG><A HREF="curs_add_wchstr.3x.html">curs_add_wchstr(3x)</A></STRONG>
+                                                    <STRONG><A HREF="curs_add_wchstr.3x.html">curs_add_wchstr(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_addch.3x.html ncurses-5.4/doc/html/man/curs_addch.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_addch.3x.html	2004-01-11 01:46:15.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_addch.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -2,7 +2,7 @@
 <!-- 
   * t
   ****************************************************************************
-  * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc.              *
+  * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc.              *
   *                                                                          *
   * Permission is hereby granted, free of charge, to any person obtaining a  *
   * copy of this software and associated documentation files (the            *
@@ -28,7 +28,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: curs_addch.3x,v 1.22 2003/12/27 18:38:28 tom Exp @
+  * @Id: curs_addch.3x,v 1.23 2004/01/31 13:16:21 tom Exp @
 -->
 <HTML>
 <HEAD>
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_addch.3x.html">curs_addch(3x)</A></STRONG>                                     <STRONG><A HREF="curs_addch.3x.html">curs_addch(3x)</A></STRONG>
+<STRONG><A HREF="curs_addch.3x.html">curs_addch(3x)</A></STRONG>                                           <STRONG><A HREF="curs_addch.3x.html">curs_addch(3x)</A></STRONG>
 
 
 
@@ -115,6 +115,7 @@
        replacement for it (but see the EXTENSIONS section below).
        The names are taken from VT100 nomenclature.
 
+
        <EM>Name</EM>           <EM>Default</EM>   <EM>Description</EM>
        --------------------------------------------------
        ACS_BLOCK      #         solid square block
@@ -183,6 +184,10 @@
        The  <STRONG>TABSIZE</STRONG>  variable  is implemented in some versions of
        curses, but is not part of X/Open curses.
 
+       If <EM>ch</EM> is a carriage return, the cursor  is  moved  to  the
+       beginning  of the current row of the window.  This is true
+       of other implementations, but is not documented.
+
 
 </PRE>
 <H2>SEE ALSO</H2><PRE>
@@ -191,7 +196,7 @@
 
 
 
-                                                   <STRONG><A HREF="curs_addch.3x.html">curs_addch(3x)</A></STRONG>
+                                                         <STRONG><A HREF="curs_addch.3x.html">curs_addch(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_addchstr.3x.html ncurses-5.4/doc/html/man/curs_addchstr.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_addchstr.3x.html	2004-01-11 01:46:15.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_addchstr.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_addchstr.3x.html">curs_addchstr(3x)</A></STRONG>                               <STRONG><A HREF="curs_addchstr.3x.html">curs_addchstr(3x)</A></STRONG>
+<STRONG><A HREF="curs_addchstr.3x.html">curs_addchstr(3x)</A></STRONG>                                     <STRONG><A HREF="curs_addchstr.3x.html">curs_addchstr(3x)</A></STRONG>
 
 
 
@@ -112,7 +112,7 @@
 
 
 
-                                                <STRONG><A HREF="curs_addchstr.3x.html">curs_addchstr(3x)</A></STRONG>
+                                                      <STRONG><A HREF="curs_addchstr.3x.html">curs_addchstr(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_addstr.3x.html ncurses-5.4/doc/html/man/curs_addstr.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_addstr.3x.html	2004-01-11 01:46:15.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_addstr.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_addstr.3x.html">curs_addstr(3x)</A></STRONG>                                   <STRONG><A HREF="curs_addstr.3x.html">curs_addstr(3x)</A></STRONG>
+<STRONG><A HREF="curs_addstr.3x.html">curs_addstr(3x)</A></STRONG>                                         <STRONG><A HREF="curs_addstr.3x.html">curs_addstr(3x)</A></STRONG>
 
 
 
@@ -105,7 +105,7 @@
 
 
 
-                                                  <STRONG><A HREF="curs_addstr.3x.html">curs_addstr(3x)</A></STRONG>
+                                                        <STRONG><A HREF="curs_addstr.3x.html">curs_addstr(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_addwstr.3x.html ncurses-5.4/doc/html/man/curs_addwstr.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_addwstr.3x.html	2004-01-11 01:46:15.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_addwstr.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
 <!-- 
   ****************************************************************************
-  * Copyright (c) 2002,2003 Free Software Foundation, Inc.                   *
+  * Copyright (c) 2002-2003,2004 Free Software Foundation, Inc.              *
   *                                                                          *
   * Permission is hereby granted, free of charge, to any person obtaining a  *
   * copy of this software and associated documentation files (the            *
@@ -27,7 +27,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: curs_addwstr.3x,v 1.3 2003/12/27 18:51:01 tom Exp @
+  * @Id: curs_addwstr.3x,v 1.4 2004/09/11 20:57:04 tom Exp @
 -->
 <HTML>
 <HEAD>
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_addwstr.3x.html">curs_addwstr(3x)</A></STRONG>                                 <STRONG><A HREF="curs_addwstr.3x.html">curs_addwstr(3x)</A></STRONG>
+<STRONG><A HREF="curs_addwstr.3x.html">curs_addwstr(3x)</A></STRONG>                                       <STRONG><A HREF="curs_addwstr.3x.html">curs_addwstr(3x)</A></STRONG>
 
 
 
@@ -69,7 +69,7 @@
 </PRE>
 <H2>DESCRIPTION</H2><PRE>
        These  routines  write  the characters of the (null-termi-
-       nated) <STRONG>wchar_t</STRONG>character string <EM>wstr</EM> on the  given  window.
+       nated) <STRONG>wchar_t</STRONG> character string <EM>wstr</EM> on the given  window.
        It  is  similar to constructing a <STRONG>cchar_t</STRONG> for each wchar_t
        in the string, then calling  <STRONG>wadd_wch</STRONG>  for  the  resulting
        <STRONG>cchar_t</STRONG>.
@@ -109,7 +109,7 @@
 
 
 
-                                                 <STRONG><A HREF="curs_addwstr.3x.html">curs_addwstr(3x)</A></STRONG>
+                                                       <STRONG><A HREF="curs_addwstr.3x.html">curs_addwstr(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_attr.3x.html ncurses-5.4/doc/html/man/curs_attr.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_attr.3x.html	2004-01-11 01:46:15.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_attr.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_attr.3x.html">curs_attr(3x)</A></STRONG>                                       <STRONG><A HREF="curs_attr.3x.html">curs_attr(3x)</A></STRONG>
+<STRONG><A HREF="curs_attr.3x.html">curs_attr(3x)</A></STRONG>                                             <STRONG><A HREF="curs_attr.3x.html">curs_attr(3x)</A></STRONG>
 
 
 
@@ -152,6 +152,7 @@
        be passed to the routines <STRONG>attron</STRONG>, <STRONG>attroff</STRONG>, and <STRONG>attrset</STRONG>, or
        OR'ed with the characters passed to <STRONG>addch</STRONG>.
 
+
         <STRONG>A_NORMAL</STRONG>        Normal display (no highlight)
         <STRONG>A_STANDOUT</STRONG>      Best highlighting mode of the terminal.
         <STRONG>A_UNDERLINE</STRONG>     Underlining
@@ -203,6 +204,7 @@
        <STRONG>wattr_set</STRONG>.  These are intended to work with a  new  series
        of highlight macros prefixed with <STRONG>WA_</STRONG>.
 
+
         <STRONG>WA_NORMAL</STRONG>       Normal display (no highlight)
         <STRONG>WA_STANDOUT</STRONG>     Best highlighting mode of the terminal.
         <STRONG>WA_UNDERLINE</STRONG>    Underlining
@@ -229,7 +231,7 @@
 
 
 
-                                                    <STRONG><A HREF="curs_attr.3x.html">curs_attr(3x)</A></STRONG>
+                                                          <STRONG><A HREF="curs_attr.3x.html">curs_attr(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_beep.3x.html ncurses-5.4/doc/html/man/curs_beep.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_beep.3x.html	2004-01-11 01:46:15.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_beep.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
 <!-- 
   ****************************************************************************
-  * Copyright (c) 1998,2003 Free Software Foundation, Inc.                   *
+  * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc.              *
   *                                                                          *
   * Permission is hereby granted, free of charge, to any person obtaining a  *
   * copy of this software and associated documentation files (the            *
@@ -27,7 +27,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: curs_beep.3x,v 1.9 2003/12/27 18:44:30 tom Exp @
+  * @Id: curs_beep.3x,v 1.10 2005/01/08 17:55:51 tom Exp @
 -->
 <HTML>
 <HEAD>
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_beep.3x.html">curs_beep(3x)</A></STRONG>                                       <STRONG><A HREF="curs_beep.3x.html">curs_beep(3x)</A></STRONG>
+<STRONG><A HREF="curs_beep.3x.html">curs_beep(3x)</A></STRONG>                                             <STRONG><A HREF="curs_beep.3x.html">curs_beep(3x)</A></STRONG>
 
 
 
@@ -84,7 +84,7 @@
 
 </PRE>
 <H2>PORTABILITY</H2><PRE>
-       These functions are defined in the  XSI  Curses  standard,
+       These functions are described in the XSI Curses  standard,
        Issue  4.  Like SVr4, it specifies that they always return
        <STRONG>OK</STRONG>.
 
@@ -95,7 +95,7 @@
 
 
 
-                                                    <STRONG><A HREF="curs_beep.3x.html">curs_beep(3x)</A></STRONG>
+                                                          <STRONG><A HREF="curs_beep.3x.html">curs_beep(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_bkgd.3x.html ncurses-5.4/doc/html/man/curs_bkgd.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_bkgd.3x.html	2004-01-11 01:46:15.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_bkgd.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_bkgd.3x.html">curs_bkgd(3x)</A></STRONG>                                       <STRONG><A HREF="curs_bkgd.3x.html">curs_bkgd(3x)</A></STRONG>
+<STRONG><A HREF="curs_bkgd.3x.html">curs_bkgd(3x)</A></STRONG>                                             <STRONG><A HREF="curs_bkgd.3x.html">curs_bkgd(3x)</A></STRONG>
 
 
 
@@ -120,7 +120,7 @@
 
 
 
-                                                    <STRONG><A HREF="curs_bkgd.3x.html">curs_bkgd(3x)</A></STRONG>
+                                                          <STRONG><A HREF="curs_bkgd.3x.html">curs_bkgd(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_bkgrnd.3x.html ncurses-5.4/doc/html/man/curs_bkgrnd.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_bkgrnd.3x.html	2003-10-25 17:39:45.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_bkgrnd.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
 <!-- 
   ****************************************************************************
-  * Copyright (c) 2002 Free Software Foundation, Inc.                        *
+  * Copyright (c) 2002,2004 Free Software Foundation, Inc.                   *
   *                                                                          *
   * Permission is hereby granted, free of charge, to any person obtaining a  *
   * copy of this software and associated documentation files (the            *
@@ -27,7 +27,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: curs_bkgrnd.3x,v 1.1 2002/02/23 23:23:42 tom Exp @
+  * @Id: curs_bkgrnd.3x,v 1.2 2004/03/13 19:39:10 tom Exp @
 -->
 <HTML>
 <HEAD>
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_bkgrnd.3x.html">curs_bkgrnd(3x)</A></STRONG>                                   <STRONG><A HREF="curs_bkgrnd.3x.html">curs_bkgrnd(3x)</A></STRONG>
+<STRONG><A HREF="curs_bkgrnd.3x.html">curs_bkgrnd(3x)</A></STRONG>                                         <STRONG><A HREF="curs_bkgrnd.3x.html">curs_bkgrnd(3x)</A></STRONG>
 
 
 
@@ -118,7 +118,7 @@
 
 
 
-                                                  <STRONG><A HREF="curs_bkgrnd.3x.html">curs_bkgrnd(3x)</A></STRONG>
+                                                        <STRONG><A HREF="curs_bkgrnd.3x.html">curs_bkgrnd(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_border.3x.html ncurses-5.4/doc/html/man/curs_border.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_border.3x.html	2003-10-25 17:39:45.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_border.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_border.3x.html">curs_border(3x)</A></STRONG>                                   <STRONG><A HREF="curs_border.3x.html">curs_border(3x)</A></STRONG>
+<STRONG><A HREF="curs_border.3x.html">curs_border(3x)</A></STRONG>                                         <STRONG><A HREF="curs_border.3x.html">curs_border(3x)</A></STRONG>
 
 
 
@@ -141,7 +141,7 @@
 
 
 
-                                                  <STRONG><A HREF="curs_border.3x.html">curs_border(3x)</A></STRONG>
+                                                        <STRONG><A HREF="curs_border.3x.html">curs_border(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_border_set.3x.html ncurses-5.4/doc/html/man/curs_border_set.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_border_set.3x.html	2003-10-25 17:39:45.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_border_set.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
 <!-- 
   ****************************************************************************
-  * Copyright (c) 2002 Free Software Foundation, Inc.                        *
+  * Copyright (c) 2002,2004 Free Software Foundation, Inc.                   *
   *                                                                          *
   * Permission is hereby granted, free of charge, to any person obtaining a  *
   * copy of this software and associated documentation files (the            *
@@ -27,7 +27,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: curs_border_set.3x,v 1.3 2002/04/20 16:49:13 tom Exp @
+  * @Id: curs_border_set.3x,v 1.4 2004/03/13 19:39:10 tom Exp @
 -->
 <HTML>
 <HEAD>
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_border_set.3x.html">curs_border_set(3x)</A></STRONG>                           <STRONG><A HREF="curs_border_set.3x.html">curs_border_set(3x)</A></STRONG>
+<STRONG><A HREF="curs_border_set.3x.html">curs_border_set(3x)</A></STRONG>                                 <STRONG><A HREF="curs_border_set.3x.html">curs_border_set(3x)</A></STRONG>
 
 
 
@@ -165,7 +165,7 @@
 
 
 
-                                              <STRONG><A HREF="curs_border_set.3x.html">curs_border_set(3x)</A></STRONG>
+                                                    <STRONG><A HREF="curs_border_set.3x.html">curs_border_set(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_clear.3x.html ncurses-5.4/doc/html/man/curs_clear.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_clear.3x.html	2003-10-25 17:39:45.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_clear.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_clear.3x.html">curs_clear(3x)</A></STRONG>                                     <STRONG><A HREF="curs_clear.3x.html">curs_clear(3x)</A></STRONG>
+<STRONG><A HREF="curs_clear.3x.html">curs_clear(3x)</A></STRONG>                                           <STRONG><A HREF="curs_clear.3x.html">curs_clear(3x)</A></STRONG>
 
 
 
@@ -119,7 +119,7 @@
 
 
 
-                                                   <STRONG><A HREF="curs_clear.3x.html">curs_clear(3x)</A></STRONG>
+                                                         <STRONG><A HREF="curs_clear.3x.html">curs_clear(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_color.3x.html ncurses-5.4/doc/html/man/curs_color.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_color.3x.html	2003-10-25 17:39:46.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_color.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
 <!-- 
   ****************************************************************************
-  * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc.              *
+  * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc.              *
   *                                                                          *
   * Permission is hereby granted, free of charge, to any person obtaining a  *
   * copy of this software and associated documentation files (the            *
@@ -27,7 +27,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: curs_color.3x,v 1.19 2002/02/16 22:38:32 tom Exp @
+  * @Id: curs_color.3x,v 1.25 2005/04/03 14:06:00 tom Exp @
 -->
 <HTML>
 <HEAD>
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_color.3x.html">curs_color(3x)</A></STRONG>                                     <STRONG><A HREF="curs_color.3x.html">curs_color(3x)</A></STRONG>
+<STRONG><A HREF="curs_color.3x.html">curs_color(3x)</A></STRONG>                                           <STRONG><A HREF="curs_color.3x.html">curs_color(3x)</A></STRONG>
 
 
 
@@ -112,8 +112,10 @@
             <STRONG>COLOR_PAIRS-1</STRONG>.
 
        -    The value of the second and third arguments  must  be
-            between  0  and  <STRONG>COLORS</STRONG> (the 0 color pair is wired to
-            white on black and cannot be changed).
+            between  0 and <STRONG>COLORS</STRONG>.  Color pair 0 is assumed to be
+            white on black, but is actually whatever the terminal
+            implements before color is initialized.  It cannot be
+            modified by the application.
 
        If the color-pair was previously initialized,  the  screen
        is  refreshed  and  all occurrences of that color-pair are
@@ -190,6 +192,20 @@
        an <STRONG>OK</STRONG> (SVr4 specifies only "an integer  value  other  than
        <STRONG>ERR</STRONG>") upon successful completion.
 
+       X/Open  defines  no error conditions.  This implementation
+       will return <STRONG>ERR</STRONG> on attempts to use  color  values  outside
+       the  range  0  to  COLORS-1 (except for the default colors
+       extension), or use color pairs  outside  the  range  0  to
+       COLOR_PAIR-1.   Color values used in <STRONG>init_color</STRONG> must be in
+       the range 0 to 1000.
+
+       If the color table cannot be allocated, or if the terminal
+       has not been initialized, <STRONG>start_color</STRONG> returns ERR.  If the
+       screen has not been initialized, that is also an error.
+
+       An error is returned, e.g., from <STRONG>init_pair</STRONG>, if <STRONG>start_color</STRONG>
+       was not first called.
+
 
 </PRE>
 <H2>NOTES</H2><PRE>
@@ -235,8 +251,11 @@
 
        The assumption that <STRONG>COLOR_BLACK</STRONG> is the default  background
        color   for  all  terminals  can  be  modified  using  the
-       <STRONG>assume_default_colors</STRONG> extension,
+       <STRONG>assume_default_colors</STRONG> extension.
 
+       This implementation checks the  pointers,  e.g.,  for  the
+       values  returned  by  <STRONG>color_content</STRONG>  and <STRONG>pair_content</STRONG>, and
+       will treat those as optional parameters when null.
 
 
 </PRE>
@@ -246,7 +265,7 @@
 
 
 
-                                                   <STRONG><A HREF="curs_color.3x.html">curs_color(3x)</A></STRONG>
+                                                         <STRONG><A HREF="curs_color.3x.html">curs_color(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_delch.3x.html ncurses-5.4/doc/html/man/curs_delch.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_delch.3x.html	2003-10-25 17:39:46.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_delch.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_delch.3x.html">curs_delch(3x)</A></STRONG>                                     <STRONG><A HREF="curs_delch.3x.html">curs_delch(3x)</A></STRONG>
+<STRONG><A HREF="curs_delch.3x.html">curs_delch(3x)</A></STRONG>                                           <STRONG><A HREF="curs_delch.3x.html">curs_delch(3x)</A></STRONG>
 
 
 
@@ -97,7 +97,7 @@
 
 
 
-                                                   <STRONG><A HREF="curs_delch.3x.html">curs_delch(3x)</A></STRONG>
+                                                         <STRONG><A HREF="curs_delch.3x.html">curs_delch(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_deleteln.3x.html ncurses-5.4/doc/html/man/curs_deleteln.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_deleteln.3x.html	2003-10-25 17:39:46.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_deleteln.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_deleteln.3x.html">curs_deleteln(3x)</A></STRONG>                               <STRONG><A HREF="curs_deleteln.3x.html">curs_deleteln(3x)</A></STRONG>
+<STRONG><A HREF="curs_deleteln.3x.html">curs_deleteln(3x)</A></STRONG>                                     <STRONG><A HREF="curs_deleteln.3x.html">curs_deleteln(3x)</A></STRONG>
 
 
 
@@ -111,7 +111,7 @@
 
 
 
-                                                <STRONG><A HREF="curs_deleteln.3x.html">curs_deleteln(3x)</A></STRONG>
+                                                      <STRONG><A HREF="curs_deleteln.3x.html">curs_deleteln(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_extend.3x.html ncurses-5.4/doc/html/man/curs_extend.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_extend.3x.html	2004-01-11 01:46:16.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_extend.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
 <!-- 
   ****************************************************************************
-  * Copyright (c) 1999-2002,2003 Free Software Foundation, Inc.              *
+  * Copyright (c) 1999-2003,2004 Free Software Foundation, Inc.              *
   *                                                                          *
   * Permission is hereby granted, free of charge, to any person obtaining a  *
   * copy of this software and associated documentation files (the            *
@@ -28,7 +28,7 @@
   * authorization.                                                           *
   ****************************************************************************
   * Author: Thomas E. Dickey 1999
-  * @Id: curs_extend.3x,v 1.12 2003/10/25 20:33:16 tom Exp @
+  * @Id: curs_extend.3x,v 1.13 2004/07/05 13:16:08 tom Exp @
 -->
 <HTML>
 <HEAD>
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_extend.3x.html">curs_extend(3x)</A></STRONG>                                   <STRONG><A HREF="curs_extend.3x.html">curs_extend(3x)</A></STRONG>
+<STRONG><A HREF="curs_extend.3x.html">curs_extend(3x)</A></STRONG>                                         <STRONG><A HREF="curs_extend.3x.html">curs_extend(3x)</A></STRONG>
 
 
 
@@ -101,7 +101,7 @@
 
 
 
-                                                  <STRONG><A HREF="curs_extend.3x.html">curs_extend(3x)</A></STRONG>
+                                                        <STRONG><A HREF="curs_extend.3x.html">curs_extend(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_get_wch.3x.html ncurses-5.4/doc/html/man/curs_get_wch.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_get_wch.3x.html	2003-10-25 17:39:46.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_get_wch.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_get_wch.3x.html">curs_get_wch(3x)</A></STRONG>                                 <STRONG><A HREF="curs_get_wch.3x.html">curs_get_wch(3x)</A></STRONG>
+<STRONG><A HREF="curs_get_wch.3x.html">curs_get_wch(3x)</A></STRONG>                                       <STRONG><A HREF="curs_get_wch.3x.html">curs_get_wch(3x)</A></STRONG>
 
 
 
@@ -140,7 +140,7 @@
 
 
 
-                                                 <STRONG><A HREF="curs_get_wch.3x.html">curs_get_wch(3x)</A></STRONG>
+                                                       <STRONG><A HREF="curs_get_wch.3x.html">curs_get_wch(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_get_wstr.3x.html ncurses-5.4/doc/html/man/curs_get_wstr.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_get_wstr.3x.html	2003-10-25 17:39:46.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_get_wstr.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_get_wstr.3x.html">curs_get_wstr(3x)</A></STRONG>                               <STRONG><A HREF="curs_get_wstr.3x.html">curs_get_wstr(3x)</A></STRONG>
+<STRONG><A HREF="curs_get_wstr.3x.html">curs_get_wstr(3x)</A></STRONG>                                     <STRONG><A HREF="curs_get_wstr.3x.html">curs_get_wstr(3x)</A></STRONG>
 
 
 
@@ -144,7 +144,7 @@
 
 
 
-                                                <STRONG><A HREF="curs_get_wstr.3x.html">curs_get_wstr(3x)</A></STRONG>
+                                                      <STRONG><A HREF="curs_get_wstr.3x.html">curs_get_wstr(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_getcchar.3x.html ncurses-5.4/doc/html/man/curs_getcchar.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_getcchar.3x.html	2003-10-25 17:39:46.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_getcchar.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_getcchar.3x.html">curs_getcchar(3x)</A></STRONG>                               <STRONG><A HREF="curs_getcchar.3x.html">curs_getcchar(3x)</A></STRONG>
+<STRONG><A HREF="curs_getcchar.3x.html">curs_getcchar(3x)</A></STRONG>                                     <STRONG><A HREF="curs_getcchar.3x.html">curs_getcchar(3x)</A></STRONG>
 
 
 
@@ -142,7 +142,7 @@
 
 
 
-                                                <STRONG><A HREF="curs_getcchar.3x.html">curs_getcchar(3x)</A></STRONG>
+                                                      <STRONG><A HREF="curs_getcchar.3x.html">curs_getcchar(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_getch.3x.html ncurses-5.4/doc/html/man/curs_getch.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_getch.3x.html	2004-01-11 01:46:17.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_getch.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -2,7 +2,7 @@
 <!-- 
   * t
   ****************************************************************************
-  * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc.              *
+  * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc.              *
   *                                                                          *
   * Permission is hereby granted, free of charge, to any person obtaining a  *
   * copy of this software and associated documentation files (the            *
@@ -28,7 +28,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: curs_getch.3x,v 1.24 2003/12/27 18:46:06 tom Exp @
+  * @Id: curs_getch.3x,v 1.26 2005/01/02 01:27:47 tom Exp @
 -->
 <HTML>
 <HEAD>
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_getch.3x.html">curs_getch(3x)</A></STRONG>                                     <STRONG><A HREF="curs_getch.3x.html">curs_getch(3x)</A></STRONG>
+<STRONG><A HREF="curs_getch.3x.html">curs_getch(3x)</A></STRONG>                                           <STRONG><A HREF="curs_getch.3x.html">curs_getch(3x)</A></STRONG>
 
 
 
@@ -118,6 +118,7 @@
        that  not  all  of  these are necessarily supported on any
        particular terminal.
 
+
             <EM>Name</EM>            <EM>Key</EM> <EM>name</EM>
 
                    KEY_BREAK       Break key
@@ -178,10 +179,10 @@
             KEY_REFERENCE   Ref(erence) key
             KEY_REFRESH     Refresh key
             KEY_REPLACE     Replace key
-
             KEY_RESIZE      Screen resized
             KEY_RESTART     Restart key
             KEY_RESUME      Resume key
+
             KEY_SAVE        Save key
             KEY_SBEG        Shifted beginning key
             KEY_SCANCEL     Shifted cancel key
@@ -217,6 +218,7 @@
 
        Keypad is arranged like this:
 
+
                          +-----+------+-------+
                          | <STRONG>A1</STRONG>  |  <STRONG>up</STRONG>  |  <STRONG>A3</STRONG>   |
                          +-----+------+-------+
@@ -309,11 +311,11 @@
 </PRE>
 <H2>SEE ALSO</H2><PRE>
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>,        <STRONG><A HREF="curs_inopts.3x.html">curs_inopts(3x)</A></STRONG>,        <STRONG><A HREF="curs_mouse.3x.html">curs_mouse(3x)</A></STRONG>,
-       <STRONG><A HREF="curs_move.3x.html">curs_move(3x)</A></STRONG>, <STRONG><A HREF="curs_refresh.3x.html">curs_refresh(3x)</A></STRONG>.  <STRONG><A HREF="resizeterm.3x.html">resizeterm(3x)</A></STRONG>.
+       <STRONG><A HREF="curs_move.3x.html">curs_move(3x)</A></STRONG>, <STRONG><A HREF="curs_refresh.3x.html">curs_refresh(3x)</A></STRONG>, <STRONG><A HREF="resizeterm.3x.html">resizeterm(3x)</A></STRONG>.
 
 
 
-                                                   <STRONG><A HREF="curs_getch.3x.html">curs_getch(3x)</A></STRONG>
+                                                         <STRONG><A HREF="curs_getch.3x.html">curs_getch(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_getstr.3x.html ncurses-5.4/doc/html/man/curs_getstr.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_getstr.3x.html	2003-10-25 17:39:47.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_getstr.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_getstr.3x.html">curs_getstr(3x)</A></STRONG>                                   <STRONG><A HREF="curs_getstr.3x.html">curs_getstr(3x)</A></STRONG>
+<STRONG><A HREF="curs_getstr.3x.html">curs_getstr(3x)</A></STRONG>                                         <STRONG><A HREF="curs_getstr.3x.html">curs_getstr(3x)</A></STRONG>
 
 
 
@@ -120,8 +120,8 @@
        useful  (being,  in  fact, the low-order eight bits of the
        key's KEY_ value).
 
-       The functions <STRONG>getnstr</STRONG>, <STRONG>mvgetnstr</STRONG>, and <STRONG>mvwgetnstr</STRONG> were pre-
-       sent but not documented in SVr4.
+       The functions  <STRONG>getnstr</STRONG>,  <STRONG>mvgetnstr</STRONG>,  and  <STRONG>mvwgetnstr</STRONG>  were
+       present but not documented in SVr4.
 
 
 </PRE>
@@ -130,7 +130,7 @@
 
 
 
-                                                  <STRONG><A HREF="curs_getstr.3x.html">curs_getstr(3x)</A></STRONG>
+                                                        <STRONG><A HREF="curs_getstr.3x.html">curs_getstr(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_getyx.3x.html ncurses-5.4/doc/html/man/curs_getyx.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_getyx.3x.html	2003-10-25 17:39:47.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_getyx.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_getyx.3x.html">curs_getyx(3x)</A></STRONG>                                     <STRONG><A HREF="curs_getyx.3x.html">curs_getyx(3x)</A></STRONG>
+<STRONG><A HREF="curs_getyx.3x.html">curs_getyx(3x)</A></STRONG>                                           <STRONG><A HREF="curs_getyx.3x.html">curs_getyx(3x)</A></STRONG>
 
 
 
@@ -105,7 +105,7 @@
 
 
 
-                                                   <STRONG><A HREF="curs_getyx.3x.html">curs_getyx(3x)</A></STRONG>
+                                                         <STRONG><A HREF="curs_getyx.3x.html">curs_getyx(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_in_wch.3x.html ncurses-5.4/doc/html/man/curs_in_wch.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_in_wch.3x.html	2003-10-25 17:39:47.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_in_wch.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_in_wch.3x.html">curs_in_wch(3x)</A></STRONG>                                   <STRONG><A HREF="curs_in_wch.3x.html">curs_in_wch(3x)</A></STRONG>
+<STRONG><A HREF="curs_in_wch.3x.html">curs_in_wch(3x)</A></STRONG>                                         <STRONG><A HREF="curs_in_wch.3x.html">curs_in_wch(3x)</A></STRONG>
 
 
 
@@ -94,7 +94,7 @@
 
 
 
-                                                  <STRONG><A HREF="curs_in_wch.3x.html">curs_in_wch(3x)</A></STRONG>
+                                                        <STRONG><A HREF="curs_in_wch.3x.html">curs_in_wch(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_in_wchstr.3x.html ncurses-5.4/doc/html/man/curs_in_wchstr.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_in_wchstr.3x.html	2003-10-25 17:39:47.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_in_wchstr.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
 <!-- 
   ****************************************************************************
-  * Copyright (c) 2002 Free Software Foundation, Inc.                        *
+  * Copyright (c) 2002,2005 Free Software Foundation, Inc.                   *
   *                                                                          *
   * Permission is hereby granted, free of charge, to any person obtaining a  *
   * copy of this software and associated documentation files (the            *
@@ -27,7 +27,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: curs_in_wchstr.3x,v 1.2 2002/05/18 21:48:30 tom Exp @
+  * @Id: curs_in_wchstr.3x,v 1.4 2005/01/02 01:27:19 tom Exp @
 -->
 <HTML>
 <HEAD>
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_in_wchstr.3x.html">curs_in_wchstr(3x)</A></STRONG>                             <STRONG><A HREF="curs_in_wchstr.3x.html">curs_in_wchstr(3x)</A></STRONG>
+<STRONG><A HREF="curs_in_wchstr.3x.html">curs_in_wchstr(3x)</A></STRONG>                                   <STRONG><A HREF="curs_in_wchstr.3x.html">curs_in_wchstr(3x)</A></STRONG>
 
 
 
@@ -104,12 +104,12 @@
 
 </PRE>
 <H2>SEE ALSO</H2><PRE>
-       Functions:   <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>,  <STRONG><A HREF="curs_in_wch.3x.html">curs_in_wch(3x)</A></STRONG>  <STRONG><A HREF="curs_instr.3x.html">curs_instr(3x)</A></STRONG>,
+       Functions:  <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>,  <STRONG><A HREF="curs_in_wch.3x.html">curs_in_wch(3x)</A></STRONG>,  <STRONG><A HREF="curs_instr.3x.html">curs_instr(3x)</A></STRONG>,
        <STRONG><A HREF="curs_inwstr.3x.html">curs_inwstr(3x)</A></STRONG>
 
 
 
-                                               <STRONG><A HREF="curs_in_wchstr.3x.html">curs_in_wchstr(3x)</A></STRONG>
+                                                     <STRONG><A HREF="curs_in_wchstr.3x.html">curs_in_wchstr(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_inch.3x.html ncurses-5.4/doc/html/man/curs_inch.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_inch.3x.html	2003-10-25 17:39:47.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_inch.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_inch.3x.html">curs_inch(3x)</A></STRONG>                                       <STRONG><A HREF="curs_inch.3x.html">curs_inch(3x)</A></STRONG>
+<STRONG><A HREF="curs_inch.3x.html">curs_inch(3x)</A></STRONG>                                             <STRONG><A HREF="curs_inch.3x.html">curs_inch(3x)</A></STRONG>
 
 
 
@@ -76,6 +76,7 @@
        The  following  bit-masks  may  be  AND-ed with characters
        returned by <STRONG>winch</STRONG>.
 
+
        <STRONG>A_CHARTEXT</STRONG>     Bit-mask to extract character
        <STRONG>A_ATTRIBUTES</STRONG>   Bit-mask to extract attributes
        <STRONG>A_COLOR</STRONG>        Bit-mask to extract color-pair field information
@@ -98,7 +99,7 @@
 
 
 
-                                                    <STRONG><A HREF="curs_inch.3x.html">curs_inch(3x)</A></STRONG>
+                                                          <STRONG><A HREF="curs_inch.3x.html">curs_inch(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_inchstr.3x.html ncurses-5.4/doc/html/man/curs_inchstr.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_inchstr.3x.html	2003-10-25 17:39:47.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_inchstr.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_inchstr.3x.html">curs_inchstr(3x)</A></STRONG>                                 <STRONG><A HREF="curs_inchstr.3x.html">curs_inchstr(3x)</A></STRONG>
+<STRONG><A HREF="curs_inchstr.3x.html">curs_inchstr(3x)</A></STRONG>                                       <STRONG><A HREF="curs_inchstr.3x.html">curs_inchstr(3x)</A></STRONG>
 
 
 
@@ -111,7 +111,7 @@
 
 
 
-                                                 <STRONG><A HREF="curs_inchstr.3x.html">curs_inchstr(3x)</A></STRONG>
+                                                       <STRONG><A HREF="curs_inchstr.3x.html">curs_inchstr(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_initscr.3x.html ncurses-5.4/doc/html/man/curs_initscr.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_initscr.3x.html	2003-10-25 17:39:47.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_initscr.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_initscr.3x.html">curs_initscr(3x)</A></STRONG>                                 <STRONG><A HREF="curs_initscr.3x.html">curs_initscr(3x)</A></STRONG>
+<STRONG><A HREF="curs_initscr.3x.html">curs_initscr(3x)</A></STRONG>                                       <STRONG><A HREF="curs_initscr.3x.html">curs_initscr(3x)</A></STRONG>
 
 
 
@@ -152,7 +152,7 @@
 
 
 
-                                                 <STRONG><A HREF="curs_initscr.3x.html">curs_initscr(3x)</A></STRONG>
+                                                       <STRONG><A HREF="curs_initscr.3x.html">curs_initscr(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_inopts.3x.html ncurses-5.4/doc/html/man/curs_inopts.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_inopts.3x.html	2004-01-11 01:46:18.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_inopts.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_inopts.3x.html">curs_inopts(3x)</A></STRONG>                                   <STRONG><A HREF="curs_inopts.3x.html">curs_inopts(3x)</A></STRONG>
+<STRONG><A HREF="curs_inopts.3x.html">curs_inopts(3x)</A></STRONG>                                         <STRONG><A HREF="curs_inopts.3x.html">curs_inopts(3x)</A></STRONG>
 
 
 
@@ -241,7 +241,7 @@
 
 
 
-                                                  <STRONG><A HREF="curs_inopts.3x.html">curs_inopts(3x)</A></STRONG>
+                                                        <STRONG><A HREF="curs_inopts.3x.html">curs_inopts(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_ins_wch.3x.html ncurses-5.4/doc/html/man/curs_ins_wch.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_ins_wch.3x.html	2003-10-25 17:39:48.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_ins_wch.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_ins_wch.3x.html">curs_ins_wch(3x)</A></STRONG>                                 <STRONG><A HREF="curs_ins_wch.3x.html">curs_ins_wch(3x)</A></STRONG>
+<STRONG><A HREF="curs_ins_wch.3x.html">curs_ins_wch(3x)</A></STRONG>                                       <STRONG><A HREF="curs_ins_wch.3x.html">curs_ins_wch(3x)</A></STRONG>
 
 
 
@@ -89,7 +89,7 @@
 
 
 
-                                                 <STRONG><A HREF="curs_ins_wch.3x.html">curs_ins_wch(3x)</A></STRONG>
+                                                       <STRONG><A HREF="curs_ins_wch.3x.html">curs_ins_wch(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_ins_wstr.3x.html ncurses-5.4/doc/html/man/curs_ins_wstr.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_ins_wstr.3x.html	2003-10-25 17:39:48.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_ins_wstr.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_ins_wstr.3x.html">curs_ins_wstr(3x)</A></STRONG>                               <STRONG><A HREF="curs_ins_wstr.3x.html">curs_ins_wstr(3x)</A></STRONG>
+<STRONG><A HREF="curs_ins_wstr.3x.html">curs_ins_wstr(3x)</A></STRONG>                                     <STRONG><A HREF="curs_ins_wstr.3x.html">curs_ins_wstr(3x)</A></STRONG>
 
 
 
@@ -114,7 +114,7 @@
 
 
 
-                                                <STRONG><A HREF="curs_ins_wstr.3x.html">curs_ins_wstr(3x)</A></STRONG>
+                                                      <STRONG><A HREF="curs_ins_wstr.3x.html">curs_ins_wstr(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_insch.3x.html ncurses-5.4/doc/html/man/curs_insch.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_insch.3x.html	2003-10-25 17:39:48.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_insch.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_insch.3x.html">curs_insch(3x)</A></STRONG>                                     <STRONG><A HREF="curs_insch.3x.html">curs_insch(3x)</A></STRONG>
+<STRONG><A HREF="curs_insch.3x.html">curs_insch(3x)</A></STRONG>                                           <STRONG><A HREF="curs_insch.3x.html">curs_insch(3x)</A></STRONG>
 
 
 
@@ -99,7 +99,7 @@
 
 
 
-                                                   <STRONG><A HREF="curs_insch.3x.html">curs_insch(3x)</A></STRONG>
+                                                         <STRONG><A HREF="curs_insch.3x.html">curs_insch(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_insstr.3x.html ncurses-5.4/doc/html/man/curs_insstr.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_insstr.3x.html	2003-10-25 17:39:48.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_insstr.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
 <!-- 
   ****************************************************************************
-  * Copyright (c) 1998,2000,2001 Free Software Foundation, Inc.              *
+  * Copyright (c) 1998-2001,2004 Free Software Foundation, Inc.              *
   *                                                                          *
   * Permission is hereby granted, free of charge, to any person obtaining a  *
   * copy of this software and associated documentation files (the            *
@@ -27,7 +27,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: curs_insstr.3x,v 1.12 2001/11/03 19:59:03 tom Exp @
+  * @Id: curs_insstr.3x,v 1.14 2004/06/19 22:22:51 tom Exp @
 -->
 <HTML>
 <HEAD>
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_insstr.3x.html">curs_insstr(3x)</A></STRONG>                                   <STRONG><A HREF="curs_insstr.3x.html">curs_insstr(3x)</A></STRONG>
+<STRONG><A HREF="curs_insstr.3x.html">curs_insstr(3x)</A></STRONG>                                         <STRONG><A HREF="curs_insstr.3x.html">curs_insstr(3x)</A></STRONG>
 
 
 
@@ -71,22 +71,14 @@
        These  routines insert a character string (as many charac-
        ters as will fit on the line) before the  character  under
        the cursor.  All characters to the right of the cursor are
-       shifted right, with the possibility of the rightmost char-
+       shifted right with the possibility of the rightmost  char-
        acters  on  the line being lost.  The cursor position does
-       not change (after moving to <EM>y</EM>, <EM>x</EM>, if specified). The  four
-       routines with <EM>n</EM> as the last argument insert a leading sub-
-       string of at most <EM>n</EM> characters.  If <EM>n</EM>&lt;=0, then the  entire
-       string is inserted.
-
-       If  a  character in <EM>str</EM> is a tab, newline, carriage return
-       or backspace, the cursor is moved appropriately within the
-       window.   A  newline  also  does a <STRONG>clrtoeol</STRONG> before moving.
-       Tabs are considered to be at every eighth  column.   If  a
-       character in <EM>str</EM> is another control character, it is drawn
-       in the <STRONG>^</STRONG><EM>X</EM> notation.  Calling <STRONG>winch</STRONG> after adding a  control
-       character (and moving to it, if necessary) does not return
-       the control character, but instead returns a character  in
-       the ^-representation of the control character.
+       not change (after moving to  <EM>y</EM>,  <EM>x</EM>,  if  specified).   The
+       functions  with  <EM>n</EM>  as  the last argument insert a leading
+       substring of at most <EM>n</EM>  characters.   If  <EM>n</EM>&lt;=0,  then  the
+       entire string is inserted.
+
+       Special characters are handled as in <STRONG>addch</STRONG>.
 
 
 </PRE>
@@ -111,14 +103,20 @@
        detected (this implementation does not  yet  support  XPG4
        multibyte characters).
 
+       The  Single  Unix  Specification,  Version  2  states that
+       <STRONG>insnstr</STRONG> and <STRONG>winsnstr</STRONG> perform wrapping.  This  is  probably
+       an error, since it makes this group of functions inconsis-
+       tent.  Also, no implementation of  curses  documents  this
+       inconsistency.
+
 
 </PRE>
 <H2>SEE ALSO</H2><PRE>
-       <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_clear.3x.html">curs_clear(3x)</A></STRONG>, <STRONG><A HREF="curs_inch.3x.html">curs_inch(3x)</A></STRONG>.
+       <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="unctrl.3x.html">unctrl(3x)</A></STRONG>, <STRONG><A HREF="curs_clear.3x.html">curs_clear(3x)</A></STRONG>, <STRONG><A HREF="curs_inch.3x.html">curs_inch(3x)</A></STRONG>.
 
 
 
-                                                  <STRONG><A HREF="curs_insstr.3x.html">curs_insstr(3x)</A></STRONG>
+                                                        <STRONG><A HREF="curs_insstr.3x.html">curs_insstr(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_instr.3x.html ncurses-5.4/doc/html/man/curs_instr.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_instr.3x.html	2003-10-25 17:39:48.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_instr.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_instr.3x.html">curs_instr(3x)</A></STRONG>                                     <STRONG><A HREF="curs_instr.3x.html">curs_instr(3x)</A></STRONG>
+<STRONG><A HREF="curs_instr.3x.html">curs_instr(3x)</A></STRONG>                                           <STRONG><A HREF="curs_instr.3x.html">curs_instr(3x)</A></STRONG>
 
 
 
@@ -108,7 +108,7 @@
 
 
 
-                                                   <STRONG><A HREF="curs_instr.3x.html">curs_instr(3x)</A></STRONG>
+                                                         <STRONG><A HREF="curs_instr.3x.html">curs_instr(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_inwstr.3x.html ncurses-5.4/doc/html/man/curs_inwstr.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_inwstr.3x.html	2003-10-25 17:39:48.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_inwstr.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
 <!-- 
   ****************************************************************************
-  * Copyright (c) 2002 Free Software Foundation, Inc.                        *
+  * Copyright (c) 2002,2004 Free Software Foundation, Inc.                   *
   *                                                                          *
   * Permission is hereby granted, free of charge, to any person obtaining a  *
   * copy of this software and associated documentation files (the            *
@@ -27,7 +27,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: curs_inwstr.3x,v 1.2 2002/04/13 20:25:35 tom Exp @
+  * @Id: curs_inwstr.3x,v 1.3 2004/03/13 19:39:10 tom Exp @
 -->
 <HTML>
 <HEAD>
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_inwstr.3.html">curs_inwstr(3)</A></STRONG>                                     <STRONG><A HREF="curs_inwstr.3.html">curs_inwstr(3)</A></STRONG>
+<STRONG><A HREF="curs_inwstr.3.html">curs_inwstr(3)</A></STRONG>                                           <STRONG><A HREF="curs_inwstr.3.html">curs_inwstr(3)</A></STRONG>
 
 
 
@@ -100,7 +100,7 @@
 
 
 
-                                                   <STRONG><A HREF="curs_inwstr.3.html">curs_inwstr(3)</A></STRONG>
+                                                         <STRONG><A HREF="curs_inwstr.3.html">curs_inwstr(3)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_kernel.3x.html ncurses-5.4/doc/html/man/curs_kernel.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_kernel.3x.html	2003-10-25 17:39:49.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_kernel.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_kernel.3x.html">curs_kernel(3x)</A></STRONG>                                   <STRONG><A HREF="curs_kernel.3x.html">curs_kernel(3x)</A></STRONG>
+<STRONG><A HREF="curs_kernel.3x.html">curs_kernel(3x)</A></STRONG>                                         <STRONG><A HREF="curs_kernel.3x.html">curs_kernel(3x)</A></STRONG>
 
 
 
@@ -179,7 +179,7 @@
 
 
 
-                                                  <STRONG><A HREF="curs_kernel.3x.html">curs_kernel(3x)</A></STRONG>
+                                                        <STRONG><A HREF="curs_kernel.3x.html">curs_kernel(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_mouse.3x.html ncurses-5.4/doc/html/man/curs_mouse.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_mouse.3x.html	2004-01-11 01:46:19.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_mouse.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -2,7 +2,7 @@
 <!-- 
   * t
   ****************************************************************************
-  * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc.              *
+  * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc.              *
   *                                                                          *
   * Permission is hereby granted, free of charge, to any person obtaining a  *
   * copy of this software and associated documentation files (the            *
@@ -28,7 +28,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: curs_mouse.3x,v 1.24 2003/12/27 18:47:54 tom Exp @
+  * @Id: curs_mouse.3x,v 1.26 2005/02/19 20:59:40 tom Exp @
 -->
 <HTML>
 <HEAD>
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_mouse.3x.html">curs_mouse(3x)</A></STRONG>                                     <STRONG><A HREF="curs_mouse.3x.html">curs_mouse(3x)</A></STRONG>
+<STRONG><A HREF="curs_mouse.3x.html">curs_mouse(3x)</A></STRONG>                                           <STRONG><A HREF="curs_mouse.3x.html">curs_mouse(3x)</A></STRONG>
 
 
 
@@ -95,7 +95,8 @@
        the  mouse pointer; setting a nonzero mask may turn it on.
        Whether this happens is device-dependent.
 
-       Here are the mouse event type masks:
+       Here are the mouse event type masks which may be defined:
+
 
        <EM>Name</EM>                     <EM>Description</EM>
        ---------------------------------------------------------------------
@@ -104,27 +105,38 @@
        BUTTON1_CLICKED          mouse button 1 clicked
        BUTTON1_DOUBLE_CLICKED   mouse button 1 double clicked
        BUTTON1_TRIPLE_CLICKED   mouse button 1 triple clicked
+       ---------------------------------------------------------------------
        BUTTON2_PRESSED          mouse button 2 down
        BUTTON2_RELEASED         mouse button 2 up
        BUTTON2_CLICKED          mouse button 2 clicked
        BUTTON2_DOUBLE_CLICKED   mouse button 2 double clicked
        BUTTON2_TRIPLE_CLICKED   mouse button 2 triple clicked
+       ---------------------------------------------------------------------
+
        BUTTON3_PRESSED          mouse button 3 down
        BUTTON3_RELEASED         mouse button 3 up
        BUTTON3_CLICKED          mouse button 3 clicked
-
        BUTTON3_DOUBLE_CLICKED   mouse button 3 double clicked
        BUTTON3_TRIPLE_CLICKED   mouse button 3 triple clicked
+       ---------------------------------------------------------------------
        BUTTON4_PRESSED          mouse button 4 down
        BUTTON4_RELEASED         mouse button 4 up
        BUTTON4_CLICKED          mouse button 4 clicked
        BUTTON4_DOUBLE_CLICKED   mouse button 4 double clicked
        BUTTON4_TRIPLE_CLICKED   mouse button 4 triple clicked
+       ---------------------------------------------------------------------
+       BUTTON5_PRESSED          mouse button 5 down
+       BUTTON5_RELEASED         mouse button 5 up
+       BUTTON5_CLICKED          mouse button 5 clicked
+       BUTTON5_DOUBLE_CLICKED   mouse button 5 double clicked
+       BUTTON5_TRIPLE_CLICKED   mouse button 5 triple clicked
+       ---------------------------------------------------------------------
        BUTTON_SHIFT             shift was down during button state change
        BUTTON_CTRL              control was down during button state change
        BUTTON_ALT               alt was down during button state change
        ALL_MOUSE_EVENTS         report all button state changes
        REPORT_MOUSE_POSITION    report mouse movement
+       ---------------------------------------------------------------------
 
        Once a class of mouse events have been made visible  in  a
        window,  calling  the  <STRONG>wgetch</STRONG>  function on that window may
@@ -139,9 +151,9 @@
        event type.
 
        The <STRONG>ungetmouse</STRONG> function behaves  analogously  to  <STRONG>ungetch</STRONG>.
-       It  pushes  a  <STRONG>KEY_MOUSE</STRONG>  event  onto the input queue, and
-       associates with  that  event  the  given  state  data  and
-       screen-relative character-cell coordinates.
+       It  pushes a <STRONG>KEY_MOUSE</STRONG> event onto the input queue, and as-
+       sociates with that event the given state data and  screen-
+       relative character-cell coordinates.
 
        The  <STRONG>wenclose</STRONG>  function  tests  whether  a  given  pair of
        screen-relative character-cell coordinates is enclosed  by
@@ -175,79 +187,88 @@
        The <STRONG>mouseinterval</STRONG> function sets the maximum time (in thou-
        sands  of  a  second)  that  can  elapse between press and
        release events for them to be recognized as a click.   Use
-       <STRONG>mouseinterval(-1)</STRONG> to disable click resolution.  This func-
-       tion returns the previous interval value.  The default  is
-       one sixth of a second.
+       <STRONG>mouseinterval(0)</STRONG>  to disable click resolution.  This func-
+       tion returns the previous interval value.  Use <STRONG>mouseinter-</STRONG>
+       <STRONG>val(-1)</STRONG>  to  obtain the interval without altering it.  The
+       default is one sixth of a second.
 
-       Note  that  mouse  events will be ignored when input is in
+       Note that mouse events will be ignored when  input  is  in
        cooked mode, and will cause an error beep when cooked mode
-       is  being simulated in a window by a function such as <STRONG>get-</STRONG>
+       is being simulated in a window by a function such as  <STRONG>get-</STRONG>
        <STRONG>str</STRONG> that expects a linefeed for input-loop termination.
 
 
 </PRE>
 <H2>RETURN VALUE</H2><PRE>
-       <STRONG>getmouse</STRONG>, <STRONG>ungetmouse</STRONG> and <STRONG>mouseinterval</STRONG> return the  integer
+       <STRONG>getmouse</STRONG>,  <STRONG>ungetmouse</STRONG> and <STRONG>mouseinterval</STRONG> return the integer
        <STRONG>ERR</STRONG> upon failure or <STRONG>OK</STRONG> upon successful completion.  <STRONG>mouse-</STRONG>
-       <STRONG>mask</STRONG> returns the mask of reportable events.  <STRONG>wenclose</STRONG>  and
+       <STRONG>mask</STRONG>  returns the mask of reportable events.  <STRONG>wenclose</STRONG> and
        <STRONG>wmouse_trafo</STRONG> are boolean functions returning <STRONG>TRUE</STRONG> or <STRONG>FALSE</STRONG>
        depending on their test result.
 
 
 </PRE>
 <H2>PORTABILITY</H2><PRE>
-       These calls were designed for  <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG>,  and  are  not
+       These  calls  were  designed  for <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG>, and are not
        found in SVr4 curses, 4.4BSD curses, or any other previous
        version of curses.
 
        The feature macro <STRONG>NCURSES_MOUSE_VERSION</STRONG> is provided so the
-       preprocessor  can  be  used to test whether these features
-       are present  (its  value  is  1).   If  the  interface  is
-       changed, the value of <STRONG>NCURSES_MOUSE_VERSION</STRONG> will be incre-
-       mented.
+       preprocessor can be used to test  whether  these  features
+       are  present.   If  the interface is changed, the value of
+       <STRONG>NCURSES_MOUSE_VERSION</STRONG> will be incremented.   These  values
+       for  <STRONG>NCURSES_MOUSE_VERSION</STRONG> may be specified when configur-
+       ing ncurses:
+
+              1  has definitions for reserved events.   The  mask
+                 uses 28 bits.
+
+              2  adds definitions for button 5, removes the defi-
+                 nitions for reserved events.  The mask  uses  29
+                 bits.
 
-       The order of the <STRONG>MEVENT</STRONG> structure members is  not  guaran-
-       teed.   Additional fields may be added to the structure in
+       The  order  of the <STRONG>MEVENT</STRONG> structure members is not guaran-
+       teed.  Additional fields may be added to the structure  in
        the future.
 
        Under  <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG>,  these  calls  are  implemented  using
-       either  xterm's  built-in  mouse-tracking API or platform-
+       either xterm's built-in mouse-tracking  API  or  platform-
        specific drivers including
               Alessandro Rubini's gpm server.
               FreeBSD sysmouse
               OS/2 EMX
-       If you  are  using  an  unsupported  configuration,  mouse
+       If  you  are  using  an  unsupported  configuration, mouse
        events will not be visible to <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG> (and the <STRONG>wmouse-</STRONG>
        <STRONG>mask</STRONG> function will always return <STRONG>0</STRONG>).
 
-       If the terminfo entry contains a <STRONG>XM</STRONG> string, this  is  used
-       in  the xterm mouse driver to control the way the terminal
+       If  the  terminfo entry contains a <STRONG>XM</STRONG> string, this is used
+       in the xterm mouse driver to control the way the  terminal
        is initialized for mouse operation.  The default, if <STRONG>XM</STRONG> is
        not found, corresponds to private mode 1000 of xterm:
               \E[?1000%?%p1%{1}%=%th%el%;
        The z member in the event structure is not presently used.
-       It is intended for use with touch screens  (which  may  be
+       It  is  intended  for use with touch screens (which may be
        pressure-sensitive)   or   with   3D-mice/trackballs/power
        gloves.
 
 
 </PRE>
 <H2>BUGS</H2><PRE>
-       Mouse events under xterm will not in fact be ignored  dur-
-       ing  cooked mode, if they have been enabled by <STRONG>wmousemask</STRONG>.
-       Instead, the xterm mouse report sequence  will  appear  in
+       Mouse  events under xterm will not in fact be ignored dur-
+       ing cooked mode, if they have been enabled by  <STRONG>wmousemask</STRONG>.
+       Instead,  the  xterm  mouse report sequence will appear in
        the string read.
 
        Mouse events under xterm will not be detected correctly in
-       a window with its keypad bit off, since  they  are  inter-
-       preted  as  a  variety  of  function  key.   Your terminfo
-       description must have <STRONG>kmous</STRONG> set to "\E[M"  (the  beginning
+       a  window  with  its keypad bit off, since they are inter-
+       preted as  a  variety  of  function  key.   Your  terminfo
+       description  must  have <STRONG>kmous</STRONG> set to "\E[M" (the beginning
        of the response from xterm for mouse clicks).
 
-       Because  there  are  no  standard  terminal responses that
-       would serve to identify terminals which support the  xterm
-       mouse  protocol,  <STRONG>ncurses</STRONG> assumes that if your $TERM envi-
-       ronment variable contains "xterm", or <STRONG>kmous</STRONG> is defined  in
+       Because there are  no  standard  terminal  responses  that
+       would  serve to identify terminals which support the xterm
+       mouse protocol, <STRONG>ncurses</STRONG> assumes that if your  $TERM  envi-
+       ronment  variable contains "xterm", or <STRONG>kmous</STRONG> is defined in
        the terminal description, then the terminal may send mouse
        events.
 
@@ -258,7 +279,7 @@
 
 
 
-                                                   <STRONG><A HREF="curs_mouse.3x.html">curs_mouse(3x)</A></STRONG>
+                                                         <STRONG><A HREF="curs_mouse.3x.html">curs_mouse(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_move.3x.html ncurses-5.4/doc/html/man/curs_move.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_move.3x.html	2003-10-25 17:39:49.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_move.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_move.3x.html">curs_move(3x)</A></STRONG>                                       <STRONG><A HREF="curs_move.3x.html">curs_move(3x)</A></STRONG>
+<STRONG><A HREF="curs_move.3x.html">curs_move(3x)</A></STRONG>                                             <STRONG><A HREF="curs_move.3x.html">curs_move(3x)</A></STRONG>
 
 
 
@@ -95,7 +95,7 @@
 
 
 
-                                                    <STRONG><A HREF="curs_move.3x.html">curs_move(3x)</A></STRONG>
+                                                          <STRONG><A HREF="curs_move.3x.html">curs_move(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_outopts.3x.html ncurses-5.4/doc/html/man/curs_outopts.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_outopts.3x.html	2003-10-25 17:39:49.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_outopts.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_outopts.3x.html">curs_outopts(3x)</A></STRONG>                                 <STRONG><A HREF="curs_outopts.3x.html">curs_outopts(3x)</A></STRONG>
+<STRONG><A HREF="curs_outopts.3x.html">curs_outopts(3x)</A></STRONG>                                       <STRONG><A HREF="curs_outopts.3x.html">curs_outopts(3x)</A></STRONG>
 
 
 
@@ -206,7 +206,7 @@
 
 
 
-                                                 <STRONG><A HREF="curs_outopts.3x.html">curs_outopts(3x)</A></STRONG>
+                                                       <STRONG><A HREF="curs_outopts.3x.html">curs_outopts(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_overlay.3x.html ncurses-5.4/doc/html/man/curs_overlay.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_overlay.3x.html	2003-10-25 17:39:49.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_overlay.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_overlay.3x.html">curs_overlay(3x)</A></STRONG>                                 <STRONG><A HREF="curs_overlay.3x.html">curs_overlay(3x)</A></STRONG>
+<STRONG><A HREF="curs_overlay.3x.html">curs_overlay(3x)</A></STRONG>                                       <STRONG><A HREF="curs_overlay.3x.html">curs_overlay(3x)</A></STRONG>
 
 
 
@@ -106,7 +106,7 @@
 
 
 
-                                                 <STRONG><A HREF="curs_overlay.3x.html">curs_overlay(3x)</A></STRONG>
+                                                       <STRONG><A HREF="curs_overlay.3x.html">curs_overlay(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_pad.3x.html ncurses-5.4/doc/html/man/curs_pad.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_pad.3x.html	2004-01-11 01:46:20.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_pad.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_pad.3x.html">curs_pad(3x)</A></STRONG>                                         <STRONG><A HREF="curs_pad.3x.html">curs_pad(3x)</A></STRONG>
+<STRONG><A HREF="curs_pad.3x.html">curs_pad(3x)</A></STRONG>                                               <STRONG><A HREF="curs_pad.3x.html">curs_pad(3x)</A></STRONG>
 
 
 
@@ -153,7 +153,7 @@
 
 
 
-                                                     <STRONG><A HREF="curs_pad.3x.html">curs_pad(3x)</A></STRONG>
+                                                           <STRONG><A HREF="curs_pad.3x.html">curs_pad(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_print.3x.html ncurses-5.4/doc/html/man/curs_print.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_print.3x.html	2003-10-25 17:39:49.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_print.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_print.3x.html">curs_print(3x)</A></STRONG>                                     <STRONG><A HREF="curs_print.3x.html">curs_print(3x)</A></STRONG>
+<STRONG><A HREF="curs_print.3x.html">curs_print(3x)</A></STRONG>                                           <STRONG><A HREF="curs_print.3x.html">curs_print(3x)</A></STRONG>
 
 
 
@@ -111,7 +111,7 @@
 
 
 
-                                                   <STRONG><A HREF="curs_print.3x.html">curs_print(3x)</A></STRONG>
+                                                         <STRONG><A HREF="curs_print.3x.html">curs_print(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_printw.3x.html ncurses-5.4/doc/html/man/curs_printw.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_printw.3x.html	2003-10-25 17:39:50.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_printw.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_printw.3x.html">curs_printw(3x)</A></STRONG>                                   <STRONG><A HREF="curs_printw.3x.html">curs_printw(3x)</A></STRONG>
+<STRONG><A HREF="curs_printw.3x.html">curs_printw(3x)</A></STRONG>                                         <STRONG><A HREF="curs_printw.3x.html">curs_printw(3x)</A></STRONG>
 
 
 
@@ -106,7 +106,7 @@
 
 
 
-                                                  <STRONG><A HREF="curs_printw.3x.html">curs_printw(3x)</A></STRONG>
+                                                        <STRONG><A HREF="curs_printw.3x.html">curs_printw(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_refresh.3x.html ncurses-5.4/doc/html/man/curs_refresh.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_refresh.3x.html	2003-10-25 17:39:50.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_refresh.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_refresh.3x.html">curs_refresh(3x)</A></STRONG>                                 <STRONG><A HREF="curs_refresh.3x.html">curs_refresh(3x)</A></STRONG>
+<STRONG><A HREF="curs_refresh.3x.html">curs_refresh(3x)</A></STRONG>                                       <STRONG><A HREF="curs_refresh.3x.html">curs_refresh(3x)</A></STRONG>
 
 
 
@@ -148,7 +148,7 @@
 
 
 
-                                                 <STRONG><A HREF="curs_refresh.3x.html">curs_refresh(3x)</A></STRONG>
+                                                       <STRONG><A HREF="curs_refresh.3x.html">curs_refresh(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_scanw.3x.html ncurses-5.4/doc/html/man/curs_scanw.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_scanw.3x.html	2003-10-25 17:39:50.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_scanw.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_scanw.3x.html">curs_scanw(3x)</A></STRONG>                                     <STRONG><A HREF="curs_scanw.3x.html">curs_scanw(3x)</A></STRONG>
+<STRONG><A HREF="curs_scanw.3x.html">curs_scanw(3x)</A></STRONG>                                           <STRONG><A HREF="curs_scanw.3x.html">curs_scanw(3x)</A></STRONG>
 
 
 
@@ -118,7 +118,7 @@
 
 
 
-                                                   <STRONG><A HREF="curs_scanw.3x.html">curs_scanw(3x)</A></STRONG>
+                                                         <STRONG><A HREF="curs_scanw.3x.html">curs_scanw(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_scr_dump.3x.html ncurses-5.4/doc/html/man/curs_scr_dump.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_scr_dump.3x.html	2004-01-11 01:46:20.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_scr_dump.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_scr_dump.3x.html">curs_scr_dump(3x)</A></STRONG>                               <STRONG><A HREF="curs_scr_dump.3x.html">curs_scr_dump(3x)</A></STRONG>
+<STRONG><A HREF="curs_scr_dump.3x.html">curs_scr_dump(3x)</A></STRONG>                                     <STRONG><A HREF="curs_scr_dump.3x.html">curs_scr_dump(3x)</A></STRONG>
 
 
 
@@ -122,7 +122,7 @@
 
 
 
-                                                <STRONG><A HREF="curs_scr_dump.3x.html">curs_scr_dump(3x)</A></STRONG>
+                                                      <STRONG><A HREF="curs_scr_dump.3x.html">curs_scr_dump(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_scroll.3x.html ncurses-5.4/doc/html/man/curs_scroll.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_scroll.3x.html	2003-10-25 17:39:50.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_scroll.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_scroll.3x.html">curs_scroll(3x)</A></STRONG>                                   <STRONG><A HREF="curs_scroll.3x.html">curs_scroll(3x)</A></STRONG>
+<STRONG><A HREF="curs_scroll.3x.html">curs_scroll(3x)</A></STRONG>                                         <STRONG><A HREF="curs_scroll.3x.html">curs_scroll(3x)</A></STRONG>
 
 
 
@@ -114,7 +114,7 @@
 
 
 
-                                                  <STRONG><A HREF="curs_scroll.3x.html">curs_scroll(3x)</A></STRONG>
+                                                        <STRONG><A HREF="curs_scroll.3x.html">curs_scroll(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_slk.3x.html ncurses-5.4/doc/html/man/curs_slk.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_slk.3x.html	2003-10-25 17:39:50.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_slk.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG>                                         <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG>
+<STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG>                                               <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG>
 
 
 
@@ -171,7 +171,7 @@
 
 
 
-                                                     <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG>
+                                                           <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_termattrs.3x.html ncurses-5.4/doc/html/man/curs_termattrs.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_termattrs.3x.html	2004-01-11 01:46:21.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_termattrs.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_termattrs.3x.html">curs_termattrs(3x)</A></STRONG>                             <STRONG><A HREF="curs_termattrs.3x.html">curs_termattrs(3x)</A></STRONG>
+<STRONG><A HREF="curs_termattrs.3x.html">curs_termattrs(3x)</A></STRONG>                                   <STRONG><A HREF="curs_termattrs.3x.html">curs_termattrs(3x)</A></STRONG>
 
 
 
@@ -150,7 +150,7 @@
 
 
 
-                                               <STRONG><A HREF="curs_termattrs.3x.html">curs_termattrs(3x)</A></STRONG>
+                                                     <STRONG><A HREF="curs_termattrs.3x.html">curs_termattrs(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_termcap.3x.html ncurses-5.4/doc/html/man/curs_termcap.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_termcap.3x.html	2003-10-25 17:39:50.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_termcap.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_termcap.3x.html">curs_termcap(3x)</A></STRONG>                                 <STRONG><A HREF="curs_termcap.3x.html">curs_termcap(3x)</A></STRONG>
+<STRONG><A HREF="curs_termcap.3x.html">curs_termcap(3x)</A></STRONG>                                       <STRONG><A HREF="curs_termcap.3x.html">curs_termcap(3x)</A></STRONG>
 
 
 
@@ -115,9 +115,9 @@
 </PRE>
 <H2>RETURN VALUE</H2><PRE>
        Except where explicitly noted,  routines  that  return  an
-       integer  return  <STRONG>ERR</STRONG> upon failure and <STRONG>OK</STRONG> (SVr4 only speci-
-       fies "an integer value other than  <STRONG>ERR</STRONG>")  upon  successful
-       completion.
+       integer   return  <STRONG>ERR</STRONG>  upon  failure  and  <STRONG>OK</STRONG>  (SVr4  only
+       specifies "an integer value other than <STRONG>ERR</STRONG>") upon success-
+       ful completion.
 
        Routines that return pointers return <STRONG>NULL</STRONG> on error.
 
@@ -176,7 +176,7 @@
 
 
 
-                                                 <STRONG><A HREF="curs_termcap.3x.html">curs_termcap(3x)</A></STRONG>
+                                                       <STRONG><A HREF="curs_termcap.3x.html">curs_termcap(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_terminfo.3x.html ncurses-5.4/doc/html/man/curs_terminfo.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_terminfo.3x.html	2004-01-11 01:46:21.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_terminfo.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG>                               <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG>
+<STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG>                                     <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG>
 
 
 
@@ -297,7 +297,7 @@
 
 
 
-                                                <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG>
+                                                      <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_touch.3x.html ncurses-5.4/doc/html/man/curs_touch.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_touch.3x.html	2003-10-25 17:39:51.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_touch.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_touch.3x.html">curs_touch(3x)</A></STRONG>                                     <STRONG><A HREF="curs_touch.3x.html">curs_touch(3x)</A></STRONG>
+<STRONG><A HREF="curs_touch.3x.html">curs_touch(3x)</A></STRONG>                                           <STRONG><A HREF="curs_touch.3x.html">curs_touch(3x)</A></STRONG>
 
 
 
@@ -118,7 +118,7 @@
 
 
 
-                                                   <STRONG><A HREF="curs_touch.3x.html">curs_touch(3x)</A></STRONG>
+                                                         <STRONG><A HREF="curs_touch.3x.html">curs_touch(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_trace.3x.html ncurses-5.4/doc/html/man/curs_trace.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_trace.3x.html	2003-10-25 17:39:51.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_trace.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_trace.3x.html">curs_trace(3x)</A></STRONG>                                     <STRONG><A HREF="curs_trace.3x.html">curs_trace(3x)</A></STRONG>
+<STRONG><A HREF="curs_trace.3x.html">curs_trace(3x)</A></STRONG>                                           <STRONG><A HREF="curs_trace.3x.html">curs_trace(3x)</A></STRONG>
 
 
 
@@ -163,7 +163,7 @@
 
 
 
-                                                   <STRONG><A HREF="curs_trace.3x.html">curs_trace(3x)</A></STRONG>
+                                                         <STRONG><A HREF="curs_trace.3x.html">curs_trace(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_util.3x.html ncurses-5.4/doc/html/man/curs_util.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_util.3x.html	2003-10-25 17:39:51.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_util.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
 <!-- 
   ****************************************************************************
-  * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc.              *
+  * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc.              *
   *                                                                          *
   * Permission is hereby granted, free of charge, to any person obtaining a  *
   * copy of this software and associated documentation files (the            *
@@ -27,7 +27,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: curs_util.3x,v 1.11 2003/07/19 19:59:56 tom Exp @
+  * @Id: curs_util.3x,v 1.13 2005/04/30 19:39:53 tom Exp @
 -->
 <HTML>
 <HEAD>
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_util.3x.html">curs_util(3x)</A></STRONG>                                       <STRONG><A HREF="curs_util.3x.html">curs_util(3x)</A></STRONG>
+<STRONG><A HREF="curs_util.3x.html">curs_util(3x)</A></STRONG>                                             <STRONG><A HREF="curs_util.3x.html">curs_util(3x)</A></STRONG>
 
 
 
@@ -145,6 +145,18 @@
        from the XSI Curses standard (which erroneously  fails  to
        describe the disabling of <STRONG>cuu</STRONG>).
 
+       The  strings returned by <STRONG>unctrl</STRONG> in this implementation are
+       determined at compile time, showing C1 controls  from  the
+       upper-128  codes with a `~' prefix rather than `^'.  Other
+       implementations typically show both sets of control  char-
+       acters  with  `^',  and may strip the parameter to 7 bits.
+       This implementation uses 8 bits but does  not  modify  the
+       string to reflect locale.
+
+       The  <STRONG>keyname</STRONG> function may return the names of user-defined
+       string capabilities which  are  defined  in  the  terminfo
+       entry via the <STRONG>-x</STRONG> option of <STRONG>tic</STRONG>.
+
 
 </PRE>
 <H2>SEE ALSO</H2><PRE>
@@ -153,7 +165,7 @@
 
 
 
-                                                    <STRONG><A HREF="curs_util.3x.html">curs_util(3x)</A></STRONG>
+                                                          <STRONG><A HREF="curs_util.3x.html">curs_util(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/curs_window.3x.html ncurses-5.4/doc/html/man/curs_window.3x.html
--- ncurses-5.4.orig/doc/html/man/curs_window.3x.html	2003-10-25 17:39:51.000000000 +0000
+++ ncurses-5.4/doc/html/man/curs_window.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="curs_window.3x.html">curs_window(3x)</A></STRONG>                                   <STRONG><A HREF="curs_window.3x.html">curs_window(3x)</A></STRONG>
+<STRONG><A HREF="curs_window.3x.html">curs_window(3x)</A></STRONG>                                         <STRONG><A HREF="curs_window.3x.html">curs_window(3x)</A></STRONG>
 
 
 
@@ -179,7 +179,7 @@
 
 
 
-                                                  <STRONG><A HREF="curs_window.3x.html">curs_window(3x)</A></STRONG>
+                                                        <STRONG><A HREF="curs_window.3x.html">curs_window(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/default_colors.3x.html ncurses-5.4/doc/html/man/default_colors.3x.html
--- ncurses-5.4.orig/doc/html/man/default_colors.3x.html	2004-01-11 01:46:22.000000000 +0000
+++ ncurses-5.4/doc/html/man/default_colors.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
 <!-- 
   ****************************************************************************
-  * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc.              *
+  * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc.              *
   *                                                                          *
   * Permission is hereby granted, free of charge, to any person obtaining a  *
   * copy of this software and associated documentation files (the            *
@@ -27,8 +27,8 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * Author: Thomas E. Dickey 1997,1999,2000
-  * @Id: default_colors.3x,v 1.17 2003/10/25 20:41:08 tom Exp @
+  * Author: Thomas E. Dickey 1997,1999,2000,2005
+  * @Id: default_colors.3x,v 1.18 2005/02/19 20:25:44 tom Exp @
 -->
 <HTML>
 <HEAD>
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="default_colors.3x.html">default_colors(3x)</A></STRONG>                             <STRONG><A HREF="default_colors.3x.html">default_colors(3x)</A></STRONG>
+<STRONG><A HREF="default_colors.3x.html">default_colors(3x)</A></STRONG>                                   <STRONG><A HREF="default_colors.3x.html">default_colors(3x)</A></STRONG>
 
 
 
@@ -125,12 +125,35 @@
        accepts negative arguments to specify  default  foreground
        or background colors.
 
+       The  <EM>use</EM><STRONG>_</STRONG><EM>default</EM><STRONG>_</STRONG><EM>colors()</EM>  function  was  added to support
+       <EM>ded</EM>.  This is a full-screen application which uses  curses
+       to  manage only part of the screen.  The bottom portion of
+       the screen, which is of adjustable size, is left uncolored
+       to  display the results from shell commands.  The top por-
+       tion of the screen colors filenames using  a  scheme  like
+       the  "color  ls" programs.  Attempting to manage the back-
+       ground color of the screen for this application would give
+       unsatisfactory  results  for  a  variety of reasons.  This
+       extension was devised after noting that color  xterm  (and
+       similar  programs)  provides a background color which does
+       not necessarily correspond to  any  of  the  ANSI  colors.
+       While  a special terminfo entry could be constructed using
+       nine colors, there was no mechanism provided within curses
+       to  account for the related <EM>orig</EM><STRONG>_</STRONG><EM>pair</EM> and <EM>back</EM><STRONG>_</STRONG><EM>color</EM><STRONG>_</STRONG><EM>erase</EM>
+       capabilities.
+
+       The <EM>assume</EM><STRONG>_</STRONG><EM>default</EM><STRONG>_</STRONG><EM>colors()</EM> function was added to solve  a
+       different  problem:  support  for applications which would
+       use  environment  variables  and  other  configuration  to
+       bypass  curses'  notion  of the terminal's default colors,
+       setting specific values.
+
 
 </PRE>
 <H2>PORTABILITY</H2><PRE>
-       These  routines  are  specific  to ncurses.  They were not
-       supported on Version 7, BSD or System  V  implementations.
-       It  is recommended that any code depending on them be con-
+       These routines are specific to  ncurses.   They  were  not
+       supported  on  Version 7, BSD or System V implementations.
+       It is recommended that any code depending on them be  con-
        ditioned using NCURSES_VERSION.
 
 
@@ -141,12 +164,12 @@
 
 </PRE>
 <H2>AUTHOR</H2><PRE>
-       Thomas Dickey (from an analysis of  the  requirements  for
+       Thomas  Dickey  (from  an analysis of the requirements for
        color xterm for XFree86 3.1.2C, February 1996).
 
 
 
-                                               <STRONG><A HREF="default_colors.3x.html">default_colors(3x)</A></STRONG>
+                                                     <STRONG><A HREF="default_colors.3x.html">default_colors(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/define_key.3x.html ncurses-5.4/doc/html/man/define_key.3x.html
--- ncurses-5.4.orig/doc/html/man/define_key.3x.html	2004-01-11 01:46:22.000000000 +0000
+++ ncurses-5.4/doc/html/man/define_key.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
 <!-- 
   ****************************************************************************
-  * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc.              *
+  * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc.              *
   *                                                                          *
   * Permission is hereby granted, free of charge, to any person obtaining a  *
   * copy of this software and associated documentation files (the            *
@@ -28,7 +28,7 @@
   * authorization.                                                           *
   ****************************************************************************
   * Author: Thomas E. Dickey 1997
-  * @Id: define_key.3x,v 1.10 2003/10/25 20:33:16 tom Exp @
+  * @Id: define_key.3x,v 1.11 2004/06/05 19:20:03 tom Exp @
 -->
 <HTML>
 <HEAD>
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="define_key.3x.html">define_key(3x)</A></STRONG>                                     <STRONG><A HREF="define_key.3x.html">define_key(3x)</A></STRONG>
+<STRONG><A HREF="define_key.3x.html">define_key(3x)</A></STRONG>                                           <STRONG><A HREF="define_key.3x.html">define_key(3x)</A></STRONG>
 
 
 
@@ -88,7 +88,7 @@
 
 </PRE>
 <H2>SEE ALSO</H2><PRE>
-       <STRONG><A HREF="keyok.3x.html">keyok(3x)</A></STRONG>.
+       <STRONG><A HREF="keyok.3x.html">keyok(3x)</A></STRONG>, <STRONG><A HREF="key_defined.3x.html">key_defined(3x)</A></STRONG>.
 
 
 </PRE>
@@ -97,7 +97,7 @@
 
 
 
-                                                   <STRONG><A HREF="define_key.3x.html">define_key(3x)</A></STRONG>
+                                                         <STRONG><A HREF="define_key.3x.html">define_key(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/form.3x.html ncurses-5.4/doc/html/man/form.3x.html
--- ncurses-5.4.orig/doc/html/man/form.3x.html	2003-10-25 17:39:52.000000000 +0000
+++ ncurses-5.4/doc/html/man/form.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="form.3x.html">form(3x)</A></STRONG>                                                 <STRONG><A HREF="form.3x.html">form(3x)</A></STRONG>
+<STRONG><A HREF="form.3x.html">form(3x)</A></STRONG>                                                       <STRONG><A HREF="form.3x.html">form(3x)</A></STRONG>
 
 
 
@@ -84,6 +84,7 @@
        The following table lists each <STRONG>form</STRONG> routine and  the  name
        of the manual page on which it is described.
 
+
        <STRONG>curses</STRONG> Routine Name    Manual Page Name
        -------------------------------------------------
        current_field          <STRONG><A HREF="form_page.3x.html">form_page(3x)</A></STRONG>
@@ -111,8 +112,8 @@
        form_driver            <STRONG><A HREF="form_driver.3x.html">form_driver(3x)</A></STRONG>
        form_fields            <STRONG><A HREF="form_field.3x.html">form_field(3x)</A></STRONG>
        form_init              <STRONG><A HREF="form_hook.3x.html">form_hook(3x)</A></STRONG>
-       form_opts              <STRONG><A HREF="form_opts.3x.html">form_opts(3x)</A></STRONG>
 
+       form_opts              <STRONG><A HREF="form_opts.3x.html">form_opts(3x)</A></STRONG>
        form_opts_off          <STRONG><A HREF="form_opts.3x.html">form_opts(3x)</A></STRONG>
        form_opts_on           <STRONG><A HREF="form_opts.3x.html">form_opts(3x)</A></STRONG>
        form_page              <STRONG><A HREF="form_page.3x.html">form_page(3x)</A></STRONG>
@@ -234,7 +235,7 @@
 
 
 
-                                                         <STRONG><A HREF="form.3x.html">form(3x)</A></STRONG>
+                                                               <STRONG><A HREF="form.3x.html">form(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/form_cursor.3x.html ncurses-5.4/doc/html/man/form_cursor.3x.html
--- ncurses-5.4.orig/doc/html/man/form_cursor.3x.html	2003-10-25 17:39:52.000000000 +0000
+++ ncurses-5.4/doc/html/man/form_cursor.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="form_cursor.3x.html">form_cursor(3x)</A></STRONG>                                   <STRONG><A HREF="form_cursor.3x.html">form_cursor(3x)</A></STRONG>
+<STRONG><A HREF="form_cursor.3x.html">form_cursor(3x)</A></STRONG>                                         <STRONG><A HREF="form_cursor.3x.html">form_cursor(3x)</A></STRONG>
 
 
 
@@ -107,7 +107,7 @@
 
 
 
-                                                  <STRONG><A HREF="form_cursor.3x.html">form_cursor(3x)</A></STRONG>
+                                                        <STRONG><A HREF="form_cursor.3x.html">form_cursor(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/form_data.3x.html ncurses-5.4/doc/html/man/form_data.3x.html
--- ncurses-5.4.orig/doc/html/man/form_data.3x.html	2003-10-25 17:39:52.000000000 +0000
+++ ncurses-5.4/doc/html/man/form_data.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="form_data.3x.html">form_data(3x)</A></STRONG>                                       <STRONG><A HREF="form_data.3x.html">form_data(3x)</A></STRONG>
+<STRONG><A HREF="form_data.3x.html">form_data(3x)</A></STRONG>                                             <STRONG><A HREF="form_data.3x.html">form_data(3x)</A></STRONG>
 
 
 
@@ -93,7 +93,7 @@
 
 
 
-                                                    <STRONG><A HREF="form_data.3x.html">form_data(3x)</A></STRONG>
+                                                          <STRONG><A HREF="form_data.3x.html">form_data(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/form_driver.3x.html ncurses-5.4/doc/html/man/form_driver.3x.html
--- ncurses-5.4.orig/doc/html/man/form_driver.3x.html	2003-10-25 17:39:52.000000000 +0000
+++ ncurses-5.4/doc/html/man/form_driver.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="form_driver.3x.html">form_driver(3x)</A></STRONG>                                   <STRONG><A HREF="form_driver.3x.html">form_driver(3x)</A></STRONG>
+<STRONG><A HREF="form_driver.3x.html">form_driver(3x)</A></STRONG>                                         <STRONG><A HREF="form_driver.3x.html">form_driver(3x)</A></STRONG>
 
 
 
@@ -308,7 +308,7 @@
 
 
 
-                                                  <STRONG><A HREF="form_driver.3x.html">form_driver(3x)</A></STRONG>
+                                                        <STRONG><A HREF="form_driver.3x.html">form_driver(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/form_field.3x.html ncurses-5.4/doc/html/man/form_field.3x.html
--- ncurses-5.4.orig/doc/html/man/form_field.3x.html	2003-10-25 17:39:52.000000000 +0000
+++ ncurses-5.4/doc/html/man/form_field.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="form_field.3x.html">form_field(3x)</A></STRONG>                                     <STRONG><A HREF="form_field.3x.html">form_field(3x)</A></STRONG>
+<STRONG><A HREF="form_field.3x.html">form_field(3x)</A></STRONG>                                           <STRONG><A HREF="form_field.3x.html">form_field(3x)</A></STRONG>
 
 
 
@@ -130,7 +130,7 @@
 
 
 
-                                                   <STRONG><A HREF="form_field.3x.html">form_field(3x)</A></STRONG>
+                                                         <STRONG><A HREF="form_field.3x.html">form_field(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/form_field_attributes.3x.html ncurses-5.4/doc/html/man/form_field_attributes.3x.html
--- ncurses-5.4.orig/doc/html/man/form_field_attributes.3x.html	2003-10-25 17:39:52.000000000 +0000
+++ ncurses-5.4/doc/html/man/form_field_attributes.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="form_field_attributes.3x.html">form_field_attributes(3x)</A></STRONG>               <STRONG><A HREF="form_field_attributes.3x.html">form_field_attributes(3x)</A></STRONG>
+<STRONG><A HREF="form_field_attributes.3x.html">form_field_attributes(3x)</A></STRONG>                     <STRONG><A HREF="form_field_attributes.3x.html">form_field_attributes(3x)</A></STRONG>
 
 
 
@@ -119,7 +119,7 @@
 
 
 
-                                        <STRONG><A HREF="form_field_attributes.3x.html">form_field_attributes(3x)</A></STRONG>
+                                              <STRONG><A HREF="form_field_attributes.3x.html">form_field_attributes(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/form_field_buffer.3x.html ncurses-5.4/doc/html/man/form_field_buffer.3x.html
--- ncurses-5.4.orig/doc/html/man/form_field_buffer.3x.html	2003-10-25 17:39:52.000000000 +0000
+++ ncurses-5.4/doc/html/man/form_field_buffer.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -2,7 +2,7 @@
 <!-- 
   * t
   ****************************************************************************
-  * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc.              *
+  * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc.              *
   *                                                                          *
   * Permission is hereby granted, free of charge, to any person obtaining a  *
   * copy of this software and associated documentation files (the            *
@@ -28,7 +28,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: form_field_buffer.3x,v 1.10 2003/05/10 20:22:01 tom Exp @
+  * @Id: form_field_buffer.3x,v 1.11 2004/05/16 15:58:51 tom Exp @
 -->
 <HTML>
 <HEAD>
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="form_field_buffer.3x.html">form_field_buffer(3x)</A></STRONG>                       <STRONG><A HREF="form_field_buffer.3x.html">form_field_buffer(3x)</A></STRONG>
+<STRONG><A HREF="form_field_buffer.3x.html">form_field_buffer(3x)</A></STRONG>                             <STRONG><A HREF="form_field_buffer.3x.html">form_field_buffer(3x)</A></STRONG>
 
 
 
@@ -118,7 +118,13 @@
 </PRE>
 <H2>NOTES</H2><PRE>
        The header file <STRONG>&lt;form.h&gt;</STRONG> automatically includes the header
-       file <STRONG>&lt;curses.h&gt;</STRONG>.
+       file
+
+       When  configured for wide-characters, <STRONG>field_buffer</STRONG> returns
+       a pointer to temporary storage (allocated and freed by the
+       library).   The  application  should not attempt to modify
+       the  data.   It  will  be  freed  on  the  next  call   to
+       <STRONG>field_buffer</STRONG> to return the same buffer.  <STRONG>&lt;curses.h&gt;</STRONG>.
 
 
 </PRE>
@@ -134,7 +140,7 @@
 
 
 
-                                            <STRONG><A HREF="form_field_buffer.3x.html">form_field_buffer(3x)</A></STRONG>
+                                                  <STRONG><A HREF="form_field_buffer.3x.html">form_field_buffer(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/form_field_info.3x.html ncurses-5.4/doc/html/man/form_field_info.3x.html
--- ncurses-5.4.orig/doc/html/man/form_field_info.3x.html	2003-10-25 17:39:53.000000000 +0000
+++ ncurses-5.4/doc/html/man/form_field_info.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="form_field_info.3x.html">form_field_info(3x)</A></STRONG>                           <STRONG><A HREF="form_field_info.3x.html">form_field_info(3x)</A></STRONG>
+<STRONG><A HREF="form_field_info.3x.html">form_field_info(3x)</A></STRONG>                                 <STRONG><A HREF="form_field_info.3x.html">form_field_info(3x)</A></STRONG>
 
 
 
@@ -118,7 +118,7 @@
 
 
 
-                                              <STRONG><A HREF="form_field_info.3x.html">form_field_info(3x)</A></STRONG>
+                                                    <STRONG><A HREF="form_field_info.3x.html">form_field_info(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/form_field_just.3x.html ncurses-5.4/doc/html/man/form_field_just.3x.html
--- ncurses-5.4.orig/doc/html/man/form_field_just.3x.html	2003-10-25 17:39:53.000000000 +0000
+++ ncurses-5.4/doc/html/man/form_field_just.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="form_field_just.3x.html">form_field_just(3x)</A></STRONG>                           <STRONG><A HREF="form_field_just.3x.html">form_field_just(3x)</A></STRONG>
+<STRONG><A HREF="form_field_just.3x.html">form_field_just(3x)</A></STRONG>                                 <STRONG><A HREF="form_field_just.3x.html">form_field_just(3x)</A></STRONG>
 
 
 
@@ -109,7 +109,7 @@
 
 
 
-                                              <STRONG><A HREF="form_field_just.3x.html">form_field_just(3x)</A></STRONG>
+                                                    <STRONG><A HREF="form_field_just.3x.html">form_field_just(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/form_field_new.3x.html ncurses-5.4/doc/html/man/form_field_new.3x.html
--- ncurses-5.4.orig/doc/html/man/form_field_new.3x.html	2003-10-25 17:39:53.000000000 +0000
+++ ncurses-5.4/doc/html/man/form_field_new.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="form_field_new.3x.html">form_field_new(3x)</A></STRONG>                             <STRONG><A HREF="form_field_new.3x.html">form_field_new(3x)</A></STRONG>
+<STRONG><A HREF="form_field_new.3x.html">form_field_new(3x)</A></STRONG>                                   <STRONG><A HREF="form_field_new.3x.html">form_field_new(3x)</A></STRONG>
 
 
 
@@ -130,7 +130,7 @@
 
 
 
-                                               <STRONG><A HREF="form_field_new.3x.html">form_field_new(3x)</A></STRONG>
+                                                     <STRONG><A HREF="form_field_new.3x.html">form_field_new(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/form_field_opts.3x.html ncurses-5.4/doc/html/man/form_field_opts.3x.html
--- ncurses-5.4.orig/doc/html/man/form_field_opts.3x.html	2003-10-25 17:39:53.000000000 +0000
+++ ncurses-5.4/doc/html/man/form_field_opts.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="form_field_opts.3x.html">form_field_opts(3x)</A></STRONG>                           <STRONG><A HREF="form_field_opts.3x.html">form_field_opts(3x)</A></STRONG>
+<STRONG><A HREF="form_field_opts.3x.html">form_field_opts(3x)</A></STRONG>                                 <STRONG><A HREF="form_field_opts.3x.html">form_field_opts(3x)</A></STRONG>
 
 
 
@@ -150,7 +150,7 @@
 
 
 
-                                              <STRONG><A HREF="form_field_opts.3x.html">form_field_opts(3x)</A></STRONG>
+                                                    <STRONG><A HREF="form_field_opts.3x.html">form_field_opts(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/form_field_userptr.3x.html ncurses-5.4/doc/html/man/form_field_userptr.3x.html
--- ncurses-5.4.orig/doc/html/man/form_field_userptr.3x.html	2003-10-25 17:39:53.000000000 +0000
+++ ncurses-5.4/doc/html/man/form_field_userptr.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="form_field_userptr.3x.html">form_field_userptr(3x)</A></STRONG>                     <STRONG><A HREF="form_field_userptr.3x.html">form_field_userptr(3x)</A></STRONG>
+<STRONG><A HREF="form_field_userptr.3x.html">form_field_userptr(3x)</A></STRONG>                           <STRONG><A HREF="form_field_userptr.3x.html">form_field_userptr(3x)</A></STRONG>
 
 
 
@@ -104,7 +104,7 @@
 
 
 
-                                           <STRONG><A HREF="form_field_userptr.3x.html">form_field_userptr(3x)</A></STRONG>
+                                                 <STRONG><A HREF="form_field_userptr.3x.html">form_field_userptr(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/form_field_validation.3x.html ncurses-5.4/doc/html/man/form_field_validation.3x.html
--- ncurses-5.4.orig/doc/html/man/form_field_validation.3x.html	2003-10-25 17:39:53.000000000 +0000
+++ ncurses-5.4/doc/html/man/form_field_validation.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="form_field_validation.3x.html">form_field_validation(3x)</A></STRONG>               <STRONG><A HREF="form_field_validation.3x.html">form_field_validation(3x)</A></STRONG>
+<STRONG><A HREF="form_field_validation.3x.html">form_field_validation(3x)</A></STRONG>                     <STRONG><A HREF="form_field_validation.3x.html">form_field_validation(3x)</A></STRONG>
 
 
 
@@ -185,7 +185,7 @@
 
 
 
-                                        <STRONG><A HREF="form_field_validation.3x.html">form_field_validation(3x)</A></STRONG>
+                                              <STRONG><A HREF="form_field_validation.3x.html">form_field_validation(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/form_fieldtype.3x.html ncurses-5.4/doc/html/man/form_fieldtype.3x.html
--- ncurses-5.4.orig/doc/html/man/form_fieldtype.3x.html	2003-10-25 17:39:53.000000000 +0000
+++ ncurses-5.4/doc/html/man/form_fieldtype.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="form_fieldtype.3x.html">form_fieldtype(3x)</A></STRONG>                             <STRONG><A HREF="form_fieldtype.3x.html">form_fieldtype(3x)</A></STRONG>
+<STRONG><A HREF="form_fieldtype.3x.html">form_fieldtype(3x)</A></STRONG>                                   <STRONG><A HREF="form_fieldtype.3x.html">form_fieldtype(3x)</A></STRONG>
 
 
 
@@ -166,7 +166,7 @@
 
 
 
-                                               <STRONG><A HREF="form_fieldtype.3x.html">form_fieldtype(3x)</A></STRONG>
+                                                     <STRONG><A HREF="form_fieldtype.3x.html">form_fieldtype(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/form_hook.3x.html ncurses-5.4/doc/html/man/form_hook.3x.html
--- ncurses-5.4.orig/doc/html/man/form_hook.3x.html	2003-10-25 17:39:53.000000000 +0000
+++ ncurses-5.4/doc/html/man/form_hook.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="form_hook.3x.html">form_hook(3x)</A></STRONG>                                       <STRONG><A HREF="form_hook.3x.html">form_hook(3x)</A></STRONG>
+<STRONG><A HREF="form_hook.3x.html">form_hook(3x)</A></STRONG>                                             <STRONG><A HREF="form_hook.3x.html">form_hook(3x)</A></STRONG>
 
 
 
@@ -127,7 +127,7 @@
 
 
 
-                                                    <STRONG><A HREF="form_hook.3x.html">form_hook(3x)</A></STRONG>
+                                                          <STRONG><A HREF="form_hook.3x.html">form_hook(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/form_new.3x.html ncurses-5.4/doc/html/man/form_new.3x.html
--- ncurses-5.4.orig/doc/html/man/form_new.3x.html	2003-10-25 17:39:54.000000000 +0000
+++ ncurses-5.4/doc/html/man/form_new.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="form_new.3x.html">form_new(3x)</A></STRONG>                                         <STRONG><A HREF="form_new.3x.html">form_new(3x)</A></STRONG>
+<STRONG><A HREF="form_new.3x.html">form_new(3x)</A></STRONG>                                               <STRONG><A HREF="form_new.3x.html">form_new(3x)</A></STRONG>
 
 
 
@@ -111,7 +111,7 @@
 
 
 
-                                                     <STRONG><A HREF="form_new.3x.html">form_new(3x)</A></STRONG>
+                                                           <STRONG><A HREF="form_new.3x.html">form_new(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/form_new_page.3x.html ncurses-5.4/doc/html/man/form_new_page.3x.html
--- ncurses-5.4.orig/doc/html/man/form_new_page.3x.html	2003-10-25 17:39:54.000000000 +0000
+++ ncurses-5.4/doc/html/man/form_new_page.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="form_new_page.3x.html">form_new_page(3x)</A></STRONG>                               <STRONG><A HREF="form_new_page.3x.html">form_new_page(3x)</A></STRONG>
+<STRONG><A HREF="form_new_page.3x.html">form_new_page(3x)</A></STRONG>                                     <STRONG><A HREF="form_new_page.3x.html">form_new_page(3x)</A></STRONG>
 
 
 
@@ -108,7 +108,7 @@
 
 
 
-                                                <STRONG><A HREF="form_new_page.3x.html">form_new_page(3x)</A></STRONG>
+                                                      <STRONG><A HREF="form_new_page.3x.html">form_new_page(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/form_opts.3x.html ncurses-5.4/doc/html/man/form_opts.3x.html
--- ncurses-5.4.orig/doc/html/man/form_opts.3x.html	2003-10-25 17:39:54.000000000 +0000
+++ ncurses-5.4/doc/html/man/form_opts.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="form_opts.3x.html">form_opts(3x)</A></STRONG>                                       <STRONG><A HREF="form_opts.3x.html">form_opts(3x)</A></STRONG>
+<STRONG><A HREF="form_opts.3x.html">form_opts(3x)</A></STRONG>                                             <STRONG><A HREF="form_opts.3x.html">form_opts(3x)</A></STRONG>
 
 
 
@@ -123,7 +123,7 @@
 
 
 
-                                                    <STRONG><A HREF="form_opts.3x.html">form_opts(3x)</A></STRONG>
+                                                          <STRONG><A HREF="form_opts.3x.html">form_opts(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/form_page.3x.html ncurses-5.4/doc/html/man/form_page.3x.html
--- ncurses-5.4.orig/doc/html/man/form_page.3x.html	2003-10-25 17:39:54.000000000 +0000
+++ ncurses-5.4/doc/html/man/form_page.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="form_page.3x.html">form_page(3x)</A></STRONG>                                       <STRONG><A HREF="form_page.3x.html">form_page(3x)</A></STRONG>
+<STRONG><A HREF="form_page.3x.html">form_page(3x)</A></STRONG>                                             <STRONG><A HREF="form_page.3x.html">form_page(3x)</A></STRONG>
 
 
 
@@ -128,7 +128,7 @@
 
 
 
-                                                    <STRONG><A HREF="form_page.3x.html">form_page(3x)</A></STRONG>
+                                                          <STRONG><A HREF="form_page.3x.html">form_page(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/form_post.3x.html ncurses-5.4/doc/html/man/form_post.3x.html
--- ncurses-5.4.orig/doc/html/man/form_post.3x.html	2003-10-25 17:39:54.000000000 +0000
+++ ncurses-5.4/doc/html/man/form_post.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="form_post.3x.html">form_post(3x)</A></STRONG>                                       <STRONG><A HREF="form_post.3x.html">form_post(3x)</A></STRONG>
+<STRONG><A HREF="form_post.3x.html">form_post(3x)</A></STRONG>                                             <STRONG><A HREF="form_post.3x.html">form_post(3x)</A></STRONG>
 
 
 
@@ -125,7 +125,7 @@
 
 
 
-                                                    <STRONG><A HREF="form_post.3x.html">form_post(3x)</A></STRONG>
+                                                          <STRONG><A HREF="form_post.3x.html">form_post(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/form_requestname.3x.html ncurses-5.4/doc/html/man/form_requestname.3x.html
--- ncurses-5.4.orig/doc/html/man/form_requestname.3x.html	2003-10-25 17:39:54.000000000 +0000
+++ ncurses-5.4/doc/html/man/form_requestname.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="form_requestname.3x.html">form_requestname(3x)</A></STRONG>                         <STRONG><A HREF="form_requestname.3x.html">form_requestname(3x)</A></STRONG>
+<STRONG><A HREF="form_requestname.3x.html">form_requestname(3x)</A></STRONG>                               <STRONG><A HREF="form_requestname.3x.html">form_requestname(3x)</A></STRONG>
 
 
 
@@ -62,8 +62,8 @@
 <H2>DESCRIPTION</H2><PRE>
        The  function <STRONG>form_request_name</STRONG> returns the printable name
        of a form request code.
-       The function <STRONG>form_request_by_name</STRONG> searches  in  the  name-
-       table  for  a  request with the given name and returns its
+       The function <STRONG>form_request_by_name</STRONG> searches in the name-ta-
+       ble  for  a  request  with  the given name and returns its
        request code. Otherwise E_NO_MATCH is returned.
 
 
@@ -100,7 +100,7 @@
 
 
 
-                                             <STRONG><A HREF="form_requestname.3x.html">form_requestname(3x)</A></STRONG>
+                                                   <STRONG><A HREF="form_requestname.3x.html">form_requestname(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/form_userptr.3x.html ncurses-5.4/doc/html/man/form_userptr.3x.html
--- ncurses-5.4.orig/doc/html/man/form_userptr.3x.html	2003-10-25 17:39:54.000000000 +0000
+++ ncurses-5.4/doc/html/man/form_userptr.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="form_userptr.3x.html">form_userptr(3x)</A></STRONG>                                 <STRONG><A HREF="form_userptr.3x.html">form_userptr(3x)</A></STRONG>
+<STRONG><A HREF="form_userptr.3x.html">form_userptr(3x)</A></STRONG>                                       <STRONG><A HREF="form_userptr.3x.html">form_userptr(3x)</A></STRONG>
 
 
 
@@ -104,7 +104,7 @@
 
 
 
-                                                 <STRONG><A HREF="form_userptr.3x.html">form_userptr(3x)</A></STRONG>
+                                                       <STRONG><A HREF="form_userptr.3x.html">form_userptr(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/form_win.3x.html ncurses-5.4/doc/html/man/form_win.3x.html
--- ncurses-5.4.orig/doc/html/man/form_win.3x.html	2003-10-25 17:39:55.000000000 +0000
+++ ncurses-5.4/doc/html/man/form_win.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="form_win.3x.html">form_win(3x)</A></STRONG>                                         <STRONG><A HREF="form_win.3x.html">form_win(3x)</A></STRONG>
+<STRONG><A HREF="form_win.3x.html">form_win(3x)</A></STRONG>                                               <STRONG><A HREF="form_win.3x.html">form_win(3x)</A></STRONG>
 
 
 
@@ -128,7 +128,7 @@
 
 
 
-                                                     <STRONG><A HREF="form_win.3x.html">form_win(3x)</A></STRONG>
+                                                           <STRONG><A HREF="form_win.3x.html">form_win(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/infocmp.1m.html ncurses-5.4/doc/html/man/infocmp.1m.html
--- ncurses-5.4.orig/doc/html/man/infocmp.1m.html	2004-01-11 01:46:25.000000000 +0000
+++ ncurses-5.4/doc/html/man/infocmp.1m.html	2005-05-13 04:09:59.000000000 +0000
@@ -2,7 +2,7 @@
 <!-- 
   * t
   ****************************************************************************
-  * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc.              *
+  * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc.              *
   *                                                                          *
   * Permission is hereby granted, free of charge, to any person obtaining a  *
   * copy of this software and associated documentation files (the            *
@@ -28,7 +28,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: infocmp.1m,v 1.34 2003/10/25 16:19:01 tom Exp @
+  * @Id: infocmp.1m,v 1.39 2004/08/28 22:43:49 tom Exp @
 -->
 <HTML>
 <HEAD>
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>                                           <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>
+<STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>                                                 <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>
 
 
 
@@ -53,7 +53,7 @@
 
 </PRE>
 <H2>SYNOPSIS</H2><PRE>
-       <STRONG>infocmp</STRONG> [<STRONG>-1CEFGILTVcdegilnpqrtu</STRONG>]
+       <STRONG>infocmp</STRONG> [<STRONG>-1CEFGILTVcdegilnpqrtux</STRONG>]
              [<STRONG>-v</STRONG> <EM>n</EM>] [<STRONG>-s</STRONG> <STRONG>d</STRONG>| <STRONG>i</STRONG>| <STRONG>l</STRONG>| <STRONG>c</STRONG>] [<STRONG>-R</STRONG> <STRONG>subset</STRONG>]
              [<STRONG>-w</STRONG> <EM>width</EM>] [<STRONG>-A</STRONG> <EM>directory</EM>] [<STRONG>-B</STRONG> <EM>directory</EM>]
              [<EM>termname</EM>...]
@@ -103,6 +103,7 @@
        The <STRONG>-I</STRONG>, <STRONG>-L</STRONG>, and <STRONG>-C</STRONG> options will produce a  source  listing
        for each terminal named.
 
+
       <STRONG>-I</STRONG>   use the <STRONG>terminfo</STRONG> names
       <STRONG>-L</STRONG>   use the long C variable name listed in &lt;<STRONG>term.h</STRONG>&gt;
       <STRONG>-C</STRONG>   use the <STRONG>termcap</STRONG> names
@@ -144,6 +145,7 @@
        equivalents, and some terminal types which  commonly  have
        such sequences, are:
 
+
      <STRONG>terminfo</STRONG>                    <STRONG>termcap</STRONG>   Representative Terminals
      ---------------------------------------------------------------
      <STRONG>%p1%c</STRONG>                       <STRONG>%.</STRONG>        adm
@@ -280,6 +282,7 @@
             tions.  Here  is  a  list  of  the  DEC/ANSI  special
             sequences recognized:
 
+
                   Action        Meaning
                   -----------------------------------------
                   RIS           full reset
@@ -288,6 +291,9 @@
                   LL            home-down
                   RSR           reset scroll region
 
+                  DECSTR        soft reset (VT320)
+                  S7C1T         7-bit controls (VT220)
+
                   ISO DEC G0    enable DEC graphics for G0
                   ISO UK G0     enable UK chars for G0
                   ISO US G0     enable US chars for G0
@@ -299,8 +305,14 @@
                   DECPNM        normal keypad mode
                   DECANSI       enter ANSI mode
 
+                  ECMA[+-]AM    keyboard action mode
+                  ECMA[+-]IRM   insert replace mode
+                  ECMA[+-]SRM   send receive mode
+                  ECMA[+-]LNM   linefeed mode
+
                   DEC[+-]CKM    application cursor keys
                   DEC[+-]ANM    set VT52 mode
+
                   DEC[+-]COLM   132-column mode
                   DEC[+-]SCLM   smooth scroll
                   DEC[+-]SCNM   reverse video mode
@@ -376,6 +388,10 @@
        <STRONG>-w</STRONG> <EM>width</EM>
             changes the output to <EM>width</EM> characters.
 
+       <STRONG>-x</STRONG>   print   information  for  user-defined  capabilities.
+            These are extensions to the terminfo repertoire which
+            can be loaded using the <STRONG>-x</STRONG> option of <STRONG>tic</STRONG>.
+
 
 </PRE>
 <H2>FILES</H2><PRE>
@@ -412,7 +428,7 @@
 
 
 
-                                                      <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>
+                                                            <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/infotocap.1m.html ncurses-5.4/doc/html/man/infotocap.1m.html
--- ncurses-5.4.orig/doc/html/man/infotocap.1m.html	2003-10-25 17:39:55.000000000 +0000
+++ ncurses-5.4/doc/html/man/infotocap.1m.html	2005-05-13 04:09:59.000000000 +0000
@@ -2,7 +2,7 @@
 <!-- 
   * t
   ****************************************************************************
-  * Copyright (c) 1999-2000,2003 Free Software Foundation, Inc.              *
+  * Copyright (c) 1999-2003,2004 Free Software Foundation, Inc.              *
   *                                                                          *
   * Permission is hereby granted, free of charge, to any person obtaining a  *
   * copy of this software and associated documentation files (the            *
@@ -28,7 +28,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: infotocap.1m,v 1.4 2003/05/11 00:32:53 tom Exp @
+  * @Id: infotocap.1m,v 1.5 2004/07/05 13:16:08 tom Exp @
 -->
 <HTML>
 <HEAD>
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="infotocap.1m.html">infotocap(1m)</A></STRONG>                                       <STRONG><A HREF="infotocap.1m.html">infotocap(1m)</A></STRONG>
+<STRONG><A HREF="infotocap.1m.html">infotocap(1m)</A></STRONG>                                             <STRONG><A HREF="infotocap.1m.html">infotocap(1m)</A></STRONG>
 
 
 
@@ -95,7 +95,7 @@
 
 
 
-                                                    <STRONG><A HREF="infotocap.1m.html">infotocap(1m)</A></STRONG>
+                                                          <STRONG><A HREF="infotocap.1m.html">infotocap(1m)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/key_defined.3x.html ncurses-5.4/doc/html/man/key_defined.3x.html
--- ncurses-5.4.orig/doc/html/man/key_defined.3x.html	2003-10-25 17:39:55.000000000 +0000
+++ ncurses-5.4/doc/html/man/key_defined.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
 <!-- 
   ****************************************************************************
-  * Copyright (c) 2003 Free Software Foundation, Inc.                        *
+  * Copyright (c) 2003,2004 Free Software Foundation, Inc.                   *
   *                                                                          *
   * Permission is hereby granted, free of charge, to any person obtaining a  *
   * copy of this software and associated documentation files (the            *
@@ -28,7 +28,7 @@
   * authorization.                                                           *
   ****************************************************************************
   * Author: Thomas E. Dickey 2003
-  * @Id: key_defined.3x,v 1.2 2003/05/17 23:24:45 tom Exp @
+  * @Id: key_defined.3x,v 1.3 2004/06/05 19:19:09 tom Exp @
 -->
 <HTML>
 <HEAD>
@@ -41,14 +41,14 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="key_defined.3x.html">key_defined(3x)</A></STRONG>                                   <STRONG><A HREF="key_defined.3x.html">key_defined(3x)</A></STRONG>
+<STRONG><A HREF="key_defined.3x.html">key_defined(3x)</A></STRONG>                                         <STRONG><A HREF="key_defined.3x.html">key_defined(3x)</A></STRONG>
 
 
 
 
 </PRE>
 <H2>NAME</H2><PRE>
-       <STRONG>define_key</STRONG> - define a keycode
+       <STRONG>key_defined</STRONG> - check if a keycode is defined
 
 
 </PRE>
@@ -92,7 +92,7 @@
 
 
 
-                                                  <STRONG><A HREF="key_defined.3x.html">key_defined(3x)</A></STRONG>
+                                                        <STRONG><A HREF="key_defined.3x.html">key_defined(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/keybound.3x.html ncurses-5.4/doc/html/man/keybound.3x.html
--- ncurses-5.4.orig/doc/html/man/keybound.3x.html	2004-01-11 01:46:25.000000000 +0000
+++ ncurses-5.4/doc/html/man/keybound.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="keyok.3x.html">keyok(3x)</A></STRONG>                                               <STRONG><A HREF="keyok.3x.html">keyok(3x)</A></STRONG>
+<STRONG><A HREF="keyok.3x.html">keyok(3x)</A></STRONG>                                                     <STRONG><A HREF="keyok.3x.html">keyok(3x)</A></STRONG>
 
 
 
@@ -94,7 +94,7 @@
 
 
 
-                                                        <STRONG><A HREF="keyok.3x.html">keyok(3x)</A></STRONG>
+                                                              <STRONG><A HREF="keyok.3x.html">keyok(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/keyok.3x.html ncurses-5.4/doc/html/man/keyok.3x.html
--- ncurses-5.4.orig/doc/html/man/keyok.3x.html	2004-01-11 01:46:26.000000000 +0000
+++ ncurses-5.4/doc/html/man/keyok.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="keyok.3x.html">keyok(3x)</A></STRONG>                                               <STRONG><A HREF="keyok.3x.html">keyok(3x)</A></STRONG>
+<STRONG><A HREF="keyok.3x.html">keyok(3x)</A></STRONG>                                                     <STRONG><A HREF="keyok.3x.html">keyok(3x)</A></STRONG>
 
 
 
@@ -94,7 +94,7 @@
 
 
 
-                                                        <STRONG><A HREF="keyok.3x.html">keyok(3x)</A></STRONG>
+                                                              <STRONG><A HREF="keyok.3x.html">keyok(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/menu.3x.html ncurses-5.4/doc/html/man/menu.3x.html
--- ncurses-5.4.orig/doc/html/man/menu.3x.html	2003-10-25 17:39:55.000000000 +0000
+++ ncurses-5.4/doc/html/man/menu.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="menu.3x.html">menu(3x)</A></STRONG>                                                 <STRONG><A HREF="menu.3x.html">menu(3x)</A></STRONG>
+<STRONG><A HREF="menu.3x.html">menu(3x)</A></STRONG>                                                       <STRONG><A HREF="menu.3x.html">menu(3x)</A></STRONG>
 
 
 
@@ -84,6 +84,7 @@
        The following table lists each <STRONG>menu</STRONG> routine and  the  name
        of the manual page on which it is described.
 
+
        <STRONG>curses</STRONG> Routine Name    Manual Page Name
        --------------------------------------------
        current_item           <STRONG><A HREF="mitem_current.3x.html">mitem_current(3x)</A></STRONG>
@@ -111,8 +112,8 @@
        menu_mark              <STRONG><A HREF="menu_mark.3x.html">menu_mark(3x)</A></STRONG>
        menu_opts              <STRONG><A HREF="menu_opts.3x.html">menu_opts(3x)</A></STRONG>
        menu_opts_off          <STRONG><A HREF="menu_opts.3x.html">menu_opts(3x)</A></STRONG>
-       menu_opts_on           <STRONG><A HREF="menu_opts.3x.html">menu_opts(3x)</A></STRONG>
 
+       menu_opts_on           <STRONG><A HREF="menu_opts.3x.html">menu_opts(3x)</A></STRONG>
        menu_pad               <STRONG><A HREF="menu_attributes.3x.html">menu_attributes(3x)</A></STRONG>
        menu_pattern           <STRONG><A HREF="menu_pattern.3x.html">menu_pattern(3x)</A></STRONG>
        menu_request_by_name   <STRONG><A HREF="menu_requestname.3x.html">menu_requestname(3x)</A></STRONG>
@@ -227,7 +228,7 @@
 
 
 
-                                                         <STRONG><A HREF="menu.3x.html">menu(3x)</A></STRONG>
+                                                               <STRONG><A HREF="menu.3x.html">menu(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/menu_attributes.3x.html ncurses-5.4/doc/html/man/menu_attributes.3x.html
--- ncurses-5.4.orig/doc/html/man/menu_attributes.3x.html	2003-10-25 17:39:55.000000000 +0000
+++ ncurses-5.4/doc/html/man/menu_attributes.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="menu_attributes.3x.html">menu_attributes(3x)</A></STRONG>                           <STRONG><A HREF="menu_attributes.3x.html">menu_attributes(3x)</A></STRONG>
+<STRONG><A HREF="menu_attributes.3x.html">menu_attributes(3x)</A></STRONG>                                 <STRONG><A HREF="menu_attributes.3x.html">menu_attributes(3x)</A></STRONG>
 
 
 
@@ -128,7 +128,7 @@
 
 
 
-                                              <STRONG><A HREF="menu_attributes.3x.html">menu_attributes(3x)</A></STRONG>
+                                                    <STRONG><A HREF="menu_attributes.3x.html">menu_attributes(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/menu_cursor.3x.html ncurses-5.4/doc/html/man/menu_cursor.3x.html
--- ncurses-5.4.orig/doc/html/man/menu_cursor.3x.html	2003-10-25 17:39:56.000000000 +0000
+++ ncurses-5.4/doc/html/man/menu_cursor.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="menu_cursor.3x.html">menu_cursor(3x)</A></STRONG>                                   <STRONG><A HREF="menu_cursor.3x.html">menu_cursor(3x)</A></STRONG>
+<STRONG><A HREF="menu_cursor.3x.html">menu_cursor(3x)</A></STRONG>                                         <STRONG><A HREF="menu_cursor.3x.html">menu_cursor(3x)</A></STRONG>
 
 
 
@@ -106,7 +106,7 @@
 
 
 
-                                                  <STRONG><A HREF="menu_cursor.3x.html">menu_cursor(3x)</A></STRONG>
+                                                        <STRONG><A HREF="menu_cursor.3x.html">menu_cursor(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/menu_driver.3x.html ncurses-5.4/doc/html/man/menu_driver.3x.html
--- ncurses-5.4.orig/doc/html/man/menu_driver.3x.html	2003-10-25 17:39:56.000000000 +0000
+++ ncurses-5.4/doc/html/man/menu_driver.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="menu_driver.3x.html">menu_driver(3x)</A></STRONG>                                   <STRONG><A HREF="menu_driver.3x.html">menu_driver(3x)</A></STRONG>
+<STRONG><A HREF="menu_driver.3x.html">menu_driver(3x)</A></STRONG>                                         <STRONG><A HREF="menu_driver.3x.html">menu_driver(3x)</A></STRONG>
 
 
 
@@ -213,7 +213,7 @@
 
 
 
-                                                  <STRONG><A HREF="menu_driver.3x.html">menu_driver(3x)</A></STRONG>
+                                                        <STRONG><A HREF="menu_driver.3x.html">menu_driver(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/menu_format.3x.html ncurses-5.4/doc/html/man/menu_format.3x.html
--- ncurses-5.4.orig/doc/html/man/menu_format.3x.html	2003-10-25 17:39:56.000000000 +0000
+++ ncurses-5.4/doc/html/man/menu_format.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="menu_format.3x.html">menu_format(3x)</A></STRONG>                                   <STRONG><A HREF="menu_format.3x.html">menu_format(3x)</A></STRONG>
+<STRONG><A HREF="menu_format.3x.html">menu_format(3x)</A></STRONG>                                         <STRONG><A HREF="menu_format.3x.html">menu_format(3x)</A></STRONG>
 
 
 
@@ -119,7 +119,7 @@
 
 
 
-                                                  <STRONG><A HREF="menu_format.3x.html">menu_format(3x)</A></STRONG>
+                                                        <STRONG><A HREF="menu_format.3x.html">menu_format(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/menu_hook.3x.html ncurses-5.4/doc/html/man/menu_hook.3x.html
--- ncurses-5.4.orig/doc/html/man/menu_hook.3x.html	2003-10-25 17:39:56.000000000 +0000
+++ ncurses-5.4/doc/html/man/menu_hook.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="menu_hook.3x.html">menu_hook(3x)</A></STRONG>                                       <STRONG><A HREF="menu_hook.3x.html">menu_hook(3x)</A></STRONG>
+<STRONG><A HREF="menu_hook.3x.html">menu_hook(3x)</A></STRONG>                                             <STRONG><A HREF="menu_hook.3x.html">menu_hook(3x)</A></STRONG>
 
 
 
@@ -127,7 +127,7 @@
 
 
 
-                                                    <STRONG><A HREF="menu_hook.3x.html">menu_hook(3x)</A></STRONG>
+                                                          <STRONG><A HREF="menu_hook.3x.html">menu_hook(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/menu_items.3x.html ncurses-5.4/doc/html/man/menu_items.3x.html
--- ncurses-5.4.orig/doc/html/man/menu_items.3x.html	2003-10-25 17:39:56.000000000 +0000
+++ ncurses-5.4/doc/html/man/menu_items.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="menu_items.3x.html">menu_items(3x)</A></STRONG>                                     <STRONG><A HREF="menu_items.3x.html">menu_items(3x)</A></STRONG>
+<STRONG><A HREF="menu_items.3x.html">menu_items(3x)</A></STRONG>                                           <STRONG><A HREF="menu_items.3x.html">menu_items(3x)</A></STRONG>
 
 
 
@@ -126,6 +126,7 @@
 
 
 
+                                                         <STRONG><A HREF="menu_items.3x.html">menu_items(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/menu_mark.3x.html ncurses-5.4/doc/html/man/menu_mark.3x.html
--- ncurses-5.4.orig/doc/html/man/menu_mark.3x.html	2003-10-25 17:39:56.000000000 +0000
+++ ncurses-5.4/doc/html/man/menu_mark.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="menu_mark.3x.html">menu_mark(3x)</A></STRONG>                                       <STRONG><A HREF="menu_mark.3x.html">menu_mark(3x)</A></STRONG>
+<STRONG><A HREF="menu_mark.3x.html">menu_mark(3x)</A></STRONG>                                             <STRONG><A HREF="menu_mark.3x.html">menu_mark(3x)</A></STRONG>
 
 
 
@@ -117,7 +117,7 @@
 
 
 
-                                                    <STRONG><A HREF="menu_mark.3x.html">menu_mark(3x)</A></STRONG>
+                                                          <STRONG><A HREF="menu_mark.3x.html">menu_mark(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/menu_new.3x.html ncurses-5.4/doc/html/man/menu_new.3x.html
--- ncurses-5.4.orig/doc/html/man/menu_new.3x.html	2003-10-25 17:39:56.000000000 +0000
+++ ncurses-5.4/doc/html/man/menu_new.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="menu_new.3x.html">menu_new(3x)</A></STRONG>                                         <STRONG><A HREF="menu_new.3x.html">menu_new(3x)</A></STRONG>
+<STRONG><A HREF="menu_new.3x.html">menu_new(3x)</A></STRONG>                                               <STRONG><A HREF="menu_new.3x.html">menu_new(3x)</A></STRONG>
 
 
 
@@ -111,7 +111,7 @@
 
 
 
-                                                     <STRONG><A HREF="menu_new.3x.html">menu_new(3x)</A></STRONG>
+                                                           <STRONG><A HREF="menu_new.3x.html">menu_new(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/menu_opts.3x.html ncurses-5.4/doc/html/man/menu_opts.3x.html
--- ncurses-5.4.orig/doc/html/man/menu_opts.3x.html	2003-10-25 17:39:56.000000000 +0000
+++ ncurses-5.4/doc/html/man/menu_opts.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="menu_opts.3x.html">menu_opts(3x)</A></STRONG>                                       <STRONG><A HREF="menu_opts.3x.html">menu_opts(3x)</A></STRONG>
+<STRONG><A HREF="menu_opts.3x.html">menu_opts(3x)</A></STRONG>                                             <STRONG><A HREF="menu_opts.3x.html">menu_opts(3x)</A></STRONG>
 
 
 
@@ -137,7 +137,7 @@
 
 
 
-                                                    <STRONG><A HREF="menu_opts.3x.html">menu_opts(3x)</A></STRONG>
+                                                          <STRONG><A HREF="menu_opts.3x.html">menu_opts(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/menu_pattern.3x.html ncurses-5.4/doc/html/man/menu_pattern.3x.html
--- ncurses-5.4.orig/doc/html/man/menu_pattern.3x.html	2003-10-25 17:39:57.000000000 +0000
+++ ncurses-5.4/doc/html/man/menu_pattern.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="menu_pattern.3x.html">menu_pattern(3x)</A></STRONG>                                 <STRONG><A HREF="menu_pattern.3x.html">menu_pattern(3x)</A></STRONG>
+<STRONG><A HREF="menu_pattern.3x.html">menu_pattern(3x)</A></STRONG>                                       <STRONG><A HREF="menu_pattern.3x.html">menu_pattern(3x)</A></STRONG>
 
 
 
@@ -116,7 +116,7 @@
 
 
 
-                                                 <STRONG><A HREF="menu_pattern.3x.html">menu_pattern(3x)</A></STRONG>
+                                                       <STRONG><A HREF="menu_pattern.3x.html">menu_pattern(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/menu_post.3x.html ncurses-5.4/doc/html/man/menu_post.3x.html
--- ncurses-5.4.orig/doc/html/man/menu_post.3x.html	2003-10-25 17:39:57.000000000 +0000
+++ ncurses-5.4/doc/html/man/menu_post.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="menu_post.3x.html">menu_post(3x)</A></STRONG>                                       <STRONG><A HREF="menu_post.3x.html">menu_post(3x)</A></STRONG>
+<STRONG><A HREF="menu_post.3x.html">menu_post(3x)</A></STRONG>                                             <STRONG><A HREF="menu_post.3x.html">menu_post(3x)</A></STRONG>
 
 
 
@@ -127,7 +127,7 @@
 
 
 
-                                                    <STRONG><A HREF="menu_post.3x.html">menu_post(3x)</A></STRONG>
+                                                          <STRONG><A HREF="menu_post.3x.html">menu_post(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/menu_requestname.3x.html ncurses-5.4/doc/html/man/menu_requestname.3x.html
--- ncurses-5.4.orig/doc/html/man/menu_requestname.3x.html	2003-10-25 17:39:57.000000000 +0000
+++ ncurses-5.4/doc/html/man/menu_requestname.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="menu_requestname.3x.html">menu_requestname(3x)</A></STRONG>                         <STRONG><A HREF="menu_requestname.3x.html">menu_requestname(3x)</A></STRONG>
+<STRONG><A HREF="menu_requestname.3x.html">menu_requestname(3x)</A></STRONG>                               <STRONG><A HREF="menu_requestname.3x.html">menu_requestname(3x)</A></STRONG>
 
 
 
@@ -62,8 +62,8 @@
 <H2>DESCRIPTION</H2><PRE>
        The  function <STRONG>menu_request_name</STRONG> returns the printable name
        of a menu request code.
-       The function <STRONG>menu_request_by_name</STRONG> searches  in  the  name-
-       table  for  a  request with the given name and returns its
+       The function <STRONG>menu_request_by_name</STRONG> searches in the name-ta-
+       ble  for  a  request  with  the given name and returns its
        request code. Otherwise E_NO_MATCH is returned.
 
 
@@ -100,7 +100,7 @@
 
 
 
-                                             <STRONG><A HREF="menu_requestname.3x.html">menu_requestname(3x)</A></STRONG>
+                                                   <STRONG><A HREF="menu_requestname.3x.html">menu_requestname(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/menu_spacing.3x.html ncurses-5.4/doc/html/man/menu_spacing.3x.html
--- ncurses-5.4.orig/doc/html/man/menu_spacing.3x.html	2003-10-25 17:39:57.000000000 +0000
+++ ncurses-5.4/doc/html/man/menu_spacing.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -2,7 +2,7 @@
 <!-- 
   * t
   ****************************************************************************
-  * Copyright (c) 1998,2001 Free Software Foundation, Inc.                   *
+  * Copyright (c) 1998-2001,2004 Free Software Foundation, Inc.              *
   *                                                                          *
   * Permission is hereby granted, free of charge, to any person obtaining a  *
   * copy of this software and associated documentation files (the            *
@@ -28,7 +28,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: menu_spacing.3x,v 1.6 2001/08/04 20:36:16 William.Setzer Exp @
+  * @Id: menu_spacing.3x,v 1.8 2004/12/11 23:39:07 tom Exp @
 -->
 <HTML>
 <HEAD>
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="menu_spacing.3x.html">menu_spacing(3x)</A></STRONG>                                 <STRONG><A HREF="menu_spacing.3x.html">menu_spacing(3x)</A></STRONG>
+<STRONG><A HREF="menu_spacing.3x.html">menu_spacing(3x)</A></STRONG>                                       <STRONG><A HREF="menu_spacing.3x.html">menu_spacing(3x)</A></STRONG>
 
 
 
@@ -73,7 +73,7 @@
        the  middle  of  this  spacing area the pad character. The
        remaining parts are filled with spaces.  <STRONG>spc_rows</STRONG> controls
        the  number of rows that are used for an item. It must not
-       be larger than 3. The menu system inserts then blank lines
+       be larger than 3. The menu system inserts the blank  lines
        between  item rows, these lines will contain the pad char-
        acter in the appropriate positions.  <STRONG>spc_columns</STRONG>  controls
        the number of blanks between columns of items. It must not
@@ -118,7 +118,7 @@
 
 
 
-                                                 <STRONG><A HREF="menu_spacing.3x.html">menu_spacing(3x)</A></STRONG>
+                                                       <STRONG><A HREF="menu_spacing.3x.html">menu_spacing(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/menu_userptr.3x.html ncurses-5.4/doc/html/man/menu_userptr.3x.html
--- ncurses-5.4.orig/doc/html/man/menu_userptr.3x.html	2003-10-25 17:39:57.000000000 +0000
+++ ncurses-5.4/doc/html/man/menu_userptr.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="menu_userptr.3x.html">menu_userptr(3x)</A></STRONG>                                 <STRONG><A HREF="menu_userptr.3x.html">menu_userptr(3x)</A></STRONG>
+<STRONG><A HREF="menu_userptr.3x.html">menu_userptr(3x)</A></STRONG>                                       <STRONG><A HREF="menu_userptr.3x.html">menu_userptr(3x)</A></STRONG>
 
 
 
@@ -104,7 +104,7 @@
 
 
 
-                                                 <STRONG><A HREF="menu_userptr.3x.html">menu_userptr(3x)</A></STRONG>
+                                                       <STRONG><A HREF="menu_userptr.3x.html">menu_userptr(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/menu_win.3x.html ncurses-5.4/doc/html/man/menu_win.3x.html
--- ncurses-5.4.orig/doc/html/man/menu_win.3x.html	2003-10-25 17:39:57.000000000 +0000
+++ ncurses-5.4/doc/html/man/menu_win.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="menu_win.3x.html">menu_win(3x)</A></STRONG>                                         <STRONG><A HREF="menu_win.3x.html">menu_win(3x)</A></STRONG>
+<STRONG><A HREF="menu_win.3x.html">menu_win(3x)</A></STRONG>                                               <STRONG><A HREF="menu_win.3x.html">menu_win(3x)</A></STRONG>
 
 
 
@@ -128,7 +128,7 @@
 
 
 
-                                                     <STRONG><A HREF="menu_win.3x.html">menu_win(3x)</A></STRONG>
+                                                           <STRONG><A HREF="menu_win.3x.html">menu_win(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/mitem_current.3x.html ncurses-5.4/doc/html/man/mitem_current.3x.html
--- ncurses-5.4.orig/doc/html/man/mitem_current.3x.html	2003-10-25 17:39:57.000000000 +0000
+++ ncurses-5.4/doc/html/man/mitem_current.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="mitem_current.3x.html">mitem_current(3x)</A></STRONG>                               <STRONG><A HREF="mitem_current.3x.html">mitem_current(3x)</A></STRONG>
+<STRONG><A HREF="mitem_current.3x.html">mitem_current(3x)</A></STRONG>                                     <STRONG><A HREF="mitem_current.3x.html">mitem_current(3x)</A></STRONG>
 
 
 
@@ -134,7 +134,7 @@
 
 
 
-                                                <STRONG><A HREF="mitem_current.3x.html">mitem_current(3x)</A></STRONG>
+                                                      <STRONG><A HREF="mitem_current.3x.html">mitem_current(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/mitem_name.3x.html ncurses-5.4/doc/html/man/mitem_name.3x.html
--- ncurses-5.4.orig/doc/html/man/mitem_name.3x.html	2003-10-25 17:39:57.000000000 +0000
+++ ncurses-5.4/doc/html/man/mitem_name.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="mitem_name.3x.html">mitem_name(3x)</A></STRONG>                                     <STRONG><A HREF="mitem_name.3x.html">mitem_name(3x)</A></STRONG>
+<STRONG><A HREF="mitem_name.3x.html">mitem_name(3x)</A></STRONG>                                           <STRONG><A HREF="mitem_name.3x.html">mitem_name(3x)</A></STRONG>
 
 
 
@@ -95,7 +95,7 @@
 
 
 
-                                                   <STRONG><A HREF="mitem_name.3x.html">mitem_name(3x)</A></STRONG>
+                                                         <STRONG><A HREF="mitem_name.3x.html">mitem_name(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/mitem_new.3x.html ncurses-5.4/doc/html/man/mitem_new.3x.html
--- ncurses-5.4.orig/doc/html/man/mitem_new.3x.html	2004-01-11 01:46:28.000000000 +0000
+++ ncurses-5.4/doc/html/man/mitem_new.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="mitem_new.3x.html">mitem_new(3x)</A></STRONG>                                       <STRONG><A HREF="mitem_new.3x.html">mitem_new(3x)</A></STRONG>
+<STRONG><A HREF="mitem_new.3x.html">mitem_new(3x)</A></STRONG>                                             <STRONG><A HREF="mitem_new.3x.html">mitem_new(3x)</A></STRONG>
 
 
 
@@ -115,7 +115,7 @@
 
 
 
-                                                    <STRONG><A HREF="mitem_new.3x.html">mitem_new(3x)</A></STRONG>
+                                                          <STRONG><A HREF="mitem_new.3x.html">mitem_new(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/mitem_opts.3x.html ncurses-5.4/doc/html/man/mitem_opts.3x.html
--- ncurses-5.4.orig/doc/html/man/mitem_opts.3x.html	2003-10-25 17:39:58.000000000 +0000
+++ ncurses-5.4/doc/html/man/mitem_opts.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="mitem_opts.3x.html">mitem_opts(3x)</A></STRONG>                                     <STRONG><A HREF="mitem_opts.3x.html">mitem_opts(3x)</A></STRONG>
+<STRONG><A HREF="mitem_opts.3x.html">mitem_opts(3x)</A></STRONG>                                           <STRONG><A HREF="mitem_opts.3x.html">mitem_opts(3x)</A></STRONG>
 
 
 
@@ -115,7 +115,7 @@
 
 
 
-                                                   <STRONG><A HREF="mitem_opts.3x.html">mitem_opts(3x)</A></STRONG>
+                                                         <STRONG><A HREF="mitem_opts.3x.html">mitem_opts(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/mitem_userptr.3x.html ncurses-5.4/doc/html/man/mitem_userptr.3x.html
--- ncurses-5.4.orig/doc/html/man/mitem_userptr.3x.html	2003-10-25 17:39:58.000000000 +0000
+++ ncurses-5.4/doc/html/man/mitem_userptr.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="mitem_userptr.3x.html">mitem_userptr(3x)</A></STRONG>                               <STRONG><A HREF="mitem_userptr.3x.html">mitem_userptr(3x)</A></STRONG>
+<STRONG><A HREF="mitem_userptr.3x.html">mitem_userptr(3x)</A></STRONG>                                     <STRONG><A HREF="mitem_userptr.3x.html">mitem_userptr(3x)</A></STRONG>
 
 
 
@@ -104,7 +104,7 @@
 
 
 
-                                                <STRONG><A HREF="mitem_userptr.3x.html">mitem_userptr(3x)</A></STRONG>
+                                                      <STRONG><A HREF="mitem_userptr.3x.html">mitem_userptr(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/mitem_value.3x.html ncurses-5.4/doc/html/man/mitem_value.3x.html
--- ncurses-5.4.orig/doc/html/man/mitem_value.3x.html	2003-10-25 17:39:58.000000000 +0000
+++ ncurses-5.4/doc/html/man/mitem_value.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="mitem_value.3x.html">mitem_value(3x)</A></STRONG>                                   <STRONG><A HREF="mitem_value.3x.html">mitem_value(3x)</A></STRONG>
+<STRONG><A HREF="mitem_value.3x.html">mitem_value(3x)</A></STRONG>                                         <STRONG><A HREF="mitem_value.3x.html">mitem_value(3x)</A></STRONG>
 
 
 
@@ -106,7 +106,7 @@
 
 
 
-                                                  <STRONG><A HREF="mitem_value.3x.html">mitem_value(3x)</A></STRONG>
+                                                        <STRONG><A HREF="mitem_value.3x.html">mitem_value(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/mitem_visible.3x.html ncurses-5.4/doc/html/man/mitem_visible.3x.html
--- ncurses-5.4.orig/doc/html/man/mitem_visible.3x.html	2003-10-25 17:39:58.000000000 +0000
+++ ncurses-5.4/doc/html/man/mitem_visible.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="mitem_visible.3x.html">mitem_visible(3x)</A></STRONG>                               <STRONG><A HREF="mitem_visible.3x.html">mitem_visible(3x)</A></STRONG>
+<STRONG><A HREF="mitem_visible.3x.html">mitem_visible(3x)</A></STRONG>                                     <STRONG><A HREF="mitem_visible.3x.html">mitem_visible(3x)</A></STRONG>
 
 
 
@@ -89,7 +89,7 @@
 
 
 
-                                                <STRONG><A HREF="mitem_visible.3x.html">mitem_visible(3x)</A></STRONG>
+                                                      <STRONG><A HREF="mitem_visible.3x.html">mitem_visible(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/ncurses.3x.html ncurses-5.4/doc/html/man/ncurses.3x.html
--- ncurses-5.4.orig/doc/html/man/ncurses.3x.html	2004-01-11 01:46:29.000000000 +0000
+++ ncurses-5.4/doc/html/man/ncurses.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -2,7 +2,7 @@
 <!-- 
   * t
   ****************************************************************************
-  * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc.              *
+  * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc.              *
   *                                                                          *
   * Permission is hereby granted, free of charge, to any person obtaining a  *
   * copy of this software and associated documentation files (the            *
@@ -28,7 +28,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: ncurses.3x,v 1.70 2004/01/11 01:45:54 tom Exp @
+  * @Id: ncurses.3x,v 1.74 2005/03/12 19:45:57 tom Exp @
 -->
 <HTML>
 <HEAD>
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG>                                           <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG>
+<STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG>                                                 <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG>
 
 
 
@@ -227,6 +227,7 @@
        flagged with `*' are ncurses-specific,  not  described  by
        XPG4 or present in SVr4.
 
+
               <STRONG>curses</STRONG> Routine Name     Manual Page Name
               --------------------------------------------
               COLOR_PAIR              <STRONG><A HREF="curs_color.3x.html">curs_color(3x)</A></STRONG>
@@ -243,8 +244,8 @@
               add_wch                 <STRONG><A HREF="curs_add_wch.3x.html">curs_add_wch(3x)</A></STRONG>
               add_wchnstr             <STRONG><A HREF="curs_add_wchstr.3x.html">curs_add_wchstr(3x)</A></STRONG>
               add_wchstr              <STRONG><A HREF="curs_add_wchstr.3x.html">curs_add_wchstr(3x)</A></STRONG>
-              addch                   <STRONG><A HREF="curs_addch.3x.html">curs_addch(3x)</A></STRONG>
 
+              addch                   <STRONG><A HREF="curs_addch.3x.html">curs_addch(3x)</A></STRONG>
               addchnstr               <STRONG><A HREF="curs_addchstr.3x.html">curs_addchstr(3x)</A></STRONG>
               addchstr                <STRONG><A HREF="curs_addchstr.3x.html">curs_addchstr(3x)</A></STRONG>
               addnstr                 <STRONG><A HREF="curs_addstr.3x.html">curs_addstr(3x)</A></STRONG>
@@ -309,8 +310,8 @@
               getbkgd                 <STRONG><A HREF="curs_bkgd.3x.html">curs_bkgd(3x)</A></STRONG>
               getbkgrnd               <STRONG><A HREF="curs_bkgrnd.3x.html">curs_bkgrnd(3x)</A></STRONG>
               getcchar                <STRONG><A HREF="curs_getcchar.3x.html">curs_getcchar(3x)</A></STRONG>
-              getch                   <STRONG><A HREF="curs_getch.3x.html">curs_getch(3x)</A></STRONG>
 
+              getch                   <STRONG><A HREF="curs_getch.3x.html">curs_getch(3x)</A></STRONG>
               getmaxyx                <STRONG><A HREF="curs_getyx.3x.html">curs_getyx(3x)</A></STRONG>
               getmouse                <STRONG><A HREF="curs_mouse.3x.html">curs_mouse(3x)</A></STRONG>*
               getn_wstr               <STRONG><A HREF="curs_get_wstr.3x.html">curs_get_wstr(3x)</A></STRONG>
@@ -375,8 +376,8 @@
               mvadd_wchnstr           <STRONG><A HREF="curs_add_wchstr.3x.html">curs_add_wchstr(3x)</A></STRONG>
               mvadd_wchstr            <STRONG><A HREF="curs_add_wchstr.3x.html">curs_add_wchstr(3x)</A></STRONG>
               mvaddch                 <STRONG><A HREF="curs_addch.3x.html">curs_addch(3x)</A></STRONG>
-              mvaddchnstr             <STRONG><A HREF="curs_addchstr.3x.html">curs_addchstr(3x)</A></STRONG>
 
+              mvaddchnstr             <STRONG><A HREF="curs_addchstr.3x.html">curs_addchstr(3x)</A></STRONG>
               mvaddchstr              <STRONG><A HREF="curs_addchstr.3x.html">curs_addchstr(3x)</A></STRONG>
               mvaddnstr               <STRONG><A HREF="curs_addstr.3x.html">curs_addstr(3x)</A></STRONG>
               mvaddnwstr              <STRONG><A HREF="curs_addwstr.3x.html">curs_addwstr(3x)</A></STRONG>
@@ -441,8 +442,8 @@
               mvwinch                 <STRONG><A HREF="curs_inch.3x.html">curs_inch(3x)</A></STRONG>
               mvwinchnstr             <STRONG><A HREF="curs_inchstr.3x.html">curs_inchstr(3x)</A></STRONG>
               mvwinchstr              <STRONG><A HREF="curs_inchstr.3x.html">curs_inchstr(3x)</A></STRONG>
-              mvwinnstr               <STRONG><A HREF="curs_instr.3x.html">curs_instr(3x)</A></STRONG>
 
+              mvwinnstr               <STRONG><A HREF="curs_instr.3x.html">curs_instr(3x)</A></STRONG>
               mvwinnwstr              <STRONG><A HREF="curs_inwstr.3x.html">curs_inwstr(3x)</A></STRONG>
               mvwins_nwstr            <STRONG><A HREF="curs_ins_wstr.3x.html">curs_ins_wstr(3x)</A></STRONG>
               mvwins_wch              <STRONG><A HREF="curs_ins_wch.3x.html">curs_ins_wch(3x)</A></STRONG>
@@ -507,8 +508,8 @@
               slk_attr_off            <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG>
               slk_attr_on             <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG>
               slk_attr_set            <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG>
-              slk_attroff             <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG>
 
+              slk_attroff             <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG>
               slk_attron              <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG>
               slk_attrset             <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG>
               slk_clear               <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG>
@@ -573,8 +574,8 @@
               waddnwstr               <STRONG><A HREF="curs_addwstr.3x.html">curs_addwstr(3x)</A></STRONG>
               waddstr                 <STRONG><A HREF="curs_addstr.3x.html">curs_addstr(3x)</A></STRONG>
               waddwstr                <STRONG><A HREF="curs_addwstr.3x.html">curs_addwstr(3x)</A></STRONG>
-              wattr_get               <STRONG><A HREF="curs_attr.3x.html">curs_attr(3x)</A></STRONG>
 
+              wattr_get               <STRONG><A HREF="curs_attr.3x.html">curs_attr(3x)</A></STRONG>
               wattr_off               <STRONG><A HREF="curs_attr.3x.html">curs_attr(3x)</A></STRONG>
               wattr_on                <STRONG><A HREF="curs_attr.3x.html">curs_attr(3x)</A></STRONG>
               wattr_set               <STRONG><A HREF="curs_attr.3x.html">curs_attr(3x)</A></STRONG>
@@ -639,8 +640,8 @@
               wstandend               <STRONG><A HREF="curs_attr.3x.html">curs_attr(3x)</A></STRONG>
               wstandout               <STRONG><A HREF="curs_attr.3x.html">curs_attr(3x)</A></STRONG>
               wsyncdown               <STRONG><A HREF="curs_window.3x.html">curs_window(3x)</A></STRONG>
-              wsyncup                 <STRONG><A HREF="curs_window.3x.html">curs_window(3x)</A></STRONG>
 
+              wsyncup                 <STRONG><A HREF="curs_window.3x.html">curs_window(3x)</A></STRONG>
               wtimeout                <STRONG><A HREF="curs_inopts.3x.html">curs_inopts(3x)</A></STRONG>
               wtouchln                <STRONG><A HREF="curs_touch.3x.html">curs_touch(3x)</A></STRONG>
               wunctrl                 <STRONG><A HREF="curs_util.3x.html">curs_util(3x)</A></STRONG>
@@ -730,6 +731,14 @@
             timeout applies to the composed multi-click event  as
             well as the individual clicks.
 
+            In  addition to the environment variable, this imple-
+            mentation provides a global variable  with  the  same
+            name.  Portable applications should not rely upon the
+            presence of ESCDELAY in either form, but setting  the
+            environment  variable rather than the global variable
+            does not create problems when compiling  an  applica-
+            tion.
+
        HOME Tells  <STRONG>ncurses</STRONG> where your home directory is.  That is
             where  it  may  read  and  write  auxiliary  terminal
             descriptions:
@@ -771,19 +780,19 @@
             Most  of  the  terminal  descriptions in the terminfo
             database are written for real  "hardware"  terminals.
             Many  people  use  terminal  emulators which run in a
-            windowing environment and use  curses-based  applica-
-            tions.   Terminal  emulators can duplicate all of the
-            important aspects of a hardware terminal, but they do
-            not  have the same limitations.  The chief limitation
-            of a hardware terminal from the  standpoint  of  your
-            application  is  the  management  of  dataflow, i.e.,
-            timing.  Unless a  hardware  terminal  is  interfaced
-            into  a  terminal  concentrator (which does flow con-
-            trol), it (or your application) must manage dataflow,
-            preventing overruns.  The cheapest solution (no hard-
-            ware cost) is for your program to do this by  pausing
-            after  operations that the terminal does slowly, such
-            as clearing the display.
+            windowing   environment    and    use    curses-based
+            applications.   Terminal  emulators can duplicate all
+            of the important aspects of a hardware terminal,  but
+            they  do  not  have  the same limitations.  The chief
+            limitation of a hardware terminal from the standpoint
+            of  your  application  is the management of dataflow,
+            i.e., timing.  Unless a hardware terminal  is  inter-
+            faced  into  a terminal concentrator (which does flow
+            control),  it  (or  your  application)  must   manage
+            dataflow, preventing overruns.  The cheapest solution
+            (no hardware cost) is for your program to do this  by
+            pausing  after  operations  that  the  terminal  does
+            slowly, such as clearing the display.
 
             As a result, many  terminal  descriptions  (including
             the  vt100)  have delay times embedded.  You may wish
@@ -804,37 +813,56 @@
             leaving  the  output  in  the  original (usually line
             buffered) mode.
 
+       NCURSES_NO_UTF8_ACS
+            During initialization, the <STRONG>ncurses</STRONG> library checks for
+            special  cases where VT100 line-drawing (and the cor-
+            responding  alternate  character  set   capabilities)
+            described  in  the  terminfo are known to be missing.
+            Specifically, when running in  a  UTF-8  locale,  the
+            Linux  console  emulator  and  the GNU screen program
+            ignore these.  Ncurses checks  the  TERM  environment
+            variable  for  these.   For  other special cases, you
+            should set this  environment  variable.   Doing  this
+            tells  ncurses to use Unicode values which correspond
+            to the VT100 line-drawing glyphs.  That works for the
+            special cases cited, and is likely to work for termi-
+            nal emulators.
+
+            When setting this variable, you should set  it  to  a
+            nonzero  value.   Setting it to zero (or to a nonnum-
+            ber) disables the special check for Linux and screen.
+
        NCURSES_TRACE
-            During initialization, the <STRONG>ncurses</STRONG> debugging  library
-            checks  the  NCURSES_TRACE symbol.  If it is defined,
+            During  initialization, the <STRONG>ncurses</STRONG> debugging library
+            checks the NCURSES_TRACE symbol.  If it  is  defined,
             to a numeric value, <STRONG>ncurses</STRONG> calls the <STRONG>trace</STRONG> function,
             using that value as the argument.
 
-            The  argument  values, which are defined in <STRONG>curses.h</STRONG>,
-            provide several types of information.   When  running
-            with  traces enabled, your application will write the
+            The argument values, which are defined  in  <STRONG>curses.h</STRONG>,
+            provide  several  types of information.  When running
+            with traces enabled, your application will write  the
             file <STRONG>trace</STRONG> to the current directory.
 
-       TERM Denotes your terminal type.  Each  terminal  type  is
+       TERM Denotes  your  terminal  type.  Each terminal type is
             distinct, though many are similar.
 
        TERMCAP
             If the <STRONG>ncurses</STRONG> library has been configured with <EM>term-</EM>
-            <EM>cap</EM> support, <STRONG>ncurses</STRONG>  will  check  for  a  terminal's
+            <EM>cap</EM>  support,  <STRONG>ncurses</STRONG>  will  check  for a terminal's
             description in termcap form if it is not available in
             the terminfo database.
 
-            The  TERMCAP  symbol  contains  either   a   terminal
-            description  (with  newlines stripped out), or a file
-            name telling where the  information  denoted  by  the
-            TERM  symbol  exists.   In  either  case,  setting it
-            directs <STRONG>ncurses</STRONG> to ignore the usual  place  for  this
+            The   TERMCAP   symbol  contains  either  a  terminal
+            description (with newlines stripped out), or  a  file
+            name  telling  where  the  information denoted by the
+            TERM symbol  exists.   In  either  case,  setting  it
+            directs  <STRONG>ncurses</STRONG>  to  ignore the usual place for this
             information, e.g., /etc/termcap.
 
        TERMINFO
             Overrides the directory in which <STRONG>ncurses</STRONG> searches for
             your terminal description.  This is the simplest, but
-            not  the  only way to change the list of directories.
+            not the only way to change the list  of  directories.
             The complete list of directories in order follows:
 
             -  the last directory to which <STRONG>ncurses</STRONG> wrote, if any,
@@ -851,39 +879,39 @@
                /usr/share/terminfo
 
        TERMINFO_DIRS
-            Specifies  a list of directories to search for termi-
-            nal descriptions.  The list is  separated  by  colons
-            (i.e.,  ":") on Unix, semicolons on OS/2 EMX.  All of
+            Specifies a list of directories to search for  termi-
+            nal  descriptions.   The  list is separated by colons
+            (i.e., ":") on Unix, semicolons on OS/2 EMX.  All  of
             the terminal descriptions are in terminfo form, which
-            makes  a  subdirectory  named for the first letter of
+            makes a subdirectory named for the  first  letter  of
             the terminal names therein.
 
        TERMPATH
-            If TERMCAP does not hold a  file  name  then  <STRONG>ncurses</STRONG>
-            checks  the TERMPATH symbol.  This is a list of file-
-            names separated by spaces or colons  (i.e.,  ":")  on
+            If  TERMCAP  does  not  hold a file name then <STRONG>ncurses</STRONG>
+            checks the TERMPATH symbol.  This is a list of  file-
+            names  separated  by  spaces or colons (i.e., ":") on
             Unix, semicolons on OS/2 EMX.  If the TERMPATH symbol
-            is not set, <STRONG>ncurses</STRONG> looks in the files  /etc/termcap,
-            /usr/share/misc/termcap  and  $HOME/.termcap, in that
+            is  not set, <STRONG>ncurses</STRONG> looks in the files /etc/termcap,
+            /usr/share/misc/termcap and $HOME/.termcap,  in  that
             order.
 
-       The library may be configured to disregard  the  following
-       variables  when  the current user is the superuser (root),
-       or if the application uses setuid or  setgid  permissions:
+       The  library  may be configured to disregard the following
+       variables when the current user is the  superuser  (root),
+       or  if  the application uses setuid or setgid permissions:
        $TERMINFO, $TERMINFO_DIRS, $TERMPATH, as well as $HOME.
 
 
 </PRE>
 <H2>FILES</H2><PRE>
        /usr/share/tabset
-            directory  containing  initialization  files  for the
+            directory containing  initialization  files  for  the
             terminal capability database /usr/share/terminfo ter-
             minal capability database
 
 
 </PRE>
 <H2>SEE ALSO</H2><PRE>
-       <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>  and  related  pages whose names begin "curs_"
+       <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG> and related pages whose  names  begin  "curs_"
        for detailed routine descriptions.
 
 
@@ -892,100 +920,100 @@
        The  <STRONG>ncurses</STRONG>  library  can  be  compiled  with  an  option
        (<STRONG>-DUSE_GETCAP</STRONG>) that falls back to the old-style /etc/term-
        cap file if the terminal setup code cannot find a terminfo
-       entry  corresponding  to <STRONG>TERM</STRONG>.  Use of this feature is not
-       recommended, as it essentially includes an entire  termcap
-       compiler  in the <STRONG>ncurses</STRONG> startup code, at significant cost
+       entry corresponding to <STRONG>TERM</STRONG>.  Use of this feature  is  not
+       recommended,  as it essentially includes an entire termcap
+       compiler in the <STRONG>ncurses</STRONG> startup code, at significant  cost
        in core and startup cycles.
 
-       The <STRONG>ncurses</STRONG>  library  includes  facilities  for  capturing
-       mouse  events  on certain terminals (including xterm). See
+       The  <STRONG>ncurses</STRONG>  library  includes  facilities  for capturing
+       mouse events on certain terminals (including  xterm).  See
        the <STRONG><A HREF="curs_mouse.3x.html">curs_mouse(3x)</A></STRONG> manual page for details.
 
-       The <STRONG>ncurses</STRONG> library includes facilities for responding  to
-       window  resizing  events,  e.g., when running in an xterm.
-       See the <STRONG><A HREF="resizeterm.3x.html">resizeterm(3x)</A></STRONG> and <STRONG><A HREF="wresize.3x.html">wresize(3x)</A></STRONG>  manual  pages  for
-       details.   In addition, the library may be configured with
+       The  <STRONG>ncurses</STRONG> library includes facilities for responding to
+       window resizing events, e.g., when running  in  an  xterm.
+       See  the  <STRONG><A HREF="resizeterm.3x.html">resizeterm(3x)</A></STRONG>  and <STRONG><A HREF="wresize.3x.html">wresize(3x)</A></STRONG> manual pages for
+       details.  In addition, the library may be configured  with
        a SIGWINCH handler.
 
-       The <STRONG>ncurses</STRONG> library extends the fixed set of function  key
-       capabilities  of  terminals  by  allowing  the application
-       designer to define additional key  sequences  at  runtime.
+       The  <STRONG>ncurses</STRONG> library extends the fixed set of function key
+       capabilities of  terminals  by  allowing  the  application
+       designer  to  define  additional key sequences at runtime.
        See the <STRONG><A HREF="define_key.3x.html">define_key(3x)</A></STRONG> <STRONG><A HREF="key_defined.3x.html">key_defined(3x)</A></STRONG>, and <STRONG><A HREF="keyok.3x.html">keyok(3x)</A></STRONG> man-
        ual pages for details.
 
        The <STRONG>ncurses</STRONG> library can exploit the capabilities of termi-
-       nals  which  implement  the  ISO-6429  SGR  39  and SGR 49
-       controls, which allow an application to reset the terminal
-       to  its  original  foreground and background colors.  From
-       the users' perspective, the application is  able  to  draw
-       colored  text  on a background whose color is set indepen-
-       dently, providing better  control  over  color  contrasts.
+       nals which implement the ISO-6429 SGR 39 and SGR  49  con-
+       trols, which allow an application to reset the terminal to
+       its original foreground and background colors.   From  the
+       users'  perspective,  the application is able to draw col-
+       ored text on a background  whose  color  is  set  indepen-
+       dently,  providing  better  control  over color contrasts.
        See the <STRONG><A HREF="default_colors.3x.html">default_colors(3x)</A></STRONG> manual page for details.
 
-       The  <STRONG>ncurses</STRONG>  library  includes  a  function for directing
-       application output to a printer attached to  the  terminal
+       The <STRONG>ncurses</STRONG> library  includes  a  function  for  directing
+       application  output  to a printer attached to the terminal
        device.  See the <STRONG><A HREF="curs_print.3x.html">curs_print(3x)</A></STRONG> manual page for details.
 
 
 </PRE>
 <H2>PORTABILITY</H2><PRE>
-       The  <STRONG>ncurses</STRONG>  library is intended to be BASE-level confor-
-       mant with the  XSI  Curses  standard.   The  EXTENDED  XSI
-       Curses  functionality  (including  color  support) is sup-
+       The <STRONG>ncurses</STRONG> library is intended to be  BASE-level  confor-
+       mant  with  the  XSI  Curses  standard.   The EXTENDED XSI
+       Curses functionality (including  color  support)  is  sup-
        ported.
 
-       A small number of local differences (that  is,  individual
-       differences  between the XSI Curses and <STRONG>ncurses</STRONG> calls) are
-       described in  <STRONG>PORTABILITY</STRONG>  sections  of  the  library  man
+       A  small  number of local differences (that is, individual
+       differences between the XSI Curses and <STRONG>ncurses</STRONG> calls)  are
+       described  in  <STRONG>PORTABILITY</STRONG>  sections  of  the  library man
        pages.
 
        The routine <STRONG>has_key</STRONG> is not part of XPG4, nor is it present
-       in SVr4.  See the <STRONG><A HREF="curs_getch.3x.html">curs_getch(3x)</A></STRONG> manual page for  details.
+       in  SVr4.  See the <STRONG><A HREF="curs_getch.3x.html">curs_getch(3x)</A></STRONG> manual page for details.
 
-       The  routine  <STRONG>slk_attr</STRONG> is not part of XPG4, nor is it pre-
-       sent in  SVr4.   See  the  <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG>  manual  page  for
+       The routine <STRONG>slk_attr</STRONG> is  not  part  of  XPG4,  nor  is  it
+       present  in  SVr4.   See  the <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG> manual page for
        details.
 
-       The  routines <STRONG>getmouse</STRONG>, <STRONG>mousemask</STRONG>, <STRONG>ungetmouse</STRONG>, <STRONG>mouseinter-</STRONG>
-       <STRONG>val</STRONG>, and <STRONG>wenclose</STRONG> relating to mouse  interfacing  are  not
-       part  of  XPG4,  nor  are  they  present in SVr4.  See the
+       The routines <STRONG>getmouse</STRONG>, <STRONG>mousemask</STRONG>, <STRONG>ungetmouse</STRONG>,  <STRONG>mouseinter-</STRONG>
+       <STRONG>val</STRONG>,  and  <STRONG>wenclose</STRONG>  relating to mouse interfacing are not
+       part of XPG4, nor are  they  present  in  SVr4.   See  the
        <STRONG><A HREF="curs_mouse.3x.html">curs_mouse(3x)</A></STRONG> manual page for details.
 
        The routine <STRONG>mcprint</STRONG> was not present in any previous curses
-       implementation.   See  the  <STRONG><A HREF="curs_print.3x.html">curs_print(3x)</A></STRONG> manual page for
+       implementation.  See the <STRONG><A HREF="curs_print.3x.html">curs_print(3x)</A></STRONG>  manual  page  for
        details.
 
        The routine <STRONG>wresize</STRONG> is not part of XPG4, nor is it present
        in SVr4.  See the <STRONG><A HREF="wresize.3x.html">wresize(3x)</A></STRONG> manual page for details.
 
-       In  historic curses versions, delays embedded in the capa-
+       In historic curses versions, delays embedded in the  capa-
        bilities <STRONG>cr</STRONG>, <STRONG>ind</STRONG>, <STRONG>cub1</STRONG>, <STRONG>ff</STRONG> and <STRONG>tab</STRONG> activated corresponding
-       delay  bits  in  the UNIX tty driver.  In this implementa-
-       tion, all padding is done by NUL sends.   This  method  is
-       slightly  more expensive, but narrows the interface to the
-       UNIX kernel  significantly  and  increases  the  package's
+       delay bits in the UNIX tty driver.   In  this  implementa-
+       tion,  all  padding  is done by NUL sends.  This method is
+       slightly more expensive, but narrows the interface to  the
+       UNIX  kernel  significantly  and  increases  the package's
        portability correspondingly.
 
 
 </PRE>
 <H2>NOTES</H2><PRE>
-       The  header  file  <STRONG>&lt;curses.h&gt;</STRONG>  automatically  includes the
+       The header  file  <STRONG>&lt;curses.h&gt;</STRONG>  automatically  includes  the
        header files <STRONG>&lt;stdio.h&gt;</STRONG> and <STRONG>&lt;unctrl.h&gt;</STRONG>.
 
-       If standard output from a <STRONG>ncurses</STRONG> program  is  re-directed
-       to  something  which  is not a tty, screen updates will be
+       If  standard  output from a <STRONG>ncurses</STRONG> program is re-directed
+       to something which is not a tty, screen  updates  will  be
        directed to standard error.  This was an undocumented fea-
        ture of AT&amp;T System V Release 3 curses.
 
 
 </PRE>
 <H2>AUTHORS</H2><PRE>
-       Zeyd  M.  Ben-Halim,  Eric  S.  Raymond, Thomas E. Dickey.
+       Zeyd M. Ben-Halim, Eric  S.  Raymond,  Thomas  E.  Dickey.
        Based on pcurses by Pavel Curtis.
 
 
 
-                                                      <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG>
+                                                            <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/panel.3x.html ncurses-5.4/doc/html/man/panel.3x.html
--- ncurses-5.4.orig/doc/html/man/panel.3x.html	2003-10-25 17:39:59.000000000 +0000
+++ ncurses-5.4/doc/html/man/panel.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="panel.3x.html">panel(3x)</A></STRONG>                                               <STRONG><A HREF="panel.3x.html">panel(3x)</A></STRONG>
+<STRONG><A HREF="panel.3x.html">panel(3x)</A></STRONG>                                                     <STRONG><A HREF="panel.3x.html">panel(3x)</A></STRONG>
 
 
 
@@ -223,7 +223,7 @@
 
 
 
-                                                        <STRONG><A HREF="panel.3x.html">panel(3x)</A></STRONG>
+                                                              <STRONG><A HREF="panel.3x.html">panel(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/resizeterm.3x.html ncurses-5.4/doc/html/man/resizeterm.3x.html
--- ncurses-5.4.orig/doc/html/man/resizeterm.3x.html	2004-01-11 01:46:29.000000000 +0000
+++ ncurses-5.4/doc/html/man/resizeterm.3x.html	2005-05-13 04:09:59.000000000 +0000
@@ -41,7 +41,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="resizeterm.3x.html">resizeterm(3x)</A></STRONG>                                     <STRONG><A HREF="resizeterm.3x.html">resizeterm(3x)</A></STRONG>
+<STRONG><A HREF="resizeterm.3x.html">resizeterm(3x)</A></STRONG>                                           <STRONG><A HREF="resizeterm.3x.html">resizeterm(3x)</A></STRONG>
 
 
 
@@ -123,7 +123,7 @@
 
 
 
-                                                   <STRONG><A HREF="resizeterm.3x.html">resizeterm(3x)</A></STRONG>
+                                                         <STRONG><A HREF="resizeterm.3x.html">resizeterm(3x)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/term.5.html ncurses-5.4/doc/html/man/term.5.html
--- ncurses-5.4.orig/doc/html/man/term.5.html	2003-10-25 17:39:59.000000000 +0000
+++ ncurses-5.4/doc/html/man/term.5.html	2005-05-13 04:09:59.000000000 +0000
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
 <!-- 
   ****************************************************************************
-  * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc.              *
+  * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc.              *
   *                                                                          *
   * Permission is hereby granted, free of charge, to any person obtaining a  *
   * copy of this software and associated documentation files (the            *
@@ -27,7 +27,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: term.5,v 1.15 2003/05/10 20:33:49 jmc Exp @
+  * @Id: term.5,v 1.16 2004/07/05 13:16:08 tom Exp @
 -->
 <HTML>
 <HEAD>
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="TERM.5.html">TERM(5)</A></STRONG>                                                   <STRONG><A HREF="TERM.5.html">TERM(5)</A></STRONG>
+<STRONG><A HREF="TERM.5.html">TERM(5)</A></STRONG>                                                         <STRONG><A HREF="TERM.5.html">TERM(5)</A></STRONG>
 
 
 
@@ -208,7 +208,7 @@
 
 
 
-                                                          <STRONG><A HREF="TERM.5.html">TERM(5)</A></STRONG>
+                                                                <STRONG><A HREF="TERM.5.html">TERM(5)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/term.7.html ncurses-5.4/doc/html/man/term.7.html
--- ncurses-5.4.orig/doc/html/man/term.7.html	2003-10-25 17:39:59.000000000 +0000
+++ ncurses-5.4/doc/html/man/term.7.html	2005-05-13 04:09:59.000000000 +0000
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="TERM.7.html">TERM(7)</A></STRONG>                                                   <STRONG><A HREF="TERM.7.html">TERM(7)</A></STRONG>
+<STRONG><A HREF="TERM.7.html">TERM(7)</A></STRONG>                                                         <STRONG><A HREF="TERM.7.html">TERM(7)</A></STRONG>
 
 
 
@@ -240,7 +240,7 @@
 
 
 
-                                                          <STRONG><A HREF="TERM.7.html">TERM(7)</A></STRONG>
+                                                                <STRONG><A HREF="TERM.7.html">TERM(7)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/terminfo.5.html ncurses-5.4/doc/html/man/terminfo.5.html
--- ncurses-5.4.orig/doc/html/man/terminfo.5.html	2003-10-25 17:40:00.000000000 +0000
+++ ncurses-5.4/doc/html/man/terminfo.5.html	2005-05-13 04:09:59.000000000 +0000
@@ -6,7 +6,7 @@
   * Note: this must be run through tbl before nroff.
   * The magic cookie on the first line triggers this under some man programs.
   ****************************************************************************
-  * Copyright (c) 1998-2000,2002 Free Software Foundation, Inc.              *
+  * Copyright (c) 1998-2002,2004 Free Software Foundation, Inc.              *
   *                                                                          *
   * Permission is hereby granted, free of charge, to any person obtaining a  *
   * copy of this software and associated documentation files (the            *
@@ -32,10 +32,15 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: terminfo.head,v 1.10 2002/08/17 23:37:10 tom Exp @
+  * @Id: terminfo.head,v 1.12 2004/09/25 19:07:11 tom Exp @
   * Head of terminfo man page ends here
-  * @Id: terminfo.tail,v 1.38 2003/01/05 22:47:05 tom Exp @
+  * @Id: terminfo.tail,v 1.41 2004/07/05 13:08:56 tom Exp @
   * Beginning of terminfo.tail file
+  * See "terminfo.head" for copyright.
+  *.in -2
+  *.in +2
+  *.in -2
+  *.in +2
   *.TH
 -->
 <HTML>
@@ -49,7 +54,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="TERMINFO.5.html">TERMINFO(5)</A></STRONG>                File Formats               <STRONG><A HREF="TERMINFO.5.html">TERMINFO(5)</A></STRONG>
+<STRONG><A HREF="TERMINFO.5.html">TERMINFO(5)</A></STRONG>                   File Formats                  <STRONG><A HREF="TERMINFO.5.html">TERMINFO(5)</A></STRONG>
 
 
 
@@ -86,6 +91,16 @@
        no blanks; the last name may well contain upper  case  and
        blanks for readability.
 
+       Lines beginning with a `#' in the first column are treated
+       as comments.  While comment lines are legal at any  point,
+       the  output  of  <EM>captoinfo</EM> and <EM>infotocap</EM> (aliases for <EM>tic</EM>)
+       will move comments so they occur only between entries.
+
+       Newlines and leading  tabs  may  be  used  for  formatting
+       entries  for  readability.   These are removed from parsed
+       entries.  The <EM>infocmp</EM> <EM>-f</EM> option relies on this  to  format
+       if-then-else expressions: the result can be read by <EM>tic</EM>.
+
        Terminal names (except for the last, verbose entry) should
        be chosen using the following conventions.  The particular
        piece  of  hardware  making  up the terminal should have a
@@ -96,6 +111,7 @@
        vt100-w.  The following suffixes should be used where pos-
        sible:
 
+
       <STRONG>Suffix</STRONG>                  <STRONG>Meaning</STRONG>                   <STRONG>Example</STRONG>
       -<EM>nn</EM>      Number of lines on the screen            aaa-60
       -<EM>n</EM>p      Number of pages of memory                c100-4p
@@ -109,6 +125,7 @@
       -rv      Reverse video                            c100-rv
       -s       Enable status line                       vt100-s
       -vb      Use visible bell instead of beep         wy370-vb
+
       -w       Wide mode (&gt; 80 columns, usually 132)    vt100-w
 
        For  more  on terminal naming conventions, see the <STRONG>term(7)</STRONG>
@@ -156,6 +173,7 @@
 
        These are the boolean capabilities:
 
+
                <STRONG>Variable</STRONG>          <STRONG>Cap-</STRONG>  <STRONG>TCap</STRONG>      <STRONG>Description</STRONG>
                <STRONG>Booleans</STRONG>          <STRONG>name</STRONG>  <STRONG>Code</STRONG>
        auto_left_margin          bw    bw    cub1 wraps from col-
@@ -171,6 +189,9 @@
                                              by overwriting (hp)
        col_addr_glitch           xhpa  YA    only positive motion
                                              for hpa/mhpa caps
+
+
+
        cpi_changes_res           cpix  YF    changing character
                                              pitch changes reso-
                                              lution
@@ -186,7 +207,6 @@
                                              strikes with a blank
        generic_type              gn    gn    generic line type
        hard_copy                 hc    hc    hardcopy terminal
-
        hard_cursor               chts  HC    cursor is hard to
                                              see
        has_meta_key              km    km    Has a meta key
@@ -236,6 +256,8 @@
                                              on the status line
        tilde_glitch              hz    hz    cannot print ~'s
                                              (hazeltine)
+
+
        transparent_underline     ul    ul    underline character
                                              overstrikes
        xon_xoff                  xon   xo    terminal uses
@@ -243,6 +265,7 @@
 
        These are the numeric capabilities:
 
+
             <STRONG>Variable</STRONG>         <STRONG>Cap-</STRONG>     <STRONG>TCap</STRONG>       <STRONG>Description</STRONG>
              <STRONG>Numeric</STRONG>         <STRONG>name</STRONG>     <STRONG>Code</STRONG>
        columns               cols     co     number of columns in
@@ -252,7 +275,6 @@
        label_height          lh       lh     rows in each label
        label_width           lw       lw     columns in each
                                              label
-
        lines                 lines    li     number of lines on
                                              screen or page
        lines_of_memory       lm       lm     lines of memory if &gt;
@@ -286,6 +308,7 @@
        SVr4.0 term structure, but are not yet documented  in  the
        man page.  They came in with SVr4's printer support.
 
+
              <STRONG>Variable</STRONG>         <STRONG>Cap-</STRONG>    <STRONG>TCap</STRONG>       <STRONG>Description</STRONG>
              <STRONG>Numeric</STRONG>          <STRONG>name</STRONG>    <STRONG>Code</STRONG>
        bit_image_entwining    bitwin  Yo     number of passes for
@@ -300,6 +323,7 @@
        dot_horz_spacing       spinh   Yc     spacing of dots hor-
                                              izontally in dots
                                              per inch
+
        dot_vert_spacing       spinv   Yb     spacing of pins ver-
                                              tically in pins per
                                              inch
@@ -316,9 +340,6 @@
        output_res_char        orc     Yi     horizontal resolu-
                                              tion in units per
                                              line
-
-
-
        output_res_horz_inch   orhi    Yk     horizontal resolu-
                                              tion in units per
                                              inch
@@ -334,6 +355,7 @@
 
        These are the string capabilities:
 
+
                <STRONG>Variable</STRONG>          <STRONG>Cap-</STRONG>   <STRONG>TCap</STRONG>     <STRONG>Description</STRONG>
                 <STRONG>String</STRONG>           <STRONG>name</STRONG>   <STRONG>Code</STRONG>
        acs_chars                 acsc   ac   graphics charset
@@ -366,6 +388,8 @@
                                              home cursor (P*)
        clr_bol                   el1    cb   Clear to beginning
                                              of line
+
+
        clr_eol                   el     ce   clear to end of line
                                              (P)
        clr_eos                   ed     cd   clear to end of
@@ -384,7 +408,6 @@
                                              cup)
        cursor_invisible          civis  vi   make cursor invisi-
                                              ble
-
        cursor_left               cub1   le   move left one space
        cursor_mem_address        mrcup  CM   memory relative cur-
                                              sor addressing, move
@@ -432,6 +455,7 @@
        enter_italics_mode        sitm   ZH   Enter italic mode
        enter_leftward_mode       slm    ZI   Start leftward car-
                                              riage motion
+
        enter_micro_mode          smicm  ZJ   Start micro-motion
                                              mode
        enter_near_letter_quality snlq   ZK   Enter NLQ mode
@@ -450,7 +474,6 @@
        enter_subscript_mode      ssubm  ZN   Enter subscript mode
        enter_superscript_mode    ssupm  ZO   Enter superscript
                                              mode
-
        enter_underline_mode      smul   us   begin underline mode
        enter_upward_mode         sum    ZP   Start upward car-
                                              riage motion
@@ -498,6 +521,7 @@
                                              string
        init_2string              is2    is   initialization
                                              string
+
        init_3string              is3    i3   initialization
                                              string
        init_file                 if     if   name of initializa-
@@ -515,8 +539,6 @@
        insert_padding            ip     ip   insert padding after
                                              inserted character
        key_a1                    ka1    K1   upper left of keypad
-
-
        key_a3                    ka3    K3   upper right of key-
                                              pad
        key_b2                    kb2    K2   center of keypad
@@ -565,6 +587,7 @@
        key_f22                   kf22   FC   F22 function key
        key_f23                   kf23   FD   F23 function key
        key_f24                   kf24   FE   F24 function key
+
        key_f25                   kf25   FF   F25 function key
        key_f26                   kf26   FG   F26 function key
        key_f27                   kf27   FH   F27 function key
@@ -582,7 +605,6 @@
        key_f38                   kf38   FS   F38 function key
        key_f39                   kf39   FT   F39 function key
        key_f4                    kf4    k4   F4 function key
-
        key_f40                   kf40   FU   F40 function key
        key_f41                   kf41   FV   F41 function key
        key_f42                   kf42   FW   F42 function key
@@ -631,6 +653,7 @@
        key_previous              kprv   %8   previous key
        key_print                 kprt   %9   print key
        key_redo                  krdo   %0   redo key
+
        key_reference             kref   &amp;1   reference key
        key_refresh               krfr   &amp;2   refresh key
        key_replace               krpl   &amp;3   replace key
@@ -648,7 +671,6 @@
        key_sdl                   kDL    *5   shifted delete-line
                                              key
        key_select                kslt   *6   select key
-
        key_send                  kEND   *7   shifted end key
        key_seol                  kEOL   *8   shifted clear-to-
                                              end-of-line key
@@ -696,6 +718,8 @@
                                              key f3 if not f3
        lab_f4                    lf4    l4   label on function
                                              key f4 if not f4
+
+
        lab_f5                    lf5    l5   label on function
                                              key f5 if not f5
        lab_f6                    lf6    l6   label on function
@@ -714,7 +738,6 @@
                                              (8th-bit on)
        micro_column_address      mhpa   ZY   Like column_address
                                              in micro mode
-
        micro_down                mcud1  ZZ   Like cursor_down in
                                              micro mode
        micro_left                mcub1  Za   Like cursor_left in
@@ -761,6 +784,8 @@
                                              in micro mode
        pkey_key                  pfkey  pk   program function key
                                              #1 to type string #2
+
+
        pkey_local                pfloc  pl   program function key
                                              #1 to execute string
                                              #2
@@ -779,8 +804,6 @@
        quick_dial                qdial  QD   dial number #1 with-
                                              out checking
        remove_clock              rmclk  RC   remove clock
-
-
        repeat_char               rep    rp   repeat char #1 #2
                                              times (P*)
        req_for_input             rfi    RF   send next input char
@@ -828,6 +851,7 @@
                                              umn
        set_right_margin_parm     smgrp  Zn   Set right margin at
                                              column #1
+
        set_tab                   hts    st   set a tab in every
                                              row, current columns
        set_top_margin            smgt   Zo   Set top margin at
@@ -845,8 +869,6 @@
                                              set
        stop_bit_image            rbim   Zs   Stop printing bit
                                              image graphics
-
-
        stop_char_set_def         rcsd   Zt   End definition of
                                              character set #1
        subscript_characters      subcs  Zu   List of subscript-
@@ -885,6 +907,7 @@
        SVr4.0  term structure, but were originally not documented
        in the man page.
 
+
                <STRONG>Variable</STRONG>          <STRONG>Cap-</STRONG>     <STRONG>TCap</STRONG>    <STRONG>Description</STRONG>
                 <STRONG>String</STRONG>           <STRONG>name</STRONG>     <STRONG>Code</STRONG>
        alt_scancode_esc          scesa    S8   Alternate escape
@@ -894,6 +917,7 @@
                                                of same row
        bit_image_newline         binel    Zz   Move to next row
                                                of the bit image
+
        bit_image_repeat          birep    Xy   Repeat bit image
                                                cell #1 #2 times
        char_set_names            csnm     Zy   Produce #1'th item
@@ -911,8 +935,6 @@
                                                port
        display_pc_char           dispc    S1   Display PC charac-
                                                ter #1
-
-
        end_bit_image_region      endbi    Yy   End a bit-image
                                                region
        enter_pc_charset_mode     smpch    S2   Enter PC character
@@ -961,6 +983,7 @@
                                                cap).
        set_page_length           slines   YZ   Set page length to
                                                #1 lines
+
        set_tb_margin             smgtb    MT   Sets both top and
                                                bottom margins to
                                                #1, #2
@@ -973,12 +996,11 @@
         these, they may not be binary-compatible  with  System  V
         terminfo entries after SVr4.1; beware!
 
+
                 <STRONG>Variable</STRONG>         <STRONG>Cap-</STRONG>   <STRONG>TCap</STRONG>     <STRONG>Description</STRONG>
                  <STRONG>String</STRONG>          <STRONG>name</STRONG>   <STRONG>Code</STRONG>
         enter_horizontal_hl_mode ehhlm  Xh   Enter horizontal
                                              highlight mode
-
-
         enter_left_hl_mode       elhlm  Xl   Enter left highlight
                                              mode
         enter_low_hl_mode        elohlm Xo   Enter low highlight
@@ -1027,11 +1049,11 @@
        space at the beginning of  each  line  except  the  first.
        Comments  may  be  included on lines beginning with ``#''.
        Capabilities in <EM>terminfo</EM> are of three types: Boolean capa-
-       bilities which indicate that the terminal has some partic-
-       ular feature, numeric capabilities giving the size of  the
-       terminal  or  the  size  of  particular delays, and string
-       capabilities, which give a sequence which can be  used  to
-       perform particular terminal operations.
+       bilities   which  indicate  that  the  terminal  has  some
+       particular feature, numeric capabilities giving  the  size
+       of  the  terminal  or  the  size of particular delays, and
+       string capabilities, which give a sequence  which  can  be
+       used to perform particular terminal operations.
 
 
    <STRONG>Types</STRONG> <STRONG>of</STRONG> <STRONG>Capabilities</STRONG>
@@ -1199,14 +1221,14 @@
        "glass-tty" terminals.  Thus  the  model  33  teletype  is
        described as
 
-     33|tty33|tty|model 33 teletype,
-     bel=^G, cols#72, cr=^M, cud1=^J, hc, ind=^J, os,
+       33|tty33|tty|model 33 teletype,
+            bel=^G, cols#72, cr=^M, cud1=^J, hc, ind=^J, os,
 
        while the Lear Siegler ADM-3 is described as
 
-     adm3|3|lsi adm3,
-     am, bel=^G, clear=^Z, cols#80, cr=^M, cub1=^H, cud1=^J,
-     ind=^J, lines#24,
+       adm3|3|lsi adm3,
+            am, bel=^G, clear=^Z, cols#80, cr=^M, cub1=^H, cud1=^J,
+            ind=^J, lines#24,
 
 
    <STRONG>Parameterized</STRONG> <STRONG>Strings</STRONG>
@@ -1287,292 +1309,304 @@
        %i   add 1 to first two parameters (for ANSI terminals)
 
        %? <EM>expr</EM> %t <EM>thenpart</EM> %e <EM>elsepart</EM> %;
-            if-then-else, %e <EM>elsepart</EM> is optional.  else-if's are
-            possible a la Algol 68:
+            This forms  an  if-then-else.   The  %e  <EM>elsepart</EM>  is
+            optional.   Usually  the  %? <EM>expr</EM> part pushes a value
+            onto the stack, and %t pops it from the stack,  test-
+            ing  if it is nonzero (true).  If it is zero (false),
+            control passes to the %e (else) part.
+
+            It is possible to form else-if's a la Algol 68:
             %? c1 %t b1 %e c2 %t b2 %e c3 %t b3 %e c4 %t b4 %e %;
-            ci are conditions, bi are bodies.
+
+            where ci are conditions, bi are bodies.
+
+            Use the <STRONG>-f</STRONG> option of <STRONG>tic</STRONG> or <STRONG>infocmp</STRONG> to see the struc-
+            ture of if-the-else's.  Some strings, e.g.,  <STRONG>sgr</STRONG>  can
+            be very complicated when written on one line.  The <STRONG>-f</STRONG>
+            option splits the string into lines  with  the  parts
+            indented.
 
        Binary operations are in postfix form with the operands in
-       the  usual  order.   That  is,  to  get  x-5 one would use
-       "%gx%{5}%-".  %P and %g variables  are  persistent  across
+       the usual order.  That  is,  to  get  x-5  one  would  use
+       "%gx%{5}%-".   %P  and  %g variables are persistent across
        escape-string evaluations.
 
        Consider the HP2645, which, to get to row 3 and column 12,
-       needs to be sent \E&amp;a12c03Y  padded  for  6  milliseconds.
-       Note  that  the  order of the rows and columns is inverted
-       here, and that the row and column are printed as two  dig-
+       needs  to  be  sent  \E&amp;a12c03Y padded for 6 milliseconds.
+       Note that the order of the rows and  columns  is  inverted
+       here,  and that the row and column are printed as two dig-
        its.  Thus its <STRONG>cup</STRONG> capability is "cup=6\E&amp;%p2%2dc%p1%2dY".
 
        The Microterm ACT-IV needs the current row and column sent
-       preceded  by  a <STRONG>^T</STRONG>, with the row and column simply encoded
-       in binary, "cup=^T%p1%c%p2%c".  Terminals which  use  "%c"
-       need  to  be  able  to backspace the cursor (<STRONG>cub1</STRONG>), and to
+       preceded by a <STRONG>^T</STRONG>, with the row and column  simply  encoded
+       in  binary,  "cup=^T%p1%c%p2%c".  Terminals which use "%c"
+       need to be able to backspace the  cursor  (<STRONG>cub1</STRONG>),  and  to
        move the cursor up one line on the screen (<STRONG>cuu1</STRONG>).  This is
-       necessary  because it is not always safe to transmit <STRONG>\n</STRONG> <STRONG>^D</STRONG>
-       and <STRONG>\r</STRONG>, as the system may change or  discard  them.   (The
-       library  routines  dealing  with terminfo set tty modes so
+       necessary because it is not always safe to transmit <STRONG>\n</STRONG>  <STRONG>^D</STRONG>
+       and  <STRONG>\r</STRONG>,  as  the system may change or discard them.  (The
+       library routines dealing with terminfo set  tty  modes  so
        that tabs are never expanded, so \t is safe to send.  This
        turns out to be essential for the Ann Arbor 4080.)
 
        A final example is the LSI ADM-3a, which uses row and col-
        umn  offset  by  a  blank  character,  thus  "cup=\E=%p1%'
-       '%+%c%p2%'  '%+%c".   After sending `\E=', this pushes the
-       first parameter, pushes the ASCII value for a space  (32),
-       adds  them  (pushing  the sum on the stack in place of the
-       two previous values) and outputs that value as  a  charac-
-       ter.   Then  the  same  is  done for the second parameter.
+       '%+%c%p2%' '%+%c".  After sending `\E=', this  pushes  the
+       first  parameter, pushes the ASCII value for a space (32),
+       adds them (pushing the sum on the stack in  place  of  the
+       two  previous  values) and outputs that value as a charac-
+       ter.  Then the same is  done  for  the  second  parameter.
        More complex arithmetic is possible using the stack.
 
 
    <STRONG>Cursor</STRONG> <STRONG>Motions</STRONG>
        If the terminal has a fast way to home the cursor (to very
-       upper  left  corner  of  screen) then this can be given as
-       <STRONG>home</STRONG>; similarly a fast way of getting to the  lower  left-
-       hand  corner can be given as <STRONG>ll</STRONG>; this may involve going up
-       with <STRONG>cuu1</STRONG> from the home position,  but  a  program  should
-       never  do this itself (unless <STRONG>ll</STRONG> does) because it can make
-       no assumption about the effect of moving up from the  home
-       position.   Note  that  the  home  position is the same as
+       upper left corner of screen) then this  can  be  given  as
+       <STRONG>home</STRONG>;  similarly  a fast way of getting to the lower left-
+       hand corner can be given as <STRONG>ll</STRONG>; this may involve going  up
+       with  <STRONG>cuu1</STRONG>  from  the  home position, but a program should
+       never do this itself (unless <STRONG>ll</STRONG> does) because it can  make
+       no  assumption about the effect of moving up from the home
+       position.  Note that the home  position  is  the  same  as
        addressing to (0,0): to the top left corner of the screen,
-       not  of  memory.   (Thus, the \EH sequence on HP terminals
+       not of memory.  (Thus, the \EH sequence  on  HP  terminals
        cannot be used for <STRONG>home</STRONG>.)
 
        If the terminal has row or column absolute cursor address-
-       ing,  these  can be given as single parameter capabilities
+       ing, these can be given as single  parameter  capabilities
        <STRONG>hpa</STRONG> (horizontal position absolute) and <STRONG>vpa</STRONG> (vertical posi-
        tion absolute).  Sometimes these are shorter than the more
-       general two parameter sequence (as with  the  hp2645)  and
+       general  two  parameter  sequence (as with the hp2645) and
        can be used in preference to <STRONG>cup</STRONG>.  If there are parameter-
-       ized local motions (e.g., move  <EM>n</EM>  spaces  to  the  right)
+       ized  local  motions  (e.g.,  move  <EM>n</EM> spaces to the right)
        these can be given as <STRONG>cud</STRONG>, <STRONG>cub</STRONG>, <STRONG>cuf</STRONG>, and <STRONG>cuu</STRONG> with a single
-       parameter indicating how many spaces to move.   These  are
-       primarily  useful  if the terminal does not have <STRONG>cup</STRONG>, such
+       parameter  indicating  how many spaces to move.  These are
+       primarily useful if the terminal does not have  <STRONG>cup</STRONG>,  such
        as the TEKTRONIX 4025.
 
        If the terminal needs to be in a special mode when running
        a program that uses these capabilities, the codes to enter
-       and exit this mode can be given as <STRONG>smcup</STRONG> and <STRONG>rmcup</STRONG>.   This
-       arises,  for example, from terminals like the Concept with
-       more than one page of memory.  If the  terminal  has  only
-       memory  relative cursor addressing and not screen relative
+       and  exit this mode can be given as <STRONG>smcup</STRONG> and <STRONG>rmcup</STRONG>.  This
+       arises, for example, from terminals like the Concept  with
+       more  than  one  page of memory.  If the terminal has only
+       memory relative cursor addressing and not screen  relative
        cursor addressing, a one screen-sized window must be fixed
-       into  the terminal for cursor addressing to work properly.
+       into the terminal for cursor addressing to work  properly.
        This is also used for the TEKTRONIX 4025, where <STRONG>smcup</STRONG> sets
-       the  command character to be the one used by terminfo.  If
-       the <STRONG>smcup</STRONG> sequence will not restore the  screen  after  an
+       the command character to be the one used by terminfo.   If
+       the  <STRONG>smcup</STRONG>  sequence  will not restore the screen after an
        <STRONG>rmcup</STRONG> sequence is output (to the state prior to outputting
        <STRONG>rmcup</STRONG>), specify <STRONG>nrrmc</STRONG>.
 
 
    <STRONG>Area</STRONG> <STRONG>Clears</STRONG>
        If the terminal can clear from the current position to the
-       end  of  the  line,  leaving  the cursor where it is, this
+       end of the line, leaving the  cursor  where  it  is,  this
        should be given as <STRONG>el</STRONG>.  If the terminal can clear from the
-       beginning  of  the line to the current position inclusive,
-       leaving the cursor where it is, this should  be  given  as
-       <STRONG>el1</STRONG>.   If the terminal can clear from the current position
-       to the end of the display, then this should  be  given  as
-       <STRONG>ed</STRONG>.   <STRONG>Ed</STRONG>  is only defined from the first column of a line.
-       (Thus, it can be simulated by a request to delete a  large
+       beginning of the line to the current  position  inclusive,
+       leaving  the  cursor  where it is, this should be given as
+       <STRONG>el1</STRONG>.  If the terminal can clear from the current  position
+       to  the  end  of the display, then this should be given as
+       <STRONG>ed</STRONG>.  <STRONG>Ed</STRONG> is only defined from the first column of  a  line.
+       (Thus,  it can be simulated by a request to delete a large
        number of lines, if a true <STRONG>ed</STRONG> is not available.)
 
 
    <STRONG>Insert/delete</STRONG> <STRONG>line</STRONG> <STRONG>and</STRONG> <STRONG>vertical</STRONG> <STRONG>motions</STRONG>
-       If  the terminal can open a new blank line before the line
-       where the cursor is, this should be given as <STRONG>il1</STRONG>; this  is
-       done  only  from the first position of a line.  The cursor
+       If the terminal can open a new blank line before the  line
+       where  the cursor is, this should be given as <STRONG>il1</STRONG>; this is
+       done only from the first position of a line.   The  cursor
        must then appear on the newly blank line.  If the terminal
-       can  delete  the  line  which  the cursor is on, then this
-       should be given as <STRONG>dl1</STRONG>; this is done only from  the  first
-       position  on  the line to be deleted.  Versions of <STRONG>il1</STRONG> and
-       <STRONG>dl1</STRONG> which take a single parameter  and  insert  or  delete
+       can delete the line which the  cursor  is  on,  then  this
+       should  be  given as <STRONG>dl1</STRONG>; this is done only from the first
+       position on the line to be deleted.  Versions of  <STRONG>il1</STRONG>  and
+       <STRONG>dl1</STRONG>  which  take  a  single parameter and insert or delete
        that many lines can be given as <STRONG>il</STRONG> and <STRONG>dl</STRONG>.
 
-       If  the terminal has a settable scrolling region (like the
-       vt100) the command to set this can be described  with  the
-       <STRONG>csr</STRONG>  capability,  which  takes two parameters: the top and
+       If the terminal has a settable scrolling region (like  the
+       vt100)  the  command to set this can be described with the
+       <STRONG>csr</STRONG> capability, which takes two parameters:  the  top  and
        bottom lines of the scrolling region.  The cursor position
        is, alas, undefined after using this command.
 
-       It  is possible to get the effect of insert or delete line
+       It is possible to get the effect of insert or delete  line
        using <STRONG>csr</STRONG> on a properly chosen region; the <STRONG>sc</STRONG> and <STRONG>rc</STRONG> (save
-       and  restore  cursor)  commands may be useful for ensuring
-       that your synthesized insert/delete string does  not  move
-       the  cursor.  (Note that the <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG> library does this
-       synthesis  automatically,  so   you   need   not   compose
+       and restore cursor) commands may be  useful  for  ensuring
+       that  your  synthesized insert/delete string does not move
+       the cursor.  (Note that the <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG> library does  this
+       synthesis   automatically,   so   you   need  not  compose
        insert/delete strings for an entry with <STRONG>csr</STRONG>).
 
        Yet another way to construct insert and delete might be to
-       use a combination of index with  the  memory-lock  feature
-       found  on some terminals (like the HP-700/90 series, which
+       use  a  combination  of index with the memory-lock feature
+       found on some terminals (like the HP-700/90 series,  which
        however also has insert/delete).
 
-       Inserting lines at the top or bottom  of  the  screen  can
-       also  be  done using <STRONG>ri</STRONG> or <STRONG>ind</STRONG> on many terminals without a
-       true insert/delete line, and is often faster even on  ter-
+       Inserting  lines  at  the  top or bottom of the screen can
+       also be done using <STRONG>ri</STRONG> or <STRONG>ind</STRONG> on many terminals  without  a
+       true  insert/delete line, and is often faster even on ter-
        minals with those features.
 
-       The  boolean  <STRONG>non_dest_scroll_region</STRONG> should be set if each
-       scrolling window is effectively a view port on  a  screen-
-       sized  canvas.   To  test  for  this  capability, create a
-       scrolling region in the middle of the screen, write  some-
-       thing  to  the  bottom line, move the cursor to the top of
+       The boolean <STRONG>non_dest_scroll_region</STRONG> should be set  if  each
+       scrolling  window  is effectively a view port on a screen-
+       sized canvas.  To  test  for  this  capability,  create  a
+       scrolling  region in the middle of the screen, write some-
+       thing to the bottom line, move the cursor to  the  top  of
        the region, and do <STRONG>ri</STRONG> followed by <STRONG>dl1</STRONG> or <STRONG>ind</STRONG>.  If the data
-       scrolled  off  the  bottom  of  the  region  by the <STRONG>ri</STRONG> re-
-       appears, then scrolling is non-destructive.  System V  and
-       XSI  Curses  expect that <STRONG>ind</STRONG>, <STRONG>ri</STRONG>, <STRONG>indn</STRONG>, and <STRONG>rin</STRONG> will simu-
-       late destructive scrolling; their  documentation  cautions
-       you  not  to  define <STRONG>csr</STRONG> unless this is true.  This <STRONG>curses</STRONG>
+       scrolled off the bottom  of  the  region  by  the  <STRONG>ri</STRONG>  re-
+       appears,  then scrolling is non-destructive.  System V and
+       XSI Curses expect that <STRONG>ind</STRONG>, <STRONG>ri</STRONG>, <STRONG>indn</STRONG>, and <STRONG>rin</STRONG>  will  simu-
+       late  destructive  scrolling; their documentation cautions
+       you not to define <STRONG>csr</STRONG> unless this is  true.   This  <STRONG>curses</STRONG>
        implementation is more liberal and will do explicit erases
        after scrolling if <STRONG>ndstr</STRONG> is defined.
 
        If the terminal has the ability to define a window as part
-       of memory, which all commands affect, it should  be  given
+       of  memory,  which all commands affect, it should be given
        as the parameterized string <STRONG>wind</STRONG>.  The four parameters are
-       the starting and ending lines in memory and  the  starting
+       the  starting  and ending lines in memory and the starting
        and ending columns in memory, in that order.
 
-       If  the terminal can retain display memory above, then the
-       <STRONG>da</STRONG> capability should be given; if display  memory  can  be
-       retained  below,  then <STRONG>db</STRONG> should be given.  These indicate
-       that deleting a line  or  scrolling  may  bring  non-blank
-       lines  up  from  below  or that scrolling back with <STRONG>ri</STRONG> may
+       If the terminal can retain display memory above, then  the
+       <STRONG>da</STRONG>  capability  should  be given; if display memory can be
+       retained below, then <STRONG>db</STRONG> should be given.   These  indicate
+       that  deleting  a  line  or  scrolling may bring non-blank
+       lines up from below or that scrolling  back  with  <STRONG>ri</STRONG>  may
        bring down non-blank lines.
 
 
    <STRONG>Insert/Delete</STRONG> <STRONG>Character</STRONG>
-       There are two basic kinds of  intelligent  terminals  with
-       respect  to insert/delete character which can be described
-       using <EM>terminfo.</EM>  The most common  insert/delete  character
-       operations  affect only the characters on the current line
-       and shift characters off the  end  of  the  line  rigidly.
-       Other  terminals,  such  as the Concept 100 and the Perkin
-       Elmer Owl, make a distinction between  typed  and  untyped
-       blanks  on  the  screen, shifting upon an insert or delete
-       only to an untyped blank on the  screen  which  is  either
-       eliminated,  or  expanded  to two untyped blanks.  You can
-       determine the kind of terminal you have  by  clearing  the
-       screen  and  then typing text separated by cursor motions.
-       Type "abc    def" using local cursor motions (not  spaces)
+       There  are  two  basic kinds of intelligent terminals with
+       respect to insert/delete character which can be  described
+       using  <EM>terminfo.</EM>   The most common insert/delete character
+       operations affect only the characters on the current  line
+       and  shift  characters  off  the  end of the line rigidly.
+       Other terminals, such as the Concept 100  and  the  Perkin
+       Elmer  Owl,  make  a distinction between typed and untyped
+       blanks on the screen, shifting upon an  insert  or  delete
+       only  to  an  untyped  blank on the screen which is either
+       eliminated, or expanded to two untyped  blanks.   You  can
+       determine  the  kind  of terminal you have by clearing the
+       screen and then typing text separated by  cursor  motions.
+       Type  "abc    def" using local cursor motions (not spaces)
        between the "abc" and the "def".  Then position the cursor
-       before the "abc" and put the terminal in insert mode.   If
-       typing  characters  causes  the  rest of the line to shift
+       before  the "abc" and put the terminal in insert mode.  If
+       typing characters causes the rest of  the  line  to  shift
        rigidly and characters to fall off the end, then your ter-
-       minal  does  not  distinguish  between  blanks and untyped
-       positions.  If the "abc" shifts over to  the  "def"  which
-       then  move together around the end of the current line and
-       onto the next as you insert, you have the second  type  of
-       terminal,  and should give the capability <STRONG>in</STRONG>, which stands
+       minal does not  distinguish  between  blanks  and  untyped
+       positions.   If  the  "abc" shifts over to the "def" which
+       then move together around the end of the current line  and
+       onto  the  next as you insert, you have the second type of
+       terminal, and should give the capability <STRONG>in</STRONG>, which  stands
        for "insert null".  While these are two logically separate
-       attributes  (one  line  versus multi-line insert mode, and
-       special treatment of untyped spaces) we have seen no  ter-
+       attributes (one line versus multi-line  insert  mode,  and
+       special  treatment of untyped spaces) we have seen no ter-
        minals whose insert mode cannot be described with the sin-
        gle attribute.
 
-       Terminfo can describe both terminals which have an  insert
+       Terminfo  can describe both terminals which have an insert
        mode, and terminals which send a simple sequence to open a
-       blank position on the current  line.   Give  as  <STRONG>smir</STRONG>  the
-       sequence  to  get  into  insert  mode.   Give  as <STRONG>rmir</STRONG> the
-       sequence to leave insert  mode.   Now  give  as  <STRONG>ich1</STRONG>  any
+       blank  position  on  the  current  line.  Give as <STRONG>smir</STRONG> the
+       sequence to get  into  insert  mode.   Give  as  <STRONG>rmir</STRONG>  the
+       sequence  to  leave  insert  mode.   Now  give as <STRONG>ich1</STRONG> any
        sequence needed to be sent just before sending the charac-
-       ter to be inserted.  Most terminals  with  a  true  insert
-       mode  will  not give <STRONG>ich1</STRONG>; terminals which send a sequence
+       ter  to  be  inserted.   Most terminals with a true insert
+       mode will not give <STRONG>ich1</STRONG>; terminals which send  a  sequence
        to open a screen position should give it here.
 
-       If your terminal has both, insert mode is usually  prefer-
-       able  to  <STRONG>ich1</STRONG>.   Technically,  you  should  not give both
-       unless the terminal actually requires both to be  used  in
-       combination.   Accordingly,  some  non-curses applications
-       get confused if both are present; the symptom  is  doubled
+       If  your terminal has both, insert mode is usually prefer-
+       able to <STRONG>ich1</STRONG>.   Technically,  you  should  not  give  both
+       unless  the  terminal actually requires both to be used in
+       combination.  Accordingly,  some  non-curses  applications
+       get  confused  if both are present; the symptom is doubled
        characters in an update using insert.  This requirement is
        now rare; most <STRONG>ich</STRONG> sequences do not require previous smir,
        and most smir insert modes do not require <STRONG>ich1</STRONG> before each
-       character.  Therefore, the  new  <STRONG>curses</STRONG>  actually  assumes
-       this  is the case and uses either <STRONG>rmir</STRONG>/<STRONG>smir</STRONG> or <STRONG>ich</STRONG>/<STRONG>ich1</STRONG> as
+       character.   Therefore,  the  new  <STRONG>curses</STRONG> actually assumes
+       this is the case and uses either <STRONG>rmir</STRONG>/<STRONG>smir</STRONG> or <STRONG>ich</STRONG>/<STRONG>ich1</STRONG>  as
        appropriate (but not both).  If you have to write an entry
-       to  be  used under new curses for a terminal old enough to
+       to be used under new curses for a terminal old  enough  to
        need both, include the <STRONG>rmir</STRONG>/<STRONG>smir</STRONG> sequences in <STRONG>ich1</STRONG>.
 
        If post insert padding is needed, give this as a number of
-       milliseconds  in <STRONG>ip</STRONG> (a string option).  Any other sequence
-       which may need to be sent after  an  insert  of  a  single
+       milliseconds in <STRONG>ip</STRONG> (a string option).  Any other  sequence
+       which  may  need  to  be  sent after an insert of a single
        character may also be given in <STRONG>ip</STRONG>.  If your terminal needs
        both to be placed into an `insert mode' and a special code
-       to  precede  each  inserted character, then both <STRONG>smir</STRONG>/<STRONG>rmir</STRONG>
-       and <STRONG>ich1</STRONG> can be given, and both will  be  used.   The  <STRONG>ich</STRONG>
+       to precede each inserted character,  then  both  <STRONG>smir</STRONG>/<STRONG>rmir</STRONG>
+       and  <STRONG>ich1</STRONG>  can  be  given, and both will be used.  The <STRONG>ich</STRONG>
        capability, with one parameter, <EM>n</EM>, will repeat the effects
        of <STRONG>ich1</STRONG> <EM>n</EM> times.
 
        If padding is necessary between characters typed while not
-       in  insert  mode,  give  this  as a number of milliseconds
+       in insert mode, give this  as  a  number  of  milliseconds
        padding in <STRONG>rmp</STRONG>.
 
-       It is occasionally  necessary  to  move  around  while  in
-       insert  mode  to delete characters on the same line (e.g.,
-       if there is a tab after the insertion position).  If  your
-       terminal  allows  motion while in insert mode you can give
-       the capability <STRONG>mir</STRONG> to speed up  inserting  in  this  case.
-       Omitting  <STRONG>mir</STRONG>  will  affect  only  speed.   Some terminals
+       It  is  occasionally  necessary  to  move  around while in
+       insert mode to delete characters on the same  line  (e.g.,
+       if  there is a tab after the insertion position).  If your
+       terminal allows motion while in insert mode you  can  give
+       the  capability  <STRONG>mir</STRONG>  to  speed up inserting in this case.
+       Omitting <STRONG>mir</STRONG>  will  affect  only  speed.   Some  terminals
        (notably Datamedia's) must not have <STRONG>mir</STRONG> because of the way
        their insert mode works.
 
-       Finally,  you  can specify <STRONG>dch1</STRONG> to delete a single charac-
-       ter, <STRONG>dch</STRONG> with one parameter, <EM>n</EM>, to  delete  <EM>n</EM>  <EM>characters,</EM>
-       and  delete mode by giving <STRONG>smdc</STRONG> and <STRONG>rmdc</STRONG> to enter and exit
-       delete mode (any mode the terminal needs to be  placed  in
+       Finally, you can specify <STRONG>dch1</STRONG> to delete a  single  charac-
+       ter,  <STRONG>dch</STRONG>  with  one parameter, <EM>n</EM>, to delete <EM>n</EM> <EM>characters,</EM>
+       and delete mode by giving <STRONG>smdc</STRONG> and <STRONG>rmdc</STRONG> to enter and  exit
+       delete  mode  (any mode the terminal needs to be placed in
        for <STRONG>dch1</STRONG> to work).
 
-       A  command to erase <EM>n</EM> characters (equivalent to outputting
-       <EM>n</EM> blanks without moving the cursor) can be  given  as  <STRONG>ech</STRONG>
+       A command to erase <EM>n</EM> characters (equivalent to  outputting
+       <EM>n</EM>  blanks  without  moving the cursor) can be given as <STRONG>ech</STRONG>
        with one parameter.
 
 
    <STRONG>Highlighting,</STRONG> <STRONG>Underlining,</STRONG> <STRONG>and</STRONG> <STRONG>Visible</STRONG> <STRONG>Bells</STRONG>
        If  your  terminal  has  one  or  more  kinds  of  display
-       attributes, these can be represented in a number  of  dif-
+       attributes,  these  can be represented in a number of dif-
        ferent ways.  You should choose one display form as <EM>stand-</EM>
        <EM>out</EM> <EM>mode</EM>, representing a good, high contrast, easy-on-the-
-       eyes,  format  for  highlighting  error messages and other
-       attention getters.  (If you have a choice,  reverse  video
-       plus  half-bright  is  good, or reverse video alone.)  The
-       sequences to enter and exit standout  mode  are  given  as
-       <STRONG>smso</STRONG>  and  <STRONG>rmso</STRONG>, respectively.  If the code to change into
-       or out of standout mode  leaves  one  or  even  two  blank
-       spaces  on the screen, as the TVI 912 and Teleray 1061 do,
+       eyes, format for highlighting  error  messages  and  other
+       attention  getters.   (If you have a choice, reverse video
+       plus half-bright is good, or reverse  video  alone.)   The
+       sequences  to  enter  and  exit standout mode are given as
+       <STRONG>smso</STRONG> and <STRONG>rmso</STRONG>, respectively.  If the code to  change  into
+       or  out  of  standout  mode  leaves  one or even two blank
+       spaces on the screen, as the TVI 912 and Teleray 1061  do,
        then <STRONG>xmc</STRONG> should be given to tell how many spaces are left.
 
-       Codes  to  begin  underlining  and  end underlining can be
-       given as <STRONG>smul</STRONG> and <STRONG>rmul</STRONG> respectively.  If the terminal  has
-       a  code  to  underline  the current character and move the
+       Codes to begin underlining  and  end  underlining  can  be
+       given  as <STRONG>smul</STRONG> and <STRONG>rmul</STRONG> respectively.  If the terminal has
+       a code to underline the current  character  and  move  the
        cursor one space to the right, such as the Microterm Mime,
        this can be given as <STRONG>uc</STRONG>.
 
-       Other  capabilities  to  enter  various highlighting modes
-       include <STRONG>blink</STRONG> (blinking) <STRONG>bold</STRONG> (bold or extra  bright)  <STRONG>dim</STRONG>
-       (dim  or  half-bright)  <STRONG>invis</STRONG> (blanking or invisible text)
-       <STRONG>prot</STRONG> (protected) <STRONG>rev</STRONG> (reverse video) <STRONG>sgr0</STRONG>  (turn  off  <EM>all</EM>
-       attribute  modes)  <STRONG>smacs</STRONG>  (enter  alternate  character set
-       mode) and  <STRONG>rmacs</STRONG>  (exit  alternate  character  set  mode).
-       Turning  on  any of these modes singly may or may not turn
+       Other capabilities to  enter  various  highlighting  modes
+       include  <STRONG>blink</STRONG>  (blinking) <STRONG>bold</STRONG> (bold or extra bright) <STRONG>dim</STRONG>
+       (dim or half-bright) <STRONG>invis</STRONG> (blanking  or  invisible  text)
+       <STRONG>prot</STRONG>  (protected)  <STRONG>rev</STRONG>  (reverse video) <STRONG>sgr0</STRONG> (turn off <EM>all</EM>
+       attribute modes)  <STRONG>smacs</STRONG>  (enter  alternate  character  set
+       mode)  and  <STRONG>rmacs</STRONG>  (exit  alternate  character  set mode).
+       Turning on any of these modes singly may or may  not  turn
        off other modes.
 
-       If there is a sequence to set  arbitrary  combinations  of
-       modes,  this should be given as <STRONG>sgr</STRONG> (set attributes), tak-
-       ing 9 parameters.  Each parameter is either 0 or  nonzero,
+       If  there  is  a sequence to set arbitrary combinations of
+       modes, this should be given as <STRONG>sgr</STRONG> (set attributes),  tak-
+       ing  9 parameters.  Each parameter is either 0 or nonzero,
        as the corresponding attribute is on or off.  The 9 param-
-       eters are, in order: standout, underline, reverse,  blink,
-       dim,  bold,  blank, protect, alternate character set.  Not
-       all modes need be supported by <STRONG>sgr</STRONG>, only those  for  which
+       eters  are, in order: standout, underline, reverse, blink,
+       dim, bold, blank, protect, alternate character  set.   Not
+       all  modes  need be supported by <STRONG>sgr</STRONG>, only those for which
        corresponding separate attribute commands exist.
 
        For example, the DEC vt220 supports most of the modes:
 
+
            <STRONG>tparm</STRONG> <STRONG>parameter</STRONG>   <STRONG>attribute</STRONG>    <STRONG>escape</STRONG> <STRONG>sequence</STRONG>
 
            none              none         \E[0m
            p1                standout     \E[0;1;7m
            p2                underline    \E[0;4m
-
            p3                reverse      \E[0;7m
            p4                blink        \E[0;5m
            p5                dim          not available
@@ -1581,24 +1615,25 @@
            p8                protect      not used
            p9                altcharset   ^O (off) ^N (on)
 
-       We  begin each escape sequence by turning off any existing
-       modes, since there is no quick way  to  determine  whether
+       We begin each escape sequence by turning off any  existing
+       modes,  since  there  is no quick way to determine whether
        they are active.  Standout is set up to be the combination
-       of reverse and bold.  The vt220  terminal  has  a  protect
-       mode,  though  it  is  not commonly used in sgr because it
-       protects characters on the screen  from  the  host's  era-
-       sures.   The  altcharset mode also is different in that it
-       is either ^O or ^N, depending on whether it is off or  on.
-       If  all  modes  are  turned  on, the resulting sequence is
+       of  reverse  and  bold.   The vt220 terminal has a protect
+       mode, though it is not commonly used  in  sgr  because  it
+       protects  characters  on  the  screen from the host's era-
+       sures.  The altcharset mode also is different in  that  it
+       is  either ^O or ^N, depending on whether it is off or on.
+       If all modes are turned  on,  the  resulting  sequence  is
        \E[0;1;4;5;7;8m^N.
 
-       Some sequences are common to different modes.   For  exam-
-       ple,  ;7  is output when either p1 or p3 is true, that is,
+       Some  sequences  are common to different modes.  For exam-
+       ple, ;7 is output when either p1 or p3 is true,  that  is,
        if either standout or reverse modes are turned on.
 
-       Writing out the above sequences, along with  their  depen-
+       Writing  out  the above sequences, along with their depen-
        dencies yields
 
+
          <STRONG>sequence</STRONG>    <STRONG>when</STRONG> <STRONG>to</STRONG> <STRONG>output</STRONG>     <STRONG>terminfo</STRONG> <STRONG>translation</STRONG>
 
          \E[0       always              \E[0
@@ -1608,6 +1643,7 @@
          ;7         if p1 or p3         %?%p1%p3%|%t;7%;
          ;8         if p7               %?%p7%|%t;8%;
          m          always              m
+
          ^N or ^O   if p9 ^N, else ^O   %?%p9%t^N%e^O%;
 
        Putting this all together into the sgr sequence gives:
@@ -1615,216 +1651,223 @@
            sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;
                %?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
 
-       Remember  that  if  you specify sgr, you must also specify
-       sgr0.
-
-       Terminals with the ``magic cookie'' glitch  (<STRONG>xmc</STRONG>)  deposit
-       special   ``cookies''   when   they  receive  mode-setting
-       sequences, which affect the display algorithm rather  than
-       having  extra  bits  for  each character.  Some terminals,
-       such as the HP 2621,  automatically  leave  standout  mode
-       when  they  move to a new line or the cursor is addressed.
-       Programs using standout mode  should  exit  standout  mode
-       before  moving the cursor or sending a newline, unless the
-       <STRONG>msgr</STRONG> capability, asserting that it  is  safe  to  move  in
+       Remember that if you specify sgr, you  must  also  specify
+       sgr0.   Also, some implementations rely on sgr being given
+       if sgr0 is, Not all terminfo entries necessarily  have  an
+       sgr  string,  however.   Many terminfo entries are derived
+       from termcap entries which have no sgr string.   The  only
+       drawback  to  adding  an  sgr  string is that termcap also
+       assumes that sgr0 does not exit  alternate  character  set
+       mode.
+
+       Terminals  with  the ``magic cookie'' glitch (<STRONG>xmc</STRONG>) deposit
+       special  ``cookies''  when   they   receive   mode-setting
+       sequences,  which affect the display algorithm rather than
+       having extra bits for  each  character.   Some  terminals,
+       such  as  the  HP  2621, automatically leave standout mode
+       when they move to a new line or the cursor  is  addressed.
+       Programs  using  standout  mode  should exit standout mode
+       before moving the cursor or sending a newline, unless  the
+       <STRONG>msgr</STRONG>  capability,  asserting  that  it  is safe to move in
        standout mode, is present.
 
-       If  the terminal has a way of flashing the screen to indi-
-       cate an error quietly (a bell replacement) then  this  can
+       If the terminal has a way of flashing the screen to  indi-
+       cate  an  error quietly (a bell replacement) then this can
        be given as <STRONG>flash</STRONG>; it must not move the cursor.
 
-       If  the  cursor  needs to be made more visible than normal
+       If the cursor needs to be made more  visible  than  normal
        when it is not on the bottom line (to make, for example, a
-       non-blinking  underline  into  an  easier to find block or
+       non-blinking underline into an easier  to  find  block  or
        blinking underline) give this sequence as <STRONG>cvvis</STRONG>.  If there
-       is  a  way  to  make the cursor completely invisible, give
+       is a way to make the  cursor  completely  invisible,  give
        that as <STRONG>civis</STRONG>.  The capability <STRONG>cnorm</STRONG> should be given which
        undoes the effects of both of these modes.
 
        If your terminal correctly generates underlined characters
-       (with no special codes needed) even  though  it  does  not
-       overstrike,  then you should give the capability <STRONG>ul</STRONG>.  If a
-       character overstriking another leaves both  characters  on
+       (with  no  special  codes  needed) even though it does not
+       overstrike, then you should give the capability <STRONG>ul</STRONG>.  If  a
+       character  overstriking  another leaves both characters on
        the screen, specify the capability <STRONG>os</STRONG>.  If overstrikes are
-       erasable with a blank, then this should  be  indicated  by
+       erasable  with  a  blank, then this should be indicated by
        giving <STRONG>eo</STRONG>.
 
 
    <STRONG>Keypad</STRONG> <STRONG>and</STRONG> <STRONG>Function</STRONG> <STRONG>Keys</STRONG>
        If the terminal has a keypad that transmits codes when the
-       keys are pressed, this information  can  be  given.   Note
+       keys  are  pressed,  this  information can be given.  Note
        that it is not possible to handle terminals where the key-
        pad only works in local (this applies, for example, to the
-       unshifted  HP  2621  keys).   If  the keypad can be set to
-       transmit or not transmit, give these  codes  as  <STRONG>smkx</STRONG>  and
+       unshifted HP 2621 keys).  If the  keypad  can  be  set  to
+       transmit  or  not  transmit,  give these codes as <STRONG>smkx</STRONG> and
        <STRONG>rmkx</STRONG>.  Otherwise the keypad is assumed to always transmit.
-       The codes sent by the left arrow, right arrow,  up  arrow,
-       down  arrow,  and  home keys can be given as <STRONG>kcub1,</STRONG> <STRONG>kcuf1,</STRONG>
-       <STRONG>kcuu1,</STRONG> <STRONG>kcud1,</STRONG> and <STRONG>khome</STRONG> respectively.  If there are  func-
-       tion  keys  such  as f0, f1, ..., f10, the codes they send
-       can be given as <STRONG>kf0,</STRONG> <STRONG>kf1,</STRONG> <STRONG>...,</STRONG> <STRONG>kf10</STRONG>.  If these  keys  have
-       labels  other  than the default f0 through f10, the labels
-       can be given as <STRONG>lf0,</STRONG> <STRONG>lf1,</STRONG> <STRONG>...,</STRONG> <STRONG>lf10</STRONG>.  The codes  transmit-
-       ted  by certain other special keys can be given: <STRONG>kll</STRONG> (home
-       down), <STRONG>kbs</STRONG>  (backspace),  <STRONG>ktbc</STRONG>  (clear  all  tabs),  <STRONG>kctab</STRONG>
+       The  codes  sent by the left arrow, right arrow, up arrow,
+       down arrow, and home keys can be given  as  <STRONG>kcub1,</STRONG>  <STRONG>kcuf1,</STRONG>
+       <STRONG>kcuu1,</STRONG>  <STRONG>kcud1,</STRONG> and <STRONG>khome</STRONG> respectively.  If there are func-
+       tion keys such as f0, f1, ..., f10, the  codes  they  send
+       can  be  given as <STRONG>kf0,</STRONG> <STRONG>kf1,</STRONG> <STRONG>...,</STRONG> <STRONG>kf10</STRONG>.  If these keys have
+       labels other than the default f0 through f10,  the  labels
+       can  be given as <STRONG>lf0,</STRONG> <STRONG>lf1,</STRONG> <STRONG>...,</STRONG> <STRONG>lf10</STRONG>.  The codes transmit-
+       ted by certain other special keys can be given: <STRONG>kll</STRONG>  (home
+       down),  <STRONG>kbs</STRONG>  (backspace),  <STRONG>ktbc</STRONG>  (clear  all  tabs), <STRONG>kctab</STRONG>
        (clear the tab stop in this column), <STRONG>kclr</STRONG> (clear screen or
-       erase key), <STRONG>kdch1</STRONG> (delete character), <STRONG>kdl1</STRONG> (delete  line),
-       <STRONG>krmir</STRONG>  (exit insert mode), <STRONG>kel</STRONG> (clear to end of line), <STRONG>ked</STRONG>
+       erase  key), <STRONG>kdch1</STRONG> (delete character), <STRONG>kdl1</STRONG> (delete line),
+       <STRONG>krmir</STRONG> (exit insert mode), <STRONG>kel</STRONG> (clear to end of line),  <STRONG>ked</STRONG>
        (clear to end of screen), <STRONG>kich1</STRONG> (insert character or enter
-       insert  mode),  <STRONG>kil1</STRONG>  (insert  line), <STRONG>knp</STRONG> (next page), <STRONG>kpp</STRONG>
-       (previous page), <STRONG>kind</STRONG> (scroll forward/down),  <STRONG>kri</STRONG>  (scroll
-       backward/up),  <STRONG>khts</STRONG>  (set  a tab stop in this column).  In
+       insert mode), <STRONG>kil1</STRONG> (insert line),  <STRONG>knp</STRONG>  (next  page),  <STRONG>kpp</STRONG>
+       (previous  page),  <STRONG>kind</STRONG> (scroll forward/down), <STRONG>kri</STRONG> (scroll
+       backward/up), <STRONG>khts</STRONG> (set a tab stop in  this  column).   In
        addition, if the keypad has a 3 by 3 array of keys includ-
-       ing  the four arrow keys, the other five keys can be given
-       as <STRONG>ka1</STRONG>, <STRONG>ka3</STRONG>, <STRONG>kb2</STRONG>, <STRONG>kc1</STRONG>, and <STRONG>kc3</STRONG>.   These  keys  are  useful
+       ing the four arrow keys, the other five keys can be  given
+       as  <STRONG>ka1</STRONG>,  <STRONG>ka3</STRONG>,  <STRONG>kb2</STRONG>,  <STRONG>kc1</STRONG>, and <STRONG>kc3</STRONG>.  These keys are useful
        when the effects of a 3 by 3 directional pad are needed.
 
-       Strings  to  program  function keys can be given as <STRONG>pfkey</STRONG>,
-       <STRONG>pfloc</STRONG>, and <STRONG>pfx</STRONG>.  A string to program screen labels  should
-       be  specified  as  <STRONG>pln</STRONG>.   Each  of these strings takes two
-       parameters: the function key number to program (from 0  to
-       10)  and the string to program it with.  Function key num-
-       bers out of this range may program  undefined  keys  in  a
-       terminal  dependent  manner.   The  difference between the
-       capabilities is that <STRONG>pfkey</STRONG> causes pressing the  given  key
-       to  be the same as the user typing the given string; <STRONG>pfloc</STRONG>
+       Strings to program function keys can be  given  as  <STRONG>pfkey</STRONG>,
+       <STRONG>pfloc</STRONG>,  and <STRONG>pfx</STRONG>.  A string to program screen labels should
+       be specified as <STRONG>pln</STRONG>.  Each  of  these  strings  takes  two
+       parameters:  the function key number to program (from 0 to
+       10) and the string to program it with.  Function key  num-
+       bers  out  of  this  range may program undefined keys in a
+       terminal dependent manner.   The  difference  between  the
+       capabilities  is  that <STRONG>pfkey</STRONG> causes pressing the given key
+       to be the same as the user typing the given string;  <STRONG>pfloc</STRONG>
        causes the string to be executed by the terminal in local;
-       and  <STRONG>pfx</STRONG>  causes  the string to be transmitted to the com-
+       and <STRONG>pfx</STRONG> causes the string to be transmitted  to  the  com-
        puter.
 
        The capabilities <STRONG>nlab</STRONG>, <STRONG>lw</STRONG> and <STRONG>lh</STRONG> define the number of pro-
-       grammable  screen  labels  and their width and height.  If
-       there are commands to turn the labels  on  and  off,  give
-       them  in <STRONG>smln</STRONG> and <STRONG>rmln</STRONG>.  <STRONG>smln</STRONG> is normally output after one
+       grammable screen labels and their width  and  height.   If
+       there  are  commands  to  turn the labels on and off, give
+       them in <STRONG>smln</STRONG> and <STRONG>rmln</STRONG>.  <STRONG>smln</STRONG> is normally output after  one
        or more pln sequences to make sure that the change becomes
        visible.
 
 
    <STRONG>Tabs</STRONG> <STRONG>and</STRONG> <STRONG>Initialization</STRONG>
-       If  the terminal has hardware tabs, the command to advance
-       to the next tab stop can be given as <STRONG>ht</STRONG>  (usually  control
-       I).   A  ``back-tab''  command which moves leftward to the
+       If the terminal has hardware tabs, the command to  advance
+       to  the  next tab stop can be given as <STRONG>ht</STRONG> (usually control
+       I).  A ``back-tab'' command which moves  leftward  to  the
        preceding tab stop can be given as <STRONG>cbt</STRONG>.  By convention, if
-       the  teletype  modes indicate that tabs are being expanded
-       by the computer rather than being sent  to  the  terminal,
-       programs  should  not  use <STRONG>ht</STRONG> or <STRONG>cbt</STRONG> even if they are pre-
-       sent, since the user may not have the tab  stops  properly
-       set.   If  the  terminal  has hardware tabs which are ini-
-       tially set every <EM>n</EM> spaces when the terminal is powered up,
-       the  numeric  parameter <STRONG>it</STRONG> is given, showing the number of
-       spaces the tabs are set to.  This is normally used by  the
-       <EM>tset</EM>  command  to  determine  whether  to set the mode for
-       hardware tab expansion, and whether to set the tab  stops.
-       If  the  terminal  has tab stops that can be saved in non-
-       volatile memory, the terminfo description can assume  that
+       the teletype modes indicate that tabs are  being  expanded
+       by  the  computer  rather than being sent to the terminal,
+       programs should not  use  <STRONG>ht</STRONG>  or  <STRONG>cbt</STRONG>  even  if  they  are
+       present,  since  the user may not have the tab stops prop-
+       erly set.  If the terminal has  hardware  tabs  which  are
+       initially  set every <EM>n</EM> spaces when the terminal is powered
+       up, the numeric parameter <STRONG>it</STRONG> is given, showing the  number
+       of  spaces  the tabs are set to.  This is normally used by
+       the <EM>tset</EM> command to determine whether to set the mode  for
+       hardware  tab expansion, and whether to set the tab stops.
+       If the terminal has tab stops that can be  saved  in  non-
+       volatile  memory, the terminfo description can assume that
        they are properly set.
 
-       Other  capabilities include <STRONG>is1</STRONG>, <STRONG>is2</STRONG>, and <STRONG>is3</STRONG>, initializa-
-       tion strings for the terminal, <STRONG>iprog</STRONG>, the path name  of  a
-       program  to be run to initialize the terminal, and <STRONG>if</STRONG>, the
-       name of a file  containing  long  initialization  strings.
-       These  strings are expected to set the terminal into modes
-       consistent with the  rest  of  the  terminfo  description.
+       Other capabilities include <STRONG>is1</STRONG>, <STRONG>is2</STRONG>, and <STRONG>is3</STRONG>,  initializa-
+       tion  strings  for the terminal, <STRONG>iprog</STRONG>, the path name of a
+       program to be run to initialize the terminal, and <STRONG>if</STRONG>,  the
+       name  of  a  file  containing long initialization strings.
+       These strings are expected to set the terminal into  modes
+       consistent  with  the  rest  of  the terminfo description.
        They are normally sent to the terminal, by the <EM>init</EM> option
-       of the <EM>tput</EM> program, each time the  user  logs  in.   They
-       will  be  printed  in the following order: run the program
-       <STRONG>iprog</STRONG>; output <STRONG>is1</STRONG>; <STRONG>is2</STRONG>; set the margins  using  <STRONG>mgc</STRONG>,  <STRONG>smgl</STRONG>
-       and  <STRONG>smgr</STRONG>;  set tabs using <STRONG>tbc</STRONG> and <STRONG>hts</STRONG>; print the file <STRONG>if</STRONG>;
+       of  the  <EM>tput</EM>  program,  each time the user logs in.  They
+       will be printed in the following order:  run  the  program
+       <STRONG>iprog</STRONG>;  output  <STRONG>is1</STRONG>;  <STRONG>is2</STRONG>; set the margins using <STRONG>mgc</STRONG>, <STRONG>smgl</STRONG>
+       and <STRONG>smgr</STRONG>; set tabs using <STRONG>tbc</STRONG> and <STRONG>hts</STRONG>; print the  file  <STRONG>if</STRONG>;
        and finally output <STRONG>is3</STRONG>.
 
-       Most initialization is done with  <STRONG>is2</STRONG>.   Special  terminal
+       Most  initialization  is  done with <STRONG>is2</STRONG>.  Special terminal
        modes can be set up without duplicating strings by putting
-       the common sequences in <STRONG>is2</STRONG> and special cases in  <STRONG>is1</STRONG>  and
-       <STRONG>is3</STRONG>.   A pair of sequences that does a harder reset from a
-       totally unknown state can be  analogously  given  as  <STRONG>rs1</STRONG>,
-       <STRONG>rs2</STRONG>,  <STRONG>rf</STRONG>, and <STRONG>rs3</STRONG>, analogous to <STRONG>is2</STRONG> and <STRONG>if</STRONG>.  These strings
-       are output by the <EM>reset</EM> program, which is  used  when  the
-       terminal  gets into a wedged state.  Commands are normally
-       placed in <STRONG>rs1</STRONG>, <STRONG>rs2</STRONG> <STRONG>rs3</STRONG> and <STRONG>rf</STRONG> only if they produce  annoy-
-       ing  effects on the screen and are not necessary when log-
-       ging in.  For example, the command to set the  vt100  into
-       80-column  mode  would  normally  be  part  of <STRONG>is2</STRONG>, but it
-       causes an annoying glitch of the screen and  is  not  nor-
-       mally  needed  since the terminal is usually already in 80
+       the  common  sequences in <STRONG>is2</STRONG> and special cases in <STRONG>is1</STRONG> and
+       <STRONG>is3</STRONG>.  A pair of sequences that does a harder reset from  a
+       totally  unknown  state  can  be analogously given as <STRONG>rs1</STRONG>,
+       <STRONG>rs2</STRONG>, <STRONG>rf</STRONG>, and <STRONG>rs3</STRONG>, analogous to <STRONG>is2</STRONG> and <STRONG>if</STRONG>.  These  strings
+       are  output  by  the <EM>reset</EM> program, which is used when the
+       terminal gets into a wedged state.  Commands are  normally
+       placed  in <STRONG>rs1</STRONG>, <STRONG>rs2</STRONG> <STRONG>rs3</STRONG> and <STRONG>rf</STRONG> only if they produce annoy-
+       ing effects on the screen and are not necessary when  log-
+       ging  in.   For example, the command to set the vt100 into
+       80-column mode would normally  be  part  of  <STRONG>is2</STRONG>,  but  it
+       causes  an  annoying  glitch of the screen and is not nor-
+       mally needed since the terminal is usually already  in  80
        column mode.
 
        If there are commands to set and clear tab stops, they can
-       be  given  as <STRONG>tbc</STRONG> (clear all tab stops) and <STRONG>hts</STRONG> (set a tab
-       stop in the current column of every row).  If a more  com-
-       plex  sequence  is  needed  to  set  the  tabs than can be
-       described by this, the sequence can be placed  in  <STRONG>is2</STRONG>  or
+       be given as <STRONG>tbc</STRONG> (clear all tab stops) and <STRONG>hts</STRONG> (set  a  tab
+       stop  in the current column of every row).  If a more com-
+       plex sequence is needed  to  set  the  tabs  than  can  be
+       described  by  this,  the sequence can be placed in <STRONG>is2</STRONG> or
        <STRONG>if</STRONG>.
 
    <STRONG>Delays</STRONG> <STRONG>and</STRONG> <STRONG>Padding</STRONG>
-       Many  older  and  slower  terminals  don't  support either
+       Many older  and  slower  terminals  don't  support  either
        XON/XOFF or DTR handshaking, including hard copy terminals
-       and  some  very  archaic CRTs (including, for example, DEC
-       VT100s).  These may require padding characters after  cer-
+       and some very archaic CRTs (including,  for  example,  DEC
+       VT100s).   These may require padding characters after cer-
        tain cursor motions and screen changes.
 
        If the terminal uses xon/xoff handshaking for flow control
-       (that is, it automatically emits ^S back to the host  when
+       (that  is, it automatically emits ^S back to the host when
        its input buffers are close to full), set <STRONG>xon</STRONG>.  This capa-
-       bility suppresses the emission of padding.  You  can  also
-       set  it for memory-mapped console devices effectively that
-       don't have a  speed  limit.   Padding  information  should
-       still  be  included so that routines can make better deci-
+       bility  suppresses  the emission of padding.  You can also
+       set it for memory-mapped console devices effectively  that
+       don't  have  a  speed  limit.   Padding information should
+       still be included so that routines can make  better  deci-
        sions about relative costs, but actual pad characters will
        not be transmitted.
 
-       If  <STRONG>pb</STRONG> (padding baud rate) is given, padding is suppressed
-       at baud rates below the value of <STRONG>pb</STRONG>.  If the entry has  no
-       padding  baud rate, then whether padding is emitted or not
+       If <STRONG>pb</STRONG> (padding baud rate) is given, padding is  suppressed
+       at  baud rates below the value of <STRONG>pb</STRONG>.  If the entry has no
+       padding baud rate, then whether padding is emitted or  not
        is completely controlled by <STRONG>xon</STRONG>.
 
-       If the terminal requires other than a null (zero)  charac-
-       ter  as  a  pad,  then this can be given as <STRONG>pad</STRONG>.  Only the
+       If  the terminal requires other than a null (zero) charac-
+       ter as a pad, then this can be given  as  <STRONG>pad</STRONG>.   Only  the
        first character of the <STRONG>pad</STRONG> string is used.
 
 
    <STRONG>Status</STRONG> <STRONG>Lines</STRONG>
-       Some terminals have an extra `status line'  which  is  not
-       normally  used  by  software  (and thus not counted in the
+       Some  terminals  have  an extra `status line' which is not
+       normally used by software (and thus  not  counted  in  the
        terminal's <STRONG>lines</STRONG> capability).
 
-       The simplest case  is  a  status  line  which  is  cursor-
-       addressable  but  not part of the main scrolling region on
-       the screen; the Heathkit H19 has a  status  line  of  this
-       kind,  as  would  a 24-line VT100 with a 23-line scrolling
-       region set up on initialization.  This situation is  indi-
+       The  simplest  case  is  a  status  line  which is cursor-
+       addressable but not part of the main scrolling  region  on
+       the  screen;  the  Heathkit  H19 has a status line of this
+       kind, as would a 24-line VT100 with  a  23-line  scrolling
+       region  set up on initialization.  This situation is indi-
        cated by the <STRONG>hs</STRONG> capability.
 
        Some terminals with status lines need special sequences to
-       access the status line.   These  may  be  expressed  as  a
+       access  the  status  line.   These  may  be expressed as a
        string with single parameter <STRONG>tsl</STRONG> which takes the cursor to
-       a given zero-origin column on the status line.  The  capa-
+       a  given zero-origin column on the status line.  The capa-
        bility <STRONG>fsl</STRONG> must return to the main-screen cursor positions
-       before the last <STRONG>tsl</STRONG>.  You may need  to  embed  the  string
-       values  of <STRONG>sc</STRONG> (save cursor) and <STRONG>rc</STRONG> (restore cursor) in <STRONG>tsl</STRONG>
+       before  the  last  <STRONG>tsl</STRONG>.   You may need to embed the string
+       values of <STRONG>sc</STRONG> (save cursor) and <STRONG>rc</STRONG> (restore cursor) in  <STRONG>tsl</STRONG>
        and <STRONG>fsl</STRONG> to accomplish this.
 
-       The status line is normally assumed to be the  same  width
-       as  the width of the terminal.  If this is untrue, you can
+       The  status  line is normally assumed to be the same width
+       as the width of the terminal.  If this is untrue, you  can
        specify it with the numeric capability <STRONG>wsl</STRONG>.
 
-       A command to erase or blank the status line may be  speci-
+       A  command to erase or blank the status line may be speci-
        fied as <STRONG>dsl</STRONG>.
 
-       The   boolean   capability  <STRONG>eslok</STRONG>  specifies  that  escape
+       The  boolean  capability  <STRONG>eslok</STRONG>  specifies   that   escape
        sequences, tabs, etc., work ordinarily in the status line.
 
-       The  <STRONG>ncurses</STRONG>  implementation does not yet use any of these
-       capabilities.  They are documented here in case they  ever
+       The <STRONG>ncurses</STRONG> implementation does not yet use any  of  these
+       capabilities.   They are documented here in case they ever
        become important.
 
 
    <STRONG>Line</STRONG> <STRONG>Graphics</STRONG>
-       Many  terminals  have  alternate character sets useful for
-       forms-drawing.  Terminfo and <STRONG>curses</STRONG> build in  support  for
-       the  drawing  characters supported by the VT100, with some
-       characters from the AT&amp;T  4410v1  added.   This  alternate
+       Many terminals have alternate character  sets  useful  for
+       forms-drawing.   Terminfo  and <STRONG>curses</STRONG> build in support for
+       the drawing characters supported by the VT100,  with  some
+       characters  from  the  AT&amp;T  4410v1 added.  This alternate
        character set may be specified by the <STRONG>acsc</STRONG> capability.
 
+
                 <STRONG>Glyph</STRONG>             <STRONG>ACS</STRONG>            <STRONG>Ascii</STRONG>      <STRONG>VT100</STRONG>
                  <STRONG>Name</STRONG>             <STRONG>Name</STRONG>           <STRONG>Default</STRONG>    <STRONG>Name</STRONG>
        UK pound sign              ACS_STERLING   f          }
@@ -1836,7 +1879,6 @@
        bullet                     ACS_BULLET     o          ~
        checker board (stipple)    ACS_CKBOARD    :          a
        degree symbol              ACS_DEGREE     \          f
-
        diamond                    ACS_DIAMOND    +          `
        greater-than-or-equal-to   ACS_GEQUAL     &gt;          z
        greek pi                   ACS_PI         *          {
@@ -1861,60 +1903,61 @@
        upper right corner         ACS_URCORNER   +          k
        vertical line              ACS_VLINE      |          x
 
-       The  best  way to define a new device's graphics set is to
-       add a column to a copy of this table  for  your  terminal,
-       giving   the   character   which   (when  emitted  between
-       <STRONG>smacs</STRONG>/<STRONG>rmacs</STRONG> switches) will be rendered as the  correspond-
-       ing  graphic.  Then read off the VT100/your terminal char-
-       acter pairs right to left in sequence;  these  become  the
-       ACSC string.
+       The best way to define a new device's graphics set  is  to
+       add  a  column  to a copy of this table for your terminal,
+       giving  the  character   which   (when   emitted   between
+       <STRONG>smacs</STRONG>/<STRONG>rmacs</STRONG>  switches) will be rendered as the correspond-
+       ing  graphic.   Then  read  off  the  VT100/your  terminal
+       character  pairs  right  to left in sequence; these become
+       the ACSC string.
 
 
    <STRONG>Color</STRONG> <STRONG>Handling</STRONG>
-       Most  color  terminals are either `Tektronix-like' or `HP-
-       like'.  Tektronix-like terminals have a predefined set  of
-       N  colors  (where N usually 8), and can set character-cell
+       Most color terminals are either `Tektronix-like'  or  `HP-
+       like'.   Tektronix-like terminals have a predefined set of
+       N colors (where N usually 8), and can  set  character-cell
        foreground and background characters independently, mixing
-       them  into  N  * N color-pairs.  On HP-like terminals, the
+       them into N * N color-pairs.  On  HP-like  terminals,  the
        use must set each color pair up separately (foreground and
-       background  are  not  independently  settable).   Up  to M
-       color-pairs may be  set  up  from  2*M  different  colors.
+       background are  not  independently  settable).   Up  to  M
+       color-pairs  may  be  set  up  from  2*M different colors.
        ANSI-compatible terminals are Tektronix-like.
 
        Some basic color capabilities are independent of the color
        method.  The numeric capabilities <STRONG>colors</STRONG> and <STRONG>pairs</STRONG> specify
-       the  maximum numbers of colors and color-pairs that can be
-       displayed simultaneously.  The <STRONG>op</STRONG> (original  pair)  string
-       resets  foreground  and background colors to their default
-       values for the terminal.  The <STRONG>oc</STRONG> string resets all  colors
-       or  color-pairs  to their default values for the terminal.
-       Some terminals  (including  many  PC  terminal  emulators)
-       erase  screen  areas  with  the  current  background color
-       rather than the power-up default background; these  should
+       the maximum numbers of colors and color-pairs that can  be
+       displayed  simultaneously.   The <STRONG>op</STRONG> (original pair) string
+       resets foreground and background colors to  their  default
+       values  for the terminal.  The <STRONG>oc</STRONG> string resets all colors
+       or color-pairs to their default values for  the  terminal.
+       Some  terminals  (including  many  PC  terminal emulators)
+       erase screen  areas  with  the  current  background  color
+       rather  than the power-up default background; these should
        have the boolean capability <STRONG>bce</STRONG>.
 
-       To  change the current foreground or background color on a
-       Tektronix-type terminal, use <STRONG>setaf</STRONG> (set  ANSI  foreground)
-       and  <STRONG>setab</STRONG>  (set ANSI background) or <STRONG>setf</STRONG> (set foreground)
-       and <STRONG>setb</STRONG> (set background).  These take one parameter,  the
+       To change the current foreground or background color on  a
+       Tektronix-type  terminal,  use <STRONG>setaf</STRONG> (set ANSI foreground)
+       and <STRONG>setab</STRONG> (set ANSI background) or <STRONG>setf</STRONG>  (set  foreground)
+       and  <STRONG>setb</STRONG> (set background).  These take one parameter, the
        color  number.   The  SVr4  documentation  describes  only
-       <STRONG>setaf</STRONG>/<STRONG>setab</STRONG>; the XPG4 draft says  that  "If  the  terminal
+       <STRONG>setaf</STRONG>/<STRONG>setab</STRONG>;  the  XPG4  draft  says that "If the terminal
        supports ANSI escape sequences to set background and fore-
-       ground, they should be coded as <STRONG>setaf</STRONG> and  <STRONG>setab</STRONG>,  respec-
-       tively.   If  the terminal supports other escape sequences
-       to set background and foreground, they should be coded  as
-       <STRONG>setf</STRONG>  and  <STRONG>setb</STRONG>, respectively.  The <EM>vidputs()</EM> function and
-       the refresh functions use <STRONG>setaf</STRONG>  and  <STRONG>setab</STRONG>  if  they  are
+       ground,  they  should be coded as <STRONG>setaf</STRONG> and <STRONG>setab</STRONG>, respec-
+       tively.  If the terminal supports other  escape  sequences
+       to  set background and foreground, they should be coded as
+       <STRONG>setf</STRONG> and <STRONG>setb</STRONG>, respectively.  The <EM>vidputs()</EM>  function  and
+       the  refresh  functions  use  <STRONG>setaf</STRONG>  and <STRONG>setab</STRONG> if they are
        defined."
 
-       The  <STRONG>setaf</STRONG>/<STRONG>setab</STRONG>  and <STRONG>setf</STRONG>/<STRONG>setb</STRONG> capabilities take a single
+       The <STRONG>setaf</STRONG>/<STRONG>setab</STRONG> and <STRONG>setf</STRONG>/<STRONG>setb</STRONG> capabilities take  a  single
        numeric argument each.  Argument values 0-7 of <STRONG>setaf</STRONG>/<STRONG>setab</STRONG>
-       are  portably defined as follows (the middle column is the
+       are portably defined as follows (the middle column is  the
        symbolic #define available in the header for the <STRONG>curses</STRONG> or
-       <STRONG>ncurses</STRONG>  libraries).  The terminal hardware is free to map
-       these as it likes, but  the  RGB  values  indicate  normal
+       <STRONG>ncurses</STRONG> libraries).  The terminal hardware is free to  map
+       these  as  it  likes,  but  the RGB values indicate normal
        locations in color space.
 
+
              <STRONG>Color</STRONG>       <STRONG>#define</STRONG>       <STRONG>Value</STRONG>       <STRONG>RGB</STRONG>
              black     <STRONG>COLOR_BLACK</STRONG>       0     0, 0, 0
              red       <STRONG>COLOR_RED</STRONG>         1     max,0,0
@@ -1925,10 +1968,12 @@
              cyan      <STRONG>COLOR_CYAN</STRONG>        6     0,max,max
              white     <STRONG>COLOR_WHITE</STRONG>       7     max,max,max
 
-       The  argument  values of <STRONG>setf</STRONG>/<STRONG>setb</STRONG> historically correspond
+       The argument values of <STRONG>setf</STRONG>/<STRONG>setb</STRONG>  historically  correspond
        to a different mapping, i.e.,
+
              <STRONG>Color</STRONG>       <STRONG>#define</STRONG>       <STRONG>Value</STRONG>       <STRONG>RGB</STRONG>
              black     <STRONG>COLOR_BLACK</STRONG>       0     0, 0, 0
+
              blue      <STRONG>COLOR_BLUE</STRONG>        1     0,0,max
              green     <STRONG>COLOR_GREEN</STRONG>       2     0,max,0
              cyan      <STRONG>COLOR_CYAN</STRONG>        3     0,max,max
@@ -1937,38 +1982,38 @@
              yellow    <STRONG>COLOR_YELLOW</STRONG>      6     max,max,0
              white     <STRONG>COLOR_WHITE</STRONG>       7     max,max,max
        It is important to not confuse the two sets of color capa-
-       bilities;  otherwise  red/blue will be interchanged on the
+       bilities; otherwise red/blue will be interchanged  on  the
        display.
 
-       On an HP-like terminal, use <STRONG>scp</STRONG> with a  color-pair  number
+       On  an  HP-like terminal, use <STRONG>scp</STRONG> with a color-pair number
        parameter to set which color pair is current.
 
-       On  a  Tektronix-like  terminal, the capability <STRONG>ccc</STRONG> may be
-       present to indicate that colors can be modified.   If  so,
+       On a Tektronix-like terminal, the capability  <STRONG>ccc</STRONG>  may  be
+       present  to  indicate that colors can be modified.  If so,
        the <STRONG>initc</STRONG> capability will take a color number (0 to <STRONG>colors</STRONG>
-       - 1)and three more parameters which  describe  the  color.
+       -  1)and  three  more parameters which describe the color.
        These three parameters default to being interpreted as RGB
-       (Red, Green, Blue) values.  If the boolean capability  <STRONG>hls</STRONG>
+       (Red,  Green, Blue) values.  If the boolean capability <STRONG>hls</STRONG>
        is present, they are instead as HLS (Hue, Lightness, Satu-
        ration) indices.  The ranges are terminal-dependent.
 
-       On an HP-like terminal, <STRONG>initp</STRONG> may give  a  capability  for
-       changing  a  color-pair value.  It will take seven parame-
-       ters; a color-pair number (0 to <STRONG>max_pairs</STRONG> -  1),  and  two
-       triples  describing  first  background and then foreground
-       colors.  These parameters must be (Red,  Green,  Blue)  or
+       On  an  HP-like  terminal, <STRONG>initp</STRONG> may give a capability for
+       changing a color-pair value.  It will take  seven  parame-
+       ters;  a  color-pair  number (0 to <STRONG>max_pairs</STRONG> - 1), and two
+       triples describing first background  and  then  foreground
+       colors.   These  parameters  must be (Red, Green, Blue) or
        (Hue, Lightness, Saturation) depending on <STRONG>hls</STRONG>.
 
-       On  some  color terminals, colors collide with highlights.
+       On some color terminals, colors collide  with  highlights.
        You can register these collisions with the <STRONG>ncv</STRONG> capability.
-       This  is a bit-mask of attributes not to be used when col-
-       ors are enabled.  The correspondence with  the  attributes
+       This is a bit-mask of attributes not to be used when  col-
+       ors  are  enabled.  The correspondence with the attributes
        understood by <STRONG>curses</STRONG> is as follows:
 
+
                       <STRONG>Attribute</STRONG>      <STRONG>Bit</STRONG>   <STRONG>Decimal</STRONG>
                       A_STANDOUT     0     1
                       A_UNDERLINE    1     2
-
                       A_REVERSE      2     4
                       A_BLINK        3     8
                       A_DIM          4     16
@@ -1977,298 +2022,299 @@
                       A_PROTECT      7     128
                       A_ALTCHARSET   8     256
 
-       For  example,  on  many  IBM  PC  consoles,  the underline
-       attribute collides with the foreground color blue  and  is
-       not  available  in  color  mode.  These should have an <STRONG>ncv</STRONG>
+       For example,  on  many  IBM  PC  consoles,  the  underline
+       attribute  collides  with the foreground color blue and is
+       not available in color mode.  These  should  have  an  <STRONG>ncv</STRONG>
        capability of 2.
 
-       SVr4 curses does nothing with <STRONG>ncv</STRONG>, ncurses  recognizes  it
+       SVr4  curses  does nothing with <STRONG>ncv</STRONG>, ncurses recognizes it
        and optimizes the output in favor of colors.
 
 
    <STRONG>Miscellaneous</STRONG>
-       If  the terminal requires other than a null (zero) charac-
-       ter as a pad, then this can be given  as  pad.   Only  the
-       first  character of the pad string is used.  If the termi-
+       If the terminal requires other than a null (zero)  charac-
+       ter  as  a  pad,  then this can be given as pad.  Only the
+       first character of the pad string is used.  If the  termi-
        nal does not have a pad character, specify npc.  Note that
-       ncurses  implements  the  termcap-compatible  <STRONG>PC</STRONG> variable;
-       though the application may set  this  value  to  something
-       other  than  a  null,  ncurses will test <STRONG>npc</STRONG> first and use
+       ncurses implements  the  termcap-compatible  <STRONG>PC</STRONG>  variable;
+       though  the  application  may  set this value to something
+       other than a null, ncurses will test  <STRONG>npc</STRONG>  first  and  use
        napms if the terminal has no pad character.
 
-       If the terminal can move up or down half a line, this  can
-       be  indicated  with  <STRONG>hu</STRONG>  (half-line  up) and <STRONG>hd</STRONG> (half-line
+       If  the terminal can move up or down half a line, this can
+       be indicated with <STRONG>hu</STRONG>  (half-line  up)  and  <STRONG>hd</STRONG>  (half-line
        down).  This is primarily useful for superscripts and sub-
-       scripts  on  hard-copy terminals.  If a hard-copy terminal
-       can eject to the next page (form feed), give  this  as  <STRONG>ff</STRONG>
+       scripts on hard-copy terminals.  If a  hard-copy  terminal
+       can  eject  to  the next page (form feed), give this as <STRONG>ff</STRONG>
        (usually control L).
 
-       If  there is a command to repeat a given character a given
-       number of times (to save time transmitting a large  number
-       of  identical  characters)  this can be indicated with the
-       parameterized string <STRONG>rep</STRONG>.   The  first  parameter  is  the
-       character  to  be repeated and the second is the number of
-       times to repeat it.  Thus, tparm(repeat_char, 'x', 10)  is
+       If there is a command to repeat a given character a  given
+       number  of times (to save time transmitting a large number
+       of identical characters) this can be  indicated  with  the
+       parameterized  string  <STRONG>rep</STRONG>.   The  first  parameter is the
+       character to be repeated and the second is the  number  of
+       times  to repeat it.  Thus, tparm(repeat_char, 'x', 10) is
        the same as `xxxxxxxxxx'.
 
-       If  the terminal has a settable command character, such as
-       the TEKTRONIX 4025, this can be indicated with  <STRONG>cmdch</STRONG>.   A
+       If the terminal has a settable command character, such  as
+       the  TEKTRONIX  4025, this can be indicated with <STRONG>cmdch</STRONG>.  A
        prototype command character is chosen which is used in all
-       capabilities.  This character is given in the <STRONG>cmdch</STRONG>  capa-
-       bility  to  identify it.  The following convention is sup-
-       ported on some UNIX systems:  The  environment  is  to  be
-       searched  for a <STRONG>CC</STRONG> variable, and if found, all occurrences
+       capabilities.   This character is given in the <STRONG>cmdch</STRONG> capa-
+       bility to identify it.  The following convention  is  sup-
+       ported  on  some  UNIX  systems:  The environment is to be
+       searched for a <STRONG>CC</STRONG> variable, and if found, all  occurrences
        of the prototype character are replaced with the character
        in the environment variable.
 
-       Terminal  descriptions  that  do  not represent a specific
+       Terminal descriptions that do  not  represent  a  specific
        kind of known terminal, such as <EM>switch</EM>, <EM>dialup</EM>, <EM>patch</EM>, and
-       <EM>network</EM>,  should  include  the  <STRONG>gn</STRONG> (generic) capability so
-       that programs can complain that they do not  know  how  to
-       talk  to the terminal.  (This capability does not apply to
-       <EM>virtual</EM>  terminal  descriptions  for  which   the   escape
+       <EM>network</EM>, should include the  <STRONG>gn</STRONG>  (generic)  capability  so
+       that  programs  can  complain that they do not know how to
+       talk to the terminal.  (This capability does not apply  to
+       <EM>virtual</EM>   terminal   descriptions  for  which  the  escape
        sequences are known.)
 
-       If  the  terminal has a ``meta key'' which acts as a shift
-       key, setting the 8th bit  of  any  character  transmitted,
-       this  fact  can be indicated with <STRONG>km</STRONG>.  Otherwise, software
+       If the terminal has a ``meta key'' which acts as  a  shift
+       key,  setting  the  8th  bit of any character transmitted,
+       this fact can be indicated with <STRONG>km</STRONG>.   Otherwise,  software
        will assume that the 8th bit is parity and it will usually
-       be  cleared.   If strings exist to turn this ``meta mode''
+       be cleared.  If strings exist to turn this  ``meta  mode''
        on and off, they can be given as <STRONG>smm</STRONG> and <STRONG>rmm</STRONG>.
 
-       If the terminal has more lines of memory than will fit  on
-       the  screen  at once, the number of lines of memory can be
-       indicated with <STRONG>lm</STRONG>.  A value of  <STRONG>lm</STRONG>#0  indicates  that  the
+       If  the terminal has more lines of memory than will fit on
+       the screen at once, the number of lines of memory  can  be
+       indicated  with  <STRONG>lm</STRONG>.   A  value of <STRONG>lm</STRONG>#0 indicates that the
        number of lines is not fixed, but that there is still more
        memory than fits on the screen.
 
        If the terminal is one of those supported by the UNIX vir-
-       tual  terminal  protocol, the terminal number can be given
+       tual terminal protocol, the terminal number can  be  given
        as <STRONG>vt</STRONG>.
 
        Media copy strings which control an auxiliary printer con-
        nected to the terminal can be given as <STRONG>mc0</STRONG>: print the con-
-       tents of the screen, <STRONG>mc4</STRONG>: turn off the printer,  and  <STRONG>mc5</STRONG>:
-       turn  on  the  printer.   When the printer is on, all text
-       sent to the terminal will be sent to the printer.   It  is
+       tents  of  the screen, <STRONG>mc4</STRONG>: turn off the printer, and <STRONG>mc5</STRONG>:
+       turn on the printer.  When the printer  is  on,  all  text
+       sent  to  the terminal will be sent to the printer.  It is
        undefined whether the text is also displayed on the termi-
        nal screen when the printer is on.  A variation <STRONG>mc5p</STRONG> takes
        one parameter, and leaves the printer on for as many char-
-       acters as the value  of  the  parameter,  then  turns  the
-       printer  off.   The  parameter should not exceed 255.  All
+       acters  as  the  value  of  the  parameter, then turns the
+       printer off.  The parameter should not  exceed  255.   All
        text,  including  <STRONG>mc4</STRONG>,  is  transparently  passed  to  the
        printer while an <STRONG>mc5p</STRONG> is in effect.
 
 
    <STRONG>Glitches</STRONG> <STRONG>and</STRONG> <STRONG>Braindamage</STRONG>
-       Hazeltine  terminals, which do not allow `~' characters to
+       Hazeltine terminals, which do not allow `~' characters  to
        be displayed should indicate <STRONG>hz</STRONG>.
 
        Terminals which ignore a line-feed immediately after an <STRONG>am</STRONG>
        wrap, such as the Concept and vt100, should indicate <STRONG>xenl</STRONG>.
 
-       If <STRONG>el</STRONG> is required to  get  rid  of  standout  (instead  of
-       merely  writing  normal  text on top of it), <STRONG>xhp</STRONG> should be
+       If  <STRONG>el</STRONG>  is  required  to  get  rid of standout (instead of
+       merely writing normal text on top of it),  <STRONG>xhp</STRONG>  should  be
        given.
 
-       Teleray terminals, where tabs turn  all  characters  moved
-       over  to  blanks,  should  indicate <STRONG>xt</STRONG> (destructive tabs).
-       Note:   the    variable    indicating    this    is    now
-       `dest_tabs_magic_smso';  in  older  versions,  it was tel-
+       Teleray  terminals,  where  tabs turn all characters moved
+       over to blanks, should  indicate  <STRONG>xt</STRONG>  (destructive  tabs).
+       Note:    the    variable    indicating    this    is   now
+       `dest_tabs_magic_smso'; in older  versions,  it  was  tel-
        eray_glitch.  This glitch is also taken to mean that it is
-       not  possible  to  position the cursor on top of a ``magic
+       not possible to position the cursor on top  of  a  ``magic
        cookie'', that to erase standout mode it is instead neces-
        sary to use delete and insert line.  The ncurses implemen-
        tation ignores this glitch.
 
-       The Beehive Superbee, which is unable to correctly  trans-
-       mit  the escape or control C characters, has <STRONG>xsb</STRONG>, indicat-
-       ing that the f1 key is used for escape and f2 for  control
-       C.   (Only  certain Superbees have this problem, depending
-       on the ROM.)  Note that in older terminfo  versions,  this
-       capability   was   called   `beehive_glitch';  it  is  now
+       The  Beehive Superbee, which is unable to correctly trans-
+       mit the escape or control C characters, has <STRONG>xsb</STRONG>,  indicat-
+       ing  that the f1 key is used for escape and f2 for control
+       C.  (Only certain Superbees have this  problem,  depending
+       on  the  ROM.)  Note that in older terminfo versions, this
+       capability  was  called  `beehive_glitch';   it   is   now
        `no_esc_ctl_c'.
 
-       Other specific  terminal  problems  may  be  corrected  by
+       Other  specific  terminal  problems  may  be  corrected by
        adding more capabilities of the form <STRONG>x</STRONG><EM>x</EM>.
 
 
    <STRONG>Similar</STRONG> <STRONG>Terminals</STRONG>
        If there are two very similar terminals, one (the variant)
-       can be defined as being just like  the  other  (the  base)
-       with  certain  exceptions.  In the definition of the vari-
-       ant, the string capability <STRONG>use</STRONG> can be given with the  name
-       of  the  base terminal.  The capabilities given before <STRONG>use</STRONG>
-       override those in the base type named by  <STRONG>use</STRONG>.   If  there
-       are  multiple <STRONG>use</STRONG> capabilities, they are merged in reverse
-       order.  That is, the rightmost <STRONG>use</STRONG> reference is  processed
-       first,  then the one to its left, and so forth.  Capabili-
-       ties given explicitly in the entry override those  brought
+       can  be  defined  as  being just like the other (the base)
+       with certain exceptions.  In the definition of  the  vari-
+       ant,  the string capability <STRONG>use</STRONG> can be given with the name
+       of the base terminal.  The capabilities given  before  <STRONG>use</STRONG>
+       override  those  in  the base type named by <STRONG>use</STRONG>.  If there
+       are multiple <STRONG>use</STRONG> capabilities, they are merged in  reverse
+       order.   That is, the rightmost <STRONG>use</STRONG> reference is processed
+       first, then the one to its left, and so forth.   Capabili-
+       ties  given explicitly in the entry override those brought
        in by <STRONG>use</STRONG> references.
 
        A capability can be canceled by placing <STRONG>xx@</STRONG> to the left of
-       the use reference that imports it, where <EM>xx</EM> is  the  capa-
+       the  use  reference that imports it, where <EM>xx</EM> is the capa-
        bility.  For example, the entry
 
                    2621-nl, smkx@, rmkx@, use=2621,
 
-       defines  a  2621-nl  that  does  not have the <STRONG>smkx</STRONG> or <STRONG>rmkx</STRONG>
-       capabilities, and hence does not turn on the function  key
-       labels  when in visual mode.  This is useful for different
+       defines a 2621-nl that does not  have  the  <STRONG>smkx</STRONG>  or  <STRONG>rmkx</STRONG>
+       capabilities,  and hence does not turn on the function key
+       labels when in visual mode.  This is useful for  different
        modes for a terminal, or for different user preferences.
 
 
    <STRONG>Pitfalls</STRONG> <STRONG>of</STRONG> <STRONG>Long</STRONG> <STRONG>Entries</STRONG>
-       Long terminfo entries are unlikely to  be  a  problem;  to
-       date,  no  entry has even approached terminfo's 4K string-
-       table maximum.  Unfortunately,  the  termcap  translations
-       are  much  more  strictly  limited  (to  1K), thus termcap
-       translations of long terminfo entries can cause  problems.
-
-       The  man  pages for 4.3BSD and older versions of tgetent()
-       instruct the user to allocate a 1K buffer for the  termcap
-       entry.   The  entry  gets  null-terminated  by the termcap
-       library, so that makes the maximum safe length for a term-
-       cap entry 1k-1 (1023) bytes.  Depending on what the appli-
-       cation and the termcap library being used does, and  where
-       in  the  termcap  file the terminal type that tgetent() is
-       searching for is, several bad things can happen.
-
-       Some termcap libraries print a warning message or exit  if
-       they  find  an entry that's longer than 1023 bytes; others
-       don't; others truncate the entries to  1023  bytes.   Some
+       Long  terminfo  entries  are  unlikely to be a problem; to
+       date, no entry has even  approached  terminfo's  4096-byte
+       string-table maximum.  Unfortunately, the termcap transla-
+       tions are much more strictly limited (to 1023 bytes), thus
+       termcap  translations  of  long terminfo entries can cause
+       problems.
+
+       The man pages for 4.3BSD and older versions  of  <STRONG>tgetent()</STRONG>
+       instruct  the  user to allocate a 1024-byte buffer for the
+       termcap entry.  The  entry  gets  null-terminated  by  the
+       termcap library, so that makes the maximum safe length for
+       a termcap entry 1k-1 (1023) bytes.  Depending on what  the
+       application  and  the termcap library being used does, and
+       where in the termcap file the terminal type that <STRONG>tgetent()</STRONG>
+       is searching for is, several bad things can happen.
+
+       Some  termcap libraries print a warning message or exit if
+       they find an entry that's longer than 1023  bytes;  others
+       don't;  others  truncate  the entries to 1023 bytes.  Some
        application programs allocate more than the recommended 1K
        for the termcap entry; others don't.
 
        Each termcap entry has two important sizes associated with
        it: before "tc" expansion, and after "tc" expansion.  "tc"
-       is the capability that tacks on another termcap  entry  to
-       the  end  of  the current one, to add on its capabilities.
-       If a termcap entry doesn't use the "tc"  capability,  then
+       is  the  capability that tacks on another termcap entry to
+       the end of the current one, to add  on  its  capabilities.
+       If  a  termcap entry doesn't use the "tc" capability, then
        of course the two lengths are the same.
 
-       The  "before  tc  expansion"  length is the most important
-       one, because it affects more than just users of that  par-
-       ticular  terminal.   This is the length of the entry as it
+       The "before tc expansion" length  is  the  most  important
+       one,  because it affects more than just users of that par-
+       ticular terminal.  This is the length of the entry  as  it
        exists in /etc/termcap, minus the backslash-newline pairs,
-       which tgetent() strips out while reading it.  Some termcap
-       libraries strip off the final newline,  too  (GNU  termcap
+       which <STRONG>tgetent()</STRONG> strips out while reading it.  Some termcap
+       libraries  strip  off  the final newline, too (GNU termcap
        does not).  Now suppose:
 
-       *    a  termcap  entry  before expansion is more than 1023
+       *    a termcap entry before expansion is  more  than  1023
             bytes long,
 
        *    and the application has only allocated a 1k buffer,
 
-       *    and the termcap library (like the one in  BSD/OS  1.1
-            and  GNU)  reads  the whole entry into the buffer, no
-            matter what its length, to see if it's the  entry  it
+       *    and  the  termcap library (like the one in BSD/OS 1.1
+            and GNU) reads the whole entry into  the  buffer,  no
+            matter  what  its length, to see if it's the entry it
             wants,
 
-       *    and  tgetent()  is searching for a terminal type that
+       *    and <STRONG>tgetent()</STRONG> is searching for a terminal  type  that
             either is the long entry, appears in the termcap file
-            after  the  long entry, or doesn't appear in the file
-            at all (so that tgetent() has  to  search  the  whole
+            after the long entry, or doesn't appear in  the  file
+            at  all  (so  that  <STRONG>tgetent()</STRONG> has to search the whole
             termcap file).
 
-       Then  tgetent()  will overwrite memory, perhaps its stack,
-       and probably core dump the program.  Programs like  telnet
-       are  particularly  vulnerable;  modern  telnets pass along
-       values like the terminal type automatically.  The  results
-       are  almost  as  undesirable  with a termcap library, like
-       SunOS 4.1.3 and Ultrix 4.4, that prints  warning  messages
-       when  it reads an overly long termcap entry.  If a termcap
-       library truncates long entries,  like  OSF/1  3.0,  it  is
-       immune  to  dying  here but will return incorrect data for
+       Then <STRONG>tgetent()</STRONG> will overwrite memory, perhaps  its  stack,
+       and  probably core dump the program.  Programs like telnet
+       are particularly vulnerable;  modern  telnets  pass  along
+       values  like the terminal type automatically.  The results
+       are almost as undesirable with  a  termcap  library,  like
+       SunOS  4.1.3  and Ultrix 4.4, that prints warning messages
+       when it reads an overly long termcap entry.  If a  termcap
+       library  truncates  long  entries,  like  OSF/1 3.0, it is
+       immune to dying here but will return  incorrect  data  for
        the terminal.
 
        The "after tc expansion" length will have a similar effect
        to the above, but only for people who actually set TERM to
-       that terminal type, since tgetent() only does "tc"  expan-
+       that  terminal type, since <STRONG>tgetent()</STRONG> only does "tc" expan-
        sion once it's found the terminal type it was looking for,
        not while searching.
 
        In summary, a termcap entry that is longer than 1023 bytes
-       can  cause,  on  various combinations of termcap libraries
-       and applications, a  core  dump,  warnings,  or  incorrect
-       operation.   If  it's too long even before "tc" expansion,
+       can cause, on various combinations  of  termcap  libraries
+       and  applications,  a  core  dump,  warnings, or incorrect
+       operation.  If it's too long even before  "tc"  expansion,
        it will have this effect even for users of some other ter-
-       minal  types and users whose TERM variable does not have a
+       minal types and users whose TERM variable does not have  a
        termcap entry.
 
        When in -C (translate to termcap) mode, the <STRONG>ncurses</STRONG> imple-
-       mentation  of <STRONG><A HREF="tic.1.html">tic(1)</A></STRONG> issues warning messages when the pre-
-       tc length of a termcap translation is too  long.   The  -c
-       (check)  option  also checks resolved (after tc expansion)
+       mentation of <STRONG><A HREF="tic.1.html">tic(1)</A></STRONG> issues warning messages when the  pre-
+       tc  length  of  a termcap translation is too long.  The -c
+       (check) option also checks resolved (after  tc  expansion)
        lengths.
 
    <STRONG>Binary</STRONG> <STRONG>Compatibility</STRONG>
-       It is not wise to count on portability of binary  terminfo
-       entries  between commercial UNIX versions.  The problem is
-       that there are at least two versions  of  terminfo  (under
+       It  is not wise to count on portability of binary terminfo
+       entries between commercial UNIX versions.  The problem  is
+       that  there  are  at least two versions of terminfo (under
        HP-UX and AIX) which diverged from System V terminfo after
-       SVr1, and have added extension capabilities to the  string
-       table  that  (in  the binary format) collide with System V
+       SVr1,  and have added extension capabilities to the string
+       table that (in the binary format) collide  with  System  V
        and XSI Curses extensions.
 
 
 </PRE>
 <H2>EXTENSIONS</H2><PRE>
-       Some SVr4 <STRONG>curses</STRONG>  implementations,  and  all  previous  to
+       Some  SVr4  <STRONG>curses</STRONG>  implementations,  and  all previous to
        SVr4, don't interpret the %A and %O operators in parameter
        strings.
 
-       SVr4/XPG4 do not specify whether  <STRONG>msgr</STRONG>  licenses  movement
-       while  in an alternate-character-set mode (such modes may,
+       SVr4/XPG4  do  not  specify whether <STRONG>msgr</STRONG> licenses movement
+       while in an alternate-character-set mode (such modes  may,
        among other things, map CR and NL to characters that don't
-       trigger   local   motions).   The  <STRONG>ncurses</STRONG>  implementation
-       ignores <STRONG>msgr</STRONG> in <STRONG>ALTCHARSET</STRONG> mode.  This raises  the  possi-
-       bility  that  an  XPG4  implementation making the opposite
-       interpretation may need terminfo entries made for  <STRONG>ncurses</STRONG>
+       trigger  local  motions).   The   <STRONG>ncurses</STRONG>   implementation
+       ignores  <STRONG>msgr</STRONG>  in <STRONG>ALTCHARSET</STRONG> mode.  This raises the possi-
+       bility that an XPG4  implementation  making  the  opposite
+       interpretation  may need terminfo entries made for <STRONG>ncurses</STRONG>
        to have <STRONG>msgr</STRONG> turned off.
 
-       The  <STRONG>ncurses</STRONG>  library handles insert-character and insert-
+       The <STRONG>ncurses</STRONG> library handles insert-character  and  insert-
        character modes in a slightly non-standard way to get bet-
-       ter  update  efficiency.   See the <STRONG>Insert/Delete</STRONG> <STRONG>Character</STRONG>
+       ter update efficiency.  See  the  <STRONG>Insert/Delete</STRONG>  <STRONG>Character</STRONG>
        subsection above.
 
-       The  parameter  substitutions  for  <STRONG>set_clock</STRONG>   and   <STRONG>dis-</STRONG>
-       <STRONG>play_clock</STRONG>  are  not  documented in SVr4 or the XSI Curses
+       The   parameter   substitutions  for  <STRONG>set_clock</STRONG>  and  <STRONG>dis-</STRONG>
+       <STRONG>play_clock</STRONG> are not documented in SVr4 or  the  XSI  Curses
        standard.  They are deduced from the documentation for the
        AT&amp;T 505 terminal.
 
-       Be  careful  assigning  the <STRONG>kmous</STRONG> capability.  The <STRONG>ncurses</STRONG>
-       wants to interpret it as <STRONG>KEY_MOUSE</STRONG>, for use  by  terminals
-       and  emulators  like  xterm that can return mouse-tracking
+       Be careful assigning the <STRONG>kmous</STRONG>  capability.   The  <STRONG>ncurses</STRONG>
+       wants  to  interpret it as <STRONG>KEY_MOUSE</STRONG>, for use by terminals
+       and emulators like xterm that  can  return  mouse-tracking
        information in the keyboard-input stream.
 
-       Different commercial ports of terminfo and curses  support
-       different  subsets of the XSI Curses standard and (in some
+       Different  commercial ports of terminfo and curses support
+       different subsets of the XSI Curses standard and (in  some
        cases) different extension sets.  Here is a summary, accu-
        rate as of October 1995:
 
        <STRONG>SVR4,</STRONG> <STRONG>Solaris,</STRONG> <STRONG>ncurses</STRONG> -- These support all SVr4 capabili-
        ties.
 
-       <STRONG>SGI</STRONG> --  Supports  the  SVr4  set,  adds  one  undocumented
+       <STRONG>SGI</STRONG>  --  Supports  the  SVr4  set,  adds  one undocumented
        extended string capability (<STRONG>set_pglen</STRONG>).
 
-       <STRONG>SVr1,</STRONG>  <STRONG>Ultrix</STRONG> -- These support a restricted subset of ter-
-       minfo capabilities.  The booleans end with  <STRONG>xon_xoff</STRONG>;  the
-       numerics  with  <STRONG>width_status_line</STRONG>;  and  the  strings with
+       <STRONG>SVr1,</STRONG> <STRONG>Ultrix</STRONG> -- These support a restricted subset of  ter-
+       minfo  capabilities.   The booleans end with <STRONG>xon_xoff</STRONG>; the
+       numerics with  <STRONG>width_status_line</STRONG>;  and  the  strings  with
        <STRONG>prtr_non</STRONG>.
 
-       <STRONG>HP/UX</STRONG> -- Supports  the  SVr1  subset,  plus  the  SVr[234]
+       <STRONG>HP/UX</STRONG>  --  Supports  the  SVr1  subset,  plus the SVr[234]
        numerics <STRONG>num_labels</STRONG>, <STRONG>label_height</STRONG>, <STRONG>label_width</STRONG>, plus func-
-       tion keys 11 through 63,  plus  <STRONG>plab_norm</STRONG>,  <STRONG>label_on</STRONG>,  and
+       tion  keys  11  through  63, plus <STRONG>plab_norm</STRONG>, <STRONG>label_on</STRONG>, and
        <STRONG>label_off</STRONG>, plus some incompatible extensions in the string
        table.
 
-       <STRONG>AIX</STRONG> -- Supports the SVr1 subset,  plus  function  keys  11
-       through  63,  plus  a  number of incompatible string table
+       <STRONG>AIX</STRONG>  --  Supports  the  SVr1 subset, plus function keys 11
+       through 63, plus a number  of  incompatible  string  table
        extensions.
 
-       <STRONG>OSF</STRONG> -- Supports both the SVr4 set and the AIX  extensions.
+       <STRONG>OSF</STRONG>  -- Supports both the SVr4 set and the AIX extensions.
 
 
 </PRE>
@@ -2279,17 +2325,17 @@
 
 </PRE>
 <H2>SEE ALSO</H2><PRE>
-       <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="printf.3S.html">printf(3S)</A></STRONG>, <STRONG><A HREF="term.5.html">term(5)</A></STRONG>.
+       <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>, <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="printf.3S.html">printf(3S)</A></STRONG>, <STRONG><A HREF="term.5.html">term(5)</A></STRONG>.
 
 
 </PRE>
 <H2>AUTHORS</H2><PRE>
-       Zeyd M. Ben-Halim, Eric  S.  Raymond,  Thomas  E.  Dickey.
+       Zeyd  M.  Ben-Halim,  Eric  S.  Raymond, Thomas E. Dickey.
        Based on pcurses by Pavel Curtis.
 
 
 
-                                                      <STRONG><A HREF="TERMINFO.5.html">TERMINFO(5)</A></STRONG>
+                                                            <STRONG><A HREF="TERMINFO.5.html">TERMINFO(5)</A></STRONG>
 </PRE>
 <HR>
 <ADDRESS>
diff -Naur ncurses-5.4.orig/doc/html/man/tic.1m.html ncurses-5.4/doc/html/man/tic.1m.html
--- ncurses-5.4.orig/doc/html/man/tic.1m.html	2003-10-25 17:40:00.000000000 +0000
+++ ncurses-5.4/doc/html/man/tic.1m.html	2005-05-13 04:09:59.000000000 +0000
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
 <!-- 
   ****************************************************************************
-  * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc.              *
+  * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc.              *
   *                                                                          *
   * Permission is hereby granted, free of charge, to any person obtaining a  *
   * copy of this software and associated documentation files (the            *
@@ -27,7 +27,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: tic.1m,v 1.35 2003/05/11 00:32:53 tom Exp @
+  * @Id: tic.1m,v 1.38 2005/04/30 19:39:28 tom Exp @
 -->
 <HTML>
 <HEAD>
@@ -40,7 +40,7 @@
 <HR>
 <PRE>
 <!-- Manpage converted by man2html 3.0.1 -->
-<STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>                                                   <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>
+<STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>                                                         <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>
 
 
 
@@ -86,7 +86,9 @@
               rather than discarding them.  Capabilities are com-
               mented by prefixing them with a period.  This  sets
               the  <STRONG>-x</STRONG> option, because it treats the commented-out
-              entries as user-defined names.
+              entries as user-defined names.  If  the  source  is
+              termcap,  accept  the 2-character names required by
+              version 6.  Otherwise these are ignored.
 
        <STRONG>-C</STRONG>     Force source translation to termcap format.   Note:
               this  differs  from the <STRONG>-C</STRONG> option of <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG> in
@@ -111,8 